Is it a Bug in Java XML JAXP?!

i have a sample XML file
==========================
<?xml version='1.0' encoding='utf-8'?>
<aaa>
     <bbb>
          <ccc>
               Hi All
          </ccc>
     </bbb>
</aaa>
<?execute.somecde?>
When transofrming the DOMSource to XML StreamResult by using:
1- DOMSource source = new DOMSource(document);
every thing goes OK and the output is tha same as the XML file.
2- DOMSource source = new DOMSource(node);//ccc node for example
the result is Same a the XML file, i think i should see this:
<?xml version='1.0' encoding='utf-8'?>
<ccc>
     Hi All
</ccc>
the Question is "am i right? or not?, shall i see the previous XML or not"
Here is the sample code i use if you want, it works fine with no error under
J2SE version 1.4.0 released on 17/02/2002, which contais latest XML parsers.
i made this code from "The JavaTM Web Services Tutorial"
page: <WSDP_HOME>/docs/tutorial/doc/JAXPXSLT3.html#64649
Topic: "Writing Out a Subtree of the DOM"
===============================================
import ...//all imports come here
public class DOM_1 {
public static void main (String args[]) {
DOM_1 handler = new DOM_1();
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
try {
DocumentBuilder builder = factory.newDocumentBuilder();
org.w3c.dom.Document document = builder.parse(new File("D:\\XML.xml"));
TransformerFactory tFactory = TransformerFactory.newInstance();
Transformer transformer = tFactory.newTransformer();
org.w3c.dom.NodeList list = document.getElementsByTagName("ccc");
org.w3c.dom.Node node = list.item(0);
DOMSource source = new DOMSource(document);
//DOMSource source = new DOMSource(node);
StreamResult result = new StreamResult(System.out);
//StreamResult result = new StreamResult(new FileOutputStream(new
File("D:\\XML_1.xml")));
transformer.transform(source, result);
} catch (Exception x) {
x.printStackTrace();
thanks alot.

I hope you test the code to see if this problem exists on your java platform or it is in my side only.

Similar Messages

  • Bug in oracle.xml.jaxp.JXTransformer??

    I get a NullPointerException using a stylesheet which referes to an invalid (non-existant) encoding.
    I tried this with xdk 9.20.40 and 9.20.50, both fail.
    I start the transformation using
    transformer.transform( <xml-streamsource>, <result-stream> ).
    <<<
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output encoding="ISO-8859-xx" method="text"/>
    </xsl:stylesheet>
    >>>
    I can see that exception handling is done by calling JXTransformer.reportXSLException.
    For some reason the implementation extracts a "xmlerror" from the thrown exception.
    <<<
    XMLError xmlerror = xslexception.getXMLError();
    >>>
    Next line of code failes with a NullPointerException, because xmlerror is null and therefore xmlerror.getLocator() must fail!!
    <<<
    DOMLocator domlocator = new DOMLocator(xmlerror.getLocator());
    >>>
    Any suggestions if this is a bug or what´s wrong here??

    What happening here is the following:
    When you run through the browser, the http request invokes the XSQL Servlet, the XSQL page template is found (typically in the cache if it's the 2nd or subsequent time you're asking for the page), and then the result is returned. Everything fine.
    When you run through the XSQLRequest class, you are providing a URL to the "raw" XSQL page of "http://foo/bar.xsql". The XSQL Page processor fetches what it's expecting to be the "raw" template XSQL page by retrieving the resource at the given URL. However, since the URL ends with *.xsql, the request for the *.xsql file does NOT return the raw XSQL page template that the XSQLRequest class is expecting, but instead the server processes the template on the server side and returns the result of processing the bar.xsql page to the XSQLRequest class. Since apparently your XSLT stylesheet if producing HTML, what the XSQLRequest class sees for the "raw" XSQL page template is actually the resulting HTML produced by the web server and since this is not wellformed XML, it gives this error.
    The solution, either provide the URL to the bar.xsql page as a file URL, or change the extension on the template page to any extension other than *.xsql so that the template won't get processed by the web server before its delivered.

  • ClassCastException: weblogic.xml.jaxp.WebLogicTransformerFactory

    I am running Weblogic 6.1 on a Solaris 7 machine.
    I have added the following runtime properties in my startWebLogic.sh to handle
    Weblogic 6.1
    transformation bugs.
    -Djavax.xml.parsers.DocumentBuilderFactory=weblogic.xml.jaxp.WebLogicDocumentBuilderFactory
    -Djavax.xml.transform.TransformerFactory=weblogic.xml.jaxp.WebLogicTransformerFactory
    -Djavax.xml.parsers.SAXParserFactory=weblogic.xml.jaxp.WebLogicSAXParserFactory
    After adding these parameters, my servlet (which is loaded on startup and creates
    a Transformer
    Template during its init function for future XSL transformations) was working
    fine.
    Now, however, I need to create an XML Registry in order to perform entity resolution.
    When I created an XML Registry and entered the above values in the Registry, my
    servlet now
    throws the following exception:
    java.lang.ClassCastException: weblogic.xml.jaxp.WebLogicTransformerFactory
    at weblogic.xml.jaxp.RegistrySAXTransformerFactory.<init>(RegistrySAXTransformerFactory.java:48)
    at java.lang.Class.newInstance0(Native Method)
    at java.lang.Class.newInstance(Class.java:237)
    at javax.xml.transform.TransformerFactory.newInstance(TransformerFactory.java:119)
    at com.nokia.imessage.AlertServlet.loadStylesheets(AlertServlet.java:549)
    at com.nokia.imessage.AlertServlet.init(AlertServlet.java:59)
    at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:698)
    at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:641)
    My XML Registry is the following:
    <XMLRegistry
    DocumentBuilderFactory="weblogic.xml.jaxp.WebLogicDocumentBuilderFactory"
    Name="MyXMLRegistry"
    SAXParserFactory="weblogic.xml.jaxp.WebLogicSAXParserFactory"
    TransformerFactory="weblogic.xml.jaxp.WebLogicTransformerFactory"
    WhenToCache="cache-on-reference">
    <XMLEntitySpecRegistryEntry EntityURI="dtds/pap_1.0.dtd"
    Name="XMLEntitySpecRegistryEntry-1000329224935"
    PublicId="-//WAPFORUM//DTD PAP 1.0//EN"
    SystemId="http://www.wapforum.org/DTD/pap_1.0.dtd" WhenToCache="cache-at-initialization"/>
    </XMLRegistry>
    Why do the runtime parameters work but the XML Registry (with the same information)
    don't?
    Am I doing something wrong or is there a solution/workaround for this problem?
    Thank you!
    Samantha

    Hello,
    I have the answer, thanks for BEAs customer support, there is a bug from WL
    6.1, and it should be fixed with sp2 (scheduled for the middle of December).
    So here is the answer from BEA:
    -----------------answer-from-Gareth Chapman--------------------
    When I tried the code you send I did not receive the ClassCastException but
    a ClassNotFoundException, I think the root problem could be the same though.
    There looks to be two parts of a bug that's stopping this code from working
    correctly:
    (CR 055082)
    To work around the ClassNotFoundException (hopefully in your case the
    ClassCastException) add this line of code before calling the
    XSLTProcessorFactory.getProcessor():
    System.setProperty("javax.xml.transform.TransformerFactory",
    "weblogic.apache.xalan.processor.TransformerFactoryImpl");
    Secondly I received the error:
    SystemId Unknown; Line 0; Column 0; SystemId Unknown; Line 0; Column 0;
    javax.xml.transform.TransformerException: SAX Exception
    Which looks to be part of the same bug, in order to fix this you will need
    to:
    Extract org/apache/xalan/res/XSLTInfo.properties from
    $WL_HOME/lib/weblogic.jar change the path to
    weblogic/apache/xalan/res/XSLTInfo.properties and then add it to
    $WL_HOME/lib/weblogic.jar
    Steps to do this:
    WL_HOME is the directory where weblogic is installed....e.g.
    e:\bea6.1\wlserver6.1
    1) Make a backup copy of %WL_HOME%\lib\weblogic.jar
    2) jar xvf %WL_HOME%\lib\weblogic.jar
    org/apache/xalan/res/XSLTInfo.properties
    3) move org weblogic
    4) jar uvf %WL_HOME%\lib\weblogic.jar weblogic
    -----------------answer-from-Gareth Chapman--------------------
    My case the path of XSLTInfo.properties was correct, so I did not have to
    make any chances from it.
    "Slava Imeshev" <[email protected]> wrote in message
    news:[email protected]...
    Hi Jouni,
    Could you post full text of the exception here?It is (was) the full Exception!
    Regards,
    Slava Imeshev
    "Jouni Koistinen" <[email protected]> wrote in message
    news:[email protected]...
    I have (allmost) same problem.
    I get exception from XSLTProcessor.process() when running code above:
    java.lang.ClassCastException:
    weblogic.xml.jaxp.RegistrySAXTransformerFactory
    My code works fine when I use WL 6.0 sp2, but WL 6.1 sp1 gives that
    exception. If I let XSLTInputSource:s empty, WL 6.0 sp2 gives another
    exception: weblogic.apache.xalan.xslt.XSLProcessorException: File "null"not
    found, but WL 6.1 sp1 gives still the same exception, so prosessor noteven
    try to found those files.
    If I put xalan.jar (version 2.0.1) to my CLASSPATH and then run class
    like
    Samantha, then it works fine, but without xalan.jar, even if I run itlike
    this, its not working:
    java -Djavax.xml.parsers.DocumentBuilderFactory=weblogic.xml.jaxp.WebLogicDo
    >>
    >
    cumentBuilderFactory -Djavax.xml.transform.TransformerFactory=weblogic.xml.j
    >>
    >
    axp.WebLogicTransformerFactory -Djavax.xml.parsers.SAXParserFactory=weblogic
    .xml.jaxp.WebLogicSAXParserFactory xalanTest
    We are going to update our servers to 6.1sp1 from 6.0sp2, but I need toget
    system working first, I have not tested this yet from servlet but I
    think
    its working just like from console.
    What can I do with this?
    xalanTest.java:
    import weblogic.apache.xalan.xslt.XSLTProcessorFactory;
    import weblogic.apache.xalan.xslt.XSLTInputSource;
    import weblogic.apache.xalan.xslt.XSLTResultTarget;
    import weblogic.apache.xalan.xslt.XSLTProcessor;
    public class xalanTest {
    public static void main(String[] args) {
    try {
    XSLTProcessor processor = XSLTProcessorFactory.getProcessor();
    XSLTInputSource inXML = new XSLTInputSource("atom.xml");
    XSLTInputSource inXSL = new XSLTInputSource("atom.xsl");
    XSLTResultTarget out = new XSLTResultTarget(System.out);
    System.out.println("Start parsing ...\n");
    processor.process(inXML,inXSL,out);
    System.out.println("\n... Parsing ok");
    }catch (Exception e){
    System.out.println(e);
    atom.xml:
    <?xml version="1.0"?>
    <?xml-stylesheet type="text/xml" href="17-2.xsl"?>
    <PERIODIC_TABLE>
    <ATOM STATE="GAS">
    <NAME>Hydrogen</NAME>
    <SYMBOL>H</SYMBOL>
    </ATOM>
    </PERIODIC_TABLE>
    atom.xsl:
    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="PERIODIC_TABLE">
    <html>
    <xsl:apply-templates/>
    </html>
    </xsl:template>
    <xsl:template match="ATOM">
    <P>
    <xsl:apply-templates/>
    </P>
    </xsl:template>
    </xsl:stylesheet>
    Thanks
    -Jouni Koistinen-

  • SAX2 class weblogic.xml.jaxp.RegistryXMLReader does not imp. XMLReader

    Hey,
    I'm currently facing some issues while deploying a Spring Webservice on WebLogic 10.3. The Webservice requires a Xerces Sax2 Parser, but the default implementation of weblogic doesn't seem to implement all necessary classes. I already tried to set up a XMLRegistry, but without any success.
    I'm running the webservice on a server besides the AdminServer.
    h4.Configuration
    ####<30.11.2009 16.40 Uhr CET> <Info> <Management> <xsrv30> <Server-0> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1259595658807> <BEA-141187> <Java system properties are defined as follows:
    file.encoding = ISO-8859-1
    file.encoding.pkg = sun.io
    file.separator = /
    java.awt.graphicsenv = sun.awt.X11GraphicsEnvironment
    java.awt.printerjob = sun.print.PSPrinterJob
    java.class.path = /xcitec/bea/user_projects/domains/esourcing_base/lib/xercesImpl.jar:/xcitec/bea/patch_wlw1030/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/xcitec/bea/patch_wls1030/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/xcitec/bea/patch_cie660/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/xcitec/bea/jrockit_160_05/lib/tools.jar:/xcitec/bea/wlserver_10.3/server/lib/weblogic_sp.jar:/xcitec/bea/wlserver_10.3/server/lib/weblogic.jar:/xcitec/bea/modules/features/weblogic.server.modules_10.3.0.0.jar:/xcitec/bea/wlserver_10.3/server/lib/webservices.jar:/xcitec/bea/modules/org.apache.ant_1.6.5/lib/ant-all.jar:/xcitec/bea/modules/net.sf.antcontrib_1.0.0.0_1-0b2/lib/ant-contrib.jar::/xcitec/bea
    java.class.version = 50.0
    java.endorsed.dirs = /xcitec/bea/jrockit_160_05/jre/lib/endorsed
    java.ext.dirs = /xcitec/bea/jrockit_160_05/jre/lib/ext
    java.home = /xcitec/bea/jrockit_160_05/jre
    java.io.tmpdir = /tmp
    java.library.path = /xcitec/bea/jrockit_160_05/jre/lib/i386/jrockit:/xcitec/bea/jrockit_160_05/jre/lib/i386:/xcitec/bea/jrockit_160_05/jre/../lib/i386::/xcitec/bea/wlserver_10.3/server/native/linux/i686:/xcitec/bea/wlserver_10.3/server/native/linux/i686/oci920_8
    java.naming.factory.initial = weblogic.jndi.WLInitialContextFactory
    java.naming.factory.url.pkgs = weblogic.jndi.factories:weblogic.corba.j2ee.naming.url:weblogic.jndi.factories:weblogic.corba.j2ee.naming.url
    java.protocol.handler.pkgs = weblogic.utils|weblogic.utils|weblogic.utils|weblogic.net
    java.runtime.name = Java(TM) SE Runtime Environment
    java.runtime.version = 1.6.0_05-b13
    java.security.policy = /xcitec/bea/wlserver_10.3/server/lib/weblogic.policy
    java.specification.name = Java Platform API Specification
    java.specification.vendor = Sun Microsystems Inc.
    java.specification.version = 1.6
    java.vendor = BEA Systems, Inc.
    java.vendor.url = http://www.bea.com/
    java.vendor.url.bug = http://edocs.bea.com/jrockit/go2troubleshooting.html
    java.version = 1.6.0_05
    java.vm.info = compiled mode
    java.vm.name = BEA JRockit(R)
    java.vm.specification.name = Java Virtual Machine Specification
    java.vm.specification.vendor = Sun Microsystems Inc.
    java.vm.specification.version = 1.0
    java.vm.vendor = BEA Systems, Inc.
    java.vm.vendor.url = http://www.bea.com/
    java.vm.vendor.url.bug = http://edocs.bea.com/jrockit/go2troubleshooting.html
    java.vm.version = R27.6.0-50_o-100423-1.6.0_05-20080626-2104-linux-ia32
    javax.rmi.CORBA.PortableRemoteObjectClass = weblogic.iiop.PortableRemoteObjectDelegateImpl
    javax.rmi.CORBA.UtilClass = weblogic.iiop.UtilDelegateImpl
    javax.xml.rpc.ServiceFactory = weblogic.webservice.core.rpc.ServiceFactoryImpl
    javax.xml.soap.MessageFactory = weblogic.webservice.core.soap.MessageFactoryImpl
    org.omg.CORBA.ORBClass = weblogic.corba.orb.ORB
    org.omg.CORBA.ORBSingletonClass = weblogic.corba.orb.ORB
    org.xml.sax.driver = weblogic.xml.jaxp.RegistryXMLReader
    org.xml.sax.parser = weblogic.xml.jaxp.RegistryParser
    os.arch = i386
    os.name = Linux
    os.version = 2.6.22.19-0.3-bigsmp
    path.separator = :
    sun.arch.data.model = 32
    sun.boot.class.path = /xcitec/bea/jrockit_160_05/jre/lib/i386/jrockit/jrockit1.6.0.jar:/xcitec/bea/jrockit_160_05/jre/lib/i386/jrockit/jmapi.jar:/xcitec/bea/jrockit_160_05/jre/lib/i386/jrockit/jmxmapi.jar:/xcitec/bea/jrockit_160_05/jre/lib/i386/jrockit/rmp.jar:/xcitec/bea/jrockit_160_05/jre/lib/i386/jrockit/latency.jar:/xcitec/bea/jrockit_160_05/jre/lib/resources.jar:/xcitec/bea/jrockit_160_05/jre/lib/rt.jar:/xcitec/bea/jrockit_160_05/jre/lib/sunrsasign.jar:/xcitec/bea/jrockit_160_05/jre/lib/jsse.jar:/xcitec/bea/jrockit_160_05/jre/lib/jce.jar:/xcitec/bea/jrockit_160_05/jre/lib/charsets.jar:/xcitec/bea/jrockit_160_05/jre/classes
    sun.boot.library.path = /xcitec/bea/jrockit_160_05/jre/lib/i386
    sun.cpu.endian = little
    sun.io.unicode.encoding = UnicodeLittle
    sun.java.launcher = SUN_STANDARD
    sun.jnu.encoding = ISO-8859-1
    sun.management.compiler = BEA JRockit(R) Optimizing Compiler
    sun.os.patch.level = unknown
    user.country = DE
    user.dir = /xcitec/bea/user_projects/domains/esourcing_base
    user.home = /root
    user.language = de
    user.name = root
    user.timezone = Europe/Berlin
    vde.home = /xcitec/bea/user_projects/domains/esourcing_base/servers/Server-0/data/ldap
    weblogic.Name = Server-0
    weblogic.ReverseDNSAllowed = false
    weblogic.classloader.preprocessor = weblogic.diagnostics.instrumentation.DiagnosticClassPreProcessor
    weblogic.management.server = http://62.245.197.19:7001
    weblogic.nodemanager.ServiceEnabled = true
    weblogic.security.SSL.ignoreHostnameVerification = false
    weblogic.security.TrustKeyStore = DemoTrust
    weblogic.system.BootIdentityFile = /xcitec/bea/user_projects/domains/esourcing_base/servers/Server-0/data/nodemanager/boot.properties
    >
    h4.Exception
    ####<30.11.2009 16.42 Uhr CET> <Error> <HTTP> <xsrv30> <Server-0> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1259595729484> <BEA-101017> <[weblogic.servlet.internal.WebAppServletContext@10e2c0e - appName: 'srm', name: 'srm.war', context-path: '/xcitec', spec-version: 'null'] Root cause of ServletException.
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'endPointMappinng' defined in ServletContext resource [WEB-INF/spring-servlet.xml]: Cannot resolve reference to bean 'validatingInterceptor' while setting bean property 'interceptors' with key [2]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'validatingInterceptor' defined in ServletContext resource [WEB-INF/spring-servlet.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
    PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'xsdSchemaCollection' threw exception; nested exception is org.springframework.xml.validation.XmlValidationException: Could not create Schema: SAX2 driver class weblogic.xml.jaxp.RegistryXMLReader does not implement XMLReader; nested exception is java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl
         at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275)
         at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
         at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:287)
         at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:126)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
         at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
         at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
         at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
         at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
         at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
         at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
         at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:402)
         at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:316)
         at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:282)
         at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:126)
         at javax.servlet.GenericServlet.init(GenericServlet.java:241)
         at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)
         at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
         at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48)
         at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:521)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:235)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3495)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'validatingInterceptor' defined in ServletContext resource [WEB-INF/spring-servlet.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
    PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'xsdSchemaCollection' threw exception; nested exception is org.springframework.xml.validation.XmlValidationException: Could not create Schema: SAX2 driver class weblogic.xml.jaxp.RegistryXMLReader does not implement XMLReader; nested exception is java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1279)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
         at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
         at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
         at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
         at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)
         at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
         at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:287)
         at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:126)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
         at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
         at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
         at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
         at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
         at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
         at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
         at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:402)
         at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:316)
         at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:282)
         at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:126)
         at javax.servlet.GenericServlet.init(GenericServlet.java:241)
         at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)
         at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
         at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48)
         at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:521)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:235)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3495)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
    PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'xsdSchemaCollection' threw exception; nested exception is org.springframework.xml.validation.XmlValidationException: Could not create Schema: SAX2 driver class weblogic.xml.jaxp.RegistryXMLReader does not implement XMLReader; nested exception is java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl
         at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:104)
         at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:59)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1276)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
         at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
         at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
         at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
         at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)
         at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
         at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:287)
         at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:126)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
         at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
         at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
         at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
         at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
         at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
         at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
         at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:402)
         at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:316)
         at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:282)
         at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:126)
         at javax.servlet.GenericServlet.init(GenericServlet.java:241)
         at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)
         at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
         at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48)
         at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:521)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:235)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3495)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    >

    Hey,
    I'm currently facing some issues while deploying a Spring Webservice on WebLogic 10.3. The Webservice requires a Xerces Sax2 Parser, but the default implementation of weblogic doesn't seem to implement all necessary classes. I already tried to set up a XMLRegistry, but without any success.
    I'm running the webservice on a server besides the AdminServer.
    h4.Configuration
    ####<30.11.2009 16.40 Uhr CET> <Info> <Management> <xsrv30> <Server-0> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1259595658807> <BEA-141187> <Java system properties are defined as follows:
    file.encoding = ISO-8859-1
    file.encoding.pkg = sun.io
    file.separator = /
    java.awt.graphicsenv = sun.awt.X11GraphicsEnvironment
    java.awt.printerjob = sun.print.PSPrinterJob
    java.class.path = /xcitec/bea/user_projects/domains/esourcing_base/lib/xercesImpl.jar:/xcitec/bea/patch_wlw1030/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/xcitec/bea/patch_wls1030/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/xcitec/bea/patch_cie660/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/xcitec/bea/jrockit_160_05/lib/tools.jar:/xcitec/bea/wlserver_10.3/server/lib/weblogic_sp.jar:/xcitec/bea/wlserver_10.3/server/lib/weblogic.jar:/xcitec/bea/modules/features/weblogic.server.modules_10.3.0.0.jar:/xcitec/bea/wlserver_10.3/server/lib/webservices.jar:/xcitec/bea/modules/org.apache.ant_1.6.5/lib/ant-all.jar:/xcitec/bea/modules/net.sf.antcontrib_1.0.0.0_1-0b2/lib/ant-contrib.jar::/xcitec/bea
    java.class.version = 50.0
    java.endorsed.dirs = /xcitec/bea/jrockit_160_05/jre/lib/endorsed
    java.ext.dirs = /xcitec/bea/jrockit_160_05/jre/lib/ext
    java.home = /xcitec/bea/jrockit_160_05/jre
    java.io.tmpdir = /tmp
    java.library.path = /xcitec/bea/jrockit_160_05/jre/lib/i386/jrockit:/xcitec/bea/jrockit_160_05/jre/lib/i386:/xcitec/bea/jrockit_160_05/jre/../lib/i386::/xcitec/bea/wlserver_10.3/server/native/linux/i686:/xcitec/bea/wlserver_10.3/server/native/linux/i686/oci920_8
    java.naming.factory.initial = weblogic.jndi.WLInitialContextFactory
    java.naming.factory.url.pkgs = weblogic.jndi.factories:weblogic.corba.j2ee.naming.url:weblogic.jndi.factories:weblogic.corba.j2ee.naming.url
    java.protocol.handler.pkgs = weblogic.utils|weblogic.utils|weblogic.utils|weblogic.net
    java.runtime.name = Java(TM) SE Runtime Environment
    java.runtime.version = 1.6.0_05-b13
    java.security.policy = /xcitec/bea/wlserver_10.3/server/lib/weblogic.policy
    java.specification.name = Java Platform API Specification
    java.specification.vendor = Sun Microsystems Inc.
    java.specification.version = 1.6
    java.vendor = BEA Systems, Inc.
    java.vendor.url = http://www.bea.com/
    java.vendor.url.bug = http://edocs.bea.com/jrockit/go2troubleshooting.html
    java.version = 1.6.0_05
    java.vm.info = compiled mode
    java.vm.name = BEA JRockit(R)
    java.vm.specification.name = Java Virtual Machine Specification
    java.vm.specification.vendor = Sun Microsystems Inc.
    java.vm.specification.version = 1.0
    java.vm.vendor = BEA Systems, Inc.
    java.vm.vendor.url = http://www.bea.com/
    java.vm.vendor.url.bug = http://edocs.bea.com/jrockit/go2troubleshooting.html
    java.vm.version = R27.6.0-50_o-100423-1.6.0_05-20080626-2104-linux-ia32
    javax.rmi.CORBA.PortableRemoteObjectClass = weblogic.iiop.PortableRemoteObjectDelegateImpl
    javax.rmi.CORBA.UtilClass = weblogic.iiop.UtilDelegateImpl
    javax.xml.rpc.ServiceFactory = weblogic.webservice.core.rpc.ServiceFactoryImpl
    javax.xml.soap.MessageFactory = weblogic.webservice.core.soap.MessageFactoryImpl
    org.omg.CORBA.ORBClass = weblogic.corba.orb.ORB
    org.omg.CORBA.ORBSingletonClass = weblogic.corba.orb.ORB
    org.xml.sax.driver = weblogic.xml.jaxp.RegistryXMLReader
    org.xml.sax.parser = weblogic.xml.jaxp.RegistryParser
    os.arch = i386
    os.name = Linux
    os.version = 2.6.22.19-0.3-bigsmp
    path.separator = :
    sun.arch.data.model = 32
    sun.boot.class.path = /xcitec/bea/jrockit_160_05/jre/lib/i386/jrockit/jrockit1.6.0.jar:/xcitec/bea/jrockit_160_05/jre/lib/i386/jrockit/jmapi.jar:/xcitec/bea/jrockit_160_05/jre/lib/i386/jrockit/jmxmapi.jar:/xcitec/bea/jrockit_160_05/jre/lib/i386/jrockit/rmp.jar:/xcitec/bea/jrockit_160_05/jre/lib/i386/jrockit/latency.jar:/xcitec/bea/jrockit_160_05/jre/lib/resources.jar:/xcitec/bea/jrockit_160_05/jre/lib/rt.jar:/xcitec/bea/jrockit_160_05/jre/lib/sunrsasign.jar:/xcitec/bea/jrockit_160_05/jre/lib/jsse.jar:/xcitec/bea/jrockit_160_05/jre/lib/jce.jar:/xcitec/bea/jrockit_160_05/jre/lib/charsets.jar:/xcitec/bea/jrockit_160_05/jre/classes
    sun.boot.library.path = /xcitec/bea/jrockit_160_05/jre/lib/i386
    sun.cpu.endian = little
    sun.io.unicode.encoding = UnicodeLittle
    sun.java.launcher = SUN_STANDARD
    sun.jnu.encoding = ISO-8859-1
    sun.management.compiler = BEA JRockit(R) Optimizing Compiler
    sun.os.patch.level = unknown
    user.country = DE
    user.dir = /xcitec/bea/user_projects/domains/esourcing_base
    user.home = /root
    user.language = de
    user.name = root
    user.timezone = Europe/Berlin
    vde.home = /xcitec/bea/user_projects/domains/esourcing_base/servers/Server-0/data/ldap
    weblogic.Name = Server-0
    weblogic.ReverseDNSAllowed = false
    weblogic.classloader.preprocessor = weblogic.diagnostics.instrumentation.DiagnosticClassPreProcessor
    weblogic.management.server = http://62.245.197.19:7001
    weblogic.nodemanager.ServiceEnabled = true
    weblogic.security.SSL.ignoreHostnameVerification = false
    weblogic.security.TrustKeyStore = DemoTrust
    weblogic.system.BootIdentityFile = /xcitec/bea/user_projects/domains/esourcing_base/servers/Server-0/data/nodemanager/boot.properties
    >
    h4.Exception
    ####<30.11.2009 16.42 Uhr CET> <Error> <HTTP> <xsrv30> <Server-0> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1259595729484> <BEA-101017> <[weblogic.servlet.internal.WebAppServletContext@10e2c0e - appName: 'srm', name: 'srm.war', context-path: '/xcitec', spec-version: 'null'] Root cause of ServletException.
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'endPointMappinng' defined in ServletContext resource [WEB-INF/spring-servlet.xml]: Cannot resolve reference to bean 'validatingInterceptor' while setting bean property 'interceptors' with key [2]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'validatingInterceptor' defined in ServletContext resource [WEB-INF/spring-servlet.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
    PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'xsdSchemaCollection' threw exception; nested exception is org.springframework.xml.validation.XmlValidationException: Could not create Schema: SAX2 driver class weblogic.xml.jaxp.RegistryXMLReader does not implement XMLReader; nested exception is java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl
         at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275)
         at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
         at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:287)
         at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:126)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
         at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
         at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
         at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
         at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
         at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
         at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
         at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:402)
         at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:316)
         at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:282)
         at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:126)
         at javax.servlet.GenericServlet.init(GenericServlet.java:241)
         at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)
         at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
         at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48)
         at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:521)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:235)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3495)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'validatingInterceptor' defined in ServletContext resource [WEB-INF/spring-servlet.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
    PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'xsdSchemaCollection' threw exception; nested exception is org.springframework.xml.validation.XmlValidationException: Could not create Schema: SAX2 driver class weblogic.xml.jaxp.RegistryXMLReader does not implement XMLReader; nested exception is java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1279)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
         at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
         at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
         at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
         at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)
         at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
         at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:287)
         at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:126)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
         at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
         at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
         at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
         at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
         at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
         at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
         at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:402)
         at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:316)
         at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:282)
         at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:126)
         at javax.servlet.GenericServlet.init(GenericServlet.java:241)
         at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)
         at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
         at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48)
         at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:521)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:235)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3495)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
    PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'xsdSchemaCollection' threw exception; nested exception is org.springframework.xml.validation.XmlValidationException: Could not create Schema: SAX2 driver class weblogic.xml.jaxp.RegistryXMLReader does not implement XMLReader; nested exception is java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl
         at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:104)
         at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:59)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1276)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
         at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
         at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
         at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
         at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)
         at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
         at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:287)
         at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:126)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
         at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
         at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
         at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
         at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
         at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
         at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
         at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:402)
         at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:316)
         at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:282)
         at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:126)
         at javax.servlet.GenericServlet.init(GenericServlet.java:241)
         at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)
         at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
         at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48)
         at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:521)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:235)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3495)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    >

  • Java XML Parser:Null Pointer exception in EntityReader

    I got NullPointer Exception when trying to parse a XML file which
    is pointed by a net URL, (say "http://www..."). The code causing
    problem is like:
    parser.parse(new URL("http://www.../demo.xml"));
    the exception I got is:
    java.lang.NullPointerException
    java.lang.NullPointerException
    at oracle.xml.parser.EntityReader.initXMLInput(Compiled
    Code)
    at
    oracle.xml.parser.EntityReader.<init>(EntityReader.java:64)
    at oracle.xml.parser.XMLParser.parse(XMLParser.java:245)
    at DemoXML.main(DemoXML.java:47)
    The very same code works fine with a simple local file URL and we
    also know that the URL exists in correct in XML format because we
    can open the URL with IE5.
    Another question - where can we get the source for the Java XML
    Parser.
    null

    This bug has already been reported and will be fixed in our next
    release.
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    Fiona Lu (guest) wrote:
    : I got NullPointer Exception when trying to parse a XML file
    which
    : is pointed by a net URL, (say "http://www..."). The code
    causing
    : problem is like:
    : parser.parse(new URL("http://www.../demo.xml"));
    : the exception I got is:
    : java.lang.NullPointerException
    : java.lang.NullPointerException
    : at oracle.xml.parser.EntityReader.initXMLInput
    (Compiled
    : Code)
    : at
    : oracle.xml.parser.EntityReader.<init>(EntityReader.java:64)
    : at oracle.xml.parser.XMLParser.parse
    (XMLParser.java:245)
    : at DemoXML.main(DemoXML.java:47)
    : The very same code works fine with a simple local file URL and
    we
    : also know that the URL exists in correct in XML format because
    we
    : can open the URL with IE5.
    : Another question - where can we get the source for the Java
    XML
    : Parser.
    null

  • Error parsing XSL file (weblogic.xml.jaxp.RegistryXMLReader cannot be cast

    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta name="generator" content="HTML Tidy for Java (vers. 26 Sep 2004), see www.w3.org">
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>Transform</title>
    <link type="text/css" rel="stylesheet" href="css/CascadeMenu.css">
    </head>
    <body id="Bdy">
    Hello all, I've run into a perplexing problem with a new and unexptected error on a web application that resides in a JDeveloper 11g environment. I just run it from JDeveloper on my laptop. No deployement other than to the default server at run time Integratedweblogicserver. I am doing an XML transform using XSLT and it has been working fine until I tried to use the page yesterday. I get the following error. javax.servlet.ServletException: javax.xml.transform.TransformerConfigurationException: XML-22000: (Fatal Error) Error while parsing XSL file (weblogic.xml.jaxp.RegistryXMLReader cannot be cast to oracle.xml.parser.v2.SAXParser). at weblogic.servlet.jsp.PageContextImpl.handlePageException(PageContextImpl.java:417) at jsp_servlet.__transform._jspService(__transform.java:109) at weblogic.servlet.jsp.JspBase.service(JspBase.java:34) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292) at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:408) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:318) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94) at java.security.AccessController.doPrivileged(Native Method) at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313) at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413) at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138) at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:70) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:326) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201) at weblogic.work.ExecuteThread.run(ExecuteThread.java:173) Caused by: javax.xml.transform.TransformerConfigurationException: XML-22000: (Fatal Error) Error while parsing XSL file (weblogic.xml.jaxp.RegistryXMLReader cannot be cast to oracle.xml.parser.v2.SAXParser). at oracle.xml.jaxp.JXSAXTransformerFactory.reportConfigException(JXSAXTransformerFactory.java:759) at oracle.xml.jaxp.JXSAXTransformerFactory.newTemplates(JXSAXTransformerFactory.java:371) at oracle.xml.jaxp.JXSAXTransformerFactory.newTransformer(JXSAXTransformerFactory.java:272) at weblogic.xml.jaxp.RegistryTransformerFactory.newTransformer(RegistryTransformerFactory.java:209) at org.apache.taglibs.standard.tag.common.xml.TransformSupport.doStartTag(TransformSupport.java:145) at jsp_servlet.__transform._jsp__tag2(__transform.java:223) at jsp_servlet.__transform._jspService(__transform.java:102) ... 25 more Caused by: java.lang.ClassCastException: weblogic.xml.jaxp.RegistryXMLReader cannot be cast to oracle.xml.parser.v2.SAXParser at oracle.xml.jaxp.JXSAXTransformerFactory.newTemplates(JXSAXTransformerFactory.java:357) ... 30 more ------------------------------------------------ I changed no code or moved any XML or XSLT file. I do see an error in the log regarding a bad URL ----------------------------------------------- XML-22108: (Error) Invalid Source - URL format is incorrect. XML-22000: (Fatal Error) Error while parsing XSL file (weblogic.xml.jaxp.RegistryXMLReader cannot be cast to oracle.xml.parser.v2.SAXParser). &lt;[ServletContext@10343785[app:QSBQAR module:QSBQAR-QSBQAR-context-root path:/QSBQAR-QSBQAR-context-root spec-version:2.5], request: weblogic.servlet.internal.ServletRequestImpl@699744[ GET /QSBQAR-QSBQAR-context-root/Transform.jsp?reqtype=1 HTTP/1.1 Accept: image/gif, image/jpeg, image/pjpeg, application/x-ms-application, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-ms-xbap, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* Accept-Language: en-us User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; . ------------------------------ Here is the XML ------------------------------ <?xml version="1.0" encoding="windows-1252" standalone="no"?>
    ACME Bird Seed Co. Capture the Road Runner using a boulder, rope and bird seed. Quinn Brian 00 00 00 00 00 00 00 00 00 11 08 08 08 08 00 43 43 Hours have been approved. APPROVED Smart Jean 00 00 00 00 00 00 00 00 00 Hours approved. APPROVED --------------------------------------------------------------------------------------- Here is the XSL --------------------------------------------------------------------------------------- <?xml version="1.0" encoding="windows-1252"?>
    <!-- Root template -->
    <h2>Project Hours Worked</h2>
    ----------------------------------------------------------------------------------------- Here is the JSP with the transform ----------------------------------------------------------------------------------------
    <table>
    <tr>
    <td>Week Ending Date:--</td>
    </tr>
    <tr>
    <td></td>
    </tr>
    <tr>
    <th>Client</th>
    <td></td>
    <th>Project</th>
    <td></td>
    </tr>
    <tr>
    <td></td>
    </tr>
    <tr>
    <td></td>
    </tr>
    <tr>
    <th>Last Name</th>
    <th>First Name</th>
    <th>Task</th>
    <th>---</th>
    <th>Sun</th>
    <th>Mon</th>
    <th>Tue</th>
    <th>Wed</th>
    <th>Thu</th>
    <th>Fri</th>
    <th>Sat</th>
    <th>---</th>
    <th>Ttl</th>
    </tr>
    <tr>
    <td></td>
    <td></td>
    </tr>
    <tr>
    <td>---</td>
    <td>---</td>
    <td></td>
    <td>---</td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td>---</td>
    <td></td>
    </tr>
    <tr>
    <td>Total Hours: </td>
    <td></td>
    <td></td>
    </tr>
    <%@ page contentType="text/html;charset=windows-1252"%><%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x" %><%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %></table>
    <script type="text/javascript" src="scripts/CascadeMenu.js">
    </script>
    <% int bad = 1; %>
    <div id="menuBar" class="menuBar">
    <div id="Bar1" class="Bar">Home</div>
    <div id="Bar3" class="Bar">Accounting</div>
    <div id="Bar4" class="Bar">Help</div>
    </div>
    <div style="background:#84ffff; color:Aqua; "><br>
    <br>
    <p style="color:Orange; font-size:x-large; font-style:italic; font-weight:bold;
    font-family:Arial, Helvetica, sans-serif; "><img src="images/logoqsq.jpg" style="border:1" height="120" width="120" alt="Q Squared">
    </p>
    </div>
    <div>
    <p style="color:Black; font-size:x-large; font-style:italic; font-weight:bold; font-family:Arial, Helvetica, sans-serif;"><img src="images/dilbert.gif" alt="Dilbert" height="100" width="100">
    ? ? Welcome to Q Squared-Brian Quinn Consulting - Manager Time Approval</p>
    </div>
    <div>
    <table width="100%" class="table1">
    <tr>
    <td style="width:15%; border-width:medium; background-color:silver ">
    <h3>Contractor Resources</h3>
    <ul style="list-style-type:circle; ">
    <li>Time Entry</li>
    <li>Profile</li>
    </ul>
    <h3>Manager Resources</h

    LOL - I didn't think about the forum message area having trouble displaying my XML XSLT problem
    It seemed to mix the code with the site XML.
    Oh brother
    The deal is this.
    The XML XSLT transform was working and now it is not and I think it has something to do with
    the HTTP links for either the Oracle core and/or XML TAGLIBs. Either that or the W3.org has
    outdated XSLT http links.
    Anyone know if changes have been made to any of these taglib links?
    This in the JSP
    <!--
    <%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x" %>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <c:import url="HoursWorked.xml" var="xmlHoursWorked" charEncoding="windows-1252"/>
    <c:import url="./HoursWorked3.xsl" var="xslt" charEncoding="windows-1252"/>
    <x:transform xml="${xmlHoursWorked}" xslt="${xslt}" />
    -->
    This in the XSL
    <!--
    <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    -->
    And the other JSP having the same problem.
    <!--
    <%@ page contentType="text/html;charset=windows-1252"
    import="java.util.List, qsbqar.XMLHandler, org.w3c.dom.NodeList,
    javax.xml.transform.*, javax.xml.transform.stream.*,
    org.w3c.dom.Node, oracle.xml.parser.v2.*, java.io.File,
    java.io.FileReader " %>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x" %>
    <xsl:param name="employeeID" value="2"/>
    <%session.setAttribute("employee_ID", request.getParameter("consultantID")); %>
    <c:import url="HoursWorked.xml" var="xmlHoursWorked" charEncoding="windows-1252"/>
    <c:import url="./HoursWorked4.xsl" var="xslt" charEncoding="windows-1252"/>
    <x:transform xml="${xmlHoursWorked}" xslt="${xslt}">
    <x:param name="employeeID" value="${sessionScope.employee_ID }"/>
    </x:transform>
    -->
    Edited by: B of Carbon on Dec 19, 2010 12:25 AM

  • Weblogic.xml.jaxp.RegistrySAXParserFactor

    we are getting following error with weblogic 10.3.2 in one of our pages. Is this a known issue?
    tlogin.jsp:1:1: The validator class: "org.apache.taglibs.standard.tlv.JstlCoreTLV" has failed with the following exception: "java.lang.ClassCastException: weblogic.xml.jaxp.RegistrySAXParserFactory cannot be cast to javax.xml.parsers.SAXParserFactory".
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    ^-------------------------------------------------------------------
    %>
    -^

    I was encountering similiar issue deploying war file in weblogic 10.3.
    there were a couple of xml parsers jars which were critical and i couldnt have afforded to remove.
    java.lang.ClassCastException: weblogic.xml.jaxp.RegistrySAXParserFactory cannot be cast to javax.xml.parsers.SAXParserFactory
    Finally putting
    <prefer-application-packages>
    <package-name>org.apache.xerces.*</package-name>
    </prefer-application-packages>
    in weblogic-application.xml worked.
    initially i was putting weblogic-application.xml in web project's src/META-INF/ but it didnt worked. I wasted almost a day trying to run my jsp's but no success.
    finally I created a ear for my web project and tried putting weblogic-application.xml at application level and it worked.
    -Tariq

  • ClassCastException: weblogic.xml.jaxp.RegistrySAXParserFactory

    Hi all,
    I am struggling with including the jstl core taglib. Whenever I am including the directive in include.jsp, WL 9.2 throws the following exception during portlet access:
    Nested Exception is
    weblogic.servlet.jsp.CompilationException: Failed to compile JSP /WEB-INF/jsp/view.jsp
    view.jsp:1:1: The validator class: "org.apache.taglibs.standard.tlv.JstlCoreTLV" has failed with the following exception: "java.lang.ClassCastException: weblogic.xml.jaxp.RegistrySAXParserFactory".
    <%@ include file="/WEB-INF/jsp/include.jsp" %>
    ^--------------------------------------------^
    Standard-1.06 and JSTL-1.06 are included in WEB-INF/lib. Has anyone encountered this problem as well? Actually it's the same as http://forums.bea.com/bea/thread.jspa?forumID=600000007&threadID=400000561
    Kind regards,
    Matthias

    hi,
    you can set the SAXParserFactory in your weblogic-application.xml file e.g. (using xerces.jar)
    <xml><parser-factory>               <saxparser-factory>org.apache.xerces.jaxp.SAXParserFactoryImpl</saxparser-factory>
    <document-builder-factory>org.apache.xerces.jaxp.DocumentBuilderFactoryImpl</document-builder-factory>     
    </parser-factory>               
    </xml>
    and setting below in weblogic.xml file
    <container-descriptor>
    <prefer-web-inf-classes>true</prefer-web-inf-classes>
    </container-descriptor>
    (the above property has to be set if deploying BirtViewer on Weblogic)
    Unfortunately it can be not enough if xml-apis.jar file is on the classpath. In such case you'd tell weblogic which packages should be prefered e.i. in your weblogic-application.xml file add
    <prefer-application-packages>
    <package-name>org.apache.xerces.*</package-name>
    </prefer-application-packages>
    Apparently Weblogic has problems to use the correct XML parser while compiling JSP pages hence the exceptions
    Edited by gstasica at 01/14/2008 8:59 AM

  • Problem with oracle.xml.jaxp.JXXMLFilter in FOP

    Hi,
    I am gettting Null Pointer Exception while converting xml into PDF using FOP.Even thoug i have set System properties i am getting oracle.xml.jaxp.JXXMLFilter only instead of org.apache.xalan.processor.TransformerFactoryImpl.
    Here is the code block to set System Proprties.
    String key = "oracle.xml.transform.TransformerFactory";
    String value = "org.apache.xalan.processor.TransformerFactoryImpl";
         Properties props = System.getProperties();
         props.put(key, value);
    System.setProperties(props);
    Please help me to overcome this.
    Thanks
    Srinivas

    Hi,
    You do not have JServer installed most likely. Are you running Oracle 8.1.5 or above? If so, is it JAva enabled?
    Murali

  • Need Help with Java XML Pack

    I Downloaded the JavaXMLPack-summer-02_01 and am a little unsure about configuration and use...
    The documentation says:"
    To use the Java XML Pack technologies, you need to set the home directory for each technology as follows:
    JAVA_XML_PACK_HOME to the directory where the java xml pack has been installed.
    JAXM_HOME to <JAVA_XML_PACK_INSTALL>/java_xml_pack-summer-02_01/jaxm-1.1_01
    JAXP_HOME to <JAVA_XML_PACK_INSTALL>/java_xml_pack-summer-02_01/jaxp-1.2_01
    JAXR_HOME to <JAVA_XML_PACK_INSTALL>/java_xml_pack-ummer-02_01/jaxr-1.0_02
    JAXRPC_HOME to <JAVA_XML_PACK_INSTALL>/java_xml_pack-ummer-02_01/jaxrpc-1.0_01
    but nothing about where to set this...
    I tried to set those as environment variables- s�that right???
    Next thing:
    When I want to use the JAXM Libraries I have to set the .JAR Files as Classpath - Seems strage to me...
    And now the Problem:
    I compiled the StandeAlone.java Sample from "/jaxm-1.1_01/samples/standalone"
    And when I start the class File I get the Error message
    java.lang.NoClassDefFoundError: javax/xml/soap/SOAPBody
         at DataExchange.<init>(EOS.java:67)
         at EOS.init(EOS.java:14)
         at sun.applet.AppletPanel.run(AppletPanel.java:341)
         at java.lang.Thread.run(Thread.java:536)

    I have been having similar problems. I have set the variables you mentioned in my .bashrc file and set the classpath variable to include them. However the compiler still can't find them and I get a slew of NoClassDefFoundError exceptions when trying to compile code which uses the xml stuff.
    The strange thing is that the classpath variable was empty before I added the java xml stuff to it so I don't know how it finds the core java classes. It gets this information from somewhere and if I could find out where this is then I could add the xml stuff to it and everything will be fine.
    Any ideas on where java is getting the location of the core classes from?

  • Confusion on choosing the right Java XML tehcnology

    Hi there,
    I have a question about Java XML. I am still confuse on whether should I choose JAXP or JAXB for XML documents processing. I need to access a the configuration values form a properties file which stored in XML format to startup an application server, the configuration values might be using while the application server is running all the time. And probably write a tool to add/delete/modify the config values in XML file. From my point of view, I think JAXB is suitable for my needs, but I'm not sure whether the DOM tree manipulation from JAXP will be useful in my application or not. Any suggestion?
    Thanks,
    Jax

    You might want to have a look at the tutorials here:
    http://java.sun.com/webservices/docs/1.1/tutorial/doc/index.html
    When you go to the page about JAXP you will see that it says, right up front, "The Java API for XML Processing (JAXP) makes it easy to process XML data using applications written in the Java programming language." That sounds like what you want to do. And the page about JAXB says "The Java Architecture for XML Binding (JAXB) is a Java technology that enables you to generate Java classes from XML schemas." That doesn't sound like what you want to do.

  • Using Java XML 1.5 toolkit instead of sapxmltoolkit for xslt mappings

    Hi All
       We have a case whereby our xlst requires a number of customised java class functions as we are porting webmethods systems across to PI.
    eg in the xslt adding
    <xsl:when test="function-available('java:concat">
        <xsl:value-of select="java:concat($first, $last, $inputparam)"/>
    We are running sap PI 7.1 ehp1. I have been referring to a number of posts on how to complete these tasks.
    namely we have implemented the example as provided in:
        http://help.sap.com/saphelp_nwpi71/helpdata/EN/73/f61eea1741453eb8f794e150067930/frameset.htm
    This only works if "Sap XML Toolkit" is enabled in the operational mapping.
    Left unticked (default setting in the mapping) whenever a testcase is run I end up with the error "could not compile sytle sheet".
    I would like to use the Java 1.5 xml processing capability as it is supposed to perform better than the sapxmltoolkit option and support for the latter will be discontinued in future.
    Has anyone been able run the case with sapxmltoolkit enabled?
    If so did you add any other libraries for java xml 1.5?
    thanks

    Thanks, I would have thought as much, but theres no guide on the deployment.
    For now i assume this will fit into the java/ext area and Pi would need a reboot after the libraries are copied.
    Has anyone deployed the additional libraries to PI.

  • A bug in Java

    I would like to report a bug in Java.
    It began with the rmi tutorial on computing pi.
    I had no problem with this on a single computer but could never get it to work over the network. I posted messages on this forum and got lots of generous help, especially from Genady, but eventually I left it as an unsolved problem.
    Yesterday I came back to my local network with my current problem and had problems similar to pi. Now at least I have more experience and I could track it down. It looks like a Java bug to me.
    The hardware is: 1 router, behind which sit 2 computers: home-ilan at 192.168.2.100 and home-yona at 192.168.2.103. I have a client-server setup via rmi. If the server is on home-yona, all works OK. If the server is on home-ilan it fails. What could be the difference?
    It turns out that home-ilan (my main computer) also has the possibility to run VPN to the hospital. The VPN uses a given IP. If I need to get to the hospital, I use the VPN. If not, I don't use it.
    Yesterday I put Eclipse on home-yona and looked for the problem. It turns out to be in
    Query q1 = (Query) Naming.lookup(rmi1);I was running the query from home-yona to home-ilan. I got a valid q1 back, and I drilled down into it. One of the elements is
    ep=TCPEndpoint which has a host value.
    The host value should have been 192.168.2.100, but instead it was the value of the VPN. The packet was sent from 192.168.2.100 to 192.168.2.103 and home-yona picked up the packet correctly, but it had the wrong value of the host. When I actually made the query to rmi, it expected the result from the VPN IP, which it never got, so it timed out.
    The bug is that Naming.lookup, even though it got the packet through the LAN, gave VPN address. This would have been fine had I been querying from the hospital, but I was in fact doing a local query. The Naming.lookup doesn't differentiate, which is a bug.
    The bug is 100% reproducible. If I start the server while VPN is running, from home-yona I will always get the VPN IP. If I start the server while VPN is turned off, I will get the correct address.
    Any suggestions?
    Ilan

    If that were the only thing which was wrong, we'd be in great shape. It is then a bug of Cisco Systems who supplied the VPN. I just took the default conditions and used them. I had no idea there was any problem until I ran the RMI protocol.
    In fairness to Cisco Systems, I must say that it is unusal to say that I want a VPN connection into the hospital and at the same time make a connection over my local LAN. In fact it works for everything I happened to try up until now, but it fails for RMI (because of the static assignment).
    The amazing thing is that with all these incompatible programs is not that sometimes it fails, but that it works at all. When I look at the Control Panel, I see 2 LAN connections, my local LAN and the VPN. I suspect I would have a very similar problem if I had 2 physical LAN cards.
    The home-ilan identifies the computer and it doesn't identify the computer-lan combination.
    What the RMI wants is not the computer identification, but rather the lan card identification. At least in the Control Panel, such a thing doesn't exist.

  • Is this a bug in Java!

    int i=0;
    i=i++;
    System.out.println(i);
    What should this code print.
    I guess 1.
    But it prints 0.
    Can anyone explain the logic behind this, or is this a bug in Java.
    Thanks for your time in advance.

    What did the mackerel do to deserve that?it wrote Sun's search function !!!!!! :pPlease, a mackerel would of done a better job.
    All I can say is "JTable project", smiles.
    (Gah, Please kill me)mlk BANG BANG*
    *Post decease operator.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Implementing XAdES in Java XML Digital Signature API

    Hi,
    I've got some problems with implementing XAdES standard with Java XML Digital Signature API. Below is a code (SignatureTest1), that produces a digital signature with some XAdES tags placed in <ds:Object> tag. The signature is later validated with a Validator class. Everything works fine, until I set a XAdES namespace (SignatureTest1.xadesNS="http://uri.etsi.org/01903/v1.3.2#"). In this case validation of XAdES elements fails.
    The reason of validation failture is a difference between arguments passed to a digest method when document is being signed and validated. When the document is being signed a log looks like this:
    FINER: Pre-digested input:
    2007-08-21 15:38:44 org.jcp.xml.dsig.internal.DigesterOutputStream write
    FINER: <SignedProperties xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="SignP"></SignedProperties>
    2007-08-21 15:38:44 org.jcp.xml.dsig.internal.dom.DOMReference digest
    FINE: Reference object uri = #SignP
    2007-08-21 15:38:44 org.jcp.xml.dsig.internal.dom.DOMReference digest
    FINE: Reference digesting completed,but while validating:
    FINER: Pre-digested input:
    2007-08-21 15:38:44 org.jcp.xml.dsig.internal.DigesterOutputStream write
    FINER: <SignedProperties xmlns="http://uri.etsi.org/01903/v1.3.2#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="SignP"></SignedProperties>
    2007-08-21 15:38:44 org.jcp.xml.dsig.internal.dom.DOMReference validate
    FINE: Expected digest: MAQ/vctdkyVHVzoQWnOnQdeBw8g=
    2007-08-21 15:38:44 org.jcp.xml.dsig.internal.dom.DOMReference validate
    FINE: Actual digest: D7WajkF0U5t1GnVJqj9g1IntLQg=
    2007-08-21 15:38:44 org.jcp.xml.dsig.internal.dom.DOMXMLSignature validate
    FINE: Reference[#SignP] is valid: falseHow can I fix this?
    Signer class:
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.OutputStream;
    import java.security.KeyPair;
    import java.security.KeyPairGenerator;
    import java.util.ArrayList;
    import java.util.Collections;
    import java.util.Iterator;
    import java.util.List;
    import javax.xml.crypto.dom.DOMStructure;
    import javax.xml.crypto.dsig.CanonicalizationMethod;
    import javax.xml.crypto.dsig.DigestMethod;
    import javax.xml.crypto.dsig.Reference;
    import javax.xml.crypto.dsig.SignatureMethod;
    import javax.xml.crypto.dsig.SignedInfo;
    import javax.xml.crypto.dsig.Transform;
    import javax.xml.crypto.dsig.XMLObject;
    import javax.xml.crypto.dsig.XMLSignature;
    import javax.xml.crypto.dsig.XMLSignatureFactory;
    import javax.xml.crypto.dsig.dom.DOMSignContext;
    import javax.xml.crypto.dsig.dom.DOMValidateContext;
    import javax.xml.crypto.dsig.keyinfo.KeyInfo;
    import javax.xml.crypto.dsig.keyinfo.KeyInfoFactory;
    import javax.xml.crypto.dsig.keyinfo.KeyValue;
    import javax.xml.crypto.dsig.spec.C14NMethodParameterSpec;
    import javax.xml.crypto.dsig.spec.TransformParameterSpec;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.NodeList;
    import com.sun.org.apache.xml.internal.security.utils.IdResolver;
    public class SignatureTest1 {
         public static String xadesNS=null;//"http://uri.etsi.org/01903/v1.3.2#";
         public static String signatureID="Sig1";
         public static String signedPropID="SignP";
         public static void main(String[] arg) {
            try{
              XMLSignatureFactory fac = XMLSignatureFactory.getInstance("DOM");
              List<Reference> refs = new ArrayList<Reference>();
              Reference ref1 = fac.newReference
                  ("", fac.newDigestMethod(DigestMethod.SHA1, null),
                      Collections.singletonList
                    (fac.newTransform
                   (Transform.ENVELOPED, (TransformParameterSpec) null)),
                   null, null);
              refs.add(ref1);
              Reference ref2 = fac.newReference("#"+signedPropID,fac.newDigestMethod(DigestMethod.SHA1,null),null,"http://uri.etsi.org/01903/v1.3.2#SignedProperties",null);
              refs.add(ref2);
              SignedInfo si = fac.newSignedInfo
                  (fac.newCanonicalizationMethod
                   (CanonicalizationMethod.INCLUSIVE_WITH_COMMENTS,
                    (C14NMethodParameterSpec) null),
                   fac.newSignatureMethod(SignatureMethod.DSA_SHA1, null),
                   refs);
             KeyPairGenerator kpg = KeyPairGenerator.getInstance("DSA");
              kpg.initialize(512);
              KeyPair kp = kpg.generateKeyPair();
              KeyInfoFactory kif = fac.getKeyInfoFactory();
              KeyValue kv = kif.newKeyValue(kp.getPublic());
             KeyInfo ki = kif.newKeyInfo(Collections.singletonList(kv));
              DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
              dbf.setNamespaceAware(true);
              Document doc =
                  dbf.newDocumentBuilder().parse("purchaseOrder.xml");
              DOMSignContext dsc = new DOMSignContext
                  (kp.getPrivate(), doc.getDocumentElement());
              dsc.putNamespacePrefix(XMLSignature.XMLNS, "ds");
              Element QPElement = createElement(doc, "QualifyingProperties",null,xadesNS);
            QPElement.setAttributeNS(null, "Target", signatureID);
            Element SPElement = createElement(doc, "SignedProperties", null,xadesNS);
            SPElement.setAttributeNS(null, "Id", signedPropID);
            IdResolver.registerElementById(SPElement, signedPropID);
            QPElement.appendChild(SPElement);
            Element UPElement = createElement(doc, "UnsignedProperties", null,xadesNS);
            QPElement.appendChild(UPElement);
            DOMStructure qualifPropStruct = new DOMStructure(QPElement);
            List<DOMStructure> xmlObj = new ArrayList<DOMStructure>();
            xmlObj.add(qualifPropStruct);
            XMLObject object = fac.newXMLObject(xmlObj,"QualifyingInfos",null,null);
            List objects = Collections.singletonList(object);
            XMLSignature signature = fac.newXMLSignature(si, ki,objects,signatureID,null);
              signature.sign(dsc);
              OutputStream os = new FileOutputStream("signedPurchaseOrder.xml");
              TransformerFactory tf = TransformerFactory.newInstance();
              Transformer trans = tf.newTransformer();
              trans.transform(new DOMSource(doc), new StreamResult(os));
            }catch(Exception e){
                 e.printStackTrace();
            try{
            Validator.main(null);
            }catch(Exception e){
                 System.out.println("Validator exception");
                 e.printStackTrace();
         public static Element createElement(Document doc, String tag,String prefix, String nsURI) {
              String qName = prefix == null ? tag : prefix + ":" + tag;
             return doc.createElementNS(nsURI, qName);
    }Validator class:
    import javax.xml.crypto.*;
    import javax.xml.crypto.dsig.*;
    import javax.xml.crypto.dom.*;
    import javax.xml.crypto.dsig.dom.DOMValidateContext;
    import javax.xml.crypto.dsig.keyinfo.*;
    import java.io.FileInputStream;
    import java.security.*;
    import java.util.Collections;
    import java.util.Iterator;
    import java.util.List;
    import javax.xml.parsers.DocumentBuilderFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.NodeList;
    * This is a simple example of validating an XML
    * Signature using the JSR 105 API. It assumes the key needed to
    * validate the signature is contained in a KeyValue KeyInfo.
    public class Validator {
        // Synopsis: java Validate [document]
        //       where "document" is the name of a file containing the XML document
        //       to be validated.
        public static void main(String[] args) throws Exception {
         // Instantiate the document to be validated
         DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
         dbf.setNamespaceAware(true);
         Document doc =
                dbf.newDocumentBuilder().parse(new FileInputStream("signedPurchaseOrder.xml"));
         // Find Signature element
         NodeList nl =
             doc.getElementsByTagNameNS(XMLSignature.XMLNS, "Signature");
         if (nl.getLength() == 0) {
             throw new Exception("Cannot find Signature element");
         // Create a DOM XMLSignatureFactory that will be used to unmarshal the
         // document containing the XMLSignature
         XMLSignatureFactory fac = XMLSignatureFactory.getInstance("DOM");
         // Create a DOMValidateContext and specify a KeyValue KeySelector
            // and document context
         DOMValidateContext valContext = new DOMValidateContext
             (new KeyValueKeySelector(), nl.item(0));
         // unmarshal the XMLSignature
         XMLSignature signature = fac.unmarshalXMLSignature(valContext);
         // Validate the XMLSignature (generated above)
         boolean coreValidity = signature.validate(valContext);
         // Check core validation status
         if (coreValidity == false) {
                 System.err.println("Signature failed core validation");
             boolean sv = signature.getSignatureValue().validate(valContext);
             System.out.println("signature validation status: " + sv);
             // check the validation status of each Reference
             Iterator i = signature.getSignedInfo().getReferences().iterator();
             for (int j=0; i.hasNext(); j++) {
              boolean refValid =
                  ((Reference) i.next()).validate(valContext);
              System.out.println("ref["+j+"] validity status: " + refValid);
         } else {
                 System.out.println("Signature passed core validation");
         * KeySelector which retrieves the public key out of the
         * KeyValue element and returns it.
         * NOTE: If the key algorithm doesn't match signature algorithm,
         * then the public key will be ignored.
        private static class KeyValueKeySelector extends KeySelector {
         public KeySelectorResult select(KeyInfo keyInfo,
                                            KeySelector.Purpose purpose,
                                            AlgorithmMethod method,
                                            XMLCryptoContext context)
                throws KeySelectorException {
                if (keyInfo == null) {
              throw new KeySelectorException("Null KeyInfo object!");
                SignatureMethod sm = (SignatureMethod) method;
                List list = keyInfo.getContent();
                for (int i = 0; i < list.size(); i++) {
              XMLStructure xmlStructure = (XMLStructure) list.get(i);
                     if (xmlStructure instanceof KeyValue) {
                        PublicKey pk = null;
                        try {
                            pk = ((KeyValue)xmlStructure).getPublicKey();
                        } catch (KeyException ke) {
                            throw new KeySelectorException(ke);
                        // make sure algorithm is compatible with method
                        if (algEquals(sm.getAlgorithm(), pk.getAlgorithm())) {
                            return new SimpleKeySelectorResult(pk);
                throw new KeySelectorException("No KeyValue element found!");
            //@@@FIXME: this should also work for key types other than DSA/RSA
         static boolean algEquals(String algURI, String algName) {
                if (algName.equalsIgnoreCase("DSA") &&
              algURI.equalsIgnoreCase(SignatureMethod.DSA_SHA1)) {
              return true;
                } else if (algName.equalsIgnoreCase("RSA") &&
                           algURI.equalsIgnoreCase(SignatureMethod.RSA_SHA1)) {
              return true;
                } else {
              return false;
        private static class SimpleKeySelectorResult implements KeySelectorResult {
         private PublicKey pk;
         SimpleKeySelectorResult(PublicKey pk) {
             this.pk = pk;
         public Key getKey() { return pk; }
    }PurchaseOrder.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <PurchaseOrder>
    <Item number="130046593231">
      <Description>Video Game</Description>
      <Price>10.29</Price>
    </Item>
    <Buyer id="8492340">
      <Name>My Name</Name>
      <Address>
       <Street>One Network Drive</Street>
       <Town>Burlington</Town>
       <State>MA</State>
       <Country>United States</Country>
       <PostalCode>01803</PostalCode>
      </Address>
    </Buyer>
    </PurchaseOrder>signedPurchaseOrder.xml with XAdES namespace:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?><PurchaseOrder>
    <Item number="130046593231">
      <Description>Video Game</Description>
      <Price>10.29</Price>
    </Item>
    <Buyer id="8492340">
      <Name>My Name</Name>
      <Address>
       <Street>One Network Drive</Street>
       <Town>Burlington</Town>
       <State>MA</State>
       <Country>United States</Country>
       <PostalCode>01803</PostalCode>
      </Address>
    </Buyer>
    <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="Sig1"><ds:SignedInfo><ds:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"/><ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"/><ds:Reference URI=""><ds:Transforms><ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/></ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><ds:DigestValue>tVicGh6V+8cHbVYFIU91o5+L3OQ=</ds:DigestValue></ds:Reference><ds:Reference Type="http://uri.etsi.org/01903/v1.3.2#SignedProperties" URI="#SignP"><ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><ds:DigestValue>MAQ/vctdkyVHVzoQWnOnQdeBw8g=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue>lSgzfZCRIlgrgr6YpNOdB3XWdF9P9TEiXfkNoqUpAru/I7IiyiFWJg==</ds:SignatureValue><ds:KeyInfo><ds:KeyValue><ds:DSAKeyValue><ds:P>/KaCzo4Syrom78z3EQ5SbbB4sF7ey80etKII864WF64B81uRpH5t9jQTxeEu0ImbzRMqzVDZkVG9
    xD7nN1kuFw==</ds:P><ds:Q>li7dzDacuo67Jg7mtqEm2TRuOMU=</ds:Q><ds:G>Z4Rxsnqc9E7pGknFFH2xqaryRPBaQ01khpMdLRQnG541Awtx/XPaF5Bpsy4pNWMOHCBiNU0Nogps
    QW5QvnlMpA==</ds:G><ds:Y>p48gU203NGPcs9UxEQQQzQ19KBtDRGfEs3BDt0cbCRJHMh3EoySpeqOnuTeKLXuFr96nzAPq4BEU
    dNAc7XpDvQ==</ds:Y></ds:DSAKeyValue></ds:KeyValue></ds:KeyInfo><ds:Object Id="QualifyingInfos"><QualifyingProperties Target="Sig1" xmlns="http://uri.etsi.org/01903/v1.3.2#"><SignedProperties Id="SignP"/><UnsignedProperties/></QualifyingProperties></ds:Object></ds:Signature></PurchaseOrder>

    I believe the problem is that you are not explicitly adding the xades namespace
    attribute to the SignedProperties element before generating the signature. Thus,
    the namespace attribute is not visible when canonicalizing, but when you serialize the
    DOM tree to an output stream, (for reasons I'm not entirely sure why), the namespace
    attribute is visible and is added to the SignedProperties element, which breaks the
    signature.
    You must always explicitly add namespace attributes using the Element.setAttributeNS
    method. Try changing the following code from:
    Element SPElement = createElement(doc, "SignedProperties", null,xadesNS);
    to:
    Element SPElement = createElement(doc, "SignedProperties", null,xadesNS);
    SPElement.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns", xadesNS);

Maybe you are looking for