4 Replies Latest reply on Feb 11, 2010 7:24 AM by cchene

    IllegalStateException: No org.apache.InstanceManager set in

    cchene

      Hello

      I have been trying to deploy an existing webapp (Servlet 2.3 / JSP 1.2) in JBoss 5.1.0-GA.

      Everything works well except the webapp undeployment that raises the following exception :

      2009-09-11 14:44:20,125 INFO [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (HDScanner) undeploy, ctxPath=/MyWebApp
      2009-09-11 14:44:20,203 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/MyWebApp]] (HDScanner) La servlet jsp a g?n?r? une exception "unload()"
      javax.servlet.ServletException: "Servlet.destroy()" de la servlet jsp a g?n?r? une exception
       at org.apache.catalina.core.StandardWrapper.unload(StandardWrapper.java:1269)
       at org.apache.catalina.core.StandardWrapper.stop(StandardWrapper.java:1568)
       at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4601)
       at org.apache.catalina.core.ContainerBase.destroy(ContainerBase.java:1175)
       at org.apache.catalina.core.StandardContext.destroy(StandardContext.java:4705)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
       at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
       at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performUndeployInternal(TomcatDeployment.java:596)
       at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performUndeploy(TomcatDeployment.java:570)
       at org.jboss.web.deployers.AbstractWarDeployment.stop(AbstractWarDeployment.java:480)
       at org.jboss.web.deployers.WebModule.stopModule(WebModule.java:133)
       at org.jboss.web.deployers.WebModule.stop(WebModule.java:102)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
       at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
       at $Proxy38.stop(Unknown Source)
       at org.jboss.system.microcontainer.StartStopLifecycleAction.uninstallAction(StartStopLifecycleAction.java:56)
       at org.jboss.system.microcontainer.StartStopLifecycleAction.uninstallAction(StartStopLifecycleAction.java:37)
       at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleUninstallAction(SimpleControllerContextAction.java:79)
       at org.jboss.dependency.plugins.action.AccessControllerContextAction.uninstall(AccessControllerContextAction.java:131)
       at org.jboss.dependency.plugins.AbstractControllerContextActions.uninstall(AbstractControllerContextActions.java:58)
       at org.jboss.dependency.plugins.AbstractControllerContext.uninstall(AbstractControllerContext.java:354)
       at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:1664)
       at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1275)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:827)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
       at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
       at org.jboss.system.ServiceController.stop(ServiceController.java:510)
       at org.jboss.system.deployers.ServiceDeployer.stop(ServiceDeployer.java:170)
       at org.jboss.system.deployers.ServiceDeployer.undeploy(ServiceDeployer.java:150)
       at org.jboss.system.deployers.ServiceDeployer.undeploy(ServiceDeployer.java:46)
       at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalUndeploy(AbstractSimpleRealDeployer.java:69)
       at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.undeploy(AbstractRealDeployer.java:112)
       at org.jboss.deployers.plugins.deployers.DeployerWrapper.undeploy(DeployerWrapper.java:196)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.doUndeploy(DeployersImpl.java:1469)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.doUninstallParentLast(DeployersImpl.java:1376)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.doUninstallParentLast(DeployersImpl.java:1369)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.uninstall(DeployersImpl.java:1331)
       at org.jboss.dependency.plugins.AbstractControllerContext.uninstall(AbstractControllerContext.java:354)
       at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:1664)
       at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1275)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:827)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:694)
       at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:679)
       at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
       at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:362)
       at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)
       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
       at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:280)
       at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:135)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:65)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:142)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:166)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: java.lang.IllegalStateException: No org.apache.InstanceManager set in ServletContext
       at org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(InstanceManagerFactory.java:39)
       at org.apache.jasper.servlet.JspServletWrapper.destroy(JspServletWrapper.java:421)
       at org.apache.jasper.compiler.JspRuntimeContext.destroy(JspRuntimeContext.java:243)
       at org.apache.jasper.servlet.JspServlet.destroy(JspServlet.java:267)
       at org.apache.catalina.core.StandardWrapper.unload(StandardWrapper.java:1250)
       ... 68 more
      


      I tried the same webapp with different servers :
      - JBoss 5.0.0-GA : I get the same exception
      - JBoss 4.2.3-GA : no exception
      - Tomcat 6.0.20 : no exception

      I understand that the problem comes from a JSP, but can anybody tell me the meaning of this kind of error "No org.apache.InstanceManager set in ServletContext"?
      Could this be related to the redesign of Jasper (http://www.jboss.org/file-access/default/members/jbossweb/freezone/docs/latest/jasper-howto.html#Introduction) ?

      Cyril

        • 1. Re: IllegalStateException: No org.apache.InstanceManager set
          jfclere

          That is weird...
          You make a small war file to reproduce the problem?

          • 2. Re: IllegalStateException: No org.apache.InstanceManager set
            cchene

            Sorry for the delayed response but I was busy on something else...

            For information, here's the situation :
            - my Webapp consists of several JSPs and a unique Servlet,
            - the problem appears when one JSP has been accessed and the webapp is undeployed (accessing or not to the Servlet do not change this behaviour),
            - the problem does not appear when I remove the Servlet declaration from the webapp descriptor file web.xml.

            My analysis is : the deployment of my Servlet causes some interference with the "JSP management system" of JBoss (deployment, compiling, undeployment, etc)

            The Servlet is quite complex so I will need a lot of time to dig in and find the cause of the problem. For now, I have no time for reproducing the problem with a small war, so I'll keep JBoss 4.2.3.

            I was asking this question just in case somebody had an idea.

            Thanks anyway for the answer !

            • 3. Re: IllegalStateException: No org.apache.InstanceManager set
              hallmit

              did you not accidentally removed the attributes of ServletContext?

              it may be that JBoss uses a particular attribute named 'org.apache.InstanceManager' when will destroy the JSP...

              good luck!

              • 4. Re: IllegalStateException: No org.apache.InstanceManager set
                cchene

                This is exactly what was done : everything works great now.

                 

                Thanks !