[ 
https://issues.apache.org/jira/browse/JAMES-767?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12629871#action_12629871
 ] 

Markus Wiederkehr commented on JAMES-767:
-----------------------------------------

This also happens with phoenix.sh start/stop. The only difference is that the 
console output (including the ugly stacktrace) is redirected to 
temp/phoenix.console.

Stefano, may I ask why you consider this to be harmless?

I have a setup where the VM does not exit when James gets stopped. This can be 
accomplished by setting up the classpath manually and invoking 
org.apache.avalon.phoenix.frontends.CLIMain.main() and CLIMain.shutdown() to 
start and stop Phoenix including James. I know this might be a bit brutal but 
it has always worked without problems with older versions of James (or Phoenix 
respectively).

So because in my case the VM continues to run I am a bit worried about this one.

A brief look into 
org.apache.avalon.phoenix.components.application.DefaultApplication.doRunPhase(String)
 seems to indicate that the loop that is supposed to shut down all components 
gets interrupted once an exception occurs. So subsequent components are not 
shut down at all.

> exception when shutting down server
> -----------------------------------
>
>                 Key: JAMES-767
>                 URL: https://issues.apache.org/jira/browse/JAMES-767
>             Project: James
>          Issue Type: Bug
>    Affects Versions: 2.3.0
>         Environment: Mac OS X 10.4.8, intel Mac 2.16 GHz dual core, Java VM 
> build 1.5.0_06-112
>            Reporter: Ray Kiddy
>            Priority: Minor
>
> I have set up a James server to test a mail client. I configure it with the 
> IP address of the machine. I do not use DNS, but instead us e-mail addresses 
> like "[EMAIL PROTECTED]". When I shut down the server with ctl-C, I get:
> ^CJVM exiting abnormally. Shutting down Phoenix.
> org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleException: 
> Component named "thread-manager" failed to pass through the Destruction 
> stage. (Reason: java.lang.IllegalThreadStateException).
>         at 
> org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.fail(LifecycleHelper.java:354)
>         at 
> org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.shutdown(LifecycleHelper.java:288)
>         at 
> org.apache.avalon.phoenix.components.application.DefaultApplication.shutdown(DefaultApplication.java:566)
>         at 
> org.apache.avalon.phoenix.components.application.DefaultApplication.doRunPhase(DefaultApplication.java:482)
>         at 
> org.apache.avalon.phoenix.components.application.DefaultApplication.runPhase(DefaultApplication.java:409)
>         at 
> org.apache.avalon.phoenix.components.application.DefaultApplication.stop(DefaultApplication.java:233)
>         at 
> org.apache.avalon.framework.container.ContainerUtil.stop(ContainerUtil.java:292)
>         at 
> org.apache.avalon.framework.container.ContainerUtil.shutdown(ContainerUtil.java:66)
>         at 
> org.apache.avalon.phoenix.components.kernel.DefaultKernel.shutdown(DefaultKernel.java:346)
>         at 
> org.apache.avalon.phoenix.components.kernel.DefaultKernel.removeApplication(DefaultKernel.java:455)
>         at 
> org.apache.avalon.phoenix.components.deployer.DefaultDeployer.undeploy(DefaultDeployer.java:244)
>         at 
> org.apache.avalon.phoenix.components.deployer.DefaultDeployer.dispose(DefaultDeployer.java:154)
>         at 
> org.apache.avalon.framework.container.ContainerUtil.dispose(ContainerUtil.java:306)
>         at 
> org.apache.avalon.framework.container.ContainerUtil.shutdown(ContainerUtil.java:67)
>         at 
> org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.shutdownComponents(DefaultEmbeddor.java:598)
>         at 
> org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.dispose(DefaultEmbeddor.java:342)
>         at 
> org.apache.avalon.framework.container.ContainerUtil.dispose(ContainerUtil.java:306)
>         at 
> org.apache.avalon.framework.container.ContainerUtil.shutdown(ContainerUtil.java:67)
>         at 
> org.apache.avalon.phoenix.frontends.CLIMain.shutdown(CLIMain.java:326)
>         at 
> org.apache.avalon.phoenix.frontends.CLIMain.forceShutdown(CLIMain.java:295)
>         at 
> org.apache.avalon.phoenix.frontends.ShutdownHook.run(CLIMain.java:386)
> Caused by: java.lang.IllegalThreadStateException
>         at java.lang.ThreadGroup.destroy(ThreadGroup.java:750)
>         at 
> org.apache.avalon.excalibur.thread.impl.DefaultThreadPool.dispose(DefaultThreadPool.java:76)
>         at 
> org.apache.avalon.framework.container.ContainerUtil.dispose(ContainerUtil.java:306)
>         at 
> org.apache.avalon.cornerstone.blocks.threads.AbstractThreadManager.dispose(AbstractThreadManager.java:69)
>         at 
> org.apache.avalon.framework.container.ContainerUtil.dispose(ContainerUtil.java:306)
>         at 
> org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.shutdown(LifecycleHelper.java:274)
>         ... 19 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to