3 Replies Latest reply on Jan 15, 2008 1:30 PM by Jay Balunas

    IllegalStateException on WebLogic Restart

    neilac333 Novice

      I am attempting to deploy a Seam 2.0 application to WebLogic 9.2 and having a heck of a time with it. At first, Hibernate couldn't find the datasource I set up through the WL Admin Console in the JNDI tree. So I made some changes to my WAR file and tried to redeploy. Then the Admin Console started acting up on me, so I shut down WL, restarted the server, and redeployed the application. No datasource error, but I got this:

      java.lang.IllegalStateException: Attempted to invoke a Seam component outside the an initialized application
       at org.jboss.seam.contexts.Lifecycle.getApplication(Lifecycle.java:36)
       at org.jboss.seam.contexts.Lifecycle.endApplication(Lifecycle.java:50)
       at org.jboss.seam.contexts.ServletLifecycle.endApplication(ServletLifecycle.java:118)
       at org.jboss.seam.servlet.SeamListener.contextDestroyed(SeamListener.java:39)
       at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:377)
       at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
       at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
       at weblogic.servlet.internal.EventsManager.notifyContextDestroyedEvent(EventsManager.java:101)
       at weblogic.servlet.internal.WebAppServletContext.destroy(WebAppServletContext.java:2827)
       at weblogic.servlet.internal.ServletContextManager.destroyContext(ServletContextManager.java:236)
       at weblogic.servlet.internal.HttpServer.unloadWebApp(HttpServer.java:440)
       at weblogic.servlet.internal.WebAppModule.destroyContexts(WebAppModule.java:916)
       at weblogic.servlet.internal.WebAppModule.unprepare(WebAppModule.java:357)
       at weblogic.application.internal.flow.ModuleStateDriver$1.previous(ModuleStateDriver.java:167)
       at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:52)
       at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:42)
       at weblogic.application.internal.flow.ModuleStateDriver.unprepare(ModuleStateDriver.java:84)
       at weblogic.application.internal.flow.ScopedModuleDriver.unprepare(ScopedModuleDriver.java:212)
       at weblogic.application.internal.flow.ModuleListenerInvoker.unprepare(ModuleListenerInvoker.java:136)
       at weblogic.application.internal.flow.DeploymentCallbackFlow$1.previous(DeploymentCallbackFlow.java:366)
       at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:52)
       at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:42)
       at weblogic.application.internal.flow.DeploymentCallbackFlow.unprepare(DeploymentCallbackFlow.java:107)
       at weblogic.application.internal.flow.DeploymentCallbackFlow.unprepare(DeploymentCallbackFlow.java:98)
       at weblogic.application.internal.BaseDeployment$1.previous(BaseDeployment.java:621)
       at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:52)
       at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:42)
       at weblogic.application.internal.BaseDeployment.unprepare(BaseDeployment.java:255)
       at weblogic.application.internal.DeploymentStateChecker.unprepare(DeploymentStateChecker.java:196)
       at weblogic.deploy.internal.targetserver.AppContainerInvoker.unprepare(AppContainerInvoker.java:118)
       at weblogic.deploy.internal.targetserver.operations.AbstractOperation.silentUnprepare(AbstractOperation.java:684)
       at weblogic.deploy.internal.targetserver.operations.RedeployOperation.unprepareDeployment(RedeployOperation.java:195)
      >
      ####<Jan 14, 2008 3:39:37 PM EST> <Warning> <HTTP> <TSP617758> <AdminServer> <[STANDBY] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> <weblogic> <> <> <1200343177031> <BEA-101162> <User defined listener com.sun.faces.application.WebappLifecycleListener failed: java.lang.NullPointerException.
      java.lang.NullPointerException
       at com.sun.faces.application.WebappLifecycleListener.contextDestroyed(WebappLifecycleListener.java:273)
       at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:377)
       at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
       at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
       at weblogic.servlet.internal.EventsManager.notifyContextDestroyedEvent(EventsManager.java:101)
       at weblogic.servlet.internal.WebAppServletContext.destroy(WebAppServletContext.java:2827)
       at weblogic.servlet.internal.ServletContextManager.destroyContext(ServletContextManager.java:236)
       at weblogic.servlet.internal.HttpServer.unloadWebApp(HttpServer.java:440)
       at weblogic.servlet.internal.WebAppModule.destroyContexts(WebAppModule.java:916)
       at weblogic.servlet.internal.WebAppModule.unprepare(WebAppModule.java:357)
       at weblogic.application.internal.flow.ModuleStateDriver$1.previous(ModuleStateDriver.java:167)
       at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:52)
       at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:42)
       at weblogic.application.internal.flow.ModuleStateDriver.unprepare(ModuleStateDriver.java:84)
       at weblogic.application.internal.flow.ScopedModuleDriver.unprepare(ScopedModuleDriver.java:212)
       at weblogic.application.internal.flow.ModuleListenerInvoker.unprepare(ModuleListenerInvoker.java:136)
       at weblogic.application.internal.flow.DeploymentCallbackFlow$1.previous(DeploymentCallbackFlow.java:366)
       at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:52)
       at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:42)
       at weblogic.application.internal.flow.DeploymentCallbackFlow.unprepare(DeploymentCallbackFlow.java:107)
       at weblogic.application.internal.flow.DeploymentCallbackFlow.unprepare(DeploymentCallbackFlow.java:98)
       at weblogic.application.internal.BaseDeployment$1.previous(BaseDeployment.java:621)
       at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:52)
       at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:42)
       at weblogic.application.internal.BaseDeployment.unprepare(BaseDeployment.java:255)
       at weblogic.application.internal.DeploymentStateChecker.unprepare(DeploymentStateChecker.java:196)
       at weblogic.deploy.internal.targetserver.AppContainerInvoker.unprepare(AppContainerInvoker.java:118)
       at weblogic.deploy.internal.targetserver.operations.AbstractOperation.silentUnprepare(AbstractOperation.java:684)
       at weblogic.deploy.internal.targetserver.operations.RedeployOperation.unprepareDeployment(RedeployOperation.java:195)
       at weblogic.deploy.internal.targetserver.operations.RedeployOperation.doPrepare(RedeployOperation.java:110)
       at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
       at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:718)
      


      What the heck does that mean? Does this mean at least my datasource issue has been resolved? How can I "clean out" any serialized Seam stuff from a previous deployment?

      In case it matters, the application is a WAR file (with Seam components and seam.properties in WEB-INF/classes) containing two JAR files, each of which contains Seam components and seam.properties in META-INF.

      Any insight is appreciated.

      Thanks.


        • 1. Re: IllegalStateException on WebLogic Restart
          neilac333 Novice

          I have seen this issue pop up in similar situations on the forum--server restarts, etc. And in most cases, Pete has asked for an issue to be filed in JIRA. For example, see http://jira.jboss.com/jira/browse/JBSEAM-1990. Do you think the same issue is at play here?

          If so, since the issue hasn't been resolved, is there a workaround?

          • 2. Re: IllegalStateException on WebLogic Restart
            Pete Muir Master

            I don't really know what the issue is, I haven't looked at Matt's JIRA issue at all.

            Can you make sure you have a completely clean deployment environment?

            • 3. Re: IllegalStateException on WebLogic Restart
              Jay Balunas Master

              From looking at the jira issue, and the tomcat issue (linked in the bug) it looks like there is a problem where session listeners are called out of order on tomcat. I can only assume that it is the same on Weblogic 92, based on the exceptions that you are seeing.

              The new reference guide chapter I wrote uses weblogic 10.x so I do not believe this is an issue on 10.

              Some things to try:
              Clean out the "deployed apps directory" on 10 it was @BEA_HOME/user_projects/domains/<your-domain>/servers/<your-sever>/tmp/_WL_user" directory. Make sure the server is down and then delete your application there and restart.

              Also try to deploy the JPA example using the weblogic 92 build. If there are issues with that you could attempt to deploy the weblogic 10 version, but you would need to change the servlet version to 2.4 in the web.xml.