6 Replies Latest reply on Aug 21, 2004 12:48 PM by supermario

    JBOSS Bug #824187 happens again in 3.2.5 and 4.0.0RC1

    supermario Newbie

      Hello,

      I have exactly the same output (NPE) described in BugId #824187 (sf.net) when I redeploy a webapp which contains Axis. In the Bugtracker of sourceforge this bug should be fixed since 3.2.3RC1, but I have the version 3.2.5 (Win32) / 4.0.0RC1 and this bug is not solved in this version. My Axis version is 1.1. Axis 1.2alpha also leads to the NullPointerException.
      If I stop the JBOSS and restart it, then the webapp is deployed correctly and my webservice works fine. But I want to use the hotdeploying feature and not stop/start Jboss every time. :-(

      Has anybody observed the same bug in versions higher than 3.2.3RC1 ?
      What can be the problem ? Was the bugfix forgotten in the releases after 3.2.3RC1 ?

      Best Regards,
      Mario

        • 1. Re: JBOSS Bug #824187 happens again in 3.2.5 and 4.0.0RC1
          supermario Newbie

          I just downloaded the version 3.2.3RC1 of JBOSS, deployed my webapp with the webservice and redeployed it without restarting JBOSS and it works fine.
          So, this bug fix which was done for 3.2.3RC1 was really forgotten in the release after 3.2.3RC1.
          Who is responsible for such bugs ? Is it possible to reopen the Bug #824187 and provide the bug fix also for the current stable 3.2.x version
          of JBOSS ?

          Best Regards,
          Mario

          • 2. Re: JBOSS Bug #824187 happens again in 3.2.5 and 4.0.0RC1
            Thomas Diesler Master

            Hi Mario,

            this bug is inherent to axis-1.1 and its use to the commons-discovery package. What happends is, that axis internally keeps a registry of classloaders it loads resources, factory classes, etc from. When you undeploy a package from jboss we remove the classloader from the jboss classloader repository. Axis then holds a reference to an invalid classloader and will try to reuse the same old classloader with every subsequent deployment.

            As you might know, starting with jboss-3.2.6 and jboss-4.0 we use an axis derivative based on axis-1.1 (axis-ws4ee). Could you please confirm that the issue exists in jboss-head? I expect it does not.
            For the jboss-3.2.6 release I'll bring axis-ws4ee in synch with head.

            I don't see how this can be fixed without changing the axis' use of statics. Especially classloaders kept in statics will sure kill hot redeployment.

            • 3. Re: JBOSS Bug #824187 happens again in 3.2.5 and 4.0.0RC1
              supermario Newbie

              Hello Thomas,

              Thanks for your reply. To be honest, I'm a newbie in the JBOSS/Java area. So it's hard for me to understand your explanation of the root problem to my redeploy problem.
              You want to say that it is not really a bug in jboss, but a wrong coding in axis, or ?!

              I have an own little .war file, with my webservice in Authentication.java, the correct web.xml and server-config.wsdd for registering my service and in the lib directory I copied the jars from axis 1.1 (axis.jar, saaj.jar, wsdl4j.jar, common jars, xerces jars).

              So, do you have a workaround for me, that I can use JBOSS 3.2.5 and hot redeploying of my .war file ?

              I tried to copy the axis-wsee.jar from 4.0.0RC1 to my war file but then I got some IncompatibleClassChange Exception in SOAPHeaderAxisImpl.

              Best Regards,
              Mario

              • 4. Re: JBOSS Bug #824187 happens again in 3.2.5 and 4.0.0RC1
                supermario Newbie

                Additional question:
                Why does it work to redeploy my .war in jboss 3.2.3RC1 ?? Didn't remove jboss 3.2.3RC1 the classloader from the repository amd so axis 1.1 worked with this version ?

                • 5. Re: JBOSS Bug #824187 happens again in 3.2.5 and 4.0.0RC1
                  Thomas Diesler Master

                  Hi Mario,

                  you might want to read up on jboss class loading to understand loader repositories, or better get your boss to send you to training. Coping axis-ws4ee.jar to your war has no effect.

                  I looked at the bugfix for #824187 it tried to load some commonly used stuff at service startup time. So the that classloader would stay valid. This only works, as long as a deployment does not try to discover (i.e. using commons-discovery) other stuff.

                  So the fix covered some ground, but was not a general solution. Trust me, static references to classloaders will not work in jboss and axis-1.1 has them.

                  Please also consider using J2EE compatible web services with JBossWS instead of JBoss.NET. JBoss.NET has entered maintenenance and will not be developed further.

                  No need to learn an out of date propriatary stack.

                  • 6. Re: JBOSS Bug #824187 happens again in 3.2.5 and 4.0.0RC1
                    supermario Newbie

                    After browsing the mailing lists of Axis and commons-discovery I finally found a solution for my problem. The NPE could be solved by a change in commons-discovery lib. Someone made this change and upload a patched commons-discovery.jar to apache.org repository. After copying this patched jar to my war file I can redeploy my Axis Webservice without any problems.

                    Here is the link to problem discussion:
                    http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26875

                    And here is the link to the patched commons-discovery.jar:
                    http://apache.org/dist/java-repository/commons-discovery/jars/commons-discovery-20040218.194635.jar

                    Bye,
                    Mario