activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fachhoch <fachh...@gmail.com>
Subject embedded broker problem with connection
Date Tue, 22 Feb 2011 16:22:54 GMT

I am  using embedded jetty 
I configured it using spring


	<bean id="jmsConnectionFactory"
class="org.apache.activemq.ActiveMQConnectionFactory"  >
		<property name="brokerURL"
value="vm://localhost?brokerConfig=properties:gov/hhs/acf/jms/broker.properties"/>
	</bean>

this  is 
broker.properties


dataDirectory=/u01/oracle/myapp-jms 



I am getting this exception when I restart my app  , I am running it on
jetty.

 2011-02-22 11:16:27,748 [main] DEBUG
org.apache.activemq.broker.jmx.ManagementContext - Failed to create local
registry
java.rmi.server.ExportException: Port already in use: 1099; nested exception
is: 
	java.net.BindException: Address already in use: JVM_Bind
	at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:310)
	at sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:218)
	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:68)
	at java.rmi.registry.LocateRegistry.createRegistry(LocateRegistry.java:222)
	at
org.apache.activemq.broker.jmx.ManagementContext.createConnector(ManagementContext.java:418)
	at
org.apache.activemq.broker.jmx.ManagementContext.findTigerMBeanServer(ManagementContext.java:363)
	at
org.apache.activemq.broker.jmx.ManagementContext.findMBeanServer(ManagementContext.java:330)
	at
org.apache.activemq.broker.jmx.ManagementContext.getMBeanServer(ManagementContext.java:172)
	at
org.apache.activemq.broker.jmx.ManagementContext.start(ManagementContext.java:80)
	at
org.apache.activemq.broker.BrokerService.startManagementContext(BrokerService.java:2031)
	at org.apache.activemq.broker.BrokerService.start(BrokerService.java:477)
	at
org.apache.activemq.transport.vm.VMTransportFactory.doCompositeConnect(VMTransportFactory.java:123)
	at
org.apache.activemq.transport.vm.VMTransportFactory.doConnect(VMTransportFactory.java:53)
	at
org.apache.activemq.transport.TransportFactory.doConnect(TransportFactory.java:51)
	at
org.apache.activemq.transport.TransportFactory.connect(TransportFactory.java:80)
	at
org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnectionFactory.java:243)
	at
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:258)
	at
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:230)
	at
org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:178)
	at
org.springframework.jms.connection.SingleConnectionFactory.doCreateConnection(SingleConnectionFactory.java:342)
	at
org.springframework.jms.connection.SingleConnectionFactory.initConnection(SingleConnectionFactory.java:288)
	at
org.springframework.jms.connection.SingleConnectionFactory.createConnection(SingleConnectionFactory.java:225)
	at
org.springframework.jms.support.JmsAccessor.createConnection(JmsAccessor.java:184)
	at
org.springframework.jms.listener.AbstractJmsListeningContainer.createSharedConnection(AbstractJmsListeningContainer.java:403)
	at
org.springframework.jms.listener.AbstractJmsListeningContainer.establishSharedConnection(AbstractJmsListeningContainer.java:371)
	at
org.springframework.jms.listener.DefaultMessageListenerContainer.establishSharedConnection(DefaultMessageListenerContainer.java:749)
	at
org.springframework.jms.listener.AbstractJmsListeningContainer.doStart(AbstractJmsListeningContainer.java:278)
	at
org.springframework.jms.listener.AbstractJmsListeningContainer.start(AbstractJmsListeningContainer.java:263)
	at
org.springframework.jms.listener.DefaultMessageListenerContainer.start(DefaultMessageListenerContainer.java:555)
	at
org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:166)
	at
org.springframework.context.support.DefaultLifecycleProcessor.access$1(DefaultLifecycleProcessor.java:154)
	at
org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:335)
	at
org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:143)
	at
org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:108)
	at
org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:908)
	at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:428)
	at
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
	at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
	at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
	at
org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:636)
	at
org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:188)
	at
org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:995)
	at
org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:579)
	at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:381)
	at
org.mortbay.jetty.plugin.JettyWebAppContext.doStart(JettyWebAppContext.java:114)
	at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
	at
org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:165)
	at
org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:162)
	at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
	at
org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:165)
	at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
	at
org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:92)
	at org.eclipse.jetty.server.Server.doStart(Server.java:226)
	at org.mortbay.jetty.plugin.JettyServer.doStart(JettyServer.java:69)
	at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
	at
org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:433)
	at
org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:377)
	at org.mortbay.jetty.plugin.JettyRunMojo.execute(JettyRunMojo.java:577)
	at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483)
	at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:678)
	at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:553)
	at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:523)
	at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371)
	at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:332)
	at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:356)
	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:597)
	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)
Caused by: java.net.BindException: Address already in use: JVM_Bind
	at java.net.PlainSocketImpl.socketBind(Native Method)
	at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
	at java.net.ServerSocket.bind(ServerSocket.java:319)
	at java.net.ServerSocket.<init>(ServerSocket.java:185)
	at java.net.ServerSocket.<init>(ServerSocket.java:97)
	at
org.apache.activemq.broker.jmx.ManagementContext$2.createServerSocket(ManagementContext.java:421)
	at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(TCPEndpoint.java:649)
	at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:299)
	... 79 more
2011-02-22 11:16:27,889 [JMX connector] DEBUG
org.apache.activemq.broker.jmx.ManagementContext - Starting
JMXConnectorServer...
2011-02-22 11:16:28,499 [main] INFO 
org.apache.activemq.store.kahadb.plist.PListStore -
PListStore:\u01\oracle\artms-jms\localhost\tmp_storage started
2011-02-22 11:16:28,671 [main] INFO 
org.apache.activemq.broker.BrokerService - Using Persistence Adapter:
KahaDBPersistenceAdapter[\u01\oracle\artms-jms\localhost\KahaDB]
2011-02-22 11:16:29,877 [JMX connector] WARN 
org.apache.activemq.broker.jmx.ManagementContext - Failed to start jmx
connector: Cannot bind to URL [rmi://localhost:1099/jmxrmi]:
javax.naming.ServiceUnavailableException [Root exception is
java.rmi.ConnectException: Connection refused to host: localhost; nested
exception is: 
	java.net.ConnectException: Connection refused: connect]
2011-02-22 11:16:29,877 [JMX connector] DEBUG
org.apache.activemq.broker.jmx.ManagementContext - Reason for failed jms
connector start
java.io.IOException: Cannot bind to URL [rmi://localhost:1099/jmxrmi]:
javax.naming.ServiceUnavailableException [Root exception is
java.rmi.ConnectException: Connection refused to host: localhost; nested
exception is: 
	java.net.ConnectException: Connection refused: connect]
	at
javax.management.remote.rmi.RMIConnectorServer.newIOException(RMIConnectorServer.java:804)
	at
javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:417)
	at
org.apache.activemq.broker.jmx.ManagementContext$1.run(ManagementContext.java:95)
Caused by: javax.naming.ServiceUnavailableException [Root exception is
java.rmi.ConnectException: Connection refused to host: localhost; nested
exception is: 
	java.net.ConnectException: Connection refused: connect]
	at com.sun.jndi.rmi.registry.RegistryContext.bind(RegistryContext.java:126)
	at
com.sun.jndi.toolkit.url.GenericURLContext.bind(GenericURLContext.java:208)
	at javax.naming.InitialContext.bind(InitialContext.java:400)
	at
javax.management.remote.rmi.RMIConnectorServer.bind(RMIConnectorServer.java:625)
	at
javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:412)
	... 1 more
Caused by: java.rmi.ConnectException: Connection refused to host: localhost;
nested exception is: 
	java.net.ConnectException: Connection refused: connect
	at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:601)
	at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198)
	at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
	at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:322)
	at sun.rmi.registry.RegistryImpl_Stub.bind(Unknown Source)
	at com.sun.jndi.rmi.registry.RegistryContext.bind(RegistryContext.java:120)
	... 5 more
Caused by: java.net.ConnectException: Connection refused: connect
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
	at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
	at java.net.Socket.connect(Socket.java:519)
	at java.net.Socket.connect(Socket.java:469)
	at java.net.Socket.<init>(Socket.java:366)
	at java.net.Socket.<init>(Socket.java:180)
	at
sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
	at
sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
	at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:595)
	... 10 more




I have to kill javaw.exe manually to not to get this error , on restart  ,
please advice me , I am uisng 5.4.2








-- 
View this message in context: http://activemq.2283324.n4.nabble.com/embedded-broker-problem-with-connection-tp3319510p3319510.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message