activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chaf <chafr...@yahoo.com>
Subject cannot connect to broker launched through Runtime.exec
Date Mon, 14 Jan 2008 20:21:59 GMT

Hello,

If I start an activemq (version 5) broker through command line, then my
tests run fine. However, when I try to automate my tests and call the *same*
shell command for the server (activemq xbean:myConfigFile), I cannot connect
to the running server (and no, I do not want to embed a broker):

javax.jms.JMSException: Wire format negotiation timeout: peer did not send
his wire format.
	at
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:62)
	at
org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1183)
	at
org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1262)
	at
org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:292)
	at test.config.TestUtils.startJMSBroker(TestUtils.java:361)
	at test.ft.workflow.procem.Test.setUp(Test.java:73)
	at junit.framework.TestCase.runBare(TestCase.java:132)
	at junit.framework.TestResult$1.protect(TestResult.java:110)
	at junit.framework.TestResult.runProtected(TestResult.java:128)
	at junit.framework.TestResult.run(TestResult.java:113)
	at junit.framework.TestCase.run(TestCase.java:124)
	at junit.framework.TestSuite.runTest(TestSuite.java:232)
	at junit.framework.TestSuite.run(TestSuite.java:227)
	at
org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:76)
	at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
	at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: java.io.IOException: Wire format negotiation timeout: peer did
not send his wire format.
	at
org.apache.activemq.transport.WireFormatNegotiator.oneway(WireFormatNegotiator.java:85)
	at
org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:40)
	at
org.apache.activemq.transport.ResponseCorrelator.asyncRequest(ResponseCorrelator.java:70)
	at
org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:75)
	at
org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1172)
	... 18 more

this error is caused by this code:

					InitialContext ic = new InitialContext();

					ConnectionFactory cf = (ConnectionFactory) ic
							.lookup(JMSMsgReceiver.JMS_CONNECTION_FACTORY_NAME);
					javax.jms.Connection jmsConnection = cf.createConnection();
					javax.jms.Session session = jmsConnection.createSession(false,
javax.jms.Session.AUTO_ACKNOWLEDGE);


I have the same connection problem when launching the process through
ProcessBuilder.start()

Note that the server seems to be running, I can even connect to it through
JMX.

Does anyone know what could cause this connection error?

Thanks in advance,

Chaf
-- 
View this message in context: http://www.nabble.com/cannot-connect-to-broker-launched-through-Runtime.exec-tp14812856s2354p14812856.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message