When I create and run the example Java program from http://activemq.apache.org/how-do-i-use-log4j-jms-appender-with-activemq.html, the following log messages appear:
14:19:13,637 DEBUG WireFormatNegotiator:77 - Sending: WireFormatInfo { version=3, properties={CacheSize=1024, CacheEnabled=true, SizePrefixDisabled=false, MaxInactivityDurationInitalDelay=10000, TcpNoDelayEnabled=true, MaxInactivityDuration=30000, TightEncodingEnabled=true, StackTraceEnabled=true}, magic=[A,c,t,i,v,e,M,Q]} log4j:ERROR Error while activating options for appender named [jms]. 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:1255) at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1339) at org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:298) at org.apache.activemq.ActiveMQConnection.createTopicSession(ActiveMQConnection.java:1036) at org.apache.log4j.net.JMSAppender.activateOptions(Unknown Source) at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:256) at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:132) at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:96) at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:654) at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:612) at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:509) at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:415) at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:441) at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:470) at org.apache.log4j.LogManager.<clinit>(LogManager.java:122) 14:19:23,858 INFO Log4jJMSAppenderExample:33 - Test log 14:19:13,643 DEBUG WireFormatNegotiator:108 - Received WireFormat: WireFormatInfo { version=5, properties={CacheSize=1024, CacheEnabled=true, SizePrefixDisabled=false, MaxInactivityDurationInitalDelay=10000, TcpNoDelayEnabled=true, MaxInactivityDuration=30000, TightEncodingEnabled=true, StackTraceEnabled=true}, magic=[A,c,t,i,v,e,M,Q]} at org.apache.log4j.Logger.getLogger(Logger.java:117) at com.mycompany.jmsappendersimple.Log4jJMSAppenderExample.<init>(Log4jJMSAppenderExample.java:32) at com.mycompany.jmsappendersimple.Log4jJMSAppenderExample.main(Log4jJMSAppenderExample.java:43) 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:94) at org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:40) at org.apache.activemq.transport.ResponseCorrelator.asyncRequest(ResponseCorrelator.java:74) at org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:79) at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1233) ... 17 more The log topic in ActiveMQ is empty. I tried the 5.2 and the 5.3 Snapshot release, with Log4J 1.2.14. I have built the project using Maven. I will also try the Ant project in the 5.3 release. The log messages WireFormatNegotiator:77 - Sending: WireFormatInfo { version=3, ... INFO Log4jJMSAppenderExample:33 - Test log WireFormatNegotiator:108 - Received WireFormat: WireFormatInfo { version=5, look like the negotiation is not complete before Log4j tries to send the first message to the broker, maybe this is the reason? Best regards, ----- Michael Justin SCJP, SCJA betasoft - Software for Delphi™ and for the Java™ platform http://www.mikejustin.com - http://www.betabeans.de -- View this message in context: http://www.nabble.com/Log4jJMSAppenderExample%3A-Wire-format-negotiation-timeout%3A-peer-did-not-send-his-wire-format-tp25422809p25422809.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.