You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Daniel David Schäfer (JIRA)" <ax...@ws.apache.org> on 2005/06/22 11:31:17 UTC

[jira] Created: (AXIS-2076) WebappClassLoader: Lifecycle error : CL stopped

WebappClassLoader: Lifecycle error : CL stopped
-----------------------------------------------

         Key: AXIS-2076
         URL: http://issues.apache.org/jira/browse/AXIS-2076
     Project: Apache Axis
        Type: Bug
  Components: Basic Architecture  
    Versions: 1.2.1    
 Environment: Tomcat 4
    Reporter: Daniel David Schäfer
    Priority: Minor


After a webapp containing the AxisServlet was reloaded (e.g. touch on the web.xml) I get the message

    WebappClassLoader: Lifecycle error : CL stopped

This happens because Axis continues to use the old configuration with the old webapp-classloader.
I have located a place where a wrong parameter leads to this behaviour.

in org.apache.axis.transport.http.AxisServletBase there is a piece of code that tries to locate the axis-configuration:

        EngineConfiguration config =
            EngineConfigurationFactoryFinder.newFactory(servlet)
                    .getServerEngineConfig();

This call is passed to EngineConfigurationFactoryServlet.newFactory.(Object param) which checks if
the given param is an instance of ServletConfig. Unfortunately the calling code did not provide a ServletConfig but a HttpServlet.
I patched this in the code below.
I did not make use of the EngineConfigurationFactoryFinder instead I directly called the EngineConfigurationFactoryServlet,
because it has no risk to confuse the required configuration in this context.




===================================================================
RCS file: /usr/local/cvsroot/dev_projects/axis121/src/org/apache/axis/transport/http/AxisServletBase.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- dev_projects/axis121/src/org/apache/axis/transport/http/AxisServletBase.java	2005/06/22 07:05:27	1.3
+++ dev_projects/axis121/src/org/apache/axis/transport/http/AxisServletBase.java	2005/06/22 07:49:29	1.4
@@ -35,6 +35,7 @@
 import org.apache.axis.EngineConfiguration;
 import org.apache.axis.components.logger.LogFactory;
 import org.apache.axis.configuration.EngineConfigurationFactoryFinder;
+import org.apache.axis.configuration.EngineConfigurationFactoryServlet;
 import org.apache.axis.server.AxisServer;
 import org.apache.axis.utils.JavaUtils;
 import org.apache.commons.logging.Log;
@@ -270,9 +271,8 @@
             environment.put(AxisEngine.ENV_SERVLET_REALPATH,
                             webInfPath + File.separator + "attachments");
 
-        EngineConfiguration config =
-            EngineConfigurationFactoryFinder.newFactory(servlet)
-                    .getServerEngineConfig();
+        EngineConfiguration config = EngineConfigurationFactoryServlet.newFactory(
+            servlet.getServletConfig()).getServerEngineConfig();
 
         if (config != null) {
             environment.put(EngineConfiguration.PROPERTY_NAME, config);



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira