You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by Dave Cameron <da...@lmco.com> on 2007/09/20 19:06:03 UTC

Re: Failed to create local registry?

Actually...I have been getting this same debug message in ActiveMQ 4.1.1 on
my system and discovered that
org.apache.activemq.broker.jmx.ManagementContext is trying to create the
Connector twice.

I set a breakpoint in ManagementContext.createConnector and saw that it was
being called twice during the brokerService.registerNetworkconnectorMBean
call.

The first time it is created at the bottom of createMBeanServer.

Then it is created again at the bottom of findMBeanServer right after it
called createMBeanServer.

This message comes flying out because the Connector has already been
created.  And the MBeanServer really doesn't like when somebody tries to do
that.

It appears that this error will never come out if an MBeanServer already
exists.  The message will come out if ManagementContext needs to create the
MBeanServer itself.

It looks to me like the createConnector call at the bottom of
findMBeanServer shouild only get called as an else to the if above it.


Dave



Hiram Chirino wrote:
> 
> Creating a JMX server and associated remote connector takes several step..
> and each one can fail for various reasons.  We try our best to get as far
> as
> we can, but error may occur and it does not always mean that a step
> failed.
> In this case it seems that the step where we create a RMI registry failed.
> I'm not sure why.  Perhaps it was already created, or perhaps that call
> does
> not work well in the jvm your are running under.
> 
> On 10/15/06, Jason Dillon <ja...@planet57.com> wrote:
>>
>> Hi guys, I was just writing a simple GShell command to start up a
>> BrokerService, and when I enable useJmx=true, I get the rather nasty
>> looking DEBUG message below.
>>
>> Anyone know why this is?
>>
>> It appears that the broker is still functional... and I can still
>> peek at the jmx details with jconsole... so why the icky DEBUG error-
>> looking failure fluff?
>>
>> --jason
>>
>>
>> <snip>
>> 17:03:42,100 DEBUG [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:75)
>>          at sun.rmi.transport.tcp.TCPTransport.exportObject
>> (TCPTransport.java:190)
>>          at sun.rmi.transport.tcp.TCPEndpoint.exportObject
>> (TCPEndpoint.java:382)
>>          at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:116)
>>          at sun.rmi.server.UnicastServerRef.exportObject
>> (UnicastServerRef.java:180)
>>          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:390)
>>          at
>> org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet
>> (XBeanBrokerService.java:47)
>>          at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
>> tory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1058)
>>          at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
>> tory.createBean(AbstractAutowireCapableBeanFactory.java:363)
>>          at
>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean
>> (AbstractBeanFactory.java:226)
>>          at
>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean
>> (AbstractBeanFactory.java:147)
>>          at
>> org.springframework.beans.factory.support.DefaultListableBeanFactory.pre
>> InstantiateSingletons(DefaultListableBeanFactory.java:275)
>>          at
>> org.springframework.context.support.AbstractApplicationContext.refresh
>> (AbstractApplicationContext.java:318)
>>          at
>> org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>
>> (ClassPathXmlApplicationContext.java:158)
>>          at
>> org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>
>> (ClassPathXmlApplicationContext.java:48)
>>          at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker
>> (XBeanBrokerFactory.java:41)
>>          at org.apache.activemq.broker.BrokerFactory.createBroker
>> (BrokerFactory.java:57)
>>          at
>> org.apache.geronimo.gbuild.commands.BrokerCommand.doExecute
>> (BrokerCommand.java:93)
>>          at org.apache.geronimo.gshell.command.CommandSupport.execute
>> (CommandSupport.java:241)
>>          at org.apache.geronimo.gshell.Shell.execute(Shell.java:200)
>>          at
>> org.apache.geronimo.gshell.commandline.ExecutingVisitor.visit
>> (ExecutingVisitor.java:96)
>>          at
>> org.apache.geronimo.gshell.commandline.parser.ASTExpression.jjtAccept
>> (ASTExpression.java:17)
>>          at
>> org.apache.geronimo.gshell.commandline.parser.SimpleNode.childrenAccept(
>> SimpleNode.java:57)
>>          at
>> org.apache.geronimo.gshell.commandline.ExecutingVisitor.visit
>> (ExecutingVisitor.java:77)
>>          at
>> org.apache.geronimo.gshell.commandline.parser.ASTCommandLine.jjtAccept
>> (ASTCommandLine.java:17)
>>          at org.apache.geronimo.gshell.commandline.CommandLineBuilder
>> $1.execute(CommandLineBuilder.java:90)
>>          at org.apache.geronimo.gshell.Shell.execute(Shell.java:116)
>>          at org.apache.geronimo.gshell.InteractiveShell$1.execute
>> (InteractiveShell.java:58)
>>          at
>> org.apache.geronimo.gshell.console.InteractiveConsole.doExecute
>> (InteractiveConsole.java:161)
>>          at
>> org.apache.geronimo.gshell.console.InteractiveConsole.doRun
>> (InteractiveConsole.java:136)
>>          at org.apache.geronimo.gshell.console.InteractiveConsole.run
>> (InteractiveConsole.java:99)
>>          at org.apache.geronimo.gshell.cli.Main.execute(Main.java:267)
>>          at org.apache.geronimo.gshell.cli.Main.run(Main.java:208)
>>          at org.apache.geronimo.gshell.cli.Main.main(Main.java:295)
>>          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>          at sun.reflect.NativeMethodAccessorImpl.invoke
>> (NativeMethodAccessorImpl.java:39)
>>          at sun.reflect.DelegatingMethodAccessorImpl.invoke
>> (DelegatingMethodAccessorImpl.java:25)
>>          at java.lang.reflect.Method.invoke(Method.java:585)
>>          at org.codehaus.classworlds.Launcher.launchEnhanced
>> (Launcher.java:315)
>>          at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>>          at org.codehaus.classworlds.Launcher.mainWithExitCode
>> (Launcher.java:430)
>>          at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
>> 17:03:42,107 INFO  [BrokerService] ActiveMQ 4.1-incubator-SNAPSHOT
>> JMS Message Broker (localhost) is starting
>> ...
>> </snip>
>>
> 
> 
> 
> -- 
> Regards,
> Hiram
> 
> Blog: http://hiramchirino.com
> 
> 

-- 
View this message in context: http://www.nabble.com/Failed-to-create-local-registry--tf2449141s2354.html#a12801544
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.