You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by chahir <ch...@yahoo.fr> on 2007/05/11 16:00:32 UTC
ERROR TransportConnector
Hi,
I want to run the example proposed by stephen pasco on activemq-4.2-snapshot
but I got the following error generated by the broker:
ERROR TransportConnector - Could not accept connection from
/127.0.0
.1:2133: java.io.IOException: Wire format negotiation timeout: peer did not
send
his wire format.
java.io.IOException: Wire format negotiation timeout: peer did not send his
wire
format.
at
org.apache.activemq.transport.WireFormatNegotiator.oneway(WireFormatN
egotiator.java:88)
at
org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.ja
va:44)
at
org.apache.activemq.broker.TransportConnection.dispatch(TransportConn
ection.java:1118)
at
org.apache.activemq.broker.TransportConnection.processDispatch(Transp
ortConnection.java:765)
at
org.apache.activemq.broker.TransportConnection.start(TransportConnect
ion.java:845)
at
org.apache.activemq.broker.TransportConnector$1.onAccept(TransportCon
nector.java:148)
at
org.apache.activemq.transport.tcp.TcpTransportServer.run(TcpTransport
Server.java:175)
at java.lang.Thread.run(Thread.java:595)
The example code is:
import org.activemq.ActiveMQConnectionFactory;
import javax.jms.Connection;
import javax.jms.Session;
import javax.jms.Destination;
import javax.jms.MessageProducer;
import javax.jms.DeliveryMode;
import javax.jms.TextMessage;
public class SendMsg
{
public static void main(String[] args)
{
runTool();
}
public static void runTool()
{
try
{
// Create a ConnectionFactory
ActiveMQConnectionFactory connectionFactory = new
ActiveMQConnectionFactory("tcp://localhost:61616");
// Create a Connection
Connection connection = connectionFactory.createConnection();
connection.setClientID("Chahir");
connection.start();
// Create a Session
Session session = connection.createSession(false,
Session.AUTO_ACKNOWLEDGE);
// Create the destination (Topic or Queue)
//Destination destination = session.createTopic("GONE.FISHING");
Destination destination = session.createQueue("Test");
// Create a MessageProducer from the Session to the Topic or Queue
MessageProducer producer = session.createProducer(destination);
producer.setTimeToLive(10000);
producer.setDeliveryMode(DeliveryMode.PERSISTENT);
// Create a message
String text = "Test";
TextMessage message = session.createTextMessage(text);
// Tell the producer to send the message
System.out.println("Sent message");
producer.send(message);
// Clean up
session.close();
//connection.close();
}
catch (Exception e)
{
System.out.println("Caught: " + e);
e.printStackTrace();
}
}
}
Thank you for your advices.
--
View this message in context: http://www.nabble.com/ERROR-TransportConnector-tf3727589s2354.html#a10432504
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.