1 2 Previous Next 21 Replies Latest reply on Jun 5, 2004 8:53 PM by jww_xj

    servlet 2.3 web container first class loading in JBoss 3.2.3

    datriasteve

      I changed this
      false
      in jboss-service.xml

      To enable the servlet 2.3 web container first class loading.

      It seems that if I have 2 .wars containing different versions of the same .jar file, they both get the the .jar from the first .war deployed.

      Does that sound like the correct behavior?

        • 1. Re: servlet 2.3 web container first class loading in JBoss 3
          datriasteve

          BTW,

          I see my post is missing the attribute line from jboss-servicexml

          The attribute I set was Java2ClassLoadingCompliance and I set it to false.

          • 2. Re: servlet 2.3 web container first class loading in JBoss 3
            starksm64

            Both of these attributes must be set to false:

             <!-- Get the flag indicating if the normal Java2 parent first class
             loading model should be used over the servlet 2.3 web container first
             model.
             -->
             <attribute name="Java2ClassLoadingCompliance">false</attribute>
            
             <!-- A flag indicating if the JBoss Loader should be used. This loader
             uses a unified class loader as the class loader rather than the tomcat
             specific class loader.
             -->
             <attribute name="UseJBossWebLoader">false</attribute>
            


            • 3. Re: servlet 2.3 web container first class loading in JBoss 3
              skondam

              Hi Scott,
              After setting both the above flags to false, upon reboot, JBoss throws the following exceptions. How to fix this?

              17:50:08,680 INFO [Engine] StandardManager[/web-console]: Seeding of random number generator has been completed
              17:50:09,023 ERROR [STDERR] java.lang.NullPointerException
              17:50:09,023 ERROR [STDERR] at EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap.hash(ConcurrentReaderHashMap
              .java:297)
              17:50:09,023 ERROR [STDERR] at EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap.get(ConcurrentReaderHashMap.
              java:409)
              17:50:09,023 ERROR [STDERR] at org.jboss.system.Registry.lookup(Registry.java:51)
              17:50:09,023 ERROR [STDERR] at org.jboss.console.plugins.helpers.AbstractPluginWrapper.findPluginManager(AbstractPlu
              ginWrapper.java:252)
              17:50:09,023 ERROR [STDERR] at org.jboss.console.plugins.helpers.AbstractPluginWrapper.init(AbstractPluginWrapper.ja
              va:98)
              17:50:09,039 ERROR [STDERR] at org.jboss.console.plugins.helpers.BasePluginWrapper.init(BasePluginWrapper.java:72)
              17:50:09,039 ERROR [STDERR] at org.jboss.console.plugins.helpers.ServletPluginHelper.init(ServletPluginHelper.java:6
              1)
              17:50:09,039 ERROR [STDERR] at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:935)
              17:50:09,039 ERROR [STDERR] at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:823)
              17:50:09,039 ERROR [STDERR] at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3422)
              17:50:09,039 ERROR [STDERR] at org.apache.catalina.core.StandardContext.start(StandardContext.java:3623)
              17:50:09,039 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821)
              17:50:09,039 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
              17:50:09,039 ERROR [STDERR] at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
              17:50:09,039 ERROR [STDERR] at org.jboss.web.tomcat.tc4.EmbeddedTomcatService.createWebContext(EmbeddedTomcatService
              .java:549)
              17:50:09,039 ERROR [STDERR] at org.jboss.web.tomcat.tc4.EmbeddedTomcatService.performDeploy(EmbeddedTomcatService.ja
              va:309)
              17:50:09,039 ERROR [STDERR] at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:428)
              17:50:09,039 ERROR [STDERR] at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
              17:50:09,039 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
              17:50:09,039 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
              17:50:09,039 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
              17:50:09,039 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

              17:50:09,039 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:324)
              17:50:09,039 ERROR [STDERR] at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java
              :284)
              17:50:09,039 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
              17:50:09,039 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
              17:50:09,039 ERROR [STDERR] at $Proxy6.deploy(Unknown Source)
              17:50:09,039 ERROR [STDERR] at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:30
              2)
              17:50:09,039 ERROR [STDERR] at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:476)

              17:50:09,039 ERROR [STDERR] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractD
              eploymentScanner.java:201)
              17:50:09,039 ERROR [STDERR] at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymen
              tScanner.java:274)
              17:50:09,039 ERROR [STDERR] at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)



              MUCH MORE...

              • 4. Re: servlet 2.3 web container first class loading in JBoss 3
                datriasteve

                Hi Scott,

                I get the same error when setting both parameters to false. Do I need to change another configuration item as well?

                • 5. Re: servlet 2.3 web container first class loading in JBoss 3
                  skondam

                  In Jboss\server\default\deploy\jbossweb-tomcat41.sar\META-INF\jboss-service.xml
                  set the following attribute to false

                  <attribute name="UseJBossWebLoader">false</attribute>



                  AND

                  in your webapplication WEB-INF/jboss-web.xml set the following attribute to false

                  <class-loading java2ClassLoadingCompliance='false'/>


                  This worked for me


                  Thanks,
                  Sampath


                  • 6. Re: servlet 2.3 web container first class loading in JBoss 3
                    datriasteve

                    No Luck,

                    If I set this to false, I cannot deploy my app. Even with the other attribute set in jboss-web.xml

                    jboss-service.xml
                    <!-- A flag indicating if the JBoss Loader should be used. This loader
                    uses a unified class loader as the class loader rather than the tomcat
                    specific class loader.
                    -->
                    false</attribute

                    jboss-web.xml
                    <?xml version="1.0" encoding="UTF-8"?>
                    <!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.2//EN"
                    "http://www.jboss.org/j2ee/dtd/jboss-web.dtd">
                    <jboss-web>
                    <class-loading java2ClassLoadingCompliance='false'/>
                    </jboss-web>

                    • 7. Re: servlet 2.3 web container first class loading in JBoss 3
                      skondam

                      It worked in jboss-3.2.3 for me. Are you sure that the following set to true?

                      <attribute name="Java2ClassLoadingCompliance">true</attribute>


                      • 8. Re: servlet 2.3 web container first class loading in JBoss 3
                        datriasteve

                        So are you saying this combination worked for you?

                        jboss-web.xml:

                        Set this attribute:

                        <class-loading java2ClassLoadingCompliance='false'/>
                        

                        In \jboss-3.2.3\server\default\deploy\jbossweb-tomcat41.sar\META-INF\jboss-service.xml

                        Set these attributes:
                        <attribute name="Java2ClassLoadingCompliance">true</attribute>
                        <attribute name="UseJBossWebLoader">false</attribute>
                        


                        • 9. Re: servlet 2.3 web container first class loading in JBoss 3
                          skondam

                          It worked for me, I have some issues with JNDI names of the datasources. I don't how the classloader will affect the JNDI name?
                          Trying to resolve this, I will update once I solve this problem

                          • 10. Re: servlet 2.3 web container first class loading in JBoss 3
                            starksm64

                            To correct the web-console error, you change the web-console.war/WEB-INF/jboss-web.xml to:

                            <jboss-web>
                             <!-- Uncomment the security-domain to enable security. You will
                             need to edit the htmladaptor login configuration to setup the
                             login modules used to authentication users.
                             <security-domain>java:/jaas/web-console</security-domain>
                             -->
                             <class-loading java2ClassLoadingCompliance='true'/>
                            </jboss-web>
                            


                            and leave the jbossweb-tomcat41.sar/META-INF/jboss-service.xml settings
                            as:
                             <!-- Get the flag indicating if the normal Java2 parent first class
                             loading model should be used over the servlet 2.3 web container first
                             model.
                             -->
                             <attribute name="Java2ClassLoadingCompliance">false</attribute>
                            
                             <!-- A flag indicating if the JBoss Loader should be used. This loader
                             uses a unified class loader as the class loader rather than the tomcat
                             specific class loader.
                             -->
                             <attribute name="UseJBossWebLoader">false</attribute>
                            


                            to enable the default servlet 2.3 class loading model which loads from the war before the server.


                            • 11. Re: servlet 2.3 web container first class loading in JBoss 3
                              datriasteve

                              Scott,

                              Thanks that got past the web-console error.

                              Now the problem is in the loading of my application.

                              2004-05-05 09:08:04,453 ERROR [org.jboss.deployment.MainDeployer] could not start deployment: file:/D:/jboss-3.2.3/server/default/deploy/EspeakDispatch.war
                              java.lang.VerifyError: (class: org/apache/xerces/parsers/IntegratedParserConfiguration, method: configurePipeline signature: ()V) Incompatible type for getting or setting field
                               at java.lang.Class.newInstance0(Native Method)
                               at java.lang.Class.newInstance(Class.java:237)
                               at org.apache.xerces.util.ObjectFactory.newInstance(ObjectFactory.java:296)
                               at org.apache.xerces.util.ObjectFactory.createObject(ObjectFactory.java:224)
                               at org.apache.xerces.util.ObjectFactory.createObject(ObjectFactory.java:119)
                               at org.apache.xerces.parsers.SAXParser.<init>(SAXParser.java:95)
                               at org.apache.xerces.jaxp.SAXParserImpl.<init>(SAXParserImpl.java:102)
                               at org.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParser(SAXParserFactoryImpl.java:95)
                               at org.apache.commons.digester.Digester.getParser(Digester.java:686)
                               at org.apache.commons.digester.Digester.getXMLReader(Digester.java:902)
                               at org.apache.commons.digester.Digester.parse(Digester.java:1567)
                               at org.jboss.web.tomcat.tc4.SingleSignOnContextConfig.tldScanStream(SingleSignOnContextConfig.java:1132)
                               at org.jboss.web.tomcat.tc4.SingleSignOnContextConfig.tldScanJar(SingleSignOnContextConfig.java:1062)
                               at org.jboss.web.tomcat.tc4.SingleSignOnContextConfig.tldScan(SingleSignOnContextConfig.java:999)
                               at org.jboss.web.tomcat.tc4.SingleSignOnContextConfig.start(SingleSignOnContextConfig.java:752)
                               at org.jboss.web.tomcat.tc4.SingleSignOnContextConfig.lifecycleEvent(SingleSignOnContextConfig.java:255)
                               at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
                               at org.apache.catalina.core.StandardContext.start(StandardContext.java:3582)
                               at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821)
                               at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
                               at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
                               at org.jboss.web.tomcat.tc4.EmbeddedTomcatService.createWebContext(EmbeddedTomcatService.java:549)
                               at org.jboss.web.tomcat.tc4.EmbeddedTomcatService.performDeploy(EmbeddedTomcatService.java:309)
                               at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:428)
                               at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
                               at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
                               at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
                               at java.lang.reflect.Method.invoke(Native Method)
                               at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                               at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                               at $Proxy6.deploy(Unknown Source)
                               at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
                               at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:476)
                               at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
                               at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:274)
                               at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
                               at java.lang.reflect.Method.invoke(Native Method)
                               at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                               at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
                               at $Proxy0.start(Unknown Source)
                               at org.jboss.system.ServiceController.start(ServiceController.java:394)
                               at java.lang.reflect.Method.invoke(Native Method)
                               at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                               at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                               at $Proxy4.start(Unknown Source)
                               at org.jboss.deployment.SARDeployer.start(SARDeployer.java:226)
                               at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
                               at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
                               at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
                               at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:589)
                               at java.lang.reflect.Method.invoke(Native Method)
                               at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                               at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                               at $Proxy5.deploy(Unknown Source)
                               at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:384)
                               at org.jboss.system.server.ServerImpl.start(ServerImpl.java:291)
                               at org.jboss.Main.boot(Main.java:150)
                               at org.jboss.Main$1.run(Main.java:395)
                               at java.lang.Thread.run(Thread.java:484)


                              My war has a version of xercesImpl.jar, castor.jar and castor-xml.jar in it, maybe those versions are not compatible?

                              • 12. Re: servlet 2.3 web container first class loading in JBoss 3
                                pjaromin

                                I experienced the same issue discussed in this thread. I managed to resolve the VerifierError by removing the xercesImpl.jar (different version) from the war (also worked if I used the JBoss-supplied version in the war).

                                Now, I'm experiencing the JNDI "not bound" issue for my oracle datasource as described in an earlier post on this thread.

                                How do I resolve this problem?

                                • 13. Re: servlet 2.3 web container first class loading in JBoss 3
                                  datriasteve

                                  Using jBoss's xercesImpl.jar fixed the deploy problem as well. Sorry, but I dont get JNDI not bound issues, although my classes12.zip is in jBoss's default\lib, as opposed to my .war

                                  • 14. Re: servlet 2.3 web container first class loading in JBoss 3
                                    sven.scheil

                                    We are using jboss 3.2.2 and I had the same problem deploying two war files containing a set of same classes: Always the classes from the war that was deployed first are used by the second (war) application.

                                    After I made the changes scott describes the deployment of the two war files is ok and both webapps are working fine.

                                    But now my server.log contains a lot of chars with ASCII code 0 !?

                                    What does this mean? Any hint?

                                    1 2 Previous Next