0 Replies Latest reply on Mar 25, 2002 11:58 AM by Andrea Giovannini

    Problems with Xalan and XML parser

    Andrea Giovannini Newbie

      Hi,
      I'm using using JBoss2.4.4+Tomcat4.0.1 on Win2k Professional with Sun JDK 1.3.0_2
      I've a XSLT transformation performed with Xalan (version 2.3.1) in a servlet and I get this error:

      [ERROR,Default] javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException: java.lang.ClassCastException: org.apache.crimson.jaxp.SAXParserFactoryImpl
      [ERROR,Default] at org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:816)

      I've also tried to configure Xerces in JBoss setting the relevant properties
      set JAXP=%JAXP% -Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
      set JAXP=%JAXP% -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl
      and putting xercesImpl.jar in JBoss classpath. But now I get this error during JBoss startup:

      [ERROR,EmbeddedCatalinaServiceSX] StandardContext[/postsales]: Servlet /postsales threw load() exceptionjavax.servlet.ServletException: Servlet.init() for servlet jsp threw exception
      at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:871)
      at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3267)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:3384)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:785)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:454)
      at org.jboss.web.catalina.EmbeddedCatalinaServiceSX.createWebContext(EmbeddedCatalinaServiceSX.java:428)
      at org.jboss.web.catalina.EmbeddedCatalinaServiceSX.performDeploy(EmbeddedCatalinaServiceSX.java:282)
      at org.jboss.web.AbstractWebContainer.deploy(AbstractWebContainer.java:191)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.deployment.J2eeDeployer.startModules(J2eeDeployer.java:505)
      at org.jboss.deployment.J2eeDeployer.startApplication(J2eeDeployer.java:459)
      at org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer.java:190)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.deployment.AutoDeployer.deploy(AutoDeployer.java:395)
      at org.jboss.deployment.AutoDeployer.run(AutoDeployer.java:233)
      at org.jboss.deployment.AutoDeployer.startService(AutoDeployer.java:371)
      at org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.java:103)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.configuration.ConfigurationService$ServiceProxy.invoke(ConfigurationService.java:967)
      at $Proxy0.start(Unknown Source)
      at org.jboss.util.ServiceControl.start(ServiceControl.java:79)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.Main.(Main.java:208)
      at org.jboss.Main$1.run(Main.java:110)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.jboss.Main.main(Main.java:106)


      I'm not sure but the problem seems related to the JBoss configuration.
      Any idea??
      Thank you very much in advance,
      Andrea