0 Replies Latest reply on May 25, 2010 1:31 AM by Chinmaya Behera

    InstanceNotFoundException while stopping Web Application from the JBoss Admin Console

    Chinmaya Behera Newbie

      Hi,

       

      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 :

       

       

      <bean id="MyPropertiesLocation"
              class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
              <property name="locations">
                  <list><value>classpath:my.properties</value></list>          
              </property>
          </bean>


           <jee:jndi-lookup id="MyQCF" jndi-name="${topicConnectionFactory}" />
          <jee:jndi-lookup id="MyTopic" jndi-name="${topic}" />


           <bean id="CentralLoggingPojo" class="my.LoggingMDP" init-method="init" destroy-method="destroy" />


           <bean id="MyLogginglistenerContainer" class="org.springframework.jms.listener.DefaultMessageListenerContainer">
              ....

              .... 
      </bean>  

       

      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.

       

      But It gives me the following exception :

       

      2010-05-25 09:31:22,835 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/CELOG]] Closing Spring root WebApplicationContext
      2010-05-25 09:32:18,084 WARN  [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)
      javax.management.InstanceNotFoundException: jboss.web:j2eeType=Servlet,name=jsp,WebModule=//localhost/CELOG,J2EEApplication=none,J2EEServer=none is not registered.
          at org.jboss.mx.server.registry.BasicMBeanRegistry.get(BasicMBeanRegistry.java:526)
          at org.jboss.mx.server.MBeanServerImpl.getMBeanInfo(MBeanServerImpl.java:675)
          at org.jboss.profileservice.management.ManagementViewImpl.createManagedObject(ManagementViewImpl.java:1723)
          at org.jboss.profileservice.management.ManagementViewImpl.load(ManagementViewImpl.java:274)
          at sun.reflect.GeneratedMethodAccessor289.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
          at java.lang.reflect.Method.invoke(Unknown Source)
          at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:121)
          at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
          at org.jboss.profileservice.remoting.ProfileServiceInvocationHandler.invoke(ProfileServiceInvocationHandler.java:97)
          at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:891)
          at org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalClientInvoker.java:106)
          at org.jboss.remoting.Client.invoke(Client.java:1724)
          at org.jboss.remoting.Client.invoke(Client.java:629)
          at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:60)
          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
          at org.jboss.aspects.remoting.MergeMetaDataInterceptor.invoke(MergeMetaDataInterceptor.java:74)
          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
          at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:65)
          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
          at org.jboss.aop.generatedproxies.AOPProxy$3.load(AOPProxy$3.java)
          at org.rhq.plugins.jbossas5.AbstractManagedDeploymentComponent.getManagedDeployment(AbstractManagedDeploymentComponent.java:220)
          at org.rhq.plugins.jbossas5.AbstractManagedDeploymentComponent.getAvailability(AbstractManagedDeploymentComponent.java:109)
          at sun.reflect.GeneratedMethodAccessor293.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
          at java.lang.reflect.Method.invoke(Unknown Source)
          at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:482)
          at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
          at java.util.concurrent.FutureTask.run(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
          at java.lang.Thread.run(Unknown Source)
      2010-05-25 09:32:18,084 WARN  [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)
      javax.management.InstanceNotFoundException: jboss.web:j2eeType=Servlet,name=default,WebModule=//localhost/CELOG,J2EEApplication=none,J2EEServer=none is not registered.
          at org.jboss.mx.server.registry.BasicMBeanRegistry.get(BasicMBeanRegistry.java:526)
          at org.jboss.mx.server.MBeanServerImpl.getMBeanInfo(MBeanServerImpl.java:675)
          at org.jboss.profileservice.management.ManagementViewImpl.createManagedObject(ManagementViewImpl.java:1723)
          at org.jboss.profileservice.management.ManagementViewImpl.load(ManagementViewImpl.java:274)
          at sun.reflect.GeneratedMethodAccessor289.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
          at java.lang.reflect.Method.invoke(Unknown Source)
          at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:121)
          at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
          at org.jboss.profileservice.remoting.ProfileServiceInvocationHandler.invoke(ProfileServiceInvocationHandler.java:97)
          at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:891)
          at org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalClientInvoker.java:106)
          at org.jboss.remoting.Client.invoke(Client.java:1724)
          at org.jboss.remoting.Client.invoke(Client.java:629)
          at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:60)
          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
          at org.jboss.aspects.remoting.MergeMetaDataInterceptor.invoke(MergeMetaDataInterceptor.java:74)
          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
          at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:65)
          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
          at org.jboss.aop.generatedproxies.AOPProxy$3.load(AOPProxy$3.java)
          at org.rhq.plugins.jbossas5.AbstractManagedDeploymentComponent.getManagedDeployment(AbstractManagedDeploymentComponent.java:220)
          at org.rhq.plugins.jbossas5.AbstractManagedDeploymentComponent.getAvailability(AbstractManagedDeploymentComponent.java:109)
          at sun.reflect.GeneratedMethodAccessor293.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
          at java.lang.reflect.Method.invoke(Unknown Source)
          at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:482)
          at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
          at java.util.concurrent.FutureTask.run(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
          at java.lang.Thread.run(Unknown Source)

       

      Please let me know if i missed anything to configure ?