You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Jon Ekdahl <jo...@xlent.se> on 2008/06/06 11:47:39 UTC

FW: IllegalStateException when undeploying webapp using an Axis2 client in JBoss


Hi,

I'm having some problems with undeploy/redeploy in JBoss. My web application uses an Axis2 client to call a web service. The following stack trace occurs on a regular basis when undeploying the web application (or shortly after, when GC/finalization is performed I assume).

09:52:59,578 INFO  [WebappClassLoader] Illegal access: this web application instance has been stopped already.
  Could not load org.apache.axis2.i18n.Messages.  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.
java.lang.IllegalStateException
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1244)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at org.apache.axis2.engine.AxisConfiguration.removeService(AxisConfiguration.java:545)
        at org.apache.axis2.client.Stub.cleanup(Stub.java:123)
        at org.apache.axis2.client.Stub.finalize(Stub.java:113)
        at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
        at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
        at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
        at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)


This leads me to think that maybe I should be calling the cleanup method in the client stub from a servlet context listener. Would this be a correct way to solve the problem?

Any help greatly appreciated!

Cheers, Jon

PS. My environment:
JBoss 4.2.2.GA
Axis2 1.4
Java version 1.6.0_02 (Sun)
OS Windows XP SP2