3 Replies Latest reply on Apr 5, 2006 4:01 PM by silviu.marcu

    NullPointerException redeploying AxisServlet on JBoss 4.0.3R

    genman

      This is when reloading a servet inside of a .war file, inside a .ear file. The axis 1.2 jar files are in $JBOSS_DIST/server/default/lib. I'm not sure this is a problem with Axis or JBoss. (I don't have this problem on JBoss 3.2, but I'm using an older Axis dist. as well.)

      Thanks.

      Messages:

      2005-08-18 16:01:50,921 INFO [WebappClassLoader] ( ) Illegal access: this web application instance has been stopped already. Could not load META-INF/services/org.apache.axis.EngineConfigurationFactory. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
      2005-08-18 16:01:50,921 ERROR [[/app]] ( ) StandardWrapper.Throwable
      java.lang.NullPointerException
       at org.jboss.mx.loading.RepositoryClassLoader.findResources(RepositoryClassLoader.java:543)
       at java.lang.ClassLoader.getResources(ClassLoader.java:851)
       at java.lang.ClassLoader.getResources(ClassLoader.java:847)
       at java.lang.ClassLoader.getResources(ClassLoader.java:847)
       at org.apache.commons.discovery.jdk.JDK12Hooks.getResources(JDK12Hooks.java:150)
       at org.apache.commons.discovery.resource.DiscoverResources$1.getNextResources(DiscoverResources.java:153)
       at org.apache.commons.discovery.resource.DiscoverResources$1.getNextResource(DiscoverResources.java:129)
       at org.apache.commons.discovery.resource.DiscoverResources$1.hasNext(DiscoverResources.java:116)
       at org.apache.commons.discovery.resource.names.DiscoverNamesInFile$1.getNextClassNames(DiscoverNamesInFile.java:186)
       at org.apache.commons.discovery.resource.names.DiscoverNamesInFile$1.getNextClassName(DiscoverNamesInFile.java:170)
       at org.apache.commons.discovery.resource.names.DiscoverNamesInFile$1.hasNext(DiscoverNamesInFile.java:157)
       at org.apache.commons.discovery.resource.names.NameDiscoverers$1.getNextIterator(NameDiscoverers.java:143)
       at org.apache.commons.discovery.resource.names.NameDiscoverers$1.hasNext(NameDiscoverers.java:126)
       at org.apache.commons.discovery.resource.classes.ResourceClassDiscoverImpl$1.getNextResource(ResourceClassDiscoverImpl.java:159)
       at org.apache.commons.discovery.resource.classes.ResourceClassDiscoverImpl$1.hasNext(ResourceClassDiscoverImpl.java:147)
       at org.apache.axis.configuration.EngineConfigurationFactoryFinder$1.run(EngineConfigurationFactoryFinder.java:120)
       at java.security.AccessController.doPrivileged(Native Method)
       at org.apache.axis.configuration.EngineConfigurationFactoryFinder.newFactory(EngineConfigurationFactoryFinder.java:113)
       at org.apache.axis.transport.http.AxisServletBase.getEngineEnvironment(AxisServletBase.java:273)
       at org.apache.axis.transport.http.AxisServletBase.getEngine(AxisServletBase.java:172)
       at org.apache.axis.transport.http.AxisServletBase.getOption(AxisServletBase.java:396)
       at org.apache.axis.transport.http.AxisServletBase.init(AxisServletBase.java:112)
       at javax.servlet.GenericServlet.init(GenericServlet.java:211)
      


        • 1. Re: NullPointerException redeploying AxisServlet on JBoss 4.
          genman


          If somebody can't help out, I guess I should probably file as a bug.

          Thanks.

          • 2. Re: NullPointerException redeploying AxisServlet on JBoss 4.
            modema

            I had the same problem when I copied the axis jar -files to server/default/lib. The Axis classloader can't recover from redeployment, because it has static classloaders.

            The problem can be avoided by copying the Axis jars to your deployment package instead of servers lib folder. Then the AS can take care of proper classloading during the (un-)deployment.

            • 3. Re: NullPointerException redeploying AxisServlet on JBoss 4.

              I have the same problem,
              jboss 4.0.3SP1 with axis 1.3,
              The other scenario (to copy the axis jars to the application) is not working because of another problem.
              (my scenario is one ejb application and one web application, try to add axis to both ... and:
              ----------------------------------------------------------------
              16:00:37,066 WARN [EngineConfigurationFactoryFinder] Factory org.apache.axis.configuration.EngineConfigurationFactoryServlet Ignored: missing required method: public static EngineConfigurationFactory newFactory(Object).
              16:00:37,071 WARN [EngineConfigurationFactoryFinder] Factory org.apache.axis.configuration.EngineConfigurationFactoryDefault Ignored: missing required method: public static EngineConfigurationFactory newFactory(Object).
              16:00:38,054 INFO [STDOUT] AxisFault
              faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
              faultSubcode:
              faultString: java.lang.ClassCastException: org.apache.axis.attachments.AttachmentsImpl
              faultActor:
              faultNode:
              faultDetail:
              {http://xml.apache.org/axis/}stackTrace:java.lang.ClassCastException: org.apache.axis.attachments.AttachmentsImpl
              ----------------------------------------------------------------