activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Endre Stølsvik <Apa...@Stolsvik.com>
Subject Re: AMQ JMX: register MBeans locally w/o starting MBeans server
Date Mon, 20 Nov 2006 10:38:49 GMT
Endre Stølsvik wrote:
> Hi!

...
>   1) Using the config fragment A, not providing -D switches, I cannot 
...
>   2) Using the same unmodified config fragment, but now providing the 
...
>   3) Using the same fragment, without -D options, but with 
...
>   4) Using the same fragment A, but now with both 
...

There's also an interesting #5:

If I just take away the entire amq:managementContext element, AND rip 
away the mx4j jar, I get the two following exceptions: ClassNotFound for 
mx4j (which is obvious), but also java.rmi.server.ExportException while 
something is being "RMI exported" (even though the instantiation of the 
mx4j NamingService obviously didn't work out).

This somewhat puzzles me: shouldn't a java 1.5+ installation have its 
own MBean server thingy, and ActiveMQ should use that - and what is that 
"ObjID already in use" that "sun.rmi.transport.ObjectTable.putTarget" 
throws? Is it that one tries to inject the MBeans server (which didn't 
go through, ref the first exception), and this isn't allowed since it's 
already there?

I'd still like ActiveMQ just to install itself in the local MBeans 
thingy, both with or w/o remote JMX set up in the JVM, and be happy!

Log lines w/ Exceptions:

6000 [main] DEBUG 
org.springframework.beans.factory.support.DefaultListableBeanFactory  - 
Invoking BeanPostProcessors before initialization of bean 'PicorgMQ-id'
6000 [main] DEBUG 
org.springframework.beans.factory.support.DefaultListableBeanFactory  - 
Invoking afterPropertiesSet() on bean with name 'PicorgMQ-id'
6109 [main] DEBUG org.apache.activemq.broker.jmx.ManagementContext  - 
Failed to create local registry
java.lang.ClassNotFoundException: mx4j.tools.naming.NamingService
	at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:169)
	at 
org.apache.activemq.broker.jmx.ManagementContext.createConnector(ManagementContext.java:386)
	at 
org.apache.activemq.broker.jmx.ManagementContext.createMBeanServer(ManagementContext.java:367)
	at 
org.apache.activemq.broker.jmx.ManagementContext.findMBeanServer(ManagementContext.java:297)
	at 
org.apache.activemq.broker.jmx.ManagementContext.getMBeanServer(ManagementContext.java:154)
	at 
org.apache.activemq.broker.jmx.ManagementContext.start(ManagementContext.java:78)
	at org.apache.activemq.broker.BrokerService.start(BrokerService.java:391)
	at 
org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:47)
	at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1062)
	at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1029)
	at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:420)
	at 
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
	at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
	at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
	at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
	at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:290)
	at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:348)
	at 
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:92)
	at 
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:77)
	at 
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:68)
	at com.picorg.Picorg.newApplicationContext(Picorg.java:184)
	at com.picorg.Picorg.main(Picorg.java:83)


6125 [main] DEBUG org.apache.activemq.broker.jmx.ManagementContext  - 
Failed to create local registry
java.rmi.server.ExportException: internal error: ObjID already in use
	at sun.rmi.transport.ObjectTable.putTarget(ObjectTable.java:169)
	at sun.rmi.transport.Transport.exportObject(Transport.java:74)
	at sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:229)
	at sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:393)
	at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:129)
	at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:190)
	at sun.rmi.registry.RegistryImpl.setup(RegistryImpl.java:92)
	at sun.rmi.registry.RegistryImpl.<init>(RegistryImpl.java:78)
	at java.rmi.registry.LocateRegistry.createRegistry(LocateRegistry.java:186)
	at 
org.apache.activemq.broker.jmx.ManagementContext.createConnector(ManagementContext.java:382)
	at 
org.apache.activemq.broker.jmx.ManagementContext.findMBeanServer(ManagementContext.java:301)
	at 
org.apache.activemq.broker.jmx.ManagementContext.getMBeanServer(ManagementContext.java:154)
	at 
org.apache.activemq.broker.jmx.ManagementContext.start(ManagementContext.java:78)
	at org.apache.activemq.broker.BrokerService.start(BrokerService.java:391)
	at 
org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:47)
	at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1062)
	at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1029)
	at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:420)
	at 
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
	at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
	at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
	at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
	at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:290)
	at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:348)
	at 
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:92)
	at 
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:77)
	at 
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:68)
	at com.picorg.Picorg.newApplicationContext(Picorg.java:184)
	at com.picorg.Picorg.main(Picorg.java:83)

6156 [main] INFO org.apache.activemq.broker.BrokerService  - ActiveMQ 
null JMS Message Broker (PicorgMQ) is starting
6156 [main] INFO org.apache.activemq.broker.BrokerService  - For help or 
more information please see: http://incubator.apache.org/activemq/
6625 [JMX connector] INFO 
org.apache.activemq.broker.jmx.ManagementContext  - JMX consoles can 
connect to service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi

Regards,
Endre.

Mime
View raw message