<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    InstanceNotFoundException while stopping Web Application from the JBoss Admin Console
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/chinmayaenator">Chinmaya Behera</a> in <i>Spring Integration</i> - <a href="http://community.jboss.org/message/544588#544588">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Hi,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I have a web application which works fine. But when i try to stop/start/restart the web application from the Jboss Admin-Console i am not able to do that. I am using Jboss 5.1 and Spring 2.5. My XXXAppliationContext.xml is described below :</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="color: #3366ff;">&lt;bean id="MyPropertiesLocation"<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;property name="locations"&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;list&gt;&lt;value&gt;classpath:my.properties&lt;/value&gt;&lt;/list&gt;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/property&gt;<br/>&#160;&#160;&#160; &lt;/bean&gt; <br/></span></p><p><span style="color: #3366ff;"> <br/></span></p><p><span style="color: #3366ff;">&#160;&#160;&#160;&#160; &lt;jee:jndi-lookup id="MyQCF" jndi-name="${topicConnectionFactory}" /&gt;<br/>&#160;&#160;&#160; &lt;jee:jndi-lookup id="MyTopic" jndi-name="${topic}" /&gt; <br/></span></p><p><span style="color: #3366ff;"><br/></span></p><p><span style="color: #3366ff;">&#160;&#160;&#160;&#160; &lt;bean id="CentralLoggingPojo" class="my.LoggingMDP" init-method="init" destroy-method="destroy" /&gt;</span></p><p><span style="color: #3366ff;"><br/></span></p><p><span style="color: #3366ff;">&#160;&#160;&#160;&#160; &lt;bean id="MyLogginglistenerContainer" class="org.springframework.jms.listener.DefaultMessageListenerContainer"&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; ....</span></p><p><span style="color: #3366ff;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; ....&#160; <br/>&lt;/bean&gt;&#160;&#160; </span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>As per my requirement, when i will stop this appliation from JBoss Admin-Console it sould stop successfullyand the destroy method in my.LoggingMDP should be called.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>But It gives me the following exception :</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="color: #ff6600;">2010-05-25 09:31:22,835 INFO&#160; [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/CELOG]] Closing Spring root WebApplicationContext<br/>2010-05-25 09:32:18,084 WARN&#160; [org.jboss.profileservice.management.ManagementViewImpl] Failed to create ManagedObject for: MBeanComponent(jboss.web:j2eeType=Servlet,name=jsp,WebModule=//localhost/CELOG,J2EEApplication=none,J2EEServer=none,MBean,Servlet)<br/>javax.management.InstanceNotFoundException: jboss.web:j2eeType=Servlet,name=jsp,WebModule=//localhost/CELOG,J2EEApplication=none,J2EEServer=none is not registered.<br/>&#160;&#160;&#160; at org.jboss.mx.server.registry.BasicMBeanRegistry.get(BasicMBeanRegistry.java:526)<br/>&#160;&#160;&#160; at org.jboss.mx.server.MBeanServerImpl.getMBeanInfo(MBeanServerImpl.java:675)<br/>&#160;&#160;&#160; at org.jboss.profileservice.management.ManagementViewImpl.createManagedObject(ManagementViewImpl.java:1723)<br/>&#160;&#160;&#160; at org.jboss.profileservice.management.ManagementViewImpl.load(ManagementViewImpl.java:274)<br/>&#160;&#160;&#160; at sun.reflect.GeneratedMethodAccessor289.invoke(Unknown Source)<br/>&#160;&#160;&#160; at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br/>&#160;&#160;&#160; at java.lang.reflect.Method.invoke(Unknown Source)<br/>&#160;&#160;&#160; at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:121)<br/>&#160;&#160;&#160; at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)<br/>&#160;&#160;&#160; at org.jboss.profileservice.remoting.ProfileServiceInvocationHandler.invoke(ProfileServiceInvocationHandler.java:97)<br/>&#160;&#160;&#160; at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:891)<br/>&#160;&#160;&#160; at org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalClientInvoker.java:106)<br/>&#160;&#160;&#160; at org.jboss.remoting.Client.invoke(Client.java:1724)<br/>&#160;&#160;&#160; at org.jboss.remoting.Client.invoke(Client.java:629)<br/>&#160;&#160;&#160; at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:60)<br/>&#160;&#160;&#160; at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)<br/>&#160;&#160;&#160; at org.jboss.aspects.remoting.MergeMetaDataInterceptor.invoke(MergeMetaDataInterceptor.java:74)<br/>&#160;&#160;&#160; at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)<br/>&#160;&#160;&#160; at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:65)<br/>&#160;&#160;&#160; at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)<br/>&#160;&#160;&#160; at org.jboss.aop.generatedproxies.AOPProxy$3.load(AOPProxy$3.java)<br/>&#160;&#160;&#160; at org.rhq.plugins.jbossas5.AbstractManagedDeploymentComponent.getManagedDeployment(AbstractManagedDeploymentComponent.java:220)<br/>&#160;&#160;&#160; at org.rhq.plugins.jbossas5.AbstractManagedDeploymentComponent.getAvailability(AbstractManagedDeploymentComponent.java:109)<br/>&#160;&#160;&#160; at sun.reflect.GeneratedMethodAccessor293.invoke(Unknown Source)<br/>&#160;&#160;&#160; at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br/>&#160;&#160;&#160; at java.lang.reflect.Method.invoke(Unknown Source)<br/>&#160;&#160;&#160; at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:482)<br/>&#160;&#160;&#160; at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)<br/>&#160;&#160;&#160; at java.util.concurrent.FutureTask.run(Unknown Source)<br/>&#160;&#160;&#160; at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)<br/>&#160;&#160;&#160; at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)<br/>&#160;&#160;&#160; at java.lang.Thread.run(Unknown Source)<br/>2010-05-25 09:32:18,084 WARN&#160; [org.jboss.profileservice.management.ManagementViewImpl] Failed to create ManagedObject for: MBeanComponent(jboss.web:j2eeType=Servlet,name=default,WebModule=//localhost/CELOG,J2EEApplication=none,J2EEServer=none,MBean,Servlet)<br/>javax.management.InstanceNotFoundException: jboss.web:j2eeType=Servlet,name=default,WebModule=//localhost/CELOG,J2EEApplication=none,J2EEServer=none is not registered.<br/>&#160;&#160;&#160; at org.jboss.mx.server.registry.BasicMBeanRegistry.get(BasicMBeanRegistry.java:526)<br/>&#160;&#160;&#160; at org.jboss.mx.server.MBeanServerImpl.getMBeanInfo(MBeanServerImpl.java:675)<br/>&#160;&#160;&#160; at org.jboss.profileservice.management.ManagementViewImpl.createManagedObject(ManagementViewImpl.java:1723)<br/>&#160;&#160;&#160; at org.jboss.profileservice.management.ManagementViewImpl.load(ManagementViewImpl.java:274)<br/>&#160;&#160;&#160; at sun.reflect.GeneratedMethodAccessor289.invoke(Unknown Source)<br/>&#160;&#160;&#160; at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br/>&#160;&#160;&#160; at java.lang.reflect.Method.invoke(Unknown Source)<br/>&#160;&#160;&#160; at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:121)<br/>&#160;&#160;&#160; at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)<br/>&#160;&#160;&#160; at org.jboss.profileservice.remoting.ProfileServiceInvocationHandler.invoke(ProfileServiceInvocationHandler.java:97)<br/>&#160;&#160;&#160; at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:891)<br/>&#160;&#160;&#160; at org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalClientInvoker.java:106)<br/>&#160;&#160;&#160; at org.jboss.remoting.Client.invoke(Client.java:1724)<br/>&#160;&#160;&#160; at org.jboss.remoting.Client.invoke(Client.java:629)<br/>&#160;&#160;&#160; at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:60)<br/>&#160;&#160;&#160; at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)<br/>&#160;&#160;&#160; at org.jboss.aspects.remoting.MergeMetaDataInterceptor.invoke(MergeMetaDataInterceptor.java:74)<br/>&#160;&#160;&#160; at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)<br/>&#160;&#160;&#160; at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:65)<br/>&#160;&#160;&#160; at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)<br/>&#160;&#160;&#160; at org.jboss.aop.generatedproxies.AOPProxy$3.load(AOPProxy$3.java)<br/>&#160;&#160;&#160; at org.rhq.plugins.jbossas5.AbstractManagedDeploymentComponent.getManagedDeployment(AbstractManagedDeploymentComponent.java:220)<br/>&#160;&#160;&#160; at org.rhq.plugins.jbossas5.AbstractManagedDeploymentComponent.getAvailability(AbstractManagedDeploymentComponent.java:109)<br/>&#160;&#160;&#160; at sun.reflect.GeneratedMethodAccessor293.invoke(Unknown Source)<br/>&#160;&#160;&#160; at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br/>&#160;&#160;&#160; at java.lang.reflect.Method.invoke(Unknown Source)<br/>&#160;&#160;&#160; at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:482)<br/>&#160;&#160;&#160; at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)<br/>&#160;&#160;&#160; at java.util.concurrent.FutureTask.run(Unknown Source)<br/>&#160;&#160;&#160; at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)<br/>&#160;&#160;&#160; at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)<br/>&#160;&#160;&#160; at java.lang.Thread.run(Unknown Source)</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Please let me know if i missed anything to configure ?</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/544588#544588">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in Spring Integration at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2082">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>