Announcement Announcement Module
Collapse
No announcement yet.
InstanceNotFoundException Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • InstanceNotFoundException

    I've searched high and low and cannot find what I'm doing wrong.
    I have the JMX server up and running but when I try accessing the MBean from the client I get:

    org.springframework.jmx.access.MBeanInfoRetrievalE xception: Unable to obtain MBean info for bean [bean:name=JobRunner]: it is likely that this bean was unregistered during the proxy creation process; nested exception is javax.management.InstanceNotFoundException: bean:name=JobRunner
    javax.management.InstanceNotFoundException: bean:name=JobRunner
    at com.sun.jmx.interceptor.DefaultMBeanServerIntercep tor.getMBean(DefaultMBeanServerInterceptor.java:10 10)
    at com.sun.jmx.interceptor.DefaultMBeanServerIntercep tor.getMBeanInfo(DefaultMBeanServerInterceptor.jav a:1303)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.getMBeanInf o(JmxMBeanServer.java:903)...



    My server applicationContext looks like this:
    ...
    <bean id="JobRunner" class="net.idt.ReportEngine.Report.JobRunner" lazy-init="true">
    </bean>

    <bean id="registry" class="org.springframework.remoting.rmi.RmiRegistr yFactoryBean">
    <property name="port" value="1099"/>
    </bean>

    <bean id="mbeanServer" class="org.springframework.jmx.support.MBeanServer FactoryBean"/>

    <bean id="exporter" class="org.springframework.jmx.export.MBeanExporte r">
    <property name="beans">
    <map>
    <entry key="bean:name=JobRunner" value-ref="JobRunner"/>
    </map>
    </property>
    <property name="server" ref="mbeanServer"/>
    </bean>

    <bean id="serverConnector" class="org.springframework.jmx.support.ConnectorSe rverFactoryBean">
    <property name="objectName" value="connector:name=rmi"/>

    <property name="serviceUrl" value="service:jmx:rmi://localhost/jndi/rmi://localhost:1099/server"/>
    <property name="threaded" value="true"/>
    </bean>
    ...

    My logs say
    2006-02-07 16:55:24,421 [main] INFO org.springframework.jmx.export.MBeanExporter - Registering beans for JMX exposure on startup
    2006-02-07 16:55:26,562 [main] DEBUG org.springframework.jmx.export.MBeanExporter - Located simple bean under key [bean:name=JobRunner]: registering with JMX server
    2006-02-07 16:55:26,562 [main] DEBUG org.springframework.jmx.export.MBeanExporter - Registering and assembling MBean [bean:name=JobRunner]
    2006-02-07 16:55:26,593 [main] DEBUG org.springframework.jmx.support.JmxUtils - Found MBeanServer: com.sun.jmx.mbeanserver.JmxMBeanServer@1bedb0
    2006-02-07 16:55:26,640 [main] INFO org.springframework.jmx.support.ConnectorServerFac toryBean - JMX connector server started: javax.management.remote.rmi.RMIConnectorServer@113 f501


    My client applicationContext looks like this:
    <beans>

    <bean id="clientConnector" class="org.springframework.jmx.support.MBeanServer ConnectionFactoryBean" lazy-init="true">
    <property name="serviceUrl" value="service:jmx:rmi://localhost/jndi/rmi://localhost:1099/server"/>
    </bean>

    <bean id="proxy" class="org.springframework.jmx.access.MBeanProxyFa ctoryBean">
    <property name="objectName" value="bean:name=JobRunner"/>
    <property name="proxyInterface" value="net.idt.ReportEngine.jmx.JobRunnerInt"/>
    </bean>

    </beans>

    The error occurs when I try to load the client applicationcontext

    The client log is:

    2006-02-07 17:46:15,031 [main] INFO org.springframework.beans.factory.xml.XmlBeanDefin itionReader - Loading XML bean definitions from file [F:\ReportEngine\CODE\config\clientApplicationConte xt.xml]
    2006-02-07 17:46:15,343 [main] INFO org.springframework.context.support.FileSystemXmlA pplicationContext - Bean factory for application context [org.springframework.context.support.FileSystemXmlA pplicationContext;hashCode=9800632]: org.springframework.beans.factory.support.DefaultL istableBeanFactory defining beans [clientConnector,proxy]; root of BeanFactory hierarchy
    2006-02-07 17:46:15,390 [main] INFO org.springframework.context.support.FileSystemXmlA pplicationContext - 2 beans defined in application context [org.springframework.context.support.FileSystemXmlA pplicationContext;hashCode=9800632]
    2006-02-07 17:46:15,421 [main] INFO org.springframework.core.CollectionFactory - JDK 1.4+ collections available
    2006-02-07 17:46:15,437 [main] INFO org.springframework.context.support.FileSystemXmlA pplicationContext - Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMess ageSource@ebcdbb]
    2006-02-07 17:46:15,453 [main] INFO org.springframework.context.support.FileSystemXmlA pplicationContext - Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [org.springframework.context.event.SimpleApplicatio nEventMulticaster@12aea3e]
    2006-02-07 17:46:15,468 [main] INFO org.springframework.beans.factory.support.DefaultL istableBeanFactory - Pre-instantiating singletons in factory [org.springframework.beans.factory.support.DefaultL istableBeanFactory defining beans [clientConnector,proxy]; root of BeanFactory hierarchy]
    2006-02-07 17:46:15,640 [main] DEBUG org.springframework.jmx.access.MBeanProxyFactoryBe an - Attempting to locate local MBeanServer
    2006-02-07 17:46:15,781 [main] DEBUG org.springframework.jmx.support.JmxUtils - Found MBeanServer: com.sun.jmx.mbeanserver.JmxMBeanServer@1be2893




    What am I doing wrong?
Working...
X