Stoyan Tsonev created AXIS2-5303:
------------------------------------

             Summary: In case of multiple Axis2 instances, some of them fail 
during parallel startup, as result of NPE in TempFileManager
                 Key: AXIS2-5303
                 URL: https://issues.apache.org/jira/browse/AXIS2-5303
             Project: Axis2
          Issue Type: Bug
          Components: kernel
    Affects Versions: 1.6.0
         Environment: AIX 6, WebSphere AS 7.0
            Reporter: Stoyan Tsonev


We are running WebSphere cluster with multiple instances of Axis2.
During parallel start-up all of them (together) are "trying" to do temp folders 
clean-up in the static initializer of TempFileManager
But some instances are "faster", some are "slower" and as result of this 
time-race "slow" instances can end-up in non-functional state (see the log 
bellow).

Solution: A simple check in method  "private static void recursiveDelete(File 
rootDir)" after "File[] files = rootDir.listFiles();"

if (files != null) { ...}

should fix the issue.

--- attached log ------

java.lang.ExceptionInInitializerError
        at java.lang.J9VMInternals.initialize(J9VMInternals.java:222)
        at org.apache.axis2.deployment.util.Utils.createTempFile(Utils.java:227)
        at 
org.apache.axis2.deployment.util.Utils.getURLsForAllJars(Utils.java:168)
        at 
org.apache.axis2.deployment.util.Utils.createClassLoader(Utils.java:852)
        at 
org.apache.axis2.deployment.repository.util.DeploymentFileData.setClassLoader(DeploymentFileData.java:115)
        at 
org.apache.axis2.deployment.ModuleDeployer.deploy(ModuleDeployer.java:70)
        at 
org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
        at 
org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:813)
        at 
org.apache.axis2.deployment.RepositoryListener.init(RepositoryListener.java:264)
        at 
org.apache.axis2.deployment.RepositoryListener.init2(RepositoryListener.java:69)
        at 
org.apache.axis2.deployment.RepositoryListener.<init>(RepositoryListener.java:64)
        at 
org.apache.axis2.deployment.DeploymentEngine.loadRepository(DeploymentEngine.java:158)
        at 
org.apache.axis2.deployment.WarBasedAxisConfigurator.getAxisConfiguration(WarBasedAxisConfigurator.java:228)
        at 
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:64)
        at 
org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:584)
        at 
org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:454)
        at 
com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:358)
        at 
com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.init(ServletWrapperImpl.java:169)
        at 
com.ibm.ws.webcontainer.servlet.ServletWrapper.initialize(ServletWrapper.java:1809)
        at 
com.ibm.wsspi.webcontainer.extension.WebExtensionProcessor.createServletWrapper(WebExtensionProcessor.java:98)
        at 
com.ibm.ws.webcontainer.webapp.WebApp.getServletWrapper(WebApp.java:1038)
        at 
com.ibm.ws.webcontainer.webapp.WebApp.getServletWrapper(WebApp.java:959)
        at 
com.ibm.ws.webcontainer.webapp.WebApp.initializeTargetMappings(WebApp.java:638)
        at 
com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinally(WebApp.java:436)
        at 
com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:304)
        at 
com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:100)
        at 
com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:166)
        at 
com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:731)
        at 
com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:616)
        at 
com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:376)
        at 
com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:668)
        at 
com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1127)
        at 
com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1319)
        at 
com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:610)
        at 
com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:944)
        at 
com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:740)
        at 
com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2051)
        at 
com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:385)
        at 
com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
        at 
com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:328)
        at 
com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$300(CompositionUnitMgrImpl.java:113)
        at 
com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:895)
        at 
com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:349)
        at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604)
Caused by: java.lang.NullPointerException
        at 
org.apache.axis2.deployment.util.TempFileManager.recursiveDelete(TempFileManager.java:138)
        at 
org.apache.axis2.deployment.util.TempFileManager.<clinit>(TempFileManager.java:203)
        at java.lang.J9VMInternals.initializeImpl(Native Method)
        at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
        ... 43 more
....

The addressing-1.6.0.mar module, which is not valid, caused 
org.apache.axis2.deployment.util.TempFileManager (initialization failure)
java.lang.NoClassDefFoundError: 
org.apache.axis2.deployment.util.TempFileManager (initialization failure)
        at java.lang.J9VMInternals.initialize(J9VMInternals.java:140)
        at org.apache.axis2.deployment.util.Utils.createTempFile(Utils.java:227)
        at 
org.apache.axis2.deployment.util.Utils.getURLsForAllJars(Utils.java:168)
        at 
org.apache.axis2.deployment.util.Utils.createClassLoader(Utils.java:852)
        at 
org.apache.axis2.deployment.repository.util.DeploymentFileData.setClassLoader(DeploymentFileData.java:115)
        at 
org.apache.axis2.deployment.ModuleDeployer.deploy(ModuleDeployer.java:70)
        at 
org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
        at 
org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:813)
        at 
org.apache.axis2.deployment.RepositoryListener.init(RepositoryListener.java:264)
        at 
org.apache.axis2.deployment.RepositoryListener.init2(RepositoryListener.java:69)
        at 
org.apache.axis2.deployment.RepositoryListener.<init>(RepositoryListener.java:64)
        at 
org.apache.axis2.deployment.DeploymentEngine.loadRepository(DeploymentEngine.java:158)
        at 
org.apache.axis2.deployment.WarBasedAxisConfigurator.getAxisConfiguration(WarBasedAxisConfigurator.java:228)
        at 
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:64)
        at 
org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:584)
        at 
org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:454)
        at 
com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:358)
        at 
com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.init(ServletWrapperImpl.java:169)
        at 
com.ibm.ws.webcontainer.servlet.ServletWrapper.initialize(ServletWrapper.java:1809)
        at 
com.ibm.wsspi.webcontainer.extension.WebExtensionProcessor.createServletWrapper(WebExtensionProcessor.java:98)
        at 
com.ibm.ws.webcontainer.webapp.WebApp.getServletWrapper(WebApp.java:1038)
        at 
com.ibm.ws.webcontainer.webapp.WebApp.getServletWrapper(WebApp.java:959)
        at 
com.ibm.ws.webcontainer.webapp.WebApp.initializeTargetMappings(WebApp.java:638)
        at 
com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinally(WebApp.java:436)
        at 
com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:304)
        at 
com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:100)
        at 
com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:166)
        at 
com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:731)
        at 
com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:616)
        at 
com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:376)
        at 
com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:668)
        at 
com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1127)
        at 
com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1319)
        at 
com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:610)
        at 
com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:944)
        at 
com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:740)
        at 
com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2051)
        at 
com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:385)
        at 
com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
        at 
com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:328)
        at 
com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$300(CompositionUnitMgrImpl.java:113)
        at 
com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:895)
        at 
com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:349)
        at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604)
Caused by: java.lang.NullPointerException
        at 
org.apache.axis2.deployment.util.TempFileManager.recursiveDelete(TempFileManager.java:138)
        at 
org.apache.axis2.deployment.util.TempFileManager.<clinit>(TempFileManager.java:203)
        at java.lang.J9VMInternals.initializeImpl(Native Method)
        at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
        ... 43 more

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to