3 Replies Latest reply on Apr 22, 2005 1:19 AM by Anil Saldanha

    JBoss+JDK1.4+Xerces

    Andrea Giovannini Newbie

      Hi,
      I'm running JBoss 3.0.3 with JDK 1.4 which comes with Crimson as XML parser but I want to configure JBoss to use Xerces so:
      - I modified the run.bat script to set the relevant JAXP properties
      set JAXP=-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
      set JAXP=%JAXP% -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl
      set JAVA_OPTS=%JAVA_OPTS% -Dprogram.name=%PROGNAME% %JAXP%
      ...

      - then I put xerces.jar in JBOSS_HOME\lib

      - then I've started JBoss but I get the following error

      18:50:05,198 INFO [MainDeployer] Starting deployment of package: file:/C:/Java/
      jboss-3.0.3_tomcat-4.0.5/server/default/conf/jboss-service.xml
      18:50:05,258 ERROR [Server] start failed
      javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.Doc
      umentBuilderFactoryImpl not found
      at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderF
      actory.java:99)
      at org.jboss.deployment.SARDeployer.parseDocument(SARDeployer.java:619)
      at org.jboss.deployment.SARDeployer.init(SARDeployer.java:150)
      at org.jboss.deployment.MainDeployer.init(MainDeployer.java:668)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:604)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:580)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:564)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:324)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:221)
      at org.jboss.Main.boot(Main.java:148)
      at org.jboss.Main$1.run(Main.java:381)
      at java.lang.Thread.run(Thread.java:536)
      javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.Doc
      umentBuilderFactoryImpl not found

      Then I modified the classpath adding xerces.jar and now it's OK.
      Can somebody tell me the reason?
      Why the problem does not arise if I don't set JAXP properties? I think that JBoss has to find the right parser via JAXP even if I don't set the properties, or am i wrong?


      Thank you very much in advance,
      Andrea