Uploaded image for project: 'ZZZ-WSO2 Application Server '
  1. ZZZ-WSO2 Application Server
  2. WSAS-1906

Fix the classes that have used setInitParameter for webapps after "deployed" cycle is called

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Highest
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.3.0
    • Component/s: None
    • Labels:
      None
    • Severity:
      Blocker
    • Estimated Complexity:
      Moderate
    • Test cases added:
      No

      Description

      The below error is observed in webapp-mgt component classes, where the ApplicationContext.setInitParameter is called for webapps after they have been deployed. This is occurring after tomcat is upgraded to 7.0.59. Tomcat does not allow to add intiParameter after a webapp is deployed with the fix : http://mail-archives.apache.org/mod_mbox/tomcat-dev/201403.mbox/%3C20140306162112.036CD23888FE@eris.apache.org%3E

      The error now we see is :
      [2015-03-04 15:47:32,937] ERROR

      {org.wso2.carbon.webapp.mgt.internal.WebappManagementServiceComponent}

      - Error occurred while activating WebappManagementServiceComponent
      java.lang.IllegalStateException: Initialization parameters can not be set after the context has been initialized
      at org.apache.catalina.core.ApplicationContext.setInitParameter(ApplicationContext.java:1318)
      at org.apache.catalina.core.ApplicationContextFacade.setInitParameter(ApplicationContextFacade.java:625)
      at org.wso2.carbon.webapp.mgt.internal.WebappManagementServiceComponent.setServerURLParam(WebappManagementServiceComponent.java:156)
      at org.wso2.carbon.webapp.mgt.internal.WebappManagementServiceComponent.activate(WebappManagementServiceComponent.java:83)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:483)
      at org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:260)
      at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146)
      at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:345)
      at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:620)
      at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:197)
      at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:343)
      at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:222)
      at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107)
      at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
      at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
      at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
      at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
      at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)
      at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
      at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214)
      at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433)
      at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:451)
      at org.wso2.carbon.core.init.CarbonServerManager.initializeCarbon(CarbonServerManager.java:517)
      at org.wso2.carbon.core.init.CarbonServerManager.start(CarbonServerManager.java:219)
      at org.wso2.carbon.core.internal.CarbonCoreServiceComponent.activate(CarbonCoreServiceComponent.java:88)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:483)
      at org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:260)
      at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146)
      at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:345)
      at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:620)
      at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:197)
      at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:343)
      at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:222)
      at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107)
      at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
      at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
      at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
      at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
      at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)
      at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
      at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214)
      at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433)
      at org.eclipse.equinox.http.servlet.internal.Activator.registerHttpService(Activator.java:81)
      at org.eclipse.equinox.http.servlet.internal.Activator.addProxyServlet(Activator.java:60)
      at org.eclipse.equinox.http.servlet.internal.ProxyServlet.init(ProxyServlet.java:40)
      at org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.init(DelegationServlet.java:38)
      at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)
      at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)
      at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087)
      at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5262)
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5550)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)

        Attachments

          Activity

            People

            • Assignee:
              kishanthan@wso2.com Kishanthan Thangarajah
              Reporter:
              kishanthan@wso2.com Kishanthan Thangarajah
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: