2 Replies Latest reply on May 10, 2002 2:52 PM by attila1

    Petstore xml/jaxp parsing problem with Jboss3RC2 VS Jboss 2.

    attila1

      Hi,
      When I'm running petstore 1.1.2 on jboss 2.4, it runs fine. However, I get stuck with an xml parsing problem around the time when it tries to load the file requestmappings.xml by using the class com.sun.j2ee.blueprints.petstore.control.web.ScreenFlowXmlDAO.java. I was getting the same parsing problem until I remove the jaxp.jar and parser.jar from the lib folder under petstore as per the patching instructions.

      Now when I upgrade to the jboss3.0RC2, I'm getting the same error all over again. Is there any changes with the jaxp.jar file that comes with jboss3RC2 or am I missing any files which were left out from jboss2.4 ?

      Here's a trace of the errors I get with jboss3.0 RC2 :
      22:27:02,293 INFO [Engine] webTierEntryPoint: init
      22:27:02,293 INFO [STDOUT] MainServlet: Initializing
      22:27:02,323 INFO [STDOUT] !!!!! LoadDocument , location is jndi:/localhost/estore/WEB-INF/xml/re
      questmappings.xml
      22:27:02,323 INFO [STDOUT] ScreenFlowXmlDAO URL error: java.net.MalformedURLException: unknown prot
      ocol: jndi
      22:27:02,333 ERROR [Engine] StandardWrapperValve[webTierEntryPoint]: Allocate exception for servlet
      webTierEntryPoint
      javax.servlet.ServletException: Servlet.init() for servlet webTierEntryPoint threw exception

      22:27:02,363 ERROR [Engine] ----- Root Cause -----
      java.lang.NullPointerException
      at com.sun.j2ee.blueprints.petstore.control.web.ScreenFlowXmlDAO.getRequestMappings(ScreenFl
      owXmlDAO.java:254)
      at com.sun.j2ee.blueprints.petstore.control.web.ScreenFlowXmlDAO.loadRequestMappings(ScreenF
      lowXmlDAO.java:120)
      at com.sun.j2ee.blueprints.petstore.control.web.MainServlet.init(MainServlet.java:47)
      at javax.servlet.GenericServlet.init(GenericServlet.java:258)
      at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:916)

        • 1. Re: Petstore xml/jaxp parsing problem with Jboss3RC2 VS Jbos
          attila1

          I also tried to modify the run.bat file and added these parts (well !!! customized to fit the jboss3.0RC2) :

          2.4 :
          REM Add the XML parser jars and set the JAXP factory names
          REM Crimson parser JAXP setup(default)
          set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;../lib/crimson.jar
          set JAXP=-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.crimson.jaxp.DocumentBuilderFactoryImpl
          set JAXP=%JAXP% -Djavax.xml.parsers.SAXParserFactory=org.apache.crimson.jaxp.SAXParserFactoryImpl


          3.0RC2:
          set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;../lib/crimson.jar;%JAVAC_JAR%;%RUNJAR%

          rem Setup JBoss sepecific properties
          set JAVA_OPTS=%JAVA_OPTS% -Djavax.xml.parsers.DocumentBuilderFactory=org.apache.crimson.jaxp.DocumentBuilderFactoryImpl
          set JAVA_OPTS=%JAVA_OPTS% -Djavax.xml.parsers.SAXParserFactory=org.apache.crimson.jaxp.SAXParserFactoryImpl


          But I still got the same parsing error. Thanks for any feedback.

          • 2. Re: Petstore xml/jaxp parsing problem with Jboss3RC2 VS Jbos
            attila1

            hmm, I'm not getting much of a response !!! Let me put it this way. In the patching instructions for the petstore 1.1.2, it says to remove jaxp.jar and parser.jar from the lib folder before you build the ear file. I found out that if I didn't remove those files, the petore app is unable to parse the requestmappings.xml file. If I remove those 2 files, then I don't have this problem. There is obviously a conflict between those 2 files and the xml parser used by jboss. Does anyone understand why this was happening and why the patching instructions asked to remove those 2 files explicitly.

            Thanks.