ExceptionInInitializerError & Xerces

I have the following codes to parse xml using xerces and I think when I have line #2
and line #3 I got ExceptionInInitializerError as shown bellow. The error message
is not very helpful, could anyone give me some ideas why I got this error?
I also notice when includes all the xerces files in my jar file I had no error, but if
I let JBuilder's deployment wizard to include only files that are necessary, I got
the error but the error message does not give me any ideas which files I am missing.
Anthony
#### CODE #######
    DOMParser parser = new DOMParser();
=>        parser.setFeature("http://xml.org/sax/features/validation", true);
=>        parser.setFeature("http://apache.org/xml/features/validation/schema", true);
        parser.setFeature(
            "http://apache.org/xml/features/validation/schema-full-checking", true);
        Validator handler = new Validator();
        parser.setErrorHandler(handler);
        parser.parse(xmlfile.getAbsolutePath());
        if (handler.validationError == true) {
          JOptionPane.showMessageDialog(this, "XML Document is not valid");
          handler.saxParseException.printStackTrace(System.out);
          throw new SAXParseException("XML Document is not valid", null);
        else {
          System.out.println("XML Document is valid");
        }##### ERROR MESSAGE ######
Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError
at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at java.lang.Class.newInstance0(Class.java:350)
at java.lang.Class.newInstance(Class.java:303)
at org.apache.xerces.util.ObjectFactory.newInstance(Unknown Source)
at
org.apache.xerces.impl.dv.SchemaDVFactory.getInstance(Unknown Source)
at
org.apache.xerces.impl.dv.SchemaDVFactory.getInstance(Unknown Source)
at
org.apache.xerces.impl.xs.SchemaGrammar$BuiltinSchemaGrammar.<init>(U
nknown Source)
at org.apache.xerces.impl.xs.SchemaGrammar.<clinit>(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.<init>(Unknown
Source)
at
org.apache.xerces.parsers.IntegratedParserConfiguration.configurePipe
line(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.reset(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at twbgui.TwbGui.loadXML(TwbGui.java:906)
at twbgui.TwbGui.loadGraph(TwbGui.java:701)
at twbgui.TwbGui$8.actionPerformed(TwbGui.java:348)
at
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:18 49)
at
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.jav
a:2169)
at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
.java:420)
at
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258 )
at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
at
javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1 000)
at
javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMen
uItemUI.java:1041)
at java.awt.Component.processMouseEvent(Component.java:5488)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3093)
at java.awt.Component.processEvent(Component.java:5253)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212 )
at
java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at
java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:234)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:163)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Caused by: java.lang.RuntimeException: internal error
at
org.apache.xerces.impl.dv.xs.XSSimpleTypeDecl.applyFacets1(Unknown So urce)
at
org.apache.xerces.impl.dv.xs.SchemaDVFactoryImpl.createBuiltInTypes(U
nknown Source)
at
org.apache.xerces.impl.dv.xs.SchemaDVFactoryImpl.<clinit>(Unknown Sou rce)
... 46 more

Originally posted by: dwhitema.us.ibm.com
ask on eclipse.tools
"Rob Tanner" <[email protected]> wrote in message
news:[email protected]..
> I have tried installing the binary dist and also downloading and building
> from source, and I always get the same error at startup when I try to
> invoke eclipse. From .metadata/.log:
>
> java.lang.ExceptionInInitializerError:
> java.lang.ClassCastException:
> org.apache.xerces.parsers.StandardParserConfiguration
>
> Is this a problem with the xerces.jar file in lib/ext in the JSDK, or is
> this a problem with a file in the eclipse distribution? Also, I tried
> with both the 1.3 and 1.4 versions of the Sun Java distro.
>
> Any ideas what I need to fix?
>
> Thanks,
> Rob Tanner

Similar Messages

  • How can I use a 3rd party XML parser such as xerces with OC4J ?

    Hi all tech experts,
    I am using Oracle Application Server 10g Release 2 (10.1.2) and i have
    installed Portal and Wireless and OracleAS Infrastructure on the same
    computer.
    i tried all the solutions on this thread
    Use of Xerces Parser in out application with Oracle App Server 9.0.4
    but still fighting.
    I have also posted this query on OTN on following thread
    How can I use a 3rd party XML parser such as xerces with OC4J?
    but no reply....
    Please help me on this issue.
    Since OC4J is preconfigured to use the Oracle XML parser which is xmlparserv2.jar.
    i have read the following article which states that
    OC4J is preconfigured to use the Oracle XML parser. The Oracle XML parser is fully JAXP 1.1 compatible and will serve the needs of applications which require JAXP functionality. This approach does not require the download, installation, and configuration of additional XML parsers.
    The Oracle XML parser (xmlparserv2.jar) is configured to load as a system level library of OC4J through it's inclusion as an entry in the Class-Path entry of the oc4j.jar Manifest.mf file. This results in the Oracle XML parser being used for all common deployment and packaging situations. You are not permitted to modify the Manifest.mf file of oc4j.jar.
    It must be noted that configuring OC4J to run with any additional XML parser or JDBC library is not a supported configuration. We do know customers who have managed to successfully replace the system level XML parser and the Oracle JDBC drivers that ship with the product, but we do not support this type of configuration due to the possibility of unexpected system behavior and system errors that might occur from replacing the tested and certified libraries.
    If you absolutely must use an additional XML parser such as xerces, then you have to start OC4J such that the xerces.jar file is loaded at a level above the OC4J system classpath. This can be accomplished using the -Xbootclasspath flag of the JRE.
    i have also run the following command
    java -Xbootclasspath/a:d:\xerces\xerces.jar -jar oc4j.jar
    but no success.
    How could i utilize my jar's like xerces.jar and xalan.jar for parsing instead of OC4J in-built parser ?
    All reply will be highly appreciated.
    Thnx in advance to all.
    Neeraj Sidhaye
    try_catch_finally @ Y !

    Hi Neeraj Sidhaye,
    I am trying to deploy a sample xform application to the Oracle Application Server (10.1.3). However, I encountered the class loader issue that is similar to your stuation. I tried all the three solutions but the application is still use the Oracle xml paser class. I am wondering if you have any insight about this?
    Thanks for your help.
    Xingsheng Qian
    iPass Inc.
    Here is the error message I got.
    Message:
    java.lang.ClassCastException: oracle.xml.parser.v2.XMLElement
    Stack Trace:
    org.chiba.xml.xforms.exception.XFormsException: java.lang.ClassCastException: oracle.xml.parser.v2.XMLElement
         at org.chiba.xml.xforms.Container.dispatch(Unknown Source)
         at org.chiba.xml.xforms.Container.dispatch(Unknown Source)
         at org.chiba.xml.xforms.Container.initModels(Unknown Source)
         at org.chiba.xml.xforms.Container.init(Unknown Source)
         at org.chiba.xml.xforms.ChibaBean.init(Unknown Source)
         at org.chiba.adapter.servlet.ServletAdapter.init(ServletAdapter.java:153)
         at org.chiba.adapter.servlet.ChibaServlet.doGet(ChibaServlet.java:303)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:719)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:299)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:187)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: java.lang.ClassCastException: oracle.xml.parser.v2.XMLElement
         at org.chiba.xml.xforms.Instance.iterateModelItems(Unknown Source)
         at org.chiba.xml.xforms.Bind.initializeModelItems(Unknown Source)
         at org.chiba.xml.xforms.Bind.init(Unknown Source)
         at org.chiba.xml.xforms.Initializer.initializeBindElements(Unknown Source)
         at org.chiba.xml.xforms.Model.modelConstruct(Unknown Source)
         at org.chiba.xml.xforms.Model.performDefault(Unknown Source)
         at org.chiba.xml.xforms.XFormsDocument.performDefault(Unknown Source)
         at org.chiba.xml.xforms.XFormsDocument.dispatchEvent(Unknown Source)
         at org.apache.xerces.dom.NodeImpl.dispatchEvent(Unknown Source)
         ... 18 more

  • Trying to use newer Xerces

    I am trying to use a newer version of Xerces (2.5.0) with my web application.
    I've tried all sorts of things that haven't worked. I first started off trying
    the XML scoping feature using a .ear file but could never get that working (see
    my earlier post).
    I'm now trying to simply include the jar files in /WEB-INF/lib directory of my
    war file here is what is happening
    1) xercesImpl.jar and xml-apis.jar in /WEB-INF/lib using prefer-webinf-classes
    flag in weblogic.xml -
    java.lang.ClassCastException
    at org.xml.sax.helpers.XMLReaderFactory.loadClass(Unknown Source)
    at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(Unknown Source)
    2) xercesImpl.jar only in /WEB-INF/lib using prefer-webinf-classes flag
    javax.servlet.ServletException: loader constraints violated when linking org/xml/sax/XMLReader
    class
    at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:906)
    at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:842)
    at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:782)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:3191)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:31
    3) xercesImpl.jar only in /WEB-INF/lib not using prefer-webinf-classes flag as
    suggested here
    http://e-docs.bea.com/wls/docs81/faq/xml.html#741640
    2003-10-21 13:29:16,942 [  ] FATAL com.avaya.elat.webapp.InitPlugin - INITIALIZATION
    ERROR:
    com.avaya.elat.webapp.InvalidJAXPFactoryException: JAXP factory "SAXParserFactory"
    is set to "weblogic.xml.j
    axp.RegistrySAXParserFactory", required value is "org.apache.xerces.jaxp.SAXParserFactoryImpl"
    at com.avaya.elat.webapp.InitPlugin.checkAndLogJAXPSettings(InitPlugin.java:135)
    Any ideas how to get this working? Weblogic has been far more unpleasant to get
    this stuff working than Jakarta Tomcat. And its FREE!

    I'm using WLS 8.1 w/ Java 1.4.2
    BTW - I'm doing all SAX, not DOM
    Also, my webapp works on Tomcat 4.1.24...
    Don Ferguson <[email protected]> wrote:
    What VM are you using, and what version of WLS? If you are running
    under J2SE 1.4, the problem may be that J2SE 1.4 rt.jar ships with an
    older version of the org.w3c.dom classes than Xerces 2.5 (which supports
    DOM level 3), and this may be the source of the incompatibility.
    tbardzil wrote:
    I am trying to use a newer version of Xerces (2.5.0) with my web application.
    I've tried all sorts of things that haven't worked. I first startedoff trying
    the XML scoping feature using a .ear file but could never get that working(see
    my earlier post).
    I'm now trying to simply include the jar files in /WEB-INF/lib directoryof my
    war file here is what is happening
    1) xercesImpl.jar and xml-apis.jar in /WEB-INF/lib using prefer-webinf-classes
    flag in weblogic.xml -
    java.lang.ClassCastException
    at org.xml.sax.helpers.XMLReaderFactory.loadClass(Unknown Source)
    at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(UnknownSource)
    2) xercesImpl.jar only in /WEB-INF/lib using prefer-webinf-classes flag
    javax.servlet.ServletException: loader constraints violated when linkingorg/xml/sax/XMLReader
    class
    at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:906)
    at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:842)
    at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:782)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:3191)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:31
    3) xercesImpl.jar only in /WEB-INF/lib not using prefer-webinf-classesflag as
    suggested here
    http://e-docs.bea.com/wls/docs81/faq/xml.html#741640
    2003-10-21 13:29:16,942 [  ] FATAL com.avaya.elat.webapp.InitPlugin- INITIALIZATION
    ERROR:
    com.avaya.elat.webapp.InvalidJAXPFactoryException: JAXP factory "SAXParserFactory"
    is set to "weblogic.xml.j
    axp.RegistrySAXParserFactory", required value is "org.apache.xerces.jaxp.SAXParserFactoryImpl"
    at com.avaya.elat.webapp.InitPlugin.checkAndLogJAXPSettings(InitPlugin.java:135)
    Any ideas how to get this working? Weblogic has been far more unpleasantto get
    this stuff working than Jakarta Tomcat. And its FREE!

  • Anybody know how to read "xerces"?? and a lot more......

    And, what's the relationship between xerces and sun's JAXP? Is jaxp more a interface less an implementation? I found jaxp calls some part of xerces pack. Meanwhile, in xerces pack there sits a jaxp pack. Xerces say it support jaxp, so, is that mean xerces is a implementation of jaxp interface?
    Both of the two pack contains some implementation..... I'm confused.
    Can anybody give me an insider's view of jaxp package?
    "The SAX Plugability classes allow an application programmer to provide an implementation of the
    org.xml.sax.DefaultHandler API to a SAXParser implementation and parse XML documents. As the parser processes the XML document, it will call methods on the provided DefaultHandler."
    ------from jaxp1.2 spec
    I'm sorry but English isn't my mother tongue. I'm rather confused by the statements above. Anybody do me a favour to translate it to plain English? Very much thanks.
    Also, what does the following code mean? (from javax.xml.parser.SAXParserFactory.java)
    class FactoryFinder is in nowhere to be found. Can anybody help explain it?
        public static SAXParserFactory newInstance()
            throws FactoryConfigurationError
            try {
                return (SAXParserFactory) FactoryFinder.find(
                    /* The default property name according to the JAXP spec */
                    "javax.xml.parsers.SAXParserFactory",
                    /* The fallback implementation class name */
                    "org.apache.crimson.jaxp.SAXParserFactoryImpl"); //what's this??
            } catch (FactoryFinder.ConfigurationError e) {
                throw new FactoryConfigurationError(e.getException(),
                                                    e.getMessage());
        }Moreover, what the relation between SAXParserFactoryImpl and SAXParserFactory?
    I wrote a program to validate xml files against dtd or schema. Does the package automatically find dtd or schema files within the xml or i have to offer them in the command line? In my case, it seems to be the latter.

    Well, you see, my real problem is that i coded to validate a xml file against xsd or dtd. However, I have to feed the program with a dtd or xsd file in the command line to make it work. Isn't it supposed to find out a proper dtd/xsd in the xml file(when specified)? Or I it isn't properly configured?
    Help me, please!
    Here is the code:
    package xmltool;
    import javax.xml.parsers.*;
    import org.xml.sax.*;
    import org.xml.sax.helpers.*;
    import java.io.*;
    * This class validate a xml file against its DTD or Schema.
    * @version 1.1
    * @auther Data Zoe
    public class Check extends DefaultHandler
        /** Constants used for JAXP 1.2 */
        static final String JAXP_SCHEMA_LANGUAGE =
            "http://java.sun.com/xml/jaxp/properties/schemaLanguage";
        static final String W3C_XML_SCHEMA =
            "http://www.w3.org/2001/XMLSchema";
         public static void main(String args[])throws Exception
              //tag varible
              boolean dtdValidate = false;
              boolean xsdValidate = false;
              //xml file to be validated
              String fileName = null;
              //Check input
              for(int i=0;i<args.length;i++)
                        if(args.endsWith(".xml")||args[i].endsWith(".XML"))
                             fileName = args[i];
                        else if(args[i].endsWith(".xsd")||args[i].endsWith(".XSD"))
                             xsdValidate = true;
                        else if(args[i].endsWith(".dtd")||args[i].endsWith(".DTD"))
                             dtdValidate = true;
                        else
                                  System.err.println("Out put usage infomation.");
              if(fileName!=null)
                   SAXParserFactory spf = SAXParserFactory.newInstance();
                   spf.setNamespaceAware(true);
                   spf.setValidating(dtdValidate||xsdValidate);
                   SAXParser saxParser = spf.newSAXParser();
                   XMLReader xmlReader = saxParser.getXMLReader();
                   xmlReader.setContentHandler(new Check());
                   xmlReader.setErrorHandler(new myErrorHandler(System.err));
                   xmlReader.parse(fileName);
                   if (xsdValidate)
                        try     {saxParser.setProperty(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);}
                        catch (SAXNotRecognizedException x)
                                  // This can happen if the parser does not support JAXP 1.2
                                  System.err.println(
                                       "Error: JAXP SAXParser property not recognized: "
                                       + JAXP_SCHEMA_LANGUAGE);
                                  System.err.println(
                                       "Check to see if parser conforms to JAXP 1.2 spec.");
                                  System.exit(1);
              else
                   System.err.println("No xml file to validate");
         * Error handler
         private static class myErrorHandler implements ErrorHandler
              /** Error handler output goes here */
              private PrintStream out;
              myErrorHandler(PrintStream out)
                   this.out = out;
              * Returns a string describing parse exception details
              private String getParseExceptionInfo(SAXParseException spe)
                   String systemId = spe.getSystemId();
                   if (systemId == null)
                        systemId = "null";
                   String info = "URI=" + systemId +
                        " Line=" + spe.getLineNumber() +
                        ": " + spe.getMessage();
                   return info;
              // The following methods are standard SAX ErrorHandler methods.
              // See SAX documentation for more info.
              public void warning(SAXParseException spe) throws SAXException
                   out.println("Warning: " + getParseExceptionInfo(spe));
              public void error(SAXParseException spe) throws SAXException
                   String message = "Error: " + getParseExceptionInfo(spe);
                   throw new SAXException(message);
              public void fatalError(SAXParseException spe) throws SAXException
                   String message = "Fatal Error: " + getParseExceptionInfo(spe);
                   throw new SAXException(message);

  • How do I get to use Xerces 1.2.1 or higher w/ wls 6.0

    We are trying to port our software from WLS 5.1 to 6.0. I am running into a problem
    because our code uses Xerces 1.2.1 (or higher) and WLS 6.0 is using 1.2.0. Initially,
    I was getting a null pointer error way down in my code. I traced this to a Xerces
    problem with 1.2.0. SO I decided to place the Xerces.jar file before the weblogic
    jars in my classpath. This caused the server to not start up cleanly; so I went
    back to the weblogic jars coming first in the classpath. Then I tried creating
    an XML registry. This gives me a different error (the stack trace is included
    at the bottom of this message). However, from perusing the newsgroups, I don't
    think this method will work. Can you help me out?
    thanks,
    lisa
    1) test01GetAccounts(com.cqg.trs.admin.test.AdminSesTest)
    javax.xml.parsers.FactoryConfigurationError: com.sun.xml.parser.DocumentBuilderFactoryImpl
    at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:80)
    at com.cqg.trs.msg.TRSElement.getDocumentBuilder(TRSElement.java)
    at com.cqg.trs.msg.TRSElement.<init>(TRSElement.java)
    at com.cqg.trs.msg.S2C.<init>(S2C.java)
    at java.lang.Class.newInstance0(Native Method)
    at java.lang.Class.newInstance(Class.java:241)
    at com.cqg.trs.msg.TRSElementFactory.createTRSElement(TRSElementFactory.java)
    at com.cqg.trs.msg.TRSElement.getElements(TRSElement.java, Compiled Code)
    at com.cqg.trs.msg.TRSElement.getElement(TRSElement.java)
    at com.cqg.trs.msg.Order.getS2C(Order.java)
    at com.cqg.trs.admin.test.AdminSesTest.test01GetAccounts(AdminSesTest.java,
    Compiled Code)
    at java.lang.reflect.Method.invoke(Native Method)
    at junit.framework.TestCase.runTest(TestCase.java:155)
    at junit.framework.TestCase.runBare(TestCase.java:129)
    at junit.framework.TestResult$1.protect(TestResult.java:100)
    at junit.framework.TestResult.runProtected(TestResult.java:117)
    at junit.framework.TestResult.run(TestResult.java:103)
    at junit.framework.TestCase.run(TestCase.java:120)
    at junit.framework.TestSuite.run(TestSuite.java, Compiled Code)
    at junit.textui.TestRunner.doRun(TestRunner.java:61)
    at junit.textui.TestRunner.start(TestRunner.java, Compiled Code)
    at junit.textui.TestRunner.main(TestRunner.java:94)

    Try to remove the xerces.jar from xmlx.jar and put the one you want to usae
    in the CLASSPATH. Also set the registry's saxparserfactory to
    org.apache.xerces...
    Thanks
    Sandeep
    "Lisa Klag" <[email protected]> wrote in message
    news:[email protected]...
    >
    We are trying to port our software from WLS 5.1 to 6.0. I am running intoa problem
    because our code uses Xerces 1.2.1 (or higher) and WLS 6.0 is using 1.2.0.Initially,
    I was getting a null pointer error way down in my code. I traced this toa Xerces
    problem with 1.2.0. SO I decided to place the Xerces.jar file before theweblogic
    jars in my classpath. This caused the server to not start up cleanly; soI went
    back to the weblogic jars coming first in the classpath. Then I triedcreating
    an XML registry. This gives me a different error (the stack trace isincluded
    at the bottom of this message). However, from perusing the newsgroups, Idon't
    think this method will work. Can you help me out?
    thanks,
    lisa
    1) test01GetAccounts(com.cqg.trs.admin.test.AdminSesTest)
    javax.xml.parsers.FactoryConfigurationError:com.sun.xml.parser.DocumentBuilderFactoryImpl
    atjavax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.
    java:80)
    at com.cqg.trs.msg.TRSElement.getDocumentBuilder(TRSElement.java)
    at com.cqg.trs.msg.TRSElement.<init>(TRSElement.java)
    at com.cqg.trs.msg.S2C.<init>(S2C.java)
    at java.lang.Class.newInstance0(Native Method)
    at java.lang.Class.newInstance(Class.java:241)
    atcom.cqg.trs.msg.TRSElementFactory.createTRSElement(TRSElementFactory.java)
    at com.cqg.trs.msg.TRSElement.getElements(TRSElement.java,Compiled Code)
    at com.cqg.trs.msg.TRSElement.getElement(TRSElement.java)
    at com.cqg.trs.msg.Order.getS2C(Order.java)
    atcom.cqg.trs.admin.test.AdminSesTest.test01GetAccounts(AdminSesTest.java,
    Compiled Code)
    at java.lang.reflect.Method.invoke(Native Method)
    at junit.framework.TestCase.runTest(TestCase.java:155)
    at junit.framework.TestCase.runBare(TestCase.java:129)
    at junit.framework.TestResult$1.protect(TestResult.java:100)
    at junit.framework.TestResult.runProtected(TestResult.java:117)
    at junit.framework.TestResult.run(TestResult.java:103)
    at junit.framework.TestCase.run(TestCase.java:120)
    at junit.framework.TestSuite.run(TestSuite.java, Compiled Code)
    at junit.textui.TestRunner.doRun(TestRunner.java:61)
    at junit.textui.TestRunner.start(TestRunner.java, Compiled Code)
    at junit.textui.TestRunner.main(TestRunner.java:94)

  • How CAN I setup a custom local DTD to be used with XERCES

    Hi,
    can anyone help?
    I have to use a local DTD with XERCES which should be always used ("overwrite" the one specified in DOCTYPE if it exist, or should be used if no DOCTYPE is specified)
    I can not use EntityResolver because resolveEntity() is not called if there is no DOCTYPE specified.
    Also I can not use XSD because I have only DTD rules.
    Thanks,
    Cristian

    Thanks for your reply,
    what about using XERCES XNI?
    I could load a Grammar, as specified in the sample file xni.XMLGrammarBuilder from XERCES-J 2.8.1 samples, but I couldn't find a possibility to force it to be used with any document.
    Do you know? is it any possibility to do it?

  • Java.lang.ExceptionInInitializerError - while using a third party tool

    Hi All,
    I am trying to include truezip into my application. but I get the following stack trace.
    When I tried using the truezip in a standalone java class it orked but I am unable to make it work with appserver.
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:830)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:763)
         org.apache.jsp.TestDes_jsp._jspService(TestDes_jsp.java:75)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105)
    root cause
    java.lang.ExceptionInInitializerError
         de.schlichtherle.io.File.init(File.java:818)
         de.schlichtherle.io.File.(File.java:471)
         de.schlichtherle.io.File.(File.java:452)
         org.apache.jsp.TestDes_jsp._jspService(TestDes_jsp.java:63)
    note The full stack trace of the root cause is available in the Sun-Java-System/Application-Server logs.If I refresh the jsp page it shows the foloowing error
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:830)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:763)
         org.apache.jsp.TestDes_jsp._jspService(TestDes_jsp.java:75)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105)
    root cause
    java.lang.NoClassDefFoundError
         de.schlichtherle.io.File.init(File.java:818)
         de.schlichtherle.io.File.(File.java:471)
         de.schlichtherle.io.File.(File.java:452)
         org.apache.jsp.TestDes_jsp._jspService(TestDes_jsp.java:63)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
    note The full stack trace of the root cause is available in the Sun-Java-System/Application-Server logs.
    --------------------------------------------------------------------------------Can anyone help me on this please
    Thanks,
    R.Ramesh.

    Hi Balusc,
    here is the full stack trace
    java.lang.ExceptionInInitializerError
         at de.schlichtherle.io.File.init(File.java:830)
         at de.schlichtherle.io.File.<init>(File.java:479)
         at de.schlichtherle.io.File.<init>(File.java:458)
         at org.apache.jsp.TestDes_jsp._jspService(TestDes_jsp.java:63)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:297)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:247)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:189)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doProcess(ProcessorTask.java:604)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:475)
         at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:371)
         at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:264)
         at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:281)
         at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:83)
    Caused by: java.security.AccessControlException: access denied (java.lang.RuntimePermission shutdownHooks)
         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
         at java.security.AccessController.checkPermission(AccessController.java:427)
         at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
         at java.lang.Runtime.addShutdownHook(Runtime.java:188)
         at de.schlichtherle.io.ArchiveControllers.<clinit>(ArchiveControllers.java:67)
         ... 41 moreafter which if I refresh my jsp page I get the foloowing stack trace as in my next post

  • Extracting elements from an xml string - org.apache.xerces.dom.DeferredText

    Hello all,
    I am new to xml, and I thought I had a handle on things until I got this problem...I am getting an xml string from the body of an e-mail message, and then I am trying to extract elements out of it. Here is an example xml string:
    <?xml version="1.0" encoding="UTF-8"?>
    <filterRoot>
       <filter action="MOVE" bool="AND" name="My Saved Filter" target="Deleted Items">
          <condition attribute="TO" bool="AND" contains="CONTAINS">
             <value>[email protected]</value>
             <value>[email protected]</value>
             <value>[email protected]</value>
             <value>[email protected]</value>
             <value>[email protected]</value>
          </condition>
       </filter>
    </filterRoot>I am trying to extract the <filter> element out and store it into a Vector of Elements (called, not surprisingly, filters). However, I am getting a class cast exception:
    java.lang.ClassCastException: org.apache.xerces.dom.DeferredTextImplIt is being called from where I trying to extract the <filter> in this way:
            filterRoot = doc.getDocumentElement(); // get topmost element
            NodeList list = filterRoot.getChildNodes();
            Vector newFilters = new Vector();
            debug("There are "+list.getLength()+" filters in document");
            for(int i=0; i<list.getLength(); i++) {
                Node n = list.item(i);
                debug("Node "+i+" getNodeValue() is "+n.getNodeValue());
                Element temp = (Element)n;
                newFilters.add(temp);
            }Perhaps my question is, how do I correctly get hold of the <filter> node so that I may cast it as an Element?
    thanks,
    Riz

    Yes, I already knew that it is not a bug.
    But, I got next step problem.
    I put "false" to "include-ignorable-whitespace" feature in xerces parser.
    But, I still found unnecessary TextNodes in my parser object.
    Feature link : http://xerces.apache.org/xerces-j/features.html.
    I use xerces-2_8_0.
    DOMParser parser = new DOMParser();
    parser.setFeature("http://apache.org/xml/features/dom/include-ignorable-whitespace", false);
    parser.parse(inputSource);
    document = ps.getDocument();
    System.out.println(document.getDocumentElement().getChildNodes().length()); // still wrong lengthIs tehre any example of usage this feature?
    What is default defination of white-space "\n "(enter with one space) or " "(juz white space) or something else?
    Thanks,

  • Getting ExceptionInInitializerError while calling a java class from db

    Hi,
    I have a class file working fine outside db. When I load that through loadjava and call it through pl/sql function, I get ExceptionInInitializerError.
    Do you have any idea why this happens?
    I am trying to login into a third party server in this class file. The error is caught at the statement I am sending the username/password and host name.
    thanks,
    Setareh

    Setareh,
    Here is an excerpt from the javadoc for ExceptionInInitializer:
    Signals that an unexpected exception has occurred in a static initializer
    or the initializer for a static variable.
    Before running your function in SQL*Plus, do the following:
    set serveroutput on size 1000000
    exec DBMS_JAVA.SET_OUTPUT(1000000)Then you may get more information. If you don't then you may find more details in the Oracle log files in the "bdump" destination. The following query will tell you where that is:
    select VALUE
      from V$PARAMETER
    where NAME = 'background_dump_dest'Then, if you are still having trouble, post the entire error message and stack trace, as well as your java code.
    Good Luck,
    Avi.

  • WSAD 5, xerces, datasource and classcastexception issue

    I am running into an issue trying to run my code once I upgraded from WDAD 5.0 to WSAD 5.01. I am getting the error below when I try and connect to my DataSource. This all was working fine before I upgraded. It looks like an issue with the xerces.jar file because if I take out the JAXP stuff in the xerces.jar file I work fine. But I need the JAXP stuff because I am doing messaging. Anyone have any ideas?
    [5/22/03 7:02:59:848 CDT] 2ec4c80 SystemOut O 2003.05.22 07:02:59.848--ServerSession(426724481)--Thread[asyncDelivery0,5,main]--Connection(47762586)--TopLink, version:TopLink - 9.0.3 (Build 423)
    2003.05.22 07:02:59.848--ServerSession(426724481)--Thread[asyncDelivery0,5,main]--Connection(47762586)--connecting(DatabaseLogin(
         platform => DB2Platform
         user name => "ou79ecm"
         datasource name => "jdbc/DB239DataSource"
    [5/22/03 7:03:00:118 CDT] 2ec4c80 ConnectionFac I J2CA0122I: Resource reference jdbc/DB239DataSource could not be located, so default values of the following are used: [Resource-ref settings]
         res-auth: 1 (APPLICATION)
         res-isolation-level: 0 (TRANSACTION_NONE)
         res-sharing-scope: true (SHAREABLE)
         res-resolution-control: 999 (undefined)
    [Other attributes]
    isCMP1_x: false (not CMP1.x)
    isJMS: false (not JMS)
    [5/22/03 7:03:01:160 CDT] 2ec4c80 ConnectionFac E J2CA0009E: An exception occurred while trying to instantiate the ManagedConnectionFactory class com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl used by resource jdbc/DB239DataSource : java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl
         at javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source)
         at com.ibm.ejs.j2c.XMLReader.validate(XMLReader.java:673)
         at com.ibm.ejs.j2c.XMLReader.init(XMLReader.java:241)
         at com.ibm.ejs.j2c.XMLReader.<init>(XMLReader.java:165)
         at com.ibm.ejs.j2c.ConnectorRuntime.getJ2C_Properties(ConnectorRuntime.java:341)
         at com.ibm.ejs.j2c.poolmanager.PoolManager.<init>(PoolManager.java:541)
         at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.createCFD_Common(ConnectionFactoryBuilderImpl.java:699)
         at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.createConnectionFactoryDetails(ConnectionFactoryBuilderImpl.java:417)
         at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.getObjectInstance(ConnectionFactoryBuilderImpl.java:1400)
         at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:313)
         at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookup(Helpers.java:884)
         at com.ibm.ws.naming.jndicos.CNContextImpl.processResolveResults(CNContextImpl.java:1675)
         at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1538)
         at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1458)
         at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1130)
         at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:122)
         at javax.naming.InitialContext.lookup(InitialContext.java:363)
         at oracle.toplink.jndi.JNDIConnector.connect(Unknown Source)
         at oracle.toplink.sessions.DatabaseLogin.connect(Unknown Source)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.connect(Unknown Source)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.connect(Unknown Source)
         at oracle.toplink.threetier.ConnectionPool.buildConnection(Unknown Source)
         at oracle.toplink.threetier.ConnectionPool.startUp(Unknown Source)
         at oracle.toplink.threetier.ServerSession.connect(Unknown Source)
         at oracle.toplink.publicinterface.DatabaseSession.login(Unknown Source)
         at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
         at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
         at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
         at com.deere.jdc.toplink.ToplinkServerSessionFactory.getSession(ToplinkServerSessionFactory.java:121)
         at com.deere.jdc.toplink.ToplinkServerSessionFactory.getClientSession(ToplinkServerSessionFactory.java:56)
         at com.deere.jdc.component.rcts.dao.RCTSGateway.findDealerASMByDealerNumber(RCTSGateway.java:194)
         at com.deere.jdc.component.rcts.service.RCTSService.getRCTSDealerASM(RCTSService.java:159)
         at com.deere.jdc.component.rcts.adapter.SoapRCTSService.getRCTSDealerASM(SoapRCTSService.java:107)
         at java.lang.reflect.Method.invoke(Native Method)
         at com.deere.jdc.component.rcts.messaging.RCTSMessageHandler.invokeServiceMethod(RCTSMessageHandler.java:103)
         at com.deere.jdc.component.rcts.messaging.RCTSMessageHandler.processMessage(RCTSMessageHandler.java:62)
         at com.deere.jdc.mqseries.MQJMSMessageHandler.onMessage(MQJMSMessageHandler.java:122)
         at com.ibm.mq.jms.MQQueueReceiver.receiveAsync(MQQueueReceiver.java:861)
         at com.ibm.mq.jms.SessionAsyncHelper.run(SessionAsyncHelper.java:401)
         at java.lang.Thread.run(Thread.java:513)
    [5/22/03 7:03:01:310 CDT] 2ec4c80 ConnectionFac A J2CA0013I: An exception occurred while trying to create ManagedConnectionFactory for DB239DataSource : java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl
         at javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source)
         at com.ibm.ejs.j2c.XMLReader.validate(XMLReader.java:673)
         at com.ibm.ejs.j2c.XMLReader.init(XMLReader.java:241)
         at com.ibm.ejs.j2c.XMLReader.<init>(XMLReader.java:165)
         at com.ibm.ejs.j2c.ConnectorRuntime.getJ2C_Properties(ConnectorRuntime.java:341)
         at com.ibm.ejs.j2c.poolmanager.PoolManager.<init>(PoolManager.java:541)
         at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.createCFD_Common(ConnectionFactoryBuilderImpl.java:699)
         at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.createConnectionFactoryDetails(ConnectionFactoryBuilderImpl.java:417)
         at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.getObjectInstance(ConnectionFactoryBuilderImpl.java:1400)
         at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:313)
         at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookup(Helpers.java:884)
         at com.ibm.ws.naming.jndicos.CNContextImpl.processResolveResults(CNContextImpl.java:1675)
         at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1538)
         at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1458)
         at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1130)
         at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:122)
         at javax.naming.InitialContext.lookup(InitialContext.java:363)
         at oracle.toplink.jndi.JNDIConnector.connect(Unknown Source)
         at oracle.toplink.sessions.DatabaseLogin.connect(Unknown Source)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.connect(Unknown Source)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.connect(Unknown Source)
         at oracle.toplink.threetier.ConnectionPool.buildConnection(Unknown Source)
         at oracle.toplink.threetier.ConnectionPool.startUp(Unknown Source)
         at oracle.toplink.threetier.ServerSession.connect(Unknown Source)
         at oracle.toplink.publicinterface.DatabaseSession.login(Unknown Source)
         at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
         at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
         at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
         at com.deere.jdc.toplink.ToplinkServerSessionFactory.getSession(ToplinkServerSessionFactory.java:121)
         at com.deere.jdc.toplink.ToplinkServerSessionFactory.getClientSession(ToplinkServerSessionFactory.java:56)
         at com.deere.jdc.component.rcts.dao.RCTSGateway.findDealerASMByDealerNumber(RCTSGateway.java:194)
         at com.deere.jdc.component.rcts.service.RCTSService.getRCTSDealerASM(RCTSService.java:159)
         at com.deere.jdc.component.rcts.adapter.SoapRCTSService.getRCTSDealerASM(SoapRCTSService.java:107)
         at java.lang.reflect.Method.invoke(Native Method)
         at com.deere.jdc.component.rcts.messaging.RCTSMessageHandler.invokeServiceMethod(RCTSMessageHandler.java:103)
         at com.deere.jdc.component.rcts.messaging.RCTSMessageHandler.processMessage(RCTSMessageHandler.java:62)
         at com.deere.jdc.mqseries.MQJMSMessageHandler.onMessage(MQJMSMessageHandler.java:122)
         at com.ibm.mq.jms.MQQueueReceiver.receiveAsync(MQQueueReceiver.java:861)
         at com.ibm.mq.jms.SessionAsyncHelper.run(SessionAsyncHelper.java:401)
         at java.lang.Thread.run(Thread.java:513)
    [5/22/03 7:03:01:340 CDT] 2ec4c80 Helpers W NMSV0605W: A Reference object looked up from the context "localhost/nodes/localhost/servers/server1" with the name "jdbc/DB239DataSource" was sent to the JNDI Naming Manager and an exception resulted. Reference data follows:
    Reference Factory Class Name: com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl
    Reference Factory Class Location URLs: <null>
    Reference Class Name: DB239DataSource
    Type: connectorName
    Content: DB239DataSource
    Type: classpath
    Content: C:\Program Files\IBM\WebSphere Studio\runtimes\base_v5/lib/rsadapter.rar
    Type: FactoryJndiName
    Content: jdbc/DB239DataSource
    Address Type: dd
    AddressContents: ffffffac ffffffed 0 5 73 72 0 25 63 6f 6d 2e 69 62 6d 2e 65 6a 73 2e 6a 32 63 2e 52 65 73 6f 75 72 63 65 ...
    Address Type: poolProps
    AddressContents: ffffffac ffffffed 0 5 73 72 0 27 63 6f 6d 2e 69 62 6d 2e 65 6a 73 2e 6a 32 63 2e 43 6f 6e 6e 65 63 74 6f ...
    Address Type: configProps
    AddressContents: ffffffac ffffffed 0 5 73 72 0 23 63 6f 6d 2e 69 62 6d 2e 65 6a 73 2e 6a 32 63 2e 43 6f 6e 6e 65 63 74 6f ...
    Address Type: dsProps
    AddressContents: ffffffac ffffffed 0 5 73 72 0 14 6a 61 76 61 2e 75 74 69 6c 2e 50 72 6f 70 65 72 74 69 65 73 39 12 ffffffd0 7a ...
    Address Type: mcfProps
    AddressContents: ffffffac ffffffed 0 5 73 72 0 2d 63 6f 6d 2e 69 62 6d 2e 65 6a 73 2e 6a 32 63 2e 4d 61 6e 61 67 65 64 43 ...
    Address Type: mbeanProps
    AddressContents: ffffffac ffffffed 0 5 73 72 0 1a 63 6f 6d 2e 69 62 6d 2e 65 6a 73 2e 6a 32 63 2e 4d 42 65 61 6e 50 72 6f ...
    Exception data follows:
    java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl
         at javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source)
         at com.ibm.ejs.j2c.XMLReader.validate(XMLReader.java:673)
         at com.ibm.ejs.j2c.XMLReader.init(XMLReader.java:241)
         at com.ibm.ejs.j2c.XMLReader.<init>(XMLReader.java:165)
         at com.ibm.ejs.j2c.ConnectorRuntime.getJ2C_Properties(ConnectorRuntime.java:341)
         at com.ibm.ejs.j2c.poolmanager.PoolManager.<init>(PoolManager.java:541)
         at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.createCFD_Common(ConnectionFactoryBuilderImpl.java:699)
         at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.createConnectionFactoryDetails(ConnectionFactoryBuilderImpl.java:417)
         at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.getObjectInstance(ConnectionFactoryBuilderImpl.java:1400)
         at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:313)
         at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookup(Helpers.java:884)
         at com.ibm.ws.naming.jndicos.CNContextImpl.processResolveResults(CNContextImpl.java:1675)
         at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1538)
         at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1458)
         at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1130)
         at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:122)
         at javax.naming.InitialContext.lookup(InitialContext.java:363)
         at oracle.toplink.jndi.JNDIConnector.connect(Unknown Source)
         at oracle.toplink.sessions.DatabaseLogin.connect(Unknown Source)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.connect(Unknown Source)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.connect(Unknown Source)
         at oracle.toplink.threetier.ConnectionPool.buildConnection(Unknown Source)
         at oracle.toplink.threetier.ConnectionPool.startUp(Unknown Source)
         at oracle.toplink.threetier.ServerSession.connect(Unknown Source)
         at oracle.toplink.publicinterface.DatabaseSession.login(Unknown Source)
         at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
         at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
         at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
         at com.deere.jdc.toplink.ToplinkServerSessionFactory.getSession(ToplinkServerSessionFactory.java:121)
         at com.deere.jdc.toplink.ToplinkServerSessionFactory.getClientSession(ToplinkServerSessionFactory.java:56)
         at com.deere.jdc.component.rcts.dao.RCTSGateway.findDealerASMByDealerNumber(RCTSGateway.java:194)
         at com.deere.jdc.component.rcts.service.RCTSService.getRCTSDealerASM(RCTSService.java:159)
         at com.deere.jdc.component.rcts.adapter.SoapRCTSService.getRCTSDealerASM(SoapRCTSService.java:107)
         at java.lang.reflect.Method.invoke(Native Method)
         at com.deere.jdc.component.rcts.messaging.RCTSMessageHandler.invokeServiceMethod(RCTSMessageHandler.java:103)
         at com.deere.jdc.component.rcts.messaging.RCTSMessageHandler.processMessage(RCTSMessageHandler.java:62)
         at com.deere.jdc.mqseries.MQJMSMessageHandler.onMessage(MQJMSMessageHandler.java:122)
         at com.ibm.mq.jms.MQQueueReceiver.receiveAsync(MQQueueReceiver.java:861)
         at com.ibm.mq.jms.SessionAsyncHelper.run(SessionAsyncHelper.java:401)
         at java.lang.Thread.run(Thread.java:513)
    [5/22/03 7:03:01:891 CDT] 2ec4c80 Helpers W NMSV0610I: A NamingException is being thrown from a javax.naming.Context implementation. Details follow:
    Context implementation: com.ibm.ws.naming.jndicos.CNContextImpl
    Context method: lookup
    Context name: localhost/nodes/localhost/servers/server1
    Target name: jdbc/DB239DataSource
    Other data:
    Exception stack trace: com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object. Root exception is java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl
         at javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source)
         at com.ibm.ejs.j2c.XMLReader.validate(XMLReader.java:673)
         at com.ibm.ejs.j2c.XMLReader.init(XMLReader.java:241)
         at com.ibm.ejs.j2c.XMLReader.<init>(XMLReader.java:165)
         at com.ibm.ejs.j2c.ConnectorRuntime.getJ2C_Properties(ConnectorRuntime.java:341)
         at com.ibm.ejs.j2c.poolmanager.PoolManager.<init>(PoolManager.java:541)
         at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.createCFD_Common(ConnectionFactoryBuilderImpl.java:699)
         at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.createConnectionFactoryDetails(ConnectionFactoryBuilderImpl.java:417)
         at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.getObjectInstance(ConnectionFactoryBuilderImpl.java:1400)
         at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:313)
         at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookup(Helpers.java:884)
         at com.ibm.ws.naming.jndicos.CNContextImpl.processResolveResults(CNContextImpl.java:1675)
         at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1538)
         at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1458)
         at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1130)
         at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:122)
         at javax.naming.InitialContext.lookup(InitialContext.java:363)
         at oracle.toplink.jndi.JNDIConnector.connect(Unknown Source)
         at oracle.toplink.sessions.DatabaseLogin.connect(Unknown Source)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.connect(Unknown Source)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.connect(Unknown Source)
         at oracle.toplink.threetier.ConnectionPool.buildConnection(Unknown Source)
         at oracle.toplink.threetier.ConnectionPool.startUp(Unknown Source)
         at oracle.toplink.threetier.ServerSession.connect(Unknown Source)
         at oracle.toplink.publicinterface.DatabaseSession.login(Unknown Source)
         at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
         at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
         at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
         at com.deere.jdc.toplink.ToplinkServerSessionFactory.getSession(ToplinkServerSessionFactory.java:121)
         at com.deere.jdc.toplink.ToplinkServerSessionFactory.getClientSession(ToplinkServerSessionFactory.java:56)
         at com.deere.jdc.component.rcts.dao.RCTSGateway.findDealerASMByDealerNumber(RCTSGateway.java:194)
         at com.deere.jdc.component.rcts.service.RCTSService.getRCTSDealerASM(RCTSService.java:159)
         at com.deere.jdc.component.rcts.adapter.SoapRCTSService.getRCTSDealerASM(SoapRCTSService.java:107)
         at java.lang.reflect.Method.invoke(Native Method)
         at com.deere.jdc.component.rcts.messaging.RCTSMessageHandler.invokeServiceMethod(RCTSMessageHandler.java:103)
         at com.deere.jdc.component.rcts.messaging.RCTSMessageHandler.processMessage(RCTSMessageHandler.java:62)
         at com.deere.jdc.mqseries.MQJMSMessageHandler.onMessage(MQJMSMessageHandler.java:122)
         at com.ibm.mq.jms.MQQueueReceiver.receiveAsync(MQQueueReceiver.java:861)
         at com.ibm.mq.jms.SessionAsyncHelper.run(SessionAsyncHelper.java:401)
         at java.lang.Thread.run(Thread.java:513)
    2003.05.22 07:03:02.111--ServerSession(426724481)--Thread[asyncDelivery0,5,main]--EXCEPTION [TOPLINK-7060] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exceptions.ValidationException
    EXCEPTION DESCRIPTION: Cannot acquire data source [jdbc/DB239DataSource].
    INTERNAL EXCEPTION: com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object. [Root exception is java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl]LOCAL EXCEPTION STACK:
    EXCEPTION [TOPLINK-7060] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exceptions.ValidationException
    EXCEPTION DESCRIPTION: Cannot acquire data source [jdbc/DB239DataSource].
    INTERNAL EXCEPTION: com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object. [Root exception is java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl]
         at oracle.toplink.exceptions.ValidationException.cannotAcquireDataSource(Unknown Source)
         at oracle.toplink.jndi.JNDIConnector.connect(Unknown Source)
         at oracle.toplink.sessions.DatabaseLogin.connect(Unknown Source)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.connect(Unknown Source)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.connect(Unknown Source)
         at oracle.toplink.threetier.ConnectionPool.buildConnection(Unknown Source)
         at oracle.toplink.threetier.ConnectionPool.startUp(Unknown Source)
         at oracle.toplink.threetier.ServerSession.connect(Unknown Source)
         at oracle.toplink.publicinterface.DatabaseSession.login(Unknown Source)
         at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
         at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
         at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
         at com.deere.jdc.toplink.ToplinkServerSessionFactory.getSession(ToplinkServerSessionFactory.java:121)
         at com.deere.jdc.toplink.ToplinkServerSessionFactory.getClientSession(ToplinkServerSessionFactory.java:56)
         at com.deere.jdc.component.rcts.dao.RCTSGateway.findDealerASMByDealerNumber(RCTSGateway.java:194)
         at com.deere.jdc.component.rcts.service.RCTSService.getRCTSDealerASM(RCTSService.java:159)
         at com.deere.jdc.component.rcts.adapter.SoapRCTSService.getRCTSDealerASM(SoapRCTSService.java:107)
         at java.lang.reflect.Method.invoke(Native Method)
         at com.deere.jdc.component.rcts.messaging.RCTSMessageHandler.invokeServiceMethod(RCTSMessageHandler.java:103)
         at com.deere.jdc.component.rcts.messaging.RCTSMessageHandler.processMessage(RCTSMessageHandler.java:62)
         at com.deere.jdc.mqseries.MQJMSMessageHandler.onMessage(MQJMSMessageHandler.java:122)
         at com.ibm.mq.jms.MQQueueReceiver.receiveAsync(MQQueueReceiver.java:861)
         at com.ibm.mq.jms.SessionAsyncHelper.run(SessionAsyncHelper.java:401)
         at java.lang.Thread.run(Thread.java:513)
    INTERNAL EXCEPTION STACK:
    com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object. Root exception is java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl
         at javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source)
         at com.ibm.ejs.j2c.XMLReader.validate(XMLReader.java:673)
         at com.ibm.ejs.j2c.XMLReader.init(XMLReader.java:241)
         at com.ibm.ejs.j2c.XMLReader.<init>(XMLReader.java:165)
         at com.ibm.ejs.j2c.ConnectorRuntime.getJ2C_Properties(ConnectorRuntime.java:341)
         at com.ibm.ejs.j2c.poolmanager.PoolManager.<init>(PoolManager.java:541)
         at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.createCFD_Common(ConnectionFactoryBuilderImpl.java:699)
         at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.createConnectionFactoryDetails(ConnectionFactoryBuilderImpl.java:417)
         at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.getObjectInstance(ConnectionFactoryBuilderImpl.java:1400)
         at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:313)
         at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookup(Helpers.java:884)
         at com.ibm.ws.naming.jndicos.CNContextImpl.processResolveResults(CNContextImpl.java:1675)
         at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1538)
         at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1458)
         at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1130)
         at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:122)
         at javax.naming.InitialContext.lookup(InitialContext.java:363)
         at oracle.toplink.jndi.JNDIConnector.connect(Unknown Source)
         at oracle.toplink.sessions.DatabaseLogin.connect(Unknown Source)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.connect(Unknown Source)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.connect(Unknown Source)
         at oracle.toplink.threetier.ConnectionPool.buildConnection(Unknown Source)
         at oracle.toplink.threetier.ConnectionPool.startUp(Unknown Source)
         at oracle.toplink.threetier.ServerSession.connect(Unknown Source)
         at oracle.toplink.publicinterface.DatabaseSession.login(Unknown Source)
         at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
         at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
         at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
         at com.deere.jdc.toplink.ToplinkServerSessionFactory.getSession(ToplinkServerSessionFactory.java:121)
         at com.deere.jdc.toplink.ToplinkServerSessionFactory.getClientSession(ToplinkServerSessionFactory.java:56)
         at com.deere.jdc.component.rcts.dao.RCTSGateway.findDealerASMByDealerNumber(RCTSGateway.java:194)
         at com.deere.jdc.component.rcts.service.RCTSService.getRCTSDealerASM(RCTSService.java:159)
         at com.deere.jdc.component.rcts.adapter.SoapRCTSService.getRCTSDealerASM(SoapRCTSService.java:107)
         at java.lang.reflect.Method.invoke(Native Method)
         at com.deere.jdc.component.rcts.messaging.RCTSMessageHandler.invokeServiceMethod(RCTSMessageHandler.java:103)
         at com.deere.jdc.component.rcts.messaging.RCTSMessageHandler.processMessage(RCTSMessageHandler.java:62)
         at com.deere.jdc.mqseries.MQJMSMessageHandler.onMessage(MQJMSMessageHandler.java:122)
         at com.ibm.mq.jms.MQQueueReceiver.receiveAsync(MQQueueReceiver.java:861)
         at com.ibm.mq.jms.SessionAsyncHelper.run(SessionAsyncHelper.java:401)
         at java.lang.Thread.run(Thread.java:513)

    This looks like a classPath issue.check ur runtime
    class path and make sure xerces is before any other
    parser(xml4j /oracleParser)
    vasanth

  • Wls 6.0sp1, xerces 1.1

    I'm in the process of upgrading to weblogic 6.0sp1 from 5.1. My app uses
    xerces 1.1 for all xml parsing. My original configuration was jbuilder 4.0,
    weblogic 5.1, jdk1.2.2 and xerces 1.1. This configuration worked and all
    xml parsed fine. After upgrading to wls 6.0 my new configuration is jb4,
    wls 6.0, xerces 1.1 and jdk130. In this configuration i always get
    exceptions when i call the parse method on DOMParser. I've tried swapping
    out jdk's, and using the xerces that is bundled with wls 6.0 but have had no
    success. Any help would be much appreciated.
    Below are some code snippets to indicate my usage of DOMParser:
    import org.apache.xerces.parsers.DOMParser;
    import org.apache.xerces.dom.DocumentImpl;
    import org.apache.xml.serialize.OutputFormat;
    import org.apache.xml.serialize.XMLSerializer;
    import org.xml.sax.InputSource;
    import org.xml.sax.SAXParseException;
    import org.w3c.dom.Document;
    public class XMLModel {
    try {
    String loadXmlFileName = new String("whatever.xml");
    if(useDOM) {
    // If possible, parse the file
    DOMParser parser = new DOMParser();
    if (loadXmlFileName != null) {
    parser.parse(loadXmlFileName);
    Document loadDoc = parser.getDocument();
    Document loadDoc = XMLParser.parse(loadXmlFileName);
    catch (Exception e) {
    Log.writeError(e);
    return;
    Again...This worked with jdk1.2.2, wls 5.1, xerces 1.1....but does not
    with jdk130, wls 6.0, xerces 1.1 (or xerces 1.2 bundled with wls 6).
    Thanks for any help.
    By the way...the exception i get indicates the file can not be found. But i
    create an instance of File and ensure that i can read it before calling
    parse on the DOMParser.

    Is there any plan to support backward compatibility in future ?
    Due to above restriction we have to use lowest common BEA version.
    I guess BEA must learn how real world application work. I guess compatability
    should be like ORACLE RDBMS.
    Thanks
    Kumar Allamraju <[email protected]> wrote:
    No.
    As of 6.0 release, the client & server should be on the same version.
    Kumar
    Rakesh wrote:
    Hello,
    Can my client running on WLS 5.1.0.9 can connect/work with applicationdeployed
    on WLS 6.0.0.1 ?
    Thanks

  • Xerces cannot find symbol problem

    In my program I get an Xml from an exist database and want to place it in the hard drive.
    I have made the xerces imports I need:
    import org.apache.xerces.domx.XGrammarWriter.OutputFormat;
    import org.apache.xml.serialize.XMLSerializer;I have the jar on my classpath.and the code I am getting trouble with is:
    OutputFormat format = new OutputFormat(doc2);
                        format.setIndenting(true);
                        XMLSerializer serializer = new XMLSerializer(new FileOutputStream(new File("C:\\Configuration\\XmlCopy.xml")), format);I get the following errors
    C:\.....\Wizard1.java:2946: cannot find symbol
    symbol  : constructor OutputFormat(org.w3c.dom.Document)
    location: class org.apache.xerces.domx.XGrammarWriter.OutputFormat
                        OutputFormat format = new OutputFormat(doc2);
    C:\.....\Wizard1.java:2947: cannot find symbol
    symbol  : method setIndenting(boolean)
    location: class org.apache.xerces.domx.XGrammarWriter.OutputFormat
                        format.setIndenting(true);
    C:\....\Wizard1.java:2948: cannot find symbol
    symbol  : constructor XMLSerializer(java.io.FileOutputStream,org.apache.xerces.domx.XGrammarWriter.OutputFormat)
    location: class org.apache.xml.serialize.XMLSerializer
                        XMLSerializer serializer = new XMLSerializer(new FileOutputStream(new File("C:\\Configuration\\XmlCopy.xml")), format);Any ideas about what I'm doing wrong?

    StruL wrote:
    Instead of GrammarWriter.OutPutFormat.class it says GrammarWriter$OutPutFormat.class.
    relevant or plain stupid?
    Neither really,
    GrammarWriter.OutPutFormat is the name of the class,
    GrammarWriter$OutPutFormat.class is the file into which the class is stored.
    As to you problem the error messages you posted referred to
    C:\.....\Wizard1.java:2946: cannot find symbol
    symbol  : constructor OutputFormat(org.w3c.dom.Document)
    location: class org.apache.xerces.domx.XGrammarWriter.OutputFormatnote dom*x* and XGrammarWriter ,
    this is not the same as dom.GrammarWriter...

  • Xerces : Parsingproblem when "include" one or more Schema in another

    Hi.
    My problem is that i parse an xml-document and validate it against a schema. but the schema has multiple other schemas included (i'm using "include" not "import" because all schemas using the same namespace). and the sax parser (from xerces) can't find these schemas, because he is obviously searching in the wrong directory - in fact in the dirctory of the application, not in the directory of the including schema. the path, within the "include" attribute is given relativ to the including schema.
    i'm using java 1.3.1 and have tried different xerces versions. With xerces 2.0.0 and higher, the sax parser seems not to validate at all. xerces 1.4.4 do validate but doesn't find the included schemas.
    here is the java code:
    SAXParser saxParser = new SAXParser();
    saxParser.setContentHandler(handler);
    saxParser.setErrorHandler(handler);
    InputStream ioStream =null;
    try
    saxParser.setFeature
    ("http://xml.org/sax/features/validation",true);
    saxParser.setFeature
    ("http://apache.org/xml/features/validation/schema", true);
    saxParser.setFeature
    ("http://apache.org/xml/features/validation/schema-full-checking", true);
    InputStreamReader inputstream = new InputStreamReader(m_oStream,"UTF-8");
    InputSource inputsource = new InputSource(inputstream);
    saxParser.parse(inputsource);
    heres a fragment of the including schema (Reply.xsd) (against this an xml file is validated)
    <xs:schema targetNamespace="www.interface.de" xmlns="www.interface.de" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
    <xs:include schemaLocation="./KOM.xsd"/>
    <xs:include schemaLocation="./Ort.xsd"/>
    <xs:element name="Reply">
    <xs:complexType name="reply">
    <xs:choice>
    <xs:sequence>
    <xs:element name="AKOM" type="auditkom" minOccurs="0"/>
    <xs:element name="AOrt" type="auditort" minOccurs="0"/>
    these to schemas (KOM, Ort) were not found, when the parser validates an xml file. all schemas are in the same dirctory (an other then the application directory). and the absolut path to the Reply.xsd (which is found) is given in the xml file.
    can't sax from xerces handle "include" from xml-schema? or is there a version wich can?
    Thanks & Regards,
    Sascha

    Instead of importing a scema in another schema specifiy the schemas in the external-schemaLocation property.
    SAXParser saxParser = new SAXParser();
    saxParser.setProperty("http://apache.org/xml/properties/schema/external-schemaLocation", "xmlschema1.xsd, xmlschema2.xsd");

  • Xerces for XSD 1.1 Validation not working in Java Mapping

    Hi Experts,
    We are trying to use XSD 1.1 (assertion feature) validation for the XML payload in a Java mapping program. But I am getting the following exception:
    java.lang.IllegalArgumentException: http://www.w3.org/XML/XMLSchema/v1.1 at javax.xml.validation.SchemaFactory.newInstance(SchemaFactory.java:186)
    This is happing for the statement:
    SchemaFactory factory = SchemaFactory.newInstance("http://www.w3.org/XML/XMLSchema/v1.1");
    The reason (apparently) is because it is not able to instantiate the class org.apache.xerces.jaxp.validation.XMLSchema11Factory , which is the Xerces implementation of the SchemaFactory class.
    I have tried following things so far -
    1. If I try to validate an xml against an xsd 1.1 schema in a standalone program, it works perfectly fine.
    2. If I try to deploy this whole functionality on to the server through an EAR (like an adapter module), there again it works.
    3. Also tried this before instantiating the SchemaFactory -
    System.setProperty("javax.xml.validation.SchemaFactory:http://www.w3.org/XML/XMLSchema/v1.1","org.apache.xerces.jaxp.validation.XMLSchema11Factory");
    4. I tried by creating the Imported Archive objects for all the Xerces jars that we require for validation, within the same SWCV, namespace. But still I get the same exception as above (IllegalArgumentException)
    5. The link [http://help.sap.com/saphelp_nw70/helpdata/en/b6/8097f5a5edea4f8dfc87ac87082b22/content.htm ] mentions that we need to place all the necessary jars at location <SAP_J2EE_Engine_install_dir>/cluster/server/bin/ext /. But even after placing the jars there, I get the same exception.
    I am not sure how we need to handle this. Has anybody faced a similar situation? Any suggestions?
    Regards,
    Sudheer

    Hi Stefan,
    Thanks for the reply.
    We are on PI 7.1 SP 06. The standard XML tools from jdk supports only XSD 1.0, as far as I know. And XSD 1.0 does not have the Assert feature (also known as, co-occurrence constraint). More details are provided here - [http://www.ibm.com/developerworks/library/x-xml11pt2/]
    To use XSD 1.1, we need a different implementation like Xerces-J. I am not sure how we can use it without external jars. I would like to mention again that I could achieve this by using an adapter module (EAR containing the jars), but I need to do this in Java Mapping (imported archive).
    Do you know how we can achieve this in any other way? Any other suggestions welcome.
    Thanks & Regards,
    Sudheer

  • Memory leak in xerces on Solaris platform

    We are seeing memory leaks with xerces 2.5.0 on the Solaris platform. Has anyone encountered a similar problem and is there a fix for it.

    I have seen other apps sucessfully running in AppStore. Is there something which I am missing ??????. Help me with the issue Guys.......... it's putting  me out of businness.

Maybe you are looking for

  • Old Quark files converted to Unix Executable

    I am trying to open an old Quark file saved on a CD from 2004 and it shows up as a Unix Executable file. I changed the suffix to .indd and .qxd and it says "It is missing a plug-in" or InDesign "may not support the file format." Any ideas on how to r

  • Nokia 6230i Malfunction problem

    my phone is nokia 6230i and i have DKU-2... i downloaded new version of PC suite...when i try to connect my phone to my PC, there's an error popping "ONE OF THE USB DEVICES ATTACHED TO THIS COMPUTER HAS MALFUNCTIONED..." pls help me im tired searchin

  • Hyperlinks, scrollable text frames, and Multistate objects

    I have a DPS layout with a scrollable text frame on one side, and a multistate object (MSO) on the other. I want to be able to hyperlink parts of the text in the text frame to specific states in the MSO. How do I do this?

  • Safari web browser issue in 4.3

    Prior to 4.3 on an original ipad I had no issues with accessing my companys web site applications. after purchesing an IPAD 2 I can no longer access the online apps. I get an error "Safari cannot open the page because the network connection was lost"

  • Any update on why File Export is grayed out in Premiere Elements 8?

    I just "upgraded" from 7. In the past versions I used Export command to quickly get myself an audio track exported.  Not a huge deal because it looks like I can accomplish the same thing in the "Share" area, but why wouldn't they remove the menu comm