6 Replies Latest reply on Sep 21, 2006 7:03 AM by Duran David

    XPath creation failed in JBoss 4.0.3

    tsangcn Newbie

      Hello,

      Sorry, I post my problem here because I cannot find a suitable place to post.

      My application (deployed as EAR) is using XPathFactory.newInstance().newXPath() to create a XPath object to get data from a xml file and is running OK in JBoss 4.0.2. But when it is running in JBoss 4.0.3, it fails with the following message.


      java.lang.RuntimeException: XPathFactory#newInstance() failed to create an XPathFactory for the default object model: http://java.sun.com/jaxp/xpath/dom with the XPathFactoryConfigurationException: javax.xml.xpath.XPathFactoryConfigurationException: No XPathFctory implementation found for the object model: http://java.sun.com/jaxp/xpath/dom
      at javax.xml.xpath.XPathFactory.newInstance(Unknown Source)


      And, it also fails with JBoss 4.0.3sp1.

      I have tried moving xalan.jar from $JBOSS_HOME/lib/endorsed to $JBOSS_HOME/server/default/lib, but no help.

      My environment is Fedora Core 4 Linux and JDK 1.5.0_05.

      Please help.

      Thanks
      C. N.

        • 1. Re: XPath creation failed in JBoss 4.0.3
          Tyson Henry Newbie

          I concur with tsangcn. I am having the same problem porting my EJB3 SLSB from 4.0.1sp1 and JDK 1.5.0_03 to 4.0.3sp1 and 1.5.0_05. Running on Windows XP Professional. I have not yet determined if the problem is with a missing support jar file? Or some other initialization step. Or a conflict with jar files.

          I have removed my beans from the server and tested them stand-alone and the XPathFactory.newInstance() works outside of 4.0.3 with JDK 1.5.0_05 just fine.

          I would appreciate any ideas people have!

          TIA,
          Tyson

          • 2. Re: XPath creation failed in JBoss 4.0.3
            Scott Stark Master

            It looks like there is a conflict with the older 2.6.2 xalan.jar and the new xerces 2.7.1 jars bundled in the server lib/endorsed directory. I had to update the xalan.jar to version 2.7.0 to get the xpath test to work. Get the newer xalan from http://xml.apache.org/xalan-j/downloads.html

            • 3. Re: XPath creation failed in JBoss 4.0.3
              Edward Bridges Newbie

              Scott,

              Please not that this workaround you suggest causes a Class Not Found error, since there's a needed class in the earlier Xalan jar that is missing in the newer one. Can you advise on a different fix?

              Thanks


              2006-07-02 17:51:32,077 WARN [org.jboss.system.ServiceController] Problem creating service jboss.jca:service=ConnectionFactoryDeployer
              java.lang.NoClassDefFoundError: org/apache/xml/serializer/OutputPropertiesFactory
              at org.apache.xalan.templates.OutputProperties.(OutputProperties.java:81)
              at org.apache.xalan.templates.OutputProperties.(OutputProperties.java:56)
              at org.apache.xalan.processor.ProcessorOutputElem.startElement(ProcessorOutputElem.java:188)
              at org.apache.xalan.processor.StylesheetHandler.startElement(StylesheetHandler.java:623)
              at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
              at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
              at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(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.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
              at org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:920)
              at org.jboss.deployment.XSLSubDeployer.createService(XSLSubDeployer.java:127)
              at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:245)
              at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:228)
              at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:585)
              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
              at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:943)
              at $Proxy0.create(Unknown Source)
              at org.jboss.system.ServiceController.create(ServiceController.java:341)
              at org.jboss.system.ServiceController.create(ServiceController.java:284)
              at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:585)
              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
              at $Proxy4.create(Unknown Source)
              at org.jboss.deployment.SARDeployer.create(SARDeployer.java:241)
              at org.jboss.deployment.MainDeployer.create(MainDeployer.java:935)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:789)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
              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.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
              at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
              at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
              at $Proxy9.deploy(Unknown Source)
              at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:319)
              at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:507)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:192)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:265)
              at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274)
              at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:230)
              at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:585)
              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
              at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:943)
              at $Proxy0.start(Unknown Source)
              at org.jboss.system.ServiceController.start(ServiceController.java:428)
              at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:585)
              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
              at $Proxy4.start(Unknown Source)
              at org.jboss.deployment.SARDeployer.start(SARDeployer.java:285)
              at org.jboss.deployment.MainDeployer.start(MainDeployer.java:989)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:790)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:737)
              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.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
              at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
              at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
              at $Proxy5.deploy(Unknown Source)
              at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:453)
              at org.jboss.system.server.ServerImpl.start(ServerImpl.java:330)
              at org.jboss.Main.boot(Main.java:187)
              at org.jboss.Main$1.run(Main.java:438)
              at java.lang.Thread.run(Thread.java:595)
              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
              at $Proxy4.start(Unknown Source)
              at org.jboss.deployment.SARDeployer.start(SARDeployer.java:285)
              at org.jboss.deployment.MainDeployer.start(MainDeployer.java:989)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:790)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:737)
              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.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
              at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
              at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
              at $Proxy5.deploy(Unknown Source)
              at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:453)
              at org.jboss.system.server.ServerImpl.start(ServerImpl.java:330)
              at org.jboss.Main.boot(Main.java:187)
              at org.jboss.Main$1.run(Main.java:438)
              at java.lang.Thread.run(Thread.java:595)
              2006-07-02 17:51:37,417 ERROR [org.jboss.deployment.scanner.URLDeploymentScanner] Incomplete Deployment listing:

              --- Packages waiting for a deployer ---
              org.jboss.deployment.DeploymentInfo@c8d75f67 { url=file:/opt/jboss4/server/default/deploy/hsqldb-ds.xml }
              deployer: null
              status: null
              state: INIT_WAITING_DEPLOYER
              watch: file:/opt/jboss4/server/default/deploy/hsqldb-ds.xml
              altDD: null
              lastDeployed: 1151877096001
              lastModified: 1151877095000
              mbeans:

              org.jboss.deployment.DeploymentInfo@1adb08a4 { url=file:/opt/jboss4/server/default/deploy/jms/jms-ds.xml }
              deployer: null
              status: null
              state: INIT_WAITING_DEPLOYER
              watch: file:/opt/jboss4/server/default/deploy/jms/jms-ds.xml
              altDD: null
              lastDeployed: 1151877096006
              lastModified: 1151877096000
              mbeans:

              --- Incompletely deployed packages ---
              org.jboss.deployment.DeploymentInfo@c8d75f67 { url=file:/opt/jboss4/server/default/deploy/hsqldb-ds.xml }
              deployer: null
              status: null
              state: INIT_WAITING_DEPLOYER
              watch: file:/opt/jboss4/server/default/deploy/hsqldb-ds.xml
              altDD: null
              lastDeployed: 1151877096001
              lastModified: 1151877095000
              mbeans:

              org.jboss.deployment.DeploymentInfo@1adb08a4 { url=file:/opt/jboss4/server/default/deploy/jms/jms-ds.xml }
              deployer: null
              status: null
              state: INIT_WAITING_DEPLOYER
              watch: file:/opt/jboss4/server/default/deploy/jms/jms-ds.xml
              altDD: null
              lastDeployed: 1151877096006
              lastModified: 1151877096000
              mbeans:

              --- MBeans waiting for other MBeans ---
              ObjectName: jboss.ejb:service=EJBTimerService,persistencePolicy=database
              State: CONFIGURED
              I Depend On:
              jboss.jca:service=DataSourceBinding,name=DefaultDS

              ObjectName: jboss.mq:service=InvocationLayer,type=HTTP
              State: CONFIGURED
              I Depend On:
              jboss.mq:service=Invoker
              jboss.web:service=WebServer

              ObjectName: jboss:service=KeyGeneratorFactory,type=HiLo
              State: CONFIGURED
              I Depend On:
              jboss:service=TransactionManager
              jboss.jca:service=DataSourceBinding,name=DefaultDS

              ObjectName: jboss.jca:service=ConnectionFactoryDeployer
              State: FAILED
              Reason: java.lang.NoClassDefFoundError: org/apache/xml/serializer/OutputPropertiesFactory

              ObjectName: jboss.mq:service=StateManager
              State: CONFIGURED
              I Depend On:
              jboss.jca:service=DataSourceBinding,name=DefaultDS
              Depends On Me:
              jboss.mq:service=DestinationManager

              ObjectName: jboss.mq:service=DestinationManager
              State: CONFIGURED
              I Depend On:
              jboss.mq:service=MessageCache
              jboss.mq:service=PersistenceManager
              jboss.mq:service=StateManager
              jboss:service=Naming
              Depends On Me:
              jboss.mq.destination:service=Topic,name=testTopic
              jboss.mq.destination:service=Topic,name=securedTopic
              jboss.mq.destination:service=Topic,name=testDurableTopic
              jboss.mq.destination:service=Queue,name=testQueue
              jboss.mq.destination:service=Queue,name=A
              jboss.mq.destination:service=Queue,name=B
              jboss.mq.destination:service=Queue,name=C
              jboss.mq.destination:service=Queue,name=D
              jboss.mq.destination:service=Queue,name=ex
              jboss.mq:service=SecurityManager
              jboss.mq.destination:service=Queue,name=DLQ

              ObjectName: jboss.mq:service=PersistenceManager
              State: CONFIGURED
              I Depend On:
              jboss.jca:service=DataSourceBinding,name=DefaultDS
              Depends On Me:
              jboss.mq:service=DestinationManager

              ObjectName: jboss.mq.destination:service=Topic,name=testTopic
              State: CONFIGURED
              I Depend On:
              jboss.mq:service=DestinationManager
              jboss.mq:service=SecurityManager

              ObjectName: jboss.mq.destination:service=Topic,name=securedTopic
              State: CONFIGURED
              I Depend On:
              jboss.mq:service=DestinationManager
              jboss.mq:service=SecurityManager

              ObjectName: jboss.mq.destination:service=Topic,name=testDurableTopic
              State: CONFIGURED
              I Depend On:
              jboss.mq:service=DestinationManager
              jboss.mq:service=SecurityManager

              ObjectName: jboss.mq.destination:service=Queue,name=testQueue
              State: CONFIGURED
              I Depend On:
              jboss.mq:service=DestinationManager
              jboss.mq:service=SecurityManager

              ObjectName: jboss.mq.destination:service=Queue,name=A
              State: CONFIGURED
              I Depend On:
              jboss.mq:service=DestinationManager

              ObjectName: jboss.mq.destination:service=Queue,name=B
              State: CONFIGURED
              I Depend On:
              jboss.mq:service=DestinationManager

              ObjectName: jboss.mq.destination:service=Queue,name=C
              State: CONFIGURED
              I Depend On:
              jboss.mq:service=DestinationManager

              ObjectName: jboss.mq.destination:service=Queue,name=D
              State: CONFIGURED
              I Depend On:
              jboss.mq:service=DestinationManager

              ObjectName: jboss.mq.destination:service=Queue,name=ex
              State: CONFIGURED
              I Depend On:
              jboss.mq:service=DestinationManager

              ObjectName: jboss.mq:service=Invoker
              State: CONFIGURED
              I Depend On:
              jboss.mq:service=TracingInterceptor
              jboss:service=Naming
              Depends On Me:
              jboss.mq:service=InvocationLayer,type=HTTP
              jboss.mq:service=InvocationLayer,type=JVM
              jboss.mq:service=InvocationLayer,type=UIL2

              ObjectName: jboss.mq:service=TracingInterceptor
              State: CONFIGURED
              I Depend On:
              jboss.mq:service=SecurityManager
              Depends On Me:
              jboss.mq:service=Invoker

              ObjectName: jboss.mq:service=SecurityManager
              State: CONFIGURED
              I Depend On:
              jboss.mq:service=DestinationManager
              Depends On Me:
              jboss.mq.destination:service=Topic,name=testTopic
              jboss.mq.destination:service=Topic,name=securedTopic
              jboss.mq.destination:service=Topic,name=testDurableTopic
              jboss.mq.destination:service=Queue,name=testQueue
              jboss.mq:service=TracingInterceptor
              jboss.mq.destination:service=Queue,name=DLQ

              ObjectName: jboss.mq.destination:service=Queue,name=DLQ
              State: CONFIGURED
              I Depend On:
              jboss.mq:service=DestinationManager
              jboss.mq:service=SecurityManager

              ObjectName: jboss.mq:service=InvocationLayer,type=JVM
              State: CONFIGURED
              I Depend On:
              jboss.mq:service=Invoker

              ObjectName: jboss.mq:service=InvocationLayer,type=UIL2
              State: CONFIGURED
              I Depend On:
              jboss.mq:service=Invoker

              --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
              ObjectName: jboss.jca:service=DataSourceBinding,name=DefaultDS
              State: NOTYETINSTALLED
              Depends On Me:
              jboss.ejb:service=EJBTimerService,persistencePolicy=database
              jboss:service=KeyGeneratorFactory,type=HiLo
              jboss.mq:service=StateManager
              jboss.mq:service=PersistenceManager

              ObjectName: jboss.jca:service=ConnectionFactoryDeployer
              State: FAILED
              Reason: java.lang.NoClassDefFoundError: org/apache/xml/serializer/OutputPropertiesFactory





              • 4. Re: XPath creation failed in JBoss 4.0.3
                Alan Olmanson Newbie

                The OutputPropertiesFactory is in the serializer.jar which is a part of the xalan implementation.

                • 5. Re: XPath creation failed in JBoss 4.0.3
                  Khalid Hajsaleh Newbie

                  I added serializer.jar to the endorsed directory and that seem to take care of the problem.

                  • 6. Re: XPath creation failed in JBoss 4.0.3
                    Duran David Newbie

                    Hello,

                    "eqbridges" wrote:

                    --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
                    ObjectName: jboss.jca:service=DataSourceBinding,name=DefaultDS
                    State: NOTYETINSTALLED
                    Depends On Me:
                    jboss.ejb:service=EJBTimerService,persistencePolicy=database
                    jboss:service=KeyGeneratorFactory,type=HiLo
                    jboss.mq:service=StateManager
                    jboss.mq:service=PersistenceManager



                    I have the same problem, what can i do please?