OutOfMemoryError in SchemaFactory.newSchema

Hello,
i need to validate an xml document against an xschema. i user the following code to test this with an xml of size 4KB and an xschema of 50K.
          final String sl = XMLConstants.W3C_XML_SCHEMA_NS_URI;
          SchemaFactory factory = SchemaFactory.newInstance(sl);
          StreamSource ss = new StreamSource("sap_remadv.xsd");
          Schema schema = factory.newSchema(ss);
          Validator validator =schema.newValidator();
          validator.validate(new StreamSource("edixml_remadv.xml"));     
factory.newSchema takes quite a lot of time and break with an OutOfMemoryError. I have set the VM parameters to -Xmx768M, which i think should be enough.
Are there an known issues? I need to use 1.4.2 JDK for this solution!
Thanks in advance
Christian

I am sorry, this method does not throw the OutOfMemoryException, it just does not get to an end.
I will open a new thread for this issue.

Similar Messages

  • SchemaFactory.newSchema can't be called more than one with the same sources

    I am using Java 5 or Java 6. Did you already observed such behavior? Seems a bug but I didn't find a Bug ID match.
    // Create an array of sources
    final InputStream xsd = new FileInputStream("src/xml.xsd");
    StreamSource[] sources = new StreamSource[1];
    sources[0] = new StreamSource(xsd);
    // Create the Schema Factory       
    final SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); // Create a schema
    Schema schema1 = schemaFactory.newSchema(sources);
    // Create a second schema, it will throw an Excepion
    Schema schema2 = schemaFactory.newSchema(sources);
    If you are creating a new array of sources before to create the second schema, it works fine. It seems that SchemaFactory.newSchema is making the passed sources as not "reusable"
    Thrown Exception :
    Exception in thread "main" org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'null', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:172)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:382)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
    at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaError(XSDHandler.java:2245)
    at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchema(XSDHandler.java:1590)
    at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:438)
    at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:556)
    at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:523)
    at com.sun.org.apache.xerces.internal.jaxp.validation.xs.SchemaFactoryImpl.newSchema(SchemaFactoryImpl.java:206)
    at javaapplication5.Main.main(Main.java:55)

    I've looked further into the matter and the problem is that the newSchema() method closes the underlying input stream, as a result of which there is no way to reuse the same source object if it is based on an input stream. There's another alternative: if it is not necessary for you to provide the schemas in an array, you can use the "newSchema(URL schema)" method. The advantage of using an URL object is that it can hold a reference to files inside a jar file.

  • Memory issue loading XML schema files

    Hi,
    I have an application that a startup reads available XML schema files from a folder and creates Validator objects that are put into a HashMap.
    I'm running into problems creating validation schema objects when the file size of the schema is just over 30kB in size.
    The following error message is given when testing with the "large" schemas:
    Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
         at com.sun.org.apache.xerces.internal.impl.dtd.models.CMStateSet.<init>(CMStateSet.java:100)
         at com.sun.org.apache.xerces.internal.impl.dtd.models.CMNode.firstPos(CMNode.java:96)
         at com.sun.org.apache.xerces.internal.impl.xs.models.XSCMBinOp.calcFirstPos(XSCMBinOp.java:136)
         at com.sun.org.apache.xerces.internal.impl.dtd.models.CMNode.firstPos(CMNode.java:97)
         at com.sun.org.apache.xerces.internal.impl.xs.XSComplexTypeDecl.getContentModel(XSComplexTypeDecl.java:185)
         at com.sun.org.apache.xerces.internal.impl.xs.XSConstraints.fullSchemaChecking(XSConstraints.java:457)
         at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:530)
         at com.sun.org.apache.xerces.internal.jaxp.validation.xs.SchemaFactoryImpl.newSchema(SchemaFactoryImpl.java:206)
         at javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:489)
    The smaller 1-10kB schemas can be stored without any problem regardless of the number I test (+1000).
    The problem occurs as soon as it handles these larger schemas in the source directory. Even only one 30kB schema is enough to consume the all memory.
    Below is the code uesd for creating the validation objects
    for(int i=0;i<files.length;i++){
        SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
        Source schemaFile = new StreamSource(files);
    schema = factory.newSchema(schemaFile); // Here is where the process fails
    Validator validator = schema.newValidator();
    hm.put(documentType, validator); //hm is the HashMap used as placeholder for Validator objects
    Regards,
    Håkan
    Edited by: dezer on Jun 2, 2010 5:04 AM
    Edited by: dezer on Jun 2, 2010 5:08 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Welcome to the Sun forums.
    dezer wrote:
    ..Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
    The smaller 1-10kB schemas can be stored without any problem regardless of the number I test (+1000).
    The problem occurs as soon as it handles these larger schemas in the source directory. Even only one 30kB schema is enough to consume the all memory.Are you certain that only one schema is involved? How does the code tell how many schemas there are?
    Below is the code uesd for creating the validation objects
    for(int i=0;i<files.length;i++){
    SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
    Source schemaFile = new StreamSource(files);
    schema = factory.newSchema(schemaFile); // Here is where the process fails
    Validator validator = schema.newValidator();
    hm.put(documentType, validator); //hm is the HashMap used as placeholder for Validator objects
    It would seem that if files.length is 10000, that would end up in around 30 times as much memory usage as for the 1000x10Kb schemas.

  • Error creating MDS session

    Hi,
    I am working with embedded oc4j and I am using form based authentication.The application also has a connection to Oracle database.The Jdev version I am using is Build JDEVADF_MAIN.M1_GENERIC_080131.1115.4839.The application gets deployed on embedded oc4j but when i try to login, I get the following exception.
    WARNING: Error creating MDS session
    oracle.adf.share.ADFShareException: Error creating MDS session
    at oracle.adf.share.config.ADFContextMDSConfigHelperImpl.createMDSSession(ADFContextMDSConfigHelperImpl.java:43)
    at oracle.adf.share.ADFContext.getMDSSessionAsObject(ADFContext.java:750)
    at oracle.jbo.mom.MOMParserMDS.getMDSSession(MOMParserMDS.java:59)
    at oracle.jbo.mom.MOMParserMDS.parse(MOMParserMDS.java:188)
    at oracle.jbo.mom.MOMParserNonMDS.readAndParse(MOMParserNonMDS.java:70)
    at oracle.jbo.mom.DefinitionContextStandard.readAndParse(DefinitionContextStandard.java:226)
    at oracle.jbo.mom.DefinitionManager.loadProjectDefinition(DefinitionManager.java:1391)
    at oracle.jbo.uicli.mom.JUMetaObjectManager.findCpx(JUMetaObjectManager.java:743)
    at oracle.jbo.uicli.mom.JUMetaObjectManager.loadCpx(JUMetaObjectManager.java:810)
    at oracle.adf.model.BindingRequestHandler.initializeBindingContext(BindingRequestHandler.java:347)
    at oracle.adf.model.BindingRequestHandler.beginRequest(BindingRequestHandler.java:136)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:176)
    at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
    at oracle.adfinternal.view.faces.webapp.rich.SharedLibraryFilter.doFilter(SharedLibraryFilter.java:135)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:281)
    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:69)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:281)
    at oracle.adfinternal.view.faces.activedata.ADSFilter.doFilter(ADSFilter.java:74)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:281)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:241)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:198)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:141)
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
    at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
    at oracle.security.jazn.oc4j.JAZNFilter$3.run(JAZNFilter.java:434)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:308)
    at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:452)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:583)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:334)
    at com.evermind.server.http.HttpRequestHandler.doDispatchRequest(HttpRequestHandler.java:942)
    at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:843)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:658)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:626)
    at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:417)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:189)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:163)
    at oracle.oc4j.network.ServerSocketReadHandler$ClientRunnable.run(ServerSocketReadHandler.java:275)
    at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:237)
    at oracle.oc4j.network.ServerSocketAcceptHandler.access$800(ServerSocketAcceptHandler.java:29)
    at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:877)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
    at java.lang.Thread.run(Thread.java:595)
    Caused by: oracle.adf.share.ADFShareException: getMDSInstance error
    at oracle.adf.share.config.FallbackConfigImpl.getMDSInstance(FallbackConfigImpl.java:89)
    at oracle.adf.share.config.FallbackConfigImpl.getDefaultMDSInstance(FallbackConfigImpl.java:99)
    at oracle.adf.share.config.ADFConfigImpl.getMDSInstance(ADFConfigImpl.java:513)
    at oracle.adf.share.config.ADFContextMDSConfigHelperImpl.createMDSSession(ADFContextMDSConfigHelperImpl.java:36)
    ... 43 more
    Caused by: oracle.mds.exception.MDSRuntimeException: schema_reference.4: Failed to read schema document 'code-source:/C:/jdev latest sanity/JDEVADF_MAIN.M1_GENERIC_080131.1115.4839/mds/lib/mdsrt.jar!/oracle/mds/xsd/mdsConfig.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
    at oracle.mds.internal.config.ConfigurationUtils.setSchemaOnUnmarshaller(ConfigurationUtils.java:495)
    at oracle.mds.internal.config.ConfigurationUtils.getBeanFromElement(ConfigurationUtils.java:159)
    at oracle.mds.config.MDSConfig.loadFromElement(MDSConfig.java:795)
    at oracle.mds.config.MDSConfig.<init>(MDSConfig.java:359)
    at oracle.adf.share.config.ADFMDSConfig.getDefaultMDSInstance(ADFMDSConfig.java:354)
    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 oracle.adf.share.config.FallbackConfigImpl.getMDSInstance(FallbackConfigImpl.java:66)
    ... 46 more
    Caused by: org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'code-source:/C:/jdev latest sanity/JDEVADF_MAIN.M1_GENERIC_080131.1115.4839/mds/lib/mdsrt.jar!/oracle/mds/xsd/mdsConfig.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:172)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:382)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
    at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaError(XSDHandler.java:2245)
    at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchema(XSDHandler.java:1590)
    at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:438)
    at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:556)
    at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:523)
    at com.sun.org.apache.xerces.internal.jaxp.validation.xs.SchemaFactoryImpl.newSchema(SchemaFactoryImpl.java:206)
    at javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:489)
    at javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:521)
    at oracle.mds.internal.config.ConfigurationUtils.setSchemaOnUnmarshaller(ConfigurationUtils.java:491)
    ... 55 more
    Mar 12, 2008 4:39:29 PM com.evermind.server.ServerBase log
    WARNING: OracleIRM-IRMWebV1.1-webapp: Servlet error
    oracle.security.jazn.JAZNRuntimeException: Error creating MDS session
    at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:480)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:583)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:334)
    at com.evermind.server.http.HttpRequestHandler.doDispatchRequest(HttpRequestHandler.java:942)
    at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:843)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:658)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:626)
    at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:417)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:189)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:163)
    at oracle.oc4j.network.ServerSocketReadHandler$ClientRunnable.run(ServerSocketReadHandler.java:275)
    at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:237)
    at oracle.oc4j.network.ServerSocketAcceptHandler.access$800(ServerSocketAcceptHandler.java:29)
    at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:877)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
    at java.lang.Thread.run(Thread.java:595)
    Caused by: oracle.adf.share.ADFShareException: Error creating MDS session
    at oracle.adf.share.config.ADFContextMDSConfigHelperImpl.createMDSSession(ADFContextMDSConfigHelperImpl.java:43)
    at oracle.adf.share.ADFContext.getMDSSessionAsObject(ADFContext.java:750)
    at oracle.jbo.mom.MOMParserMDS.getMDSSession(MOMParserMDS.java:59)
    at oracle.jbo.mom.MOMParserMDS.parse(MOMParserMDS.java:188)
    at oracle.jbo.mom.MOMParserNonMDS.readAndParse(MOMParserNonMDS.java:70)
    at oracle.jbo.mom.DefinitionContextStandard.readAndParse(DefinitionContextStandard.java:226)
    at oracle.jbo.mom.DefinitionManager.loadProjectDefinition(DefinitionManager.java:1391)
    at oracle.jbo.uicli.mom.JUMetaObjectManager.findCpx(JUMetaObjectManager.java:743)
    at oracle.jbo.uicli.mom.JUMetaObjectManager.loadCpx(JUMetaObjectManager.java:810)
    at oracle.adf.model.BindingRequestHandler.initializeBindingContext(BindingRequestHandler.java:347)
    at oracle.adf.model.BindingRequestHandler.beginRequest(BindingRequestHandler.java:136)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:176)
    at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
    at oracle.adfinternal.view.faces.webapp.rich.SharedLibraryFilter.doFilter(SharedLibraryFilter.java:135)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:281)
    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:69)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:281)
    at oracle.adfinternal.view.faces.activedata.ADSFilter.doFilter(ADSFilter.java:74)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:281)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:241)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:198)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:141)
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
    at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
    at oracle.security.jazn.oc4j.JAZNFilter$3.run(JAZNFilter.java:434)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:308)
    at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:452)
    ... 16 more
    Caused by: oracle.adf.share.ADFShareException: getMDSInstance error
    at oracle.adf.share.config.FallbackConfigImpl.getMDSInstance(FallbackConfigImpl.java:89)
    at oracle.adf.share.config.FallbackConfigImpl.getDefaultMDSInstance(FallbackConfigImpl.java:99)
    at oracle.adf.share.config.ADFConfigImpl.getMDSInstance(ADFConfigImpl.java:513)
    at oracle.adf.share.config.ADFContextMDSConfigHelperImpl.createMDSSession(ADFContextMDSConfigHelperImpl.java:36)
    ... 43 more
    Caused by: oracle.mds.exception.MDSRuntimeException: schema_reference.4: Failed to read schema document 'code-source:/C:/jdev latest sanity/JDEVADF_MAIN.M1_GENERIC_080131.1115.4839/mds/lib/mdsrt.jar!/oracle/mds/xsd/mdsConfig.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
    at oracle.mds.internal.config.ConfigurationUtils.setSchemaOnUnmarshaller(ConfigurationUtils.java:495)
    at oracle.mds.internal.config.ConfigurationUtils.getBeanFromElement(ConfigurationUtils.java:159)
    at oracle.mds.config.MDSConfig.loadFromElement(MDSConfig.java:795)
    at oracle.mds.config.MDSConfig.<init>(MDSConfig.java:359)
    at oracle.adf.share.config.ADFMDSConfig.getDefaultMDSInstance(ADFMDSConfig.java:354)
    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 oracle.adf.share.config.FallbackConfigImpl.getMDSInstance(FallbackConfigImpl.java:66)
    ... 46 more
    Caused by: org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'code-source:/C:/jdev latest sanity/JDEVADF_MAIN.M1_GENERIC_080131.1115.4839/mds/lib/mdsrt.jar!/oracle/mds/xsd/mdsConfig.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:172)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:382)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
    at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaError(XSDHandler.java:2245)
    at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchema(XSDHandler.java:1590)
    at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:438)
    at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:556)
    at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:523)
    at com.sun.org.apache.xerces.internal.jaxp.validation.xs.SchemaFactoryImpl.newSchema(SchemaFactoryImpl.java:206)
    at javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:489)
    at javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:521)
    at oracle.mds.internal.config.ConfigurationUtils.setSchemaOnUnmarshaller(ConfigurationUtils.java:491)
    ... 55 more
    Let me know if somebody has an idea of this .

    This is because of space character is jdev location i.e C:/jdev latest sanity/. Change the location of jdev to another directory which doesn't contain spaces and try again.

  • Problem in parsing a particular XML file.

    Hello, I have an XML file like this:
    <eGov_IT:Intestazione xmlns:eGov_IT="http://www.cnipa.it/schemas/2003/eGovIT/Busta1_0/" xmlns:SOAP_ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.cnipa.it/schemas/2003/eGovIT/Busta1_0/
    E:\Progetti\EchoPorte\sviluppo\WEBCON~1\WEB-INF\risorse\Messaggio.xsd">
    <eGov_IT:IntestazioneMessaggio xmlns:eGov_IT="http://www.cnipa.it/schemas/2003/eGovIT/Busta1_0/">
    <eGov_IT:Collaborazione>PortaDelegata_PortaDiDominio_0000001_2007-10-05_12:26</eGov_IT:Collaborazione>
    <eGov_IT:Identificatore>PortaDelegata_PortaDiDominio_0000002_2007-10-05_12:26</eGov_IT:Identificatore>
    </eGov_IT:IntestazioneMessaggio>
    As you can see there are 2 elements in which the values are really similar. In fact in the Schema we use they have to match the same regular expression; here's the extract from my schema.
    <xsd:element name="Collaborazione" type="IdentificatoreType"/>
    <xsd:element name="Identificatore" type="IdentificatoreType"/>
    <xsd:simpleType name="IdentificatoreType">
    <xsd:restriction base="xsd:string">
    <xsd:pattern value="[\w]+_[\w]+_\d{7}_\d{4}\-\d{2}\-\d{2}_\d{2}:\d{2}"/>
    </xsd:restriction>
    </xsd:simpleType>
    I can CORRECTLY validate this expression using this code:
    public void validate (String doc, String schema) throws SAXParseException, SAXException
    try
    SchemaFactory schemaFactory = SchemaFactory.newInstance( XMLConstants.W3C_XML_SCHEMA_NS_URI );
    Schema schemaXSD = schemaFactory.newSchema( new File ( schema ) );
    Validator validator = schemaXSD.newValidator();
    DocumentBuilderFactory.newInstance().newDocumentBuilder();
    ByteArrayInputStream baisDoc = new ByteArrayInputStream(doc.getBytes());
    Document document = parser.parse(baisDoc);
    validator.validate( new DOMSource( document ) );
    And, in case the validation fails, I correctly gain a SAXParseException.
    The problem is that I can't understand if, in this case, the error is in the "Collaborazione" element or in the "Identificatore" element, because I get the following detailed message from the Exception:
    "cvc-pattern-valid: Value '' is not facet-valid with respect to pattern '[\w]+_[\w]+_\d{7}_\d{4}\-\d{2}\-\d{2}_\d{2}:\d{2}' for type 'IdentificatoreType'."
    How can I get more detailed informations about this error?
    Thanks everybody,
    Cris

    Check here:
    http://forum.java.sun.com/thread.jspa?threadID=5223284
    This is the correct post with my problem.
    Thanks!
    Cristiano

  • How to parse XML against XSD,DTD, etc.. locally (no internet connection) ?

    i've searched on how to parse xml against xsd,dtd,etc.. without the needs of internet connection..
    but unfortunately, only the xsd file can be set locally and still there needs the internet connection for the other features, properties.
    XML: GML file input from gui
    XSD: input from gui
    javax.xml
    package demo;
    import java.io.File;
    import java.io.IOException;
    import java.net.MalformedURLException;
    import java.net.URL;
    import javax.xml.XMLConstants;
    import javax.xml.transform.Source;
    import javax.xml.transform.stream.StreamSource;
    import javax.xml.validation.Schema;
    import javax.xml.validation.SchemaFactory;
    import javax.xml.validation.Validator;
    import org.xml.sax.SAXException;
    public class Sample1WithJavaxXML {
         public static void main(String[] args) {
              URL schemaFile = null;
              try {
                   //schemaFile = new URL("http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd");
                   File file0 = new File("AppSchema-C01-v1_0.xsd");
                   schemaFile = new URL(file0.toURI().toString());
              } catch (MalformedURLException e1) {
                   // TODO Auto-generated catch block
                   e1.printStackTrace();
              //Source xmlFile = new StreamSource(new File("web.xml"));
              Source xmlFile = new StreamSource(new File("C01.xml"));
              SchemaFactory schemaFactory = SchemaFactory
                  .newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
              //File file1 = new File("XMLSchema.dtd");
              //SchemaFactory schemaFactory = SchemaFactory
                   //.newInstance("javax.xml.validation.SchemaFactory:XMLSchema.dtd");
              Schema schema = null;
              try {
                   schema = schemaFactory.newSchema(schemaFile);
              } catch (SAXException e1) {
                   // TODO Auto-generated catch block
                   e1.printStackTrace();
              Validator validator = schema.newValidator();
              try {
                validator.validate(xmlFile);
                System.out.println(xmlFile.getSystemId() + " is valid");
              } catch (SAXException e) {
                System.out.println(xmlFile.getSystemId() + " is NOT valid");
                System.out.println("Reason: " + e.getLocalizedMessage());
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
    }Xerces
    package demo;
    import java.io.File;
    import java.util.Date;
    import org.apache.xerces.parsers.DOMParser;
    public class SchemaTest {
         private String xmlFile = "";
         private String xsdFile = "";
         public SchemaTest(String xmlFile, String xsdFile) {
              this.xmlFile = xmlFile;
              this.xsdFile = xsdFile;
         public static void main (String args[]) {
              File file0 = new File("AppSchema-C01-v1_0.xsd");
              String xsd = file0.toURI().toString();
              SchemaTest testXml = new SchemaTest("C01.xml",xsd);
              testXml.process();
         public void process() {
              File docFile = new File(xmlFile);
              DOMParser parser = new DOMParser();
              try {
                   parser.setFeature("http://xml.org/sax/features/validation", true);
                   parser.setFeature("http://apache.org/xml/features/validation/schema", true);
                   parser.setProperty("http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation",
                             xsdFile);
                   ErrorChecker errors = new ErrorChecker();
                   parser.setErrorHandler(errors);
                   System.out.println(new Date().toString() + " START");
                   parser.parse(docFile.toString());
              } catch (Exception e) {
                   System.out.print("Problem parsing the file.");
                   System.out.println("Error: " + e);
                   System.out.println(new Date().toString() + " ERROR");
                   return;
              System.out.println(new Date().toString() + " END");
    }

    Thanks a lot Sir DrClap..
    I tried to use and implement the org.w3c.dom.ls.LSResourceResolver Interface which is based on the SAX2 EntityResolver.
    please give comments the way I implement it. Here's the code:
    LSResourceResolver Implementation
    import org.w3c.dom.ls.LSInput;
    import org.w3c.dom.ls.LSResourceResolver;
    import abc.xml.XsdConstant.Path.DTD;
    import abc.xml.XsdConstant.Path.XSD;
    public class LSResourceResolverImpl implements LSResourceResolver {
         public LSResourceResolverImpl() {
          * {@inheritDoc}
         @Override
         public LSInput resolveResource(String type, String namespaceURI, String publicId, String systemId, String baseURI) {
              ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
              LSInput input = new LSInputImpl(publicId, systemId, baseURI);
              if ("http://www.w3.org/2001/xml.xsd".equals(systemId)) {
                   input.setByteStream(classLoader.getResourceAsStream(XSD.XML));
              } else if (XsdConstant.PUBLIC_ID_XMLSCHEMA.equals(publicId)) {
                   input.setByteStream(classLoader.getResourceAsStream(DTD.XML_SCHEMA));
              } else if (XsdConstant.PUBLIC_ID_DATATYPES.equals(publicId)) {
                   input.setByteStream(classLoader.getResourceAsStream(DTD.DATATYPES));
              return input;
    }I also implement org.w3c.dom.ls.LSInput
    import java.io.InputStream;
    import java.io.Reader;
    import org.w3c.dom.ls.LSInput;
    public class LSInputImpl implements LSInput {
         private String publicId;
         private String systemId;
         private String baseURI;
         private InputStream byteStream;
         private String stringData;
         public LSInputImpl(String publicId, String systemId, String baseURI) {
              super();
              this.publicId = publicId;
              this.systemId = systemId;
              this.baseURI = baseURI;
         //getters & setters
    }Then, here's the usage/application:
    I create XMLChecker class (SchemaFactory implementation is Xerces)
    import java.io.File;
    import java.io.IOException;
    import java.util.ArrayList;
    import java.util.List;
    import javax.xml.XMLConstants;
    import javax.xml.stream.FactoryConfigurationError;
    import javax.xml.transform.Source;
    import javax.xml.transform.stream.StreamSource;
    import javax.xml.validation.Schema;
    import javax.xml.validation.SchemaFactory;
    import javax.xml.validation.Validator;
    import org.xml.sax.ErrorHandler;
    import org.xml.sax.SAXException;
    import org.xml.sax.SAXParseException;
    import abc.xml.XsdConstant.Path.XSD;
    public class XMLChecker {
         private ErrorMessage errorMessage = new ErrorMessage();
         public boolean validate(String filePath){
              final ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
              List<Source> schemas = new ArrayList<Source>();
              schemas.add(new StreamSource(classLoader.getResourceAsStream(XSD.XML_SCHEMA)));
              schemas.add(new StreamSource(classLoader.getResourceAsStream(XSD.XLINKS)));
              schemas.add(new StreamSource(classLoader.getResourceAsStream("abc/xml/AppSchema.xsd")));
              SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
              schemaFactory.setResourceResolver(new LSResourceResolverImpl());
              try {
                   Schema schema = schemaFactory.newSchema(schemas.toArray(new Source[schemas.size()]));
                   Validator validator = schema.newValidator();
                   validator.setErrorHandler(new ErrorHandler() {
                        @Override
                        public void error(SAXParseException e) throws SAXException {
                             errorMessage.setErrorMessage(e.getMessage());
                             errorMessage.setLineNumber(e.getLineNumber());
                             errorMessage.setColumnNumber(e.getLineNumber());
                             throw e;
                        @Override
                        public void fatalError(SAXParseException e) throws SAXException {
                             errorMessage.setErrorMessage(e.getMessage());
                             errorMessage.setLineNumber(e.getLineNumber());
                             errorMessage.setColumnNumber(e.getLineNumber());
                             throw e;
                        @Override
                        public void warning(SAXParseException e) throws SAXException {
                             errorMessage.setErrorMessage(e.getMessage());
                             errorMessage.setLineNumber(e.getLineNumber());
                             errorMessage.setColumnNumber(e.getLineNumber());
                             throw e;
                   StreamSource source = new StreamSource(new File(filePath));
                   validator.validate(source);
              } catch (SAXParseException e) {
                   return false;
              } catch (SAXException e) {
                   errorMessage.setErrorMessage(e.getMessage());
                   return false;
              } catch (FactoryConfigurationError e) {
                   errorMessage.setErrorMessage(e.getMessage());
                   return false;
              } catch (IOException e) {
                   errorMessage.setErrorMessage(e.getMessage());
                   return false;
              return true;
         public ErrorMessage getErrorMessage() {
              return errorMessage;
    }Edited by: erossy on Aug 31, 2010 1:56 AM

  • Schema validation error

    Hi!
    A am parsing XML using JAXP 1.3. If i parse my XML with schema validation, i got an exception: org.xml.sax.SAXParseException: http://www.w3.org/TR/xml-schema-1#cvc-type.3.1.1?g_start&xsi:nil at line: 48 column: 27.
    XML line: 48:
    <g_start xsi:nil="true"></g_start>Schema for this element:
    <xsd:element name="g_start" type="xsd:date" minOccurs="0" nillable="true"/>If i validate my XML with XMLSpy, it's OK.
    Is it problem in my XML, or something wrong with JAXP?

    i wonder what happens if you use
    <g_start xsi:nil="true"/>Nothing changes.
    I make some small sample, if your wold like to test it.
    <?xml version = "1.0" encoding="UTF-8" standalone="yes"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:element name="root">
      <xsd:complexType>
       <xsd:choice maxOccurs="unbounded">
        <xsd:element name="elem" type="xsd:boolean" minOccurs="0" nillable="true"/>
       </xsd:choice>
      </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    <?xml version = "1.0" encoding="UTF-8" standalone="yes"?>
    <root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <elem xsi:nil="true"></elem>
    </root>
    SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
    Schema schema = schemaFactory.newSchema(new File("schema.xsd"));
    DocumentBuilderFactory documentFactory = DocumentBuilderFactory.newInstance();
    documentFactory.setSchema(schema);
    DocumentBuilder documentBuilder = documentFactory.newDocumentBuilder();
    Document document = documentBuilder.parse(new File("data.xml"));

  • XML Validation with External XSD

    Hi
    I have a xml file having DTD declaration, but my requirment is to validate this xml file with External XSD not with DTD which is declared inside the file.
    on executing java code below it is looking for DTD. how to supress validating against dtd.
    SAXParserFactory factory = SAXParserFactory.newInstance();
                   factory.setValidating(false);
                   factory.setNamespaceAware(true);
                   SchemaFactory schemaFactory =
                       SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema");
                   factory.setSchema(schemaFactory.newSchema(
                       new Source[] {new StreamSource("C:\\vittal\\Project\\received\\development-1\\da_xsd\\daAuthoring.xsd")}));
                   SAXParser parser = factory.newSAXParser();
                   XMLReader reader = parser.getXMLReader();
                   reader.setErrorHandler(new LogErrorHandler());
                   reader.parse(new InputSource("C:\\vittal\\Project\\received\\A-ADD\\DAContentExamples_2\\SampleGuidance_1.xml"));error i am getting is License file saxon-license.lic not found. Running in non-schema-aware mode
    java.io.FileNotFoundException: C:\vittal\Project\received\A-ADD\DAContentExamples_2\daAuthoring.dtd (The system cannot find the file specified)

    Hi
    I have a xml file having DTD declaration, but my requirment is to validate this xml file with External XSD not with DTD which is declared inside the file.
    on executing java code below it is looking for DTD. how to supress validating against dtd.
    SAXParserFactory factory = SAXParserFactory.newInstance();
                   factory.setValidating(false);
                   factory.setNamespaceAware(true);
                   SchemaFactory schemaFactory =
                       SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema");
                   factory.setSchema(schemaFactory.newSchema(
                       new Source[] {new StreamSource("C:\\vittal\\Project\\received\\development-1\\da_xsd\\daAuthoring.xsd")}));
                   SAXParser parser = factory.newSAXParser();
                   XMLReader reader = parser.getXMLReader();
                   reader.setErrorHandler(new LogErrorHandler());
                   reader.parse(new InputSource("C:\\vittal\\Project\\received\\A-ADD\\DAContentExamples_2\\SampleGuidance_1.xml"));error i am getting is License file saxon-license.lic not found. Running in non-schema-aware mode
    java.io.FileNotFoundException: C:\vittal\Project\received\A-ADD\DAContentExamples_2\daAuthoring.dtd (The system cannot find the file specified)

  • XML validation with StAX

    Hi,
    I have a requirement to validate XMLs during JAXB unmarshalling and during StAX parsing. The schema is packaged in a jar. I am able to successfully read the schema, and validate the XML during unmarshalling by setting the schema in the unmarshaller (through setSchema()).
    However, I am not able to validate it with StAX using the same schema and same XML.
    Here is the code snippet for StAX:
    StringReader stringReader = new StringReader(inputXMLStr);
    XMLEventReader xmlEventReader = XMLInputFactory.newInstance().createXMLEventReader(stringReader);
    EventFilter filter = new EventFilter() {
    public boolean accept(XMLEvent event) {
    return event.isStartElement();
    XMLEventReader xmlFilteredEventReader = xmlif.createFilteredReader(xmlEventReader, filter);
    Schema mySchema = getSchema(); // this method retrieves the schema by reading the schema files as
    stream source and calling schemaFactory.newSchema(...)
    Validator validator = mySchema.newValidator();
    validator.setErrorHandler(new SchemaErrorHandler());
    Source xmlSource = new StAXSource(xmlFilteredEventReader);
    validator.validate(xmlSource);
    I get a SAX Parse exception saying "cvc-elt.1: Cannot find the declaration of element 'myElement'"
    And I also see the following exception:
    Caused by: java.lang.NullPointerException
         at com.sun.org.apache.xalan.internal.xsltc.trax.StAXEvent2SAX.bridge(StAXEvent2SAX.java:171)
         at com.sun.org.apache.xalan.internal.xsltc.trax.StAXEvent2SAX.parse(StAXEvent2SAX.java:118)
         at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:651)
         at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:708)
         at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:313)
         at com.sun.org.apache.xerces.internal.jaxp.validation.StAXValidatorHelper.validate(StAXValidatorHelper.java:89)
         at com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl.validate(ValidatorImpl.java:114)
         at javax.xml.validation.Validator.validate(Validator.java:127)
    I am not able to figure out why the validation would work with UnMarshaller but not with StAX.
    Any help appreciated.
    Thanks
    Meera

    Have u tried the Stream STAX parser instead?
    something like:
    SchemaFactory factory = SchemaFactory
                             .newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
    File schemaLocation = new File(XSD_FILE_PATH);
                   Schema schema = factory.newSchema(schemaLocation);
    // 3. Get a validator from the schema.
    Validator validator = schema.newValidator();
    ErrorHandler lenient = new ForgivingErrorHandler(fw);
    validator.setErrorHandler(lenient);
    XMLInputFactory staxFactory = XMLInputFactory.newInstance();
    staxFactory.setProperty(XMLInputFactory.IS_REPLACING_ENTITY_REFERENCES,
                             Boolean.TRUE);
    staxFactory.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES,
                             Boolean.FALSE);
    staxFactory.setProperty(XMLInputFactory.IS_NAMESPACE_AWARE,
                             Boolean.TRUE);
    staxFactory     .setProperty(XMLInputFactory.IS_COALESCING, Boolean.TRUE);
    FileInputStream fis = new FileInputStream(XML_FILE_PATH);
    XMLStreamReader xmlr = staxFactory.createXMLStreamReader(fis);
    validator.validate(new StAXSource(xmlr));

  • OPA Data Source Connector failed to run on Linux server

    When I run data source connector for java on linux server using:
    java -Xms512m -Xmx512m -classpath "/usrfile/OPA/DataSourceConnector/lib/determinations-engine.jar:/usrfile/OPA/DataSourceConnector/lib/log4j-1.2.15.jar:/usrfile/OPA/DataSourceConnector/lib/sqlitejdbc-v044-native.jar:/usrfile/OPA/DataSourceConnector/lib/determinations-data-source-connector.jar:/usrfile/OPA/DataSourceConnector/lib/jsr173_api.jar:/usrfile/OPA/DataSourceConnectorlib/sjsxp.jar" com.oracle.determinations.connector.DataSourceConnector /usrfile/OPA/DataSourceConnector/data/DEMO3/run/DEMO3.xml -debug
    I got the following error message.So I think the path “..\conf\configuration.xsd” is hard coded and it raised this error. The detail error log is:
    27-12-2010, 11:35:20, INFO , Processing file /usrfile/OPA/DataSourceConnector/data/DEMO3/run/DEMO3.xml.
    27-12-2010, 11:35:20, ERROR, /usrfile/OPA/DataSourceConnector/bin/..\conf\configuration.xsd (No such file or directory)
    org.xml.sax.SAXException: /usrfile/OPA/DataSourceConnector/bin/..\conf\configuration.xsd (No such file or directory)
    at gnu.xml.validation.xmlschema.XMLSchemaSchemaFactory.newSchema(libgcj.so.7rh)
    at javax.xml.validation.SchemaFactory.newSchema(libgcj.so.7rh)
    at javax.xml.validation.SchemaFactory.newSchema(libgcj.so.7rh)
    at com.oracle.determinations.connector.schema.validation.Validate.compileSchema(Unknown Source)
    at com.oracle.determinations.connector.schema.validation.ValidateSAXStream.<init>(Unknown Source)
    at com.oracle.determinations.connector.XMLTools.validateXML(Unknown Source)
    at com.oracle.determinations.connector.Configuration.<init>(Unknown Source)
    at com.oracle.determinations.connector.DataSourceConnector.kickOff(Unknown Source)
    at com.oracle.determinations.connector.DataSourceConnector.main(Unknown Source)
    Caused by: java.io.FileNotFoundException: /usrfile/OPA/DataSourceConnector/bin/..\conf\configuration.xsd (No such file or directory)
    at gnu.java.nio.channels.FileChannelImpl.open(libgcj.so.7rh)
    at gnu.java.nio.channels.FileChannelImpl.<init>(libgcj.so.7rh)
    at gnu.java.nio.channels.FileChannelImpl.create(libgcj.so.7rh)
    at java.io.FileInputStream.<init>(libgcj.so.7rh)
    at gnu.java.net.protocol.file.Connection.connect(libgcj.so.7rh)
    at gnu.java.net.protocol.file.Connection.getInputStream(libgcj.so.7rh)
    at java.net.URL.openStream(libgcj.so.7rh)
    at gnu.xml.validation.xmlschema.XMLSchemaSchemaFactory.getDocument(libgcj.so.7rh)
    at gnu.xml.validation.xmlschema.XMLSchemaSchemaFactory.newSchema(libgcj.so.7rh)
    ...8 more
    I have checked the file path using following command:
    [root@bjx4 ~]# more /usrfile/OPA/DataSourceConnector/bin/..\conf\configuration.xsd
    /usrfile/OPA/DataSourceConnector/bin/..confconfiguration.xsd: No such file or directory
    [root@bjx4 ~]# more /usrfile/OPA/DataSourceConnector/bin/../conf/configuration.xsd
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://oracle.co
    m/determinations/connector/data-source" targetNamespace="http://oracle.com/deter
    minations/connector/data-source" elementFormDefault="qualified" version="10.0.0:
    20091013" xml:lang="en">
    <xsd:element name="configuration" type="configuration-type"/>
    <xsd:complexType name="configuration-type">
    <xsd:sequence>
    <xsd:element name="threads" type="threads-type" minOccurs="0" maxOccurs
    ="1"/>
    <xsd:element name="run-limit" type="run-limit-type" minOccurs="0" maxOc
    curs="1"/>
    <xsd:element name="time-out" type="time-out-type" minOccurs="0" maxOccu
    rs="1"/>
    <xsd:element name="unknown-value" type="unknown-type" minOccurs="0" max
    Occurs="1"/>
    <xsd:element name="uncertain-value" type="uncertain-type" minOccurs="0"
    maxOccurs="1"/>
    <!-- required elements -->
    <xsd:element name="data-sources" type="data-sources-type" minOccurs="1"
    maxOccurs="1"/>
    <xsd:element name="data-mappings" type="data-mappings-type" minOccurs="
    1" maxOccurs="1"/>
    [root@bjx4 ~]# more /usrfile/OPA/DataSourceConnector/bin/..\conf\configuration.xsd
    /usrfile/OPA/DataSourceConnector/bin/..confconfiguration.xsd: No such file or directory
    [root@bjx4 ~]# cls
    -bash: cls: command not found
    [root@bjx4 ~]# clear
    [root@bjx4 ~]# more /usrfile/OPA/DataSourceConnector/bin/..\conf\configuration.xsd
    /usrfile/OPA/DataSourceConnector/bin/..confconfiguration.xsd: No such file or directory
    [root@bjx4 ~]# more /usrfile/OPA/DataSourceConnector/bin/../conf/configuration.xsd
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://oracle.com/determinations/connector/data-source" targetNamespace="http://oracle.com/determinations/connector/data-source" elementF
    ormDefault="qualified" version="10.0.0:20091013" xml:lang="en">
    <xsd:element name="configuration" type="configuration-type"/>
    <xsd:complexType name="configuration-type">
    <xsd:sequence>
    <xsd:element name="threads" type="threads-type" minOccurs="0" maxOccurs="1"/>
    <xsd:element name="run-limit" type="run-limit-type" minOccurs="0" maxOccurs="1"/>
    <xsd:element name="time-out" type="time-out-type" minOccurs="0" maxOccurs="1"/>
    <xsd:element name="unknown-value" type="unknown-type" minOccurs="0" maxOccurs="1"/>
    <xsd:element name="uncertain-value" type="uncertain-type" minOccurs="0" maxOccurs="1"/>
    <!-- required elements -->
    <xsd:element name="data-sources" type="data-sources-type" minOccurs="1" maxOccurs="1"/>
    <xsd:element name="data-mappings" type="data-mappings-type" minOccurs="1" maxOccurs="1"/>
    <xsd:element name="output" type="output-type" minOccurs="1" maxOccurs="1"/>
    </xsd:sequence>
    </xsd:complexType>
    <!-- threads -->
    <xsd:complexType name="threads-type">
    <xsd:attribute name="value" type="xsd:integer" use="required">
    </xsd:attribute>
    </xsd:complexType>
    <!-- run-limit -->
    <xsd:complexType name="run-limit-type">
    <xsd:attribute name="value" type="xsd:integer" use="required">
    </xsd:attribute>
    </xsd:complexType>
    <!-- time-out -->
    <xsd:complexType name="time-out-type">
    <xsd:attribute name="value" type="xsd:integer" use="required">
    </xsd:attribute>
    </xsd:complexType>
    <!-- unknown value -->
    <xsd:complexType name="unknown-type">
    <xsd:attribute name="value" type="xsd:string" use="required">
    </xsd:attribute>
    </xsd:complexType>
    <!-- uncertain value -->
    <xsd:complexType name="uncertain-type">
    <xsd:attribute name="value" type="xsd:string" use="required">
    </xsd:attribute>
    </xsd:complexType>
    More(24%)
    Please help to resolve this problem, any suggestion is appreciate.

    We have confirmed this as a limitation in the current version 10.2.0 of the software, and earlier versions. We will provide more information on the timing and availability of a fix in the future.

  • Problem in SAX XSD schema validator

    hi
    I've tried this code to validate XML using xsd file:
    public static void validate(String xmlFilePath, URL schemaFileUrl)
            try
                SAXParserFactory factory = SAXParserFactory.newInstance();
                factory.setValidating(false);// stop standard validation to allow
                                                // custom schema
                factory.setNamespaceAware(true);
                SchemaFactory schemaFactory = SchemaFactory
                        .newInstance(javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI);
                factory.setSchema(schemaFactory.newSchema(schemaFileUrl));
                SAXParser parser = factory.newSAXParser();
                XMLReader reader = parser.getXMLReader();
                // Register the error handler
                reader.setErrorHandler(new JS_ValidationError());
                // Parse the file as the first argument on the command-line
                reader.parse(xmlFilePath);
            catch (SAXException e)
                System.out.println("Error: " + e.getMessage());
                e.printStackTrace();
            } catch (IOException e)
                System.out.println("Error: " + e.getMessage());
                e.printStackTrace();
            } catch (ParserConfigurationException e)
                // TODO Auto-generated catch block
                e.printStackTrace();
        } I have called this method ,but it issues this error :"unknown protocol" followed by windows partition name, in the debug I found that the value of the url is "*file://(*windows-partiton-char)/rest of path" !!!
    this should work but it doesn't!!
    so how can I fix this problem?
    thanks

    someone sent me this code to fix,it works:
    package schemaValidationPackage;
    * XsdSchemaSaxValidator.java
    * Copyright (c) 2007 by Dr. Herong Yang. All rights reserved.
    import javax.xml.validation.SchemaFactory;
    import javax.xml.validation.Schema;
    import javax.xml.XMLConstants;
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.parsers.SAXParser;
    import javax.xml.parsers.SAXParserFactory;
    import javax.xml.transform.sax.SAXSource;
    import org.xml.sax.InputSource;
    import org.xml.sax.SAXException;
    import org.xml.sax.XMLReader;
    import javax.xml.validation.Validator;
    import java.io.*;
    import java.net.URL;
    //also thanks for developer Hind Abd-El-Khalek
    public class XsdSchemaSaxValidator {
         public static void validate(String xmlFilePath, URL schemaFileUrl)
            try
                SAXParserFactory factory = SAXParserFactory.newInstance();
                factory.setValidating(false);// stop standard validation to allow
                                                // custom schema
                factory.setNamespaceAware(true);
                SchemaFactory schemaFactory = SchemaFactory
                        .newInstance(javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI);
                factory.setSchema(schemaFactory.newSchema(schemaFileUrl));
                SAXParser parser = factory.newSAXParser();
                XMLReader reader = parser.getXMLReader();
                // Register the error handler
                reader.setErrorHandler(new JS_ValidationError());
                // Parse the file as the first argument on the command-line
                reader.parse(xmlFilePath);
            catch (SAXException e)
                System.out.println("Error: " + e.getMessage());
                e.printStackTrace();
            } catch (IOException e)
                System.out.println("Error: " + e.getMessage());
                e.printStackTrace();
            } catch (ParserConfigurationException e)
                // TODO Auto-generated catch block
                e.printStackTrace();
      public static void validateXml(Schema schema, String xmlName) {
        try {
          // creating a Validator instance
          Validator validator = schema.newValidator();
          // preparing the XML file as a SAX source
          SAXSource source = new SAXSource(
            new InputSource(new java.io.FileInputStream(xmlName)));
          // validating the SAX source against the schema
          validator.validate(source);
          System.out.println();
          System.out.println("Validation passed.");
        } catch (Exception e) {
          // catching all validation exceptions
          System.out.println();
          System.out.println(e.toString());
      public static Schema loadSchema(String name) {
        Schema schema = null;
        try {
          String language = XMLConstants.W3C_XML_SCHEMA_NS_URI;
          SchemaFactory factory = SchemaFactory.newInstance(language);
          schema = factory.newSchema(new File(name));
        } catch (Exception e) {
          System.out.println(e.toString());
        return schema;
    }

  • XML Schema Validations in JDK1.4?

    Hi,
    The below code errors out when run on JDK1.4-          
    SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
    Schema schemaXSD = schemaFactory.newSchema(new File("C:\\TestSchema.xsd"));
    Validator validator = schemaXSD.newValidator();
    SAXSource source = new SAXSource(new InputSource("D:\\test.xml"));
    validator.validate(source);
    The exception is-
    Exception Message=http://www.w3.org/2001/XMLSchema
    java.lang.IllegalArgumentException: http://www.w3.org/2001/XMLSchema
    at javax.xml.validation.SchemaFactory.newInstance(Unknown Source)
    I also tried by adding the JAR file xml-apis.jar. But, it gives the same Exception.
    The above code runs fine on JDK1.5 but the requirement of my project is to use only JDK1.4 and run it on UNIX platform.
    Is there any way that this can work with JDK1.4?
    Otherwise are there any other JAVA API in JDK1.4 for performing XML Schema Validations?
    Thanks,
    Tanu

    Thanks DrClap.
    Does that mean JDK1.4 does not have any inbuilt classes for Schema Validations?
    Which parser should I use?
    Thanks,
    Tanu

  • Validating attributes with a non-schema namespace

    Hey,
    Just wondering if anyone could possibly help me with the following.
    Under 3.3.2 (http://www.w3.org/TR/xmlschema-1/#declare-element) it says that the definition of "element" can have "any attributes with non-schema namespace" .
    If I have a schema (a.xsd) and import another schema (b.xsd):
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
                       xmlns:b="http://www.foo.com"
                       elementFormDefault="qualified"
                       attributeFormDefault="unqualified">
         <xs:import namespace="http://www.foo.com"; schemaLocation="b.xsd"/>
        <xs:element name="someName" b:validAttribute="invalidValue"/>
    </xs:schema>Is there a way to ensure that b:validAttribute is validated when I use SchemaFactory#newSchema(StreamSource)?
    I've been hunting around and it just seems to ignore it / always let it pass regardless of the value.
    The w3 XMLSchema.xsd uses processContents="lax" for the xs:anyAttribute, so as I understand it, it should be validated it if it finds b.xsd (which it does)?
    As a side note, it also allows b:invalidAttribute="foo" which I'd also like to catch..
    Any help would be much appreciated!
    Cheers,
    Meph.

    If you take your schema and validate it against the schema for schemas from the W3C site then I am sure the 'b:validAttribute' will be validated.
    But I have no idea whether the SchemaFactory will process schemas that way (i.e. by validating them against the schema for schemas).

  • Need Debugging Help, Please

    Hi, I am going to bother you after my fruitless attempts to debug the code shown below. The message is "NoSuchMethodError: value" and I am very confused by the message.
    The message on the console is:
    Exception in thread "Main Thread" java.lang.NoSuchMethodError: value
         at com.sun.xml.bind.v2.model.impl.ClassInfoImpl.getAccessType(ClassInfoImpl.java:339)
         at com.sun.xml.bind.v2.model.impl.ClassInfoImpl.getProperties(ClassInfoImpl.java:228)
         at com.sun.xml.bind.v2.model.impl.RuntimeClassInfoImpl.getProperties(RuntimeClassInfoImpl.java:87)
         at com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:127)
         at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:49)
         at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:41)
         at com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:189)
         at com.sun.xml.bind.v2.model.impl.RegistryInfoImpl.<init>(RegistryInfoImpl.java:51)
         at com.sun.xml.bind.v2.model.impl.ModelBuilder.addRegistry(ModelBuilder.java:232)
         at com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:201)
         at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:327)
         at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:198)
         at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:76)
         at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:55)
         at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:124)
         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:597)
         at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:133)
         at javax.xml.bind.ContextFinder.find(ContextFinder.java:286)
         at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:372)
         at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:337)
         at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:244)
         at com.register.jaxb.JAXBUnMarshaller.unMarshall(JAXBUnMarshaller.java:18)
         at com.register.jaxb.JAXBUnMarshaller.main(JAXBUnMarshaller.java:64)
    and the source code is shown below:
    package com.register.jaxb;
    import generated.*;
    import javax.xml.bind.*;
    import javax.xml.validation.SchemaFactory;
    import javax.xml.validation.Schema;
    import org.xml.sax.SAXException;
    import java.io.*;
    import java.util.List;
    public class JAXBUnMarshaller {
         public void unMarshall(File xmlDocument) {
              try {
                   JAXBContext jaxbContext = JAXBContext.newInstance("generated");
                   Unmarshaller unMarshaller = jaxbContext.createUnmarshaller(); // this line is java:18
                   SchemaFactory schemaFactory = SchemaFactory
                             .newInstance("http://www.w3.org/2001/XMLSchema");
                   Schema schema = schemaFactory.newSchema(new File(
                             "gen_source/catalog.xsd"));
                   unMarshaller.setSchema(schema);
                   CustomValidationEventHandler validationEventHandler = new CustomValidationEventHandler();
                   unMarshaller.setEventHandler(validationEventHandler);
                   JAXBElement<CatalogType> catalogElement = (JAXBElement<CatalogType>) unMarshaller
                             .unmarshal(xmlDocument);
                   CatalogType catalog = catalogElement.getValue();
                   System.out.println("Journal Title: " + catalog.getJournalTitle());
                   System.out.println("Publisher: " + catalog.getPublisher());
                   List<JournalType> journalList = catalog.getJournal();
                   for (int i = 0; i < journalList.size(); i++) {
                        JournalType journal = (JournalType) journalList.get(i);
                        List<ArticleType> articleList = journal.getArticle();
                        for (int j = 0; j < articleList.size(); j++) {
                             ArticleType article = (ArticleType) articleList.get(j);
                             System.out.println("Article Edition: "
                                       + article.getEdition());
                             System.out.println("Title: " + article.getTitle());
                             System.out.println("Author: " + article.getAuthor());
              } catch (JAXBException e) {
                   System.out.println(e.toString());
              } catch (SAXException e) {
                   System.out.println(e.toString());
         public static void main(String[] argv) {
              File xmlDocument = new File("catalog.xml");
              JAXBUnMarshaller jaxbUnmarshaller = new JAXBUnMarshaller();
              jaxbUnmarshaller.unMarshall(xmlDocument);
         } // this line is java:64
         class CustomValidationEventHandler implements ValidationEventHandler {
              public boolean handleEvent(ValidationEvent event) {
                   if (event.getSeverity() == ValidationEvent.WARNING) {
                        return true;
                   if ((event.getSeverity() == ValidationEvent.ERROR)
                             || (event.getSeverity() == ValidationEvent.FATAL_ERROR)) {
                        System.out.println("Validation Error:" + event.getMessage());
                        ValidationEventLocator locator = event.getLocator();
                        System.out.println("at line number:" + locator.getLineNumber());
                        System.out.println("Unmarshalling Terminated");
                        return false;
                   return true;
    }

    user537770 wrote:
    Hi, I am going to bother you after my fruitless attempts to debug the code shown below. The message is "NoSuchMethodError: value" and I am very confused by the message. When you post code, please put it in code tags (you can find an example on the FAQ page, or in the welcome pages at the top of the thread).
    As for your problem, I'm way out of my comfort zone here, but the source code for ClassInfoImpl would suggest that the 'value' method is being invoked on an annotation called 'XmlAccessorType'; and since annotations only came in with version 5, I'm wondering if you have some sort of jar/jdk/jvm incompatibility. You might want to check that all of these are in sync.
    Winston

  • Unable to start em after deploying SOA composites

    Hi
    I have installed SOA 11.1.1.1.3 and cretaed the repositories. I have created a new domain soa_domain which supports SOA,Enterprise Manager,BAM.
    The first time I started the server, it started successfully and I was able to deploy two SOA composites and also test them successfully through the em console.
    Today I restarted my admin server and I find the following logs during startup:
    ####<Jan 6, 2011 10:07:47 AM GMT+05:30> <Warning> <J2EE> <INMUCHPC00278> <AdminServer> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1294288667512> <BEA-160195> <The application version lifecycle event listener oracle.security.jps.wls.listeners.JpsAppVersionLifecycleListener is ignored because the application em is not versioned.>
    ####<Jan 6, 2011 10:07:58 AM GMT+05:30> <Warning> <HTTP> <INMUCHPC00278> <AdminServer> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1294288678205> <BEA-101162> <User defined listener com.sun.faces.config.ConfigureListener failed: java.lang.NoSuchMethodError: org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar([Lorg/apache/xerces/xni/parser/XMLInputSource;)V.
    ####<Jan 6, 2011 10:07:58 AM GMT+05:30> <Error> <Deployer> <INMUCHPC00278> <AdminServer> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1294288678441> <BEA-149231> <*Unable to set the activation state to true for the application 'em'.*
    weblogic.application.ModuleException:      at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1514)
         at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:486)
         at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
         at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
         at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
         at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247)
         at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
         at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
         at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
         at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:1267)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
         at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:409)
         at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:58)
         at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
         at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
         at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:184)
         at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:361)
         at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)
         at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:200)
         at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
         at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:240)
         at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
         at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
         at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:180)
         at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:96)
         at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    *Caused By: java.lang.NoSuchMethodError: org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar([Lorg/apache/xerces/xni/parser/XMLInputSource;)V*
         at org.apache.xerces.jaxp.validation.XMLSchemaFactory.newSchema(Unknown Source)
         at javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:594)
         at com.sun.faces.config.DbfFactory.initSchema(DbfFactory.java:151)
         at com.sun.faces.config.DbfFactory.<clinit>(DbfFactory.java:120)
         at com.sun.faces.config.ConfigManager$ParseTask.<init>(ConfigManager.java:372)
         at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:280)
         at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:202)
         at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:195)
         at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:481)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:181)
         at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1863)
         at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3126)
         at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1512)
         at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:486)
         at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
         at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
         at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
         at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247)
         at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
         at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
         at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
         at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:1267)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
         at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:409)
         at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:58)
         at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
         at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
         at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:184)
         at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:361)
         at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)
         at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:200)
         at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
         at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:240)
         at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
         at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
         at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:180)
         at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:96)
         at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    And when I check the Admin console,Deployments section, the em application status is shown as failed. I tried starting it up from the Admin Console as well.
    But no luck....
    Has some one come across this before? Could you please help me figuring out the cause of this problem and how to overcome this?
    Regards
    Kshama

    When I mentioned I have deployed DBAdapter and JMSAdapter, I meant that, I added new outbound connection pools to the configuration and redeployed the adapters.
    Also, I compared the Admin Server logs( before and after redeploying Adapters), I found that there was a difference in java classpath it was referring to.
    After deployment of adapters, when I restarted the server, the classpath was referring to my classpath environment variable also which had an entry pointing to ant-1.6/xercesImpl.jar.
    I removed the entry from environment variable classpath.
    I have now reverted back the deployment order as before and everything seems to be working fine.
    Thanks All for your instant replies.
    Regards
    Kshama
    Edited by: Kshama Tamhankar on Jan 6, 2011 9:36 PM

Maybe you are looking for