1 Reply Latest reply on Mar 30, 2007 6:49 AM by Andrea Giovannini

    JBoss 4.0.5, AIX, JRE 1.4 and java.lang.ClassCastException

    Andrea Giovannini Newbie

      Hi,
      I'm trying to use JBoss 4.0.5.GA on an AIX server with IBM JRE 1.4.2
      I get this exceptions at startup:

      2007-03-27 11:15:19,125 ERROR [org.jboss.xb.binding.Util] Failed to create schema loader.
      java.lang.ClassCastException: org.apache.xerces.dom.DOMXSImplementationSourceImpl
       at org.w3c.dom.bootstrap.DOMImplementationRegistry.newInstance(Unknown Source)
       at org.jboss.xb.binding.Util$5.run(Util.java:512)
       at java.security.AccessController.doPrivileged1(Native Method)
       at java.security.AccessController.doPrivileged(AccessController.java(Compiled Code))
       at org.jboss.xb.binding.Util.getXSImplementation(Util.java:488)
       at org.jboss.xb.binding.Util.loadSchema(Util.java:387)
       at org.jboss.Main$1.run(Main.java:490)
      ...
       at java.lang.Thread.run(Thread.java:570)
      2007-03-27 11:15:19,139 INFO [org.jboss.system.ServiceConfigurator] Problem configuring service jboss.web:service=WebServer
      org.jboss.xb.binding.JBossXBException: Failed to parse source: Failed to create schema loader: org.apache.xerces.dom.DOMXSImplementationSourceImpl
       at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:170)
       at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:140)
       at org.jboss.system.ServiceConfigurator.parseJbxbSerialData(ServiceConfigurator.java:643)
       at org.jboss.system.ServiceConfigurator.configure(ServiceConfigurator.java:327)
       at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:460)
       at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:171)
       at org.jboss.system.ServiceController.install(ServiceController.java:226)
      ...
       at org.jboss.Main$1.run(Main.java:490)
       at java.lang.Thread.run(Thread.java:570)
      Caused by: java.lang.IllegalStateException: Failed to create schema loader: org.apache.xerces.dom.DOMXSImplementationSourceImpl
       at org.jboss.xb.binding.Util$5.run(Util.java:518)
       at java.security.AccessController.doPrivileged1(Native Method)
       at java.security.AccessController.doPrivileged(AccessController.java(Compiled Code))
       at org.jboss.xb.binding.Util.getXSImplementation(Util.java:488)
       at org.jboss.xb.binding.Util.loadSchema(Util.java:387)
       at org.jboss.xb.binding.sunday.unmarshalling.XsdBinder.bind(XsdBinder.java:166)
       at org.jboss.xb.binding.sunday.unmarshalling.XsdBinder.bind(XsdBinder.java:137)
       at org.jboss.xb.binding.sunday.unmarshalling.DefaultSchemaResolver.resolve(DefaultSchemaResolver.java:248)
       at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.startElement(SundayContentHandler.java:162)
       at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$DelegatingContentHandler.startElement(SaxJBossXBParser.java:301)
       at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
       at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
       at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
       at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
       at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
       at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
       at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
       at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
       at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
       at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:166)
       ... 89 more
      


      No problems with:
      - JBoss 3.2.1 with same AIX server and same JRE
      - JBoss 4.0.5 GA on Windows XP with JDK 1.4.2

      I noticed that the IBM JRE 1.4 has a file <JAVA INSTALLATION DIR>/jre/lib/xml.jar and I think that it could be the reason of the ClassCastException, with a clash between that jar file and JBOSS/lib/endorsed/xercesImpl.jar

      Am I correct? How can I solve this problem?

      Thanks in advance,
      Andrea