Announcement Announcement Module
Collapse
No announcement yet.
Unable to locate an MBeanServer instance - WAS6.1 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Unable to locate an MBeanServer instance - WAS6.1

    I am a newbie to JMX. I am trying to leverage the Spring Framework, and have the JMX Server Connector created during my WAS6.1 startup. I am trying to make the Facade MBean accessible via a JMX client Application that will be used remotley. However, I receive a Spring Exception during startup...

    Here is my contenxt excerpt and exception excerpt.

    Thanks,

    Code:
     
    <bean id="adminService" class="com.ibm.websphere.management.AdminServiceFactory" factory-method="getAdminService"/>
        <bean id="adminService.defaultDomain" class="org.springframework.beans.factory.config.PropertyPathFactoryBean"/>
        <bean id="adminService.cellName" class="org.springframework.beans.factory.config.PropertyPathFactoryBean"/>
        <bean id="adminService.nodeName" class="org.springframework.beans.factory.config.PropertyPathFactoryBean"/>
        <bean id="adminService.processName" class="org.springframework.beans.factory.config.PropertyPathFactoryBean"/>
        <bean id="websphereNamingStrategy" class="com.WebsphereNamingStrategy">
             <property name="domainName" ref="adminService.defaultDomain"/>
            <property name="cellName" ref="adminService.cellName"/>
            <property name="nodeName" ref="adminService.nodeName"/>
            <property name="processName" ref="adminService.processName"/>
        </bean>
        <bean id="beanExporter" class="org.springframework.jmx.export.MBeanExporter">
        <property name="beans">
            <map>
            <entry key="test:name=jmx,type=spring" value-ref="com.Facade"/>
                </map>
        </property>
        <property name="assembler" ref="assembler"/>
            <property name="namingStrategy" ref="websphereNamingStrategy"/>
        </bean>
        <bean id="assembler" class="org.springframework.jmx.export.assembler.InterfaceBasedMBeanInfoAssembler">
            <property name="managedInterfaces">
                <list>
                    <value>com.FacadeMBean</value>
                </list>
            </property>
        </bean>
        <bean id="registry" class="org.springframework.remoting.rmi.RmiRegistryFactoryBean">
            <property name="port" value="1099"/>
        </bean>
        <bean id="serverConnector" class="org.springframework.jmx.support.ConnectorServerFactoryBean" depends-on="registry">
            <property name="objectName" value="connector:name=rmi"/>
            <property name="serviceUrl" value="service:jmx:rmi://localhost/jndi/rmi://localhost:1099/testjmxrmi"/>
        </bean>
    I am getting the following exception during my was6.1 startup

    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'beanExporter' defined in ServletContext resource [/WEB-INF/context/applicationContext.xml]: Invocation of init method failed; nested exception is org.springframework.jmx.MBeanServerNotFoundExcepti on: Unable to locate an MBeanServer instance
    Caused by:
    org.springframework.jmx.MBeanServerNotFoundExcepti on: Unable to locate an MBeanServer instance
    at org.springframework.jmx.support.JmxUtils.locateMBe anServer(JmxUtils.java:118)
    at org.springframework.jmx.support.JmxUtils.locateMBe anServer(JmxUtils.java:77)


    netstat -a | find "1099" doesnt show anything listening

    Thanks for your help
    Last edited by justsnwbrd; Oct 7th, 2008, 05:45 PM.

  • #2
    problem solved...

    here is my context

    Code:
    	<bean id="mbeanServer" class="org.springframework.jmx.support.MBeanServerFactoryBean">
        	<property name="locateExistingServerIfPossible" value="true"/>
    	</bean>	
    	<bean id="mbeanExporter" class="org.springframework.jmx.export.MBeanExporter">
    		<property name="server" ref="mbeanServer"/>
    		<property name="ensureUniqueRuntimeObjectNames" value="true"/>
        		<property name="beans">
        			<map>
            			<entry key="justsnwbrd:bean=CacheManagementFacade">
                				<bean id="facade" class="com.Facade"/>
            			</entry>
           			</map>
    	   	</property>
    	</bean>
    	<bean id="registry" class="org.springframework.remoting.rmi.RmiRegistryFactoryBean">
    		<property name="port" value="11099" />
    	</bean>
    	<bean class="org.springframework.jmx.support.ConnectorServerFactoryBean" depends-on="registry">
    		<property name="serviceUrl" value="service:jmx:rmi://localhost/jndi/rmi://localhost:11099/jmxrmi" />
    	</bean>

    Comment

    Working...
    X