java.lang.IllegalStateException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • I am using Mule ESB EE 2.2.2 and testing it using Junit tests with the FunctionalTestCase mechanism (that is my Junit tests all subclass from this). I get this except intermittently when running the tests. This is a similar problem to that of MULE-4589, but in dispose instead of start. ********************************************************************** * Mule shut down normally on: 10/31/09 11:35 PM * * Server was up for: 0 days, 0 hours, 0 mins, 4.55 sec * ********************************************************************** INFO 2009-10-31 23:35:16,511 [Wrapper-Shutdown-Hook] org.mule.MuleServer: Mule server shutting down due to normal shutdown request Error in WrapperListener.stop callback. java.lang.IllegalStateException: Phase 'dispose' has already been executed java.lang.IllegalStateException: Phase 'dispose' has already been executed at org.mule.lifecycle.GenericLifecycleManager.checkPhase(GenericLifecycleManager.java:177) at org.mule.DefaultMuleContext.dispose(DefaultMuleContext.java:201) at org.mule.MuleServer.shutdown(MuleServer.java:411) at org.mule.module.boot.MuleServerWrapper.stop(MuleServerWrapper.java:74) at org.tanukisoftware.wrapper.WrapperManager.privilegedStopInner(WrapperManager.java:3180) at org.tanukisoftware.wrapper.WrapperManager.access$2600(WrapperManager.java:103) at org.tanukisoftware.wrapper.WrapperManager$8.run(WrapperManager.java:1995) at java.security.AccessController.doPrivileged(Native Method) at org.tanukisoftware.wrapper.WrapperManager.stop(WrapperManager.java:1992) at org.tanukisoftware.wrapper.WrapperManager$2.run(WrapperManager.java:467) <-- Wrapper Stopped
    via by Francis Upton,
  • I am using Mule ESB EE 2.2.2 and testing it using Junit tests with the FunctionalTestCase mechanism (that is my Junit tests all subclass from this). I get this except intermittently when running the tests. This is a similar problem to that of MULE-4589, but in dispose instead of start. ********************************************************************** * Mule shut down normally on: 10/31/09 11:35 PM * * Server was up for: 0 days, 0 hours, 0 mins, 4.55 sec * ********************************************************************** INFO 2009-10-31 23:35:16,511 [Wrapper-Shutdown-Hook] org.mule.MuleServer: Mule server shutting down due to normal shutdown request Error in WrapperListener.stop callback. java.lang.IllegalStateException: Phase 'dispose' has already been executed java.lang.IllegalStateException: Phase 'dispose' has already been executed at org.mule.lifecycle.GenericLifecycleManager.checkPhase(GenericLifecycleManager.java:177) at org.mule.DefaultMuleContext.dispose(DefaultMuleContext.java:201) at org.mule.MuleServer.shutdown(MuleServer.java:411) at org.mule.module.boot.MuleServerWrapper.stop(MuleServerWrapper.java:74) at org.tanukisoftware.wrapper.WrapperManager.privilegedStopInner(WrapperManager.java:3180) at org.tanukisoftware.wrapper.WrapperManager.access$2600(WrapperManager.java:103) at org.tanukisoftware.wrapper.WrapperManager$8.run(WrapperManager.java:1995) at java.security.AccessController.doPrivileged(Native Method) at org.tanukisoftware.wrapper.WrapperManager.stop(WrapperManager.java:1992) at org.tanukisoftware.wrapper.WrapperManager$2.run(WrapperManager.java:467) <-- Wrapper Stopped
    via by Francis Upton,
  • I am using Mule ESB EE 2.2.2 and testing it using Junit tests with the FunctionalTestCase mechanism (that is my Junit tests all subclass from this). I get this except intermittently when running the tests. java.lang.IllegalStateException: Phase 'start' has already been executed at org.mule.lifecycle.GenericLifecycleManager.checkPhase(GenericLifecycleManager.java:174) at org.mule.DefaultMuleContext.start(DefaultMuleContext.java:159) at org.mule.tck.AbstractMuleTestCase.setUp(AbstractMuleTestCase.java:409) at org.mule.tck.AbstractMuleTestCase.runBare(AbstractMuleTestCase.java:291) at org.mule.tck.AbstractMuleTestCase.run(AbstractMuleTestCase.java:270) The fix to the problem is below. It turns out that when I run the test cases it starts my configuration which includes several examples. The way the OSDT examples work is that they are started in a different thread; because of the thread execution order the start intermittently fails because of the problem below. In DefaultMuleClient.start(): public synchronized void start() throws MuleException { lifecycleManager.checkPhase(Startable.PHASE_NAME); if (!isStarted()) { if (getSecurityManager() == null) { throw new MuleRuntimeException(CoreMessages.objectIsNull("securityManager")); } if (getQueueManager() == null) { throw new MuleRuntimeException(CoreMessages.objectIsNull("queueManager")); } .... The lifecycleManager.checkPhase() call should be inside of the !isStarted(). What's happening in my tests is that I spawn a thread that starts up MuleClients which causes a the MuleContext to start. Remembering the stack trace in the previous message, this thread is called by the setUp() method in the AbstractMuleTestCase. If the thread starts and gets into the synchronized block of the above start() method, then the main thread will block there while the lengthy startup process is happening. Then the main thread will die because it will fail the checkPhase() call.
    via by Francis Upton,
  • I am using Mule ESB EE 2.2.2 and testing it using Junit tests with the FunctionalTestCase mechanism (that is my Junit tests all subclass from this). I get this except intermittently when running the tests. java.lang.IllegalStateException: Phase 'start' has already been executed at org.mule.lifecycle.GenericLifecycleManager.checkPhase(GenericLifecycleManager.java:174) at org.mule.DefaultMuleContext.start(DefaultMuleContext.java:159) at org.mule.tck.AbstractMuleTestCase.setUp(AbstractMuleTestCase.java:409) at org.mule.tck.AbstractMuleTestCase.runBare(AbstractMuleTestCase.java:291) at org.mule.tck.AbstractMuleTestCase.run(AbstractMuleTestCase.java:270) The fix to the problem is below. It turns out that when I run the test cases it starts my configuration which includes several examples. The way the OSDT examples work is that they are started in a different thread; because of the thread execution order the start intermittently fails because of the problem below. In DefaultMuleClient.start(): public synchronized void start() throws MuleException { lifecycleManager.checkPhase(Startable.PHASE_NAME); if (!isStarted()) { if (getSecurityManager() == null) { throw new MuleRuntimeException(CoreMessages.objectIsNull("securityManager")); } if (getQueueManager() == null) { throw new MuleRuntimeException(CoreMessages.objectIsNull("queueManager")); } .... The lifecycleManager.checkPhase() call should be inside of the !isStarted(). What's happening in my tests is that I spawn a thread that starts up MuleClients which causes a the MuleContext to start. Remembering the stack trace in the previous message, this thread is called by the setUp() method in the AbstractMuleTestCase. If the thread starts and gets into the synchronized block of the above start() method, then the main thread will block there while the lengthy startup process is happening. Then the main thread will die because it will fail the checkPhase() call.
    via by Kamil Zych,
  • I am using Mule ESB EE 2.2.2 and testing it using Junit tests with the FunctionalTestCase mechanism (that is my Junit tests all subclass from this). I get this except intermittently when running the tests. java.lang.IllegalStateException: Phase 'start' has already been executed at org.mule.lifecycle.GenericLifecycleManager.checkPhase(GenericLifecycleManager.java:174) at org.mule.DefaultMuleContext.start(DefaultMuleContext.java:159) at org.mule.tck.AbstractMuleTestCase.setUp(AbstractMuleTestCase.java:409) at org.mule.tck.AbstractMuleTestCase.runBare(AbstractMuleTestCase.java:291) at org.mule.tck.AbstractMuleTestCase.run(AbstractMuleTestCase.java:270) The fix to the problem is below. It turns out that when I run the test cases it starts my configuration which includes several examples. The way the OSDT examples work is that they are started in a different thread; because of the thread execution order the start intermittently fails because of the problem below. In DefaultMuleClient.start(): public synchronized void start() throws MuleException { lifecycleManager.checkPhase(Startable.PHASE_NAME); if (!isStarted()) { if (getSecurityManager() == null) { throw new MuleRuntimeException(CoreMessages.objectIsNull("securityManager")); } if (getQueueManager() == null) { throw new MuleRuntimeException(CoreMessages.objectIsNull("queueManager")); } .... The lifecycleManager.checkPhase() call should be inside of the !isStarted(). What's happening in my tests is that I spawn a thread that starts up MuleClients which causes a the MuleContext to start. Remembering the stack trace in the previous message, this thread is called by the setUp() method in the AbstractMuleTestCase. If the thread starts and gets into the synchronized block of the above start() method, then the main thread will block there while the lengthy startup process is happening. Then the main thread will die because it will fail the checkPhase() call.
    via by Francis Upton,
  • I am using Mule ESB EE 2.2.2 and testing it using Junit tests with the FunctionalTestCase mechanism (that is my Junit tests all subclass from this). I get this except intermittently when running the tests. java.lang.IllegalStateException: Phase 'start' has already been executed at org.mule.lifecycle.GenericLifecycleManager.checkPhase(GenericLifecycleManager.java:174) at org.mule.DefaultMuleContext.start(DefaultMuleContext.java:159) at org.mule.tck.AbstractMuleTestCase.setUp(AbstractMuleTestCase.java:409) at org.mule.tck.AbstractMuleTestCase.runBare(AbstractMuleTestCase.java:291) at org.mule.tck.AbstractMuleTestCase.run(AbstractMuleTestCase.java:270) The fix to the problem is below. It turns out that when I run the test cases it starts my configuration which includes several examples. The way the OSDT examples work is that they are started in a different thread; because of the thread execution order the start intermittently fails because of the problem below. In DefaultMuleClient.start(): public synchronized void start() throws MuleException { lifecycleManager.checkPhase(Startable.PHASE_NAME); if (!isStarted()) { if (getSecurityManager() == null) { throw new MuleRuntimeException(CoreMessages.objectIsNull("securityManager")); } if (getQueueManager() == null) { throw new MuleRuntimeException(CoreMessages.objectIsNull("queueManager")); } .... The lifecycleManager.checkPhase() call should be inside of the !isStarted(). What's happening in my tests is that I spawn a thread that starts up MuleClients which causes a the MuleContext to start. Remembering the stack trace in the previous message, this thread is called by the setUp() method in the AbstractMuleTestCase. If the thread starts and gets into the synchronized block of the above start() method, then the main thread will block there while the lengthy startup process is happening. Then the main thread will die because it will fail the checkPhase() call.
    via by Kamil Zych,
    • java.lang.IllegalStateException: Phase 'dispose' has already been executed at org.mule.lifecycle.GenericLifecycleManager.checkPhase(GenericLifecycleManager.java:177) at org.mule.DefaultMuleContext.dispose(DefaultMuleContext.java:201) at org.mule.MuleServer.shutdown(MuleServer.java:411) at org.mule.module.boot.MuleServerWrapper.stop(MuleServerWrapper.java:74) at org.tanukisoftware.wrapper.WrapperManager.privilegedStopInner(WrapperManager.java:3180) at org.tanukisoftware.wrapper.WrapperManager.access$2600(WrapperManager.java:103) at org.tanukisoftware.wrapper.WrapperManager$8.run(WrapperManager.java:1995) at java.security.AccessController.doPrivileged(Native Method) at org.tanukisoftware.wrapper.WrapperManager.stop(WrapperManager.java:1992) at org.tanukisoftware.wrapper.WrapperManager$2.run(WrapperManager.java:467)
    No Bugmate found.