0 Replies Latest reply on Nov 18, 2015 2:59 PM by Sagar Patur

    jaxb issue with jboss 6.4

    Sagar Patur Newbie

      We are trying to migrate applications from jboss 5.1 to 6.4  and all our applications having spring dependencies are failing to load the context file ..below is the exception we are seeing .....The xml seems to be good and can be loaded in simple jvm ....

       

      in jboss 5.1 and  simple JVM it looks like the jaxp parser is Using JAXP provider [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl] but in jboss 6.4 it uses Using JAXP provider [__redirected.__DocumentBuilderFactory] and end up with the below exception ..

       

      Appreciate all the help ..Thanks in advance  ...

       

      14:41:01,142 INFO  [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] (ServerService Thread Pool -- 14) Loading XML bean definitions from ServletContext resource [/WEB-INF/spring-context-servlet.xml]

      14:41:01,159 DEBUG [org.springframework.beans.factory.xml.DefaultDocumentLoader] (ServerService Thread Pool -- 14) Using JAXP provider [__redirected.__DocumentBuilderFactory]

      14:41:01,291 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] (ServerService Thread Pool -- 14) Loading schema mappings from [META-INF/spring.schemas]

      14:41:01,292 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] (ServerService Thread Pool -- 14) Loaded schema mappings: {}

      14:41:01,731 ERROR [org.springframework.web.context.ContextLoader] (ServerService Thread Pool -- 14) Context initialization failed: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 1 in XML document from ServletContext resource [/WEB-INF/spring-context-servlet.xml] is invalid; nested exception is org.xml.sax.SAXParseException: White spaces are required between publicId and systemId.

        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396) [spring-beans-3.1.4.RELEASE.jar:3.1.4.RELEASE]

       

      .....

      Caused by: org.xml.sax.SAXParseException: White spaces are required between publicId and systemId.

        at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:196)

        at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:175)

        at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:394)

        at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:322)

        at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:281)

        at org.apache.xerces.impl.XMLScanner.reportFatalError(XMLScanner.java:1496)

        at org.apache.xerces.impl.XMLScanner.scanExternalID(XMLScanner.java:1030)

        at org.apache.xerces.impl.XMLDocumentScannerImpl.scanDoctypeDecl(XMLDocumentScannerImpl.java:560)

        at org.apache.xerces.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(XMLDocumentScannerImpl.java:829)

        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:324)

        at org.apache.xerces.impl.xs.opti.SchemaParsingConfig.parse(SchemaParsingConfig.java:598)

        at org.apache.xerces.impl.xs.opti.SchemaParsingConfig.parse(SchemaParsingConfig.java:654)

        at org.apache.xerces.impl.xs.opti.SchemaDOMParser.parse(SchemaDOMParser.java:523)

        at org.apache.xerces.impl.xs.traversers.XSDHandler.getSchemaDocument(XSDHandler.java:1800)

        at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:521)

        at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:554)

        at org.apache.xerces.impl.xs.XMLSchemaValidator.findSchemaGrammar(XMLSchemaValidator.java:2526)

        at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1813)

        at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:724)

        at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:283)

        at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(XMLNSDocumentScannerImpl.java:733)

        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1754)

        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:324)

        at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:845)

        at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:768)

        at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:108)

        at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:230)

        at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:285)

        at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75) [spring-beans-3.1.4.RELEASE.jar:3.1.4.RELEASE]

        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388) [spring-beans-3.1.4.RELEASE.jar:3.1.4.RELEASE]

        ... 25 more

       

       

      Spring module is defined as below ..

      ---

      <?xml version="1.0" encoding="UTF-8"?>

      <module xmlns="urn:jboss:module:1.1" name="xanboo.common.spring.core">

      <dependencies>

          <module name="org.apache.commons.logging"  export="true"/>

        <module name="javaee.api" export="true"/>

            <module name="org.jboss.vfs"  export="true"/>

        </dependencies>

        <resources>

        <resource-root path="spring-aop-3.1.4.RELEASE.jar"/>

        <resource-root path="spring-asm-3.1.4.RELEASE.jar"/>

        <resource-root path="spring-beans-3.1.4.RELEASE.jar"/>

        <resource-root path="spring-context-3.1.4.RELEASE.jar"/>

        <resource-root path="spring-core-3.1.4.RELEASE.jar"/>

        <resource-root path="spring-expression-3.1.4.RELEASE.jar"/>

        <resource-root path="spring-tx-3.1.4.RELEASE.jar"/>

        <resource-root path="spring-jdbc-3.1.4.RELEASE.jar"/>

        <resource-root path="spring-context-support-3.1.4.RELEASE.jar"/>

        <resource-root path="spring-web-3.1.4.RELEASE.jar"/>

        <resource-root path="spring-webmvc-3.1.4.RELEASE.jar"/>

        </resources>

      </module>

      --------