You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by David Borja <ad...@gmail.com> on 2007/02/14 02:03:05 UTC

Problems with amq and log4j ...

Hi activemq devs!!

I'm having a problem with activemq and log4j ...

this is my log4j.properties :

log4j.appender.A1=org.apache.log4j.net.JMSAppender
log4j.appender.A1.InitialContextFactoryName=org.apache.activemq.jndi.ActiveMQInitialContextFactory
log4j.appender.A1.ProviderURL=tcp://dllo-aborja:61616
log4j.appender.A1.TopicBindingName=jms/log.queue
log4j.appender.A1.TopicConnectionFactoryBindingName=ConnectionFactory

log4j.appender.A1.layout=lineai.base.jms.util.log4j.XMLLayout

When i try to send log message, the following exception is thrown:

log4j:ERROR Error while activating options for appender named [A1].
javax.jms.JMSException: Wire format negociation timeout: peer did not send
his wire format.
    at org.apache.activemq.util.JMSExceptionSupport.create(
JMSExceptionSupport.java:58)
    at org.apache.activemq.ActiveMQConnection.syncSendPacket(
ActiveMQConnection.java:1181)
    at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent (
ActiveMQConnection.java:1259)
    at org.apache.activemq.ActiveMQConnection.createSession(
ActiveMQConnection.java:274)
    at org.apache.activemq.ActiveMQConnection.createTopicSession(
ActiveMQConnection.java:960)
    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.PropertyConfigurator.configure (
PropertyConfigurator.java:336)
    at lineai.base.jms.util.log4j.LogTest.test(LogTest.java:12)
    at lineai.base.jms.util.log4j.LogTest.main(LogTest.java:24)
Caused by: java.io.IOException: Wire format negociation timeout: peer did
not send his wire format.
    at org.apache.activemq.transport.WireFormatNegotiator.oneway(
WireFormatNegotiator.java:88)
    at org.apache.activemq.transport.MutexTransport.oneway(
MutexTransport.java:43)
    at org.apache.activemq.transport.ResponseCorrelator.asyncRequest (
ResponseCorrelator.java:69)
    at org.apache.activemq.transport.ResponseCorrelator.request(
ResponseCorrelator.java:74)
    at org.apache.activemq.ActiveMQConnection.syncSendPacket(
ActiveMQConnection.java:1171)
    ... 15 more

Any ideas??

Thnx ...

David

Re: Problems with amq and log4j ...

Posted by James Strachan <ja...@gmail.com>.
Given that ActiveMQ uses commons logging during its startup - its
gonna  be hard to use ActiveMQ to log messages of ActiveMQ starting up
:). So there's clearly gonna be ordering & dependency issues gettings
started.



On 2/15/07, teryz <te...@gmail.com> wrote:
>
> Hello David i ran into the same problem and i used an appender that I wrote
> myself for log4J to send message in ActiveMQ and this class is based on the
> ProducerTool example given with activeMQ (we don't have any app server).
>
> I tried it on the 4.1, same error, i tried it a 4.2 snapshot still the same.
> I get it to work by doing this trick (don't ask me i can't understand why it
> changed anything) :
> i made the org.apachae.activemq logger log in an appender that is not the
> JMS one !! and i didn't have the problem any more.
>
> Keep me posted if it works for you. Maybe someone would be able to explain.
>
> Cheers,
> Terry.
>
>
> David Borja-2 wrote:
> >
> > Hi James ...
> >
> > The version of active mq is the latest (apache-activemq-4.1.0-incubator),
> > and the activemq log seems normal (i think so ...):
> >
> >
> > 2007-02-14 09:09:16,306 [main           ] INFO
> > BrokerService                  - ActiveMQ 4.1.0-incubator JMS Message
> > Broker
> > (localhost) is starting
> > 2007-02-14 09:09:16,306 [main           ] INFO
> > BrokerService                  - For help or more information please see:
> > http://incubator.apache.org/activemq/
> > 2007-02-14 09:09:17,477 [JMX connector  ] INFO
> > ManagementContext              - JMX consoles can connect to
> > service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
> > 2007-02-14 09:09:19,679 [main           ] INFO
> > JDBCPersistenceAdapter         - Database driver recognized:
> > [apache_derby_embedded_jdbc_driver]
> > 2007-02-14 09:09:22,521 [main           ] INFO
> > DefaultDatabaseLocker          - Attempting to acquire the exclusive lock
> > to
> > become the Master broker
> > 2007-02-14 09:09:22,521 [main           ] INFO
> > DefaultDatabaseLocker          - Becoming the master on dataSource:
> > org.apache.derby.jdbc.EmbeddedDataSource@143bf3d
> > 2007-02-14 09:09:22,771 [main           ] INFO
> > JournalPersistenceAdapter      - Journal Recovery Started from: Active
> > Journal: using 5 x 20.0 Megs at: C:\trabajo\instaladores\Apache\apache-
> > activemq-4.1.0-incubator\activemq-data\journal
> > 2007-02-14 09:09:22,880 [main           ] INFO
> > JournalPersistenceAdapter      - Journal Recovered: 0 message(s) in
> > transactions recovered.
> > 2007-02-14 09:09:23,083 [main           ] INFO
> > TransportServerThreadSupport   - Listening for connections at:
> > tcp://dllo-aborja:61616
> > 2007-02-14 09:09:23,130 [main           ] INFO
> > TransportConnector             - Connector openwire Started
> > 2007-02-14 09:09:23,146 [main           ] INFO
> > TransportServerThreadSupport   - Listening for connections at:
> > stomp://dllo-aborja:61613
> > 2007-02-14 09:09:23,161 [main           ] INFO
> > TransportConnector             - Connector stomp Started
> > 2007-02-14 09:09:23,286 [main           ] INFO
> > NetworkConnector               - Network Connector default-nc Started
> > 2007-02-14 09:09:23,286 [main           ] INFO
> > BrokerService                  - ActiveMQ JMS Message Broker (localhost,
> > ID:dllo-aborja-1307-1171462155744-1:0) started
> >
> > I send a normal message and it responds ....
> >
> >
> > Thanx!!!
> >
> > David
> >
> >
> > On 2/14/07, James Strachan <ja...@gmail.com> wrote:
> >>
> >> Which version are you using? Also what appears in the broker's log
> >> file - it seems the broker side is not responding properly
> >>
> >> On 2/14/07, David Borja <ad...@gmail.com> wrote:
> >> > Hi activemq devs!!
> >> >
> >> > I'm having a problem with activemq and log4j ...
> >> >
> >> > this is my log4j.properties :
> >> >
> >> > log4j.appender.A1=org.apache.log4j.net.JMSAppender
> >> >
> >> log4j.appender.A1.InitialContextFactoryName=org.apache.activemq.jndi.ActiveMQInitialContextFactory
> >> > log4j.appender.A1.ProviderURL=tcp://dllo-aborja:61616
> >> > log4j.appender.A1.TopicBindingName=jms/log.queue
> >> > log4j.appender.A1.TopicConnectionFactoryBindingName=ConnectionFactory
> >> >
> >> > log4j.appender.A1.layout=lineai.base.jms.util.log4j.XMLLayout
> >> >
> >> > When i try to send log message, the following exception is thrown:
> >> >
> >> > log4j:ERROR Error while activating options for appender named [A1].
> >> > javax.jms.JMSException: Wire format negociation timeout: peer did not
> >> send
> >> > his wire format.
> >> >     at org.apache.activemq.util.JMSExceptionSupport.create(
> >> > JMSExceptionSupport.java:58)
> >> >     at org.apache.activemq.ActiveMQConnection.syncSendPacket(
> >> > ActiveMQConnection.java:1181)
> >> >     at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent
> >> (
> >> > ActiveMQConnection.java:1259)
> >> >     at org.apache.activemq.ActiveMQConnection.createSession(
> >> > ActiveMQConnection.java:274)
> >> >     at org.apache.activemq.ActiveMQConnection.createTopicSession(
> >> > ActiveMQConnection.java:960)
> >> >     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.PropertyConfigurator.configure (
> >> > PropertyConfigurator.java:336)
> >> >     at lineai.base.jms.util.log4j.LogTest.test(LogTest.java:12)
> >> >     at lineai.base.jms.util.log4j.LogTest.main(LogTest.java:24)
> >> > Caused by: java.io.IOException: Wire format negociation timeout: peer
> >> did
> >> > not send his wire format.
> >> >     at org.apache.activemq.transport.WireFormatNegotiator.oneway(
> >> > WireFormatNegotiator.java:88)
> >> >     at org.apache.activemq.transport.MutexTransport.oneway(
> >> > MutexTransport.java:43)
> >> >     at org.apache.activemq.transport.ResponseCorrelator.asyncRequest (
> >> > ResponseCorrelator.java:69)
> >> >     at org.apache.activemq.transport.ResponseCorrelator.request(
> >> > ResponseCorrelator.java:74)
> >> >     at org.apache.activemq.ActiveMQConnection.syncSendPacket(
> >> > ActiveMQConnection.java:1171)
> >> >     ... 15 more
> >> >
> >> > Any ideas??
> >> >
> >> > Thnx ...
> >> >
> >> > David
> >> >
> >>
> >>
> >> --
> >>
> >> James
> >> -------
> >> http://radio.weblogs.com/0112098/
> >>
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Problems-with-amq-and-log4j-...-tf3224651s2354.html#a8995823
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


-- 

James
-------
http://radio.weblogs.com/0112098/

Re: [Spam: 5.0] Problems with amq and log4j ...

Posted by teryz <te...@gmail.com>.
Hello David,

sorry for the delay, what i was suggesting is to do the following, here is
an excerpt of my xml log4j config file, just make the activemq classes log
in a different appender than the JMS one


<logger name="org.apache.activemq">
        <level value="info" />
        <appender-ref ref="STDOUT" />
</logger>
    
<root>
        <level value="trace" />
        <appender-ref ref="STDOUT" />
        <appender-ref ref="JMS_APPENDER" />
</root>

this works fine for me with the 4.2 snapshot distro of activemq

hope it helps, 

see u,

Terry.

 	

David Borja-2 wrote:
> 
> Hi Terys ...
> 
> I'm got the same problem configuring my log4j.properties with activemq
> appender, this is my log config:
> 
> log4j.appender.A1=org.apache.activemq.util.JmsLogAppender
> log4j.appender.A1.uri=tcp://localhost:61616
> 
> i don't know why!!!
> 
> Thanx!
> 
> On 2/15/07, teryz <te...@gmail.com> wrote:
>>
>>
>> Hello David i ran into the same problem and i used an appender that I
>> wrote
>> myself for log4J to send message in ActiveMQ and this class is based on
>> the
>> ProducerTool example given with activeMQ (we don't have any app server).
>>
>> I tried it on the 4.1, same error, i tried it a 4.2 snapshot still the
>> same.
>> I get it to work by doing this trick (don't ask me i can't understand why
>> it
>> changed anything) :
>> i made the org.apachae.activemq logger log in an appender that is not the
>> JMS one !! and i didn't have the problem any more.
>>
>> Keep me posted if it works for you. Maybe someone would be able to
>> explain.
>>
>> Cheers,
>> Terry.
>>
>>
>> David Borja-2 wrote:
>> >
>> > Hi James ...
>> >
>> > The version of active mq is the latest (apache-activemq-4.1.0-incubator
>> ),
>> > and the activemq log seems normal (i think so ...):
>> >
>> >
>> > 2007-02-14 09:09:16,306 [main           ] INFO
>> > BrokerService                  - ActiveMQ 4.1.0-incubator JMS Message
>> > Broker
>> > (localhost) is starting
>> > 2007-02-14 09:09:16,306 [main           ] INFO
>> > BrokerService                  - For help or more information please
>> see:
>> > http://incubator.apache.org/activemq/
>> > 2007-02-14 09:09:17,477 [JMX connector  ] INFO
>> > ManagementContext              - JMX consoles can connect to
>> > service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
>> > 2007-02-14 09:09:19,679 [main           ] INFO
>> > JDBCPersistenceAdapter         - Database driver recognized:
>> > [apache_derby_embedded_jdbc_driver]
>> > 2007-02-14 09:09:22,521 [main           ] INFO
>> > DefaultDatabaseLocker          - Attempting to acquire the exclusive
>> lock
>> > to
>> > become the Master broker
>> > 2007-02-14 09:09:22,521 [main           ] INFO
>> > DefaultDatabaseLocker          - Becoming the master on dataSource:
>> > org.apache.derby.jdbc.EmbeddedDataSource@143bf3d
>> > 2007-02-14 09:09:22,771 [main           ] INFO
>> > JournalPersistenceAdapter      - Journal Recovery Started from: Active
>> > Journal: using 5 x 20.0 Megs at: C:\trabajo\instaladores\Apache\apache-
>> > activemq-4.1.0-incubator\activemq-data\journal
>> > 2007-02-14 09:09:22,880 [main           ] INFO
>> > JournalPersistenceAdapter      - Journal Recovered: 0 message(s) in
>> > transactions recovered.
>> > 2007-02-14 09:09:23,083 [main           ] INFO
>> > TransportServerThreadSupport   - Listening for connections at:
>> > tcp://dllo-aborja:61616
>> > 2007-02-14 09:09:23,130 [main           ] INFO
>> > TransportConnector             - Connector openwire Started
>> > 2007-02-14 09:09:23,146 [main           ] INFO
>> > TransportServerThreadSupport   - Listening for connections at:
>> > stomp://dllo-aborja:61613
>> > 2007-02-14 09:09:23,161 [main           ] INFO
>> > TransportConnector             - Connector stomp Started
>> > 2007-02-14 09:09:23,286 [main           ] INFO
>> > NetworkConnector               - Network Connector default-nc Started
>> > 2007-02-14 09:09:23,286 [main           ] INFO
>> > BrokerService                  - ActiveMQ JMS Message Broker
>> (localhost,
>> > ID:dllo-aborja-1307-1171462155744-1:0) started
>> >
>> > I send a normal message and it responds ....
>> >
>> >
>> > Thanx!!!
>> >
>> > David
>> >
>> >
>> > On 2/14/07, James Strachan <ja...@gmail.com> wrote:
>> >>
>> >> Which version are you using? Also what appears in the broker's log
>> >> file - it seems the broker side is not responding properly
>> >>
>> >> On 2/14/07, David Borja <ad...@gmail.com> wrote:
>> >> > Hi activemq devs!!
>> >> >
>> >> > I'm having a problem with activemq and log4j ...
>> >> >
>> >> > this is my log4j.properties :
>> >> >
>> >> > log4j.appender.A1=org.apache.log4j.net.JMSAppender
>> >> >
>> >>
>> log4j.appender.A1.InitialContextFactoryName=org.apache.activemq.jndi.ActiveMQInitialContextFactory
>> >> > log4j.appender.A1.ProviderURL=tcp://dllo-aborja:61616
>> >> > log4j.appender.A1.TopicBindingName=jms/log.queue
>> >> >
>> log4j.appender.A1.TopicConnectionFactoryBindingName=ConnectionFactory
>> >> >
>> >> > log4j.appender.A1.layout=lineai.base.jms.util.log4j.XMLLayout
>> >> >
>> >> > When i try to send log message, the following exception is thrown:
>> >> >
>> >> > log4j:ERROR Error while activating options for appender named [A1].
>> >> > javax.jms.JMSException: Wire format negociation timeout: peer did
>> not
>> >> send
>> >> > his wire format.
>> >> >     at org.apache.activemq.util.JMSExceptionSupport.create(
>> >> > JMSExceptionSupport.java:58)
>> >> >     at org.apache.activemq.ActiveMQConnection.syncSendPacket(
>> >> > ActiveMQConnection.java:1181)
>> >> >     at
>> org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent
>> >> (
>> >> > ActiveMQConnection.java:1259)
>> >> >     at org.apache.activemq.ActiveMQConnection.createSession(
>> >> > ActiveMQConnection.java:274)
>> >> >     at org.apache.activemq.ActiveMQConnection.createTopicSession(
>> >> > ActiveMQConnection.java:960)
>> >> >     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.PropertyConfigurator.configure (
>> >> > PropertyConfigurator.java:336)
>> >> >     at lineai.base.jms.util.log4j.LogTest.test(LogTest.java:12)
>> >> >     at lineai.base.jms.util.log4j.LogTest.main(LogTest.java:24)
>> >> > Caused by: java.io.IOException: Wire format negociation timeout:
>> peer
>> >> did
>> >> > not send his wire format.
>> >> >     at org.apache.activemq.transport.WireFormatNegotiator.oneway(
>> >> > WireFormatNegotiator.java:88)
>> >> >     at org.apache.activemq.transport.MutexTransport.oneway(
>> >> > MutexTransport.java:43)
>> >> >     at
>> org.apache.activemq.transport.ResponseCorrelator.asyncRequest(
>> >> > ResponseCorrelator.java:69)
>> >> >     at org.apache.activemq.transport.ResponseCorrelator.request(
>> >> > ResponseCorrelator.java:74)
>> >> >     at org.apache.activemq.ActiveMQConnection.syncSendPacket(
>> >> > ActiveMQConnection.java:1171)
>> >> >     ... 15 more
>> >> >
>> >> > Any ideas??
>> >> >
>> >> > Thnx ...
>> >> >
>> >> > David
>> >> >
>> >>
>> >>
>> >> --
>> >>
>> >> James
>> >> -------
>> >> http://radio.weblogs.com/0112098/
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Problems-with-amq-and-log4j-...-tf3224651s2354.html#a8995823
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Problems-with-amq-and-log4j-...-tf3224651s2354.html#a9299233
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Problems with amq and log4j ...

Posted by David Borja <ad...@gmail.com>.
Hi Terys ...

I'm got the same problem configuring my log4j.properties with activemq
appender, this is my log config:

log4j.appender.A1=org.apache.activemq.util.JmsLogAppender
log4j.appender.A1.uri=tcp://localhost:61616

i don't know why!!!

Thanx!

On 2/15/07, teryz <te...@gmail.com> wrote:
>
>
> Hello David i ran into the same problem and i used an appender that I
> wrote
> myself for log4J to send message in ActiveMQ and this class is based on
> the
> ProducerTool example given with activeMQ (we don't have any app server).
>
> I tried it on the 4.1, same error, i tried it a 4.2 snapshot still the
> same.
> I get it to work by doing this trick (don't ask me i can't understand why
> it
> changed anything) :
> i made the org.apachae.activemq logger log in an appender that is not the
> JMS one !! and i didn't have the problem any more.
>
> Keep me posted if it works for you. Maybe someone would be able to
> explain.
>
> Cheers,
> Terry.
>
>
> David Borja-2 wrote:
> >
> > Hi James ...
> >
> > The version of active mq is the latest (apache-activemq-4.1.0-incubator
> ),
> > and the activemq log seems normal (i think so ...):
> >
> >
> > 2007-02-14 09:09:16,306 [main           ] INFO
> > BrokerService                  - ActiveMQ 4.1.0-incubator JMS Message
> > Broker
> > (localhost) is starting
> > 2007-02-14 09:09:16,306 [main           ] INFO
> > BrokerService                  - For help or more information please
> see:
> > http://incubator.apache.org/activemq/
> > 2007-02-14 09:09:17,477 [JMX connector  ] INFO
> > ManagementContext              - JMX consoles can connect to
> > service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
> > 2007-02-14 09:09:19,679 [main           ] INFO
> > JDBCPersistenceAdapter         - Database driver recognized:
> > [apache_derby_embedded_jdbc_driver]
> > 2007-02-14 09:09:22,521 [main           ] INFO
> > DefaultDatabaseLocker          - Attempting to acquire the exclusive
> lock
> > to
> > become the Master broker
> > 2007-02-14 09:09:22,521 [main           ] INFO
> > DefaultDatabaseLocker          - Becoming the master on dataSource:
> > org.apache.derby.jdbc.EmbeddedDataSource@143bf3d
> > 2007-02-14 09:09:22,771 [main           ] INFO
> > JournalPersistenceAdapter      - Journal Recovery Started from: Active
> > Journal: using 5 x 20.0 Megs at: C:\trabajo\instaladores\Apache\apache-
> > activemq-4.1.0-incubator\activemq-data\journal
> > 2007-02-14 09:09:22,880 [main           ] INFO
> > JournalPersistenceAdapter      - Journal Recovered: 0 message(s) in
> > transactions recovered.
> > 2007-02-14 09:09:23,083 [main           ] INFO
> > TransportServerThreadSupport   - Listening for connections at:
> > tcp://dllo-aborja:61616
> > 2007-02-14 09:09:23,130 [main           ] INFO
> > TransportConnector             - Connector openwire Started
> > 2007-02-14 09:09:23,146 [main           ] INFO
> > TransportServerThreadSupport   - Listening for connections at:
> > stomp://dllo-aborja:61613
> > 2007-02-14 09:09:23,161 [main           ] INFO
> > TransportConnector             - Connector stomp Started
> > 2007-02-14 09:09:23,286 [main           ] INFO
> > NetworkConnector               - Network Connector default-nc Started
> > 2007-02-14 09:09:23,286 [main           ] INFO
> > BrokerService                  - ActiveMQ JMS Message Broker (localhost,
> > ID:dllo-aborja-1307-1171462155744-1:0) started
> >
> > I send a normal message and it responds ....
> >
> >
> > Thanx!!!
> >
> > David
> >
> >
> > On 2/14/07, James Strachan <ja...@gmail.com> wrote:
> >>
> >> Which version are you using? Also what appears in the broker's log
> >> file - it seems the broker side is not responding properly
> >>
> >> On 2/14/07, David Borja <ad...@gmail.com> wrote:
> >> > Hi activemq devs!!
> >> >
> >> > I'm having a problem with activemq and log4j ...
> >> >
> >> > this is my log4j.properties :
> >> >
> >> > log4j.appender.A1=org.apache.log4j.net.JMSAppender
> >> >
> >>
> log4j.appender.A1.InitialContextFactoryName=org.apache.activemq.jndi.ActiveMQInitialContextFactory
> >> > log4j.appender.A1.ProviderURL=tcp://dllo-aborja:61616
> >> > log4j.appender.A1.TopicBindingName=jms/log.queue
> >> > log4j.appender.A1.TopicConnectionFactoryBindingName=ConnectionFactory
> >> >
> >> > log4j.appender.A1.layout=lineai.base.jms.util.log4j.XMLLayout
> >> >
> >> > When i try to send log message, the following exception is thrown:
> >> >
> >> > log4j:ERROR Error while activating options for appender named [A1].
> >> > javax.jms.JMSException: Wire format negociation timeout: peer did not
> >> send
> >> > his wire format.
> >> >     at org.apache.activemq.util.JMSExceptionSupport.create(
> >> > JMSExceptionSupport.java:58)
> >> >     at org.apache.activemq.ActiveMQConnection.syncSendPacket(
> >> > ActiveMQConnection.java:1181)
> >> >     at
> org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent
> >> (
> >> > ActiveMQConnection.java:1259)
> >> >     at org.apache.activemq.ActiveMQConnection.createSession(
> >> > ActiveMQConnection.java:274)
> >> >     at org.apache.activemq.ActiveMQConnection.createTopicSession(
> >> > ActiveMQConnection.java:960)
> >> >     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.PropertyConfigurator.configure (
> >> > PropertyConfigurator.java:336)
> >> >     at lineai.base.jms.util.log4j.LogTest.test(LogTest.java:12)
> >> >     at lineai.base.jms.util.log4j.LogTest.main(LogTest.java:24)
> >> > Caused by: java.io.IOException: Wire format negociation timeout: peer
> >> did
> >> > not send his wire format.
> >> >     at org.apache.activemq.transport.WireFormatNegotiator.oneway(
> >> > WireFormatNegotiator.java:88)
> >> >     at org.apache.activemq.transport.MutexTransport.oneway(
> >> > MutexTransport.java:43)
> >> >     at org.apache.activemq.transport.ResponseCorrelator.asyncRequest(
> >> > ResponseCorrelator.java:69)
> >> >     at org.apache.activemq.transport.ResponseCorrelator.request(
> >> > ResponseCorrelator.java:74)
> >> >     at org.apache.activemq.ActiveMQConnection.syncSendPacket(
> >> > ActiveMQConnection.java:1171)
> >> >     ... 15 more
> >> >
> >> > Any ideas??
> >> >
> >> > Thnx ...
> >> >
> >> > David
> >> >
> >>
> >>
> >> --
> >>
> >> James
> >> -------
> >> http://radio.weblogs.com/0112098/
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Problems-with-amq-and-log4j-...-tf3224651s2354.html#a8995823
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>

Re: Problems with amq and log4j ...

Posted by teryz <te...@gmail.com>.
Hello David i ran into the same problem and i used an appender that I wrote
myself for log4J to send message in ActiveMQ and this class is based on the
ProducerTool example given with activeMQ (we don't have any app server).

I tried it on the 4.1, same error, i tried it a 4.2 snapshot still the same.
I get it to work by doing this trick (don't ask me i can't understand why it
changed anything) :
i made the org.apachae.activemq logger log in an appender that is not the
JMS one !! and i didn't have the problem any more.

Keep me posted if it works for you. Maybe someone would be able to explain.

Cheers,
Terry.


David Borja-2 wrote:
> 
> Hi James ...
> 
> The version of active mq is the latest (apache-activemq-4.1.0-incubator),
> and the activemq log seems normal (i think so ...):
> 
> 
> 2007-02-14 09:09:16,306 [main           ] INFO
> BrokerService                  - ActiveMQ 4.1.0-incubator JMS Message
> Broker
> (localhost) is starting
> 2007-02-14 09:09:16,306 [main           ] INFO
> BrokerService                  - For help or more information please see:
> http://incubator.apache.org/activemq/
> 2007-02-14 09:09:17,477 [JMX connector  ] INFO
> ManagementContext              - JMX consoles can connect to
> service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
> 2007-02-14 09:09:19,679 [main           ] INFO
> JDBCPersistenceAdapter         - Database driver recognized:
> [apache_derby_embedded_jdbc_driver]
> 2007-02-14 09:09:22,521 [main           ] INFO
> DefaultDatabaseLocker          - Attempting to acquire the exclusive lock
> to
> become the Master broker
> 2007-02-14 09:09:22,521 [main           ] INFO
> DefaultDatabaseLocker          - Becoming the master on dataSource:
> org.apache.derby.jdbc.EmbeddedDataSource@143bf3d
> 2007-02-14 09:09:22,771 [main           ] INFO
> JournalPersistenceAdapter      - Journal Recovery Started from: Active
> Journal: using 5 x 20.0 Megs at: C:\trabajo\instaladores\Apache\apache-
> activemq-4.1.0-incubator\activemq-data\journal
> 2007-02-14 09:09:22,880 [main           ] INFO
> JournalPersistenceAdapter      - Journal Recovered: 0 message(s) in
> transactions recovered.
> 2007-02-14 09:09:23,083 [main           ] INFO
> TransportServerThreadSupport   - Listening for connections at:
> tcp://dllo-aborja:61616
> 2007-02-14 09:09:23,130 [main           ] INFO
> TransportConnector             - Connector openwire Started
> 2007-02-14 09:09:23,146 [main           ] INFO
> TransportServerThreadSupport   - Listening for connections at:
> stomp://dllo-aborja:61613
> 2007-02-14 09:09:23,161 [main           ] INFO
> TransportConnector             - Connector stomp Started
> 2007-02-14 09:09:23,286 [main           ] INFO
> NetworkConnector               - Network Connector default-nc Started
> 2007-02-14 09:09:23,286 [main           ] INFO
> BrokerService                  - ActiveMQ JMS Message Broker (localhost,
> ID:dllo-aborja-1307-1171462155744-1:0) started
> 
> I send a normal message and it responds ....
> 
> 
> Thanx!!!
> 
> David
> 
> 
> On 2/14/07, James Strachan <ja...@gmail.com> wrote:
>>
>> Which version are you using? Also what appears in the broker's log
>> file - it seems the broker side is not responding properly
>>
>> On 2/14/07, David Borja <ad...@gmail.com> wrote:
>> > Hi activemq devs!!
>> >
>> > I'm having a problem with activemq and log4j ...
>> >
>> > this is my log4j.properties :
>> >
>> > log4j.appender.A1=org.apache.log4j.net.JMSAppender
>> >
>> log4j.appender.A1.InitialContextFactoryName=org.apache.activemq.jndi.ActiveMQInitialContextFactory
>> > log4j.appender.A1.ProviderURL=tcp://dllo-aborja:61616
>> > log4j.appender.A1.TopicBindingName=jms/log.queue
>> > log4j.appender.A1.TopicConnectionFactoryBindingName=ConnectionFactory
>> >
>> > log4j.appender.A1.layout=lineai.base.jms.util.log4j.XMLLayout
>> >
>> > When i try to send log message, the following exception is thrown:
>> >
>> > log4j:ERROR Error while activating options for appender named [A1].
>> > javax.jms.JMSException: Wire format negociation timeout: peer did not
>> send
>> > his wire format.
>> >     at org.apache.activemq.util.JMSExceptionSupport.create(
>> > JMSExceptionSupport.java:58)
>> >     at org.apache.activemq.ActiveMQConnection.syncSendPacket(
>> > ActiveMQConnection.java:1181)
>> >     at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent
>> (
>> > ActiveMQConnection.java:1259)
>> >     at org.apache.activemq.ActiveMQConnection.createSession(
>> > ActiveMQConnection.java:274)
>> >     at org.apache.activemq.ActiveMQConnection.createTopicSession(
>> > ActiveMQConnection.java:960)
>> >     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.PropertyConfigurator.configure (
>> > PropertyConfigurator.java:336)
>> >     at lineai.base.jms.util.log4j.LogTest.test(LogTest.java:12)
>> >     at lineai.base.jms.util.log4j.LogTest.main(LogTest.java:24)
>> > Caused by: java.io.IOException: Wire format negociation timeout: peer
>> did
>> > not send his wire format.
>> >     at org.apache.activemq.transport.WireFormatNegotiator.oneway(
>> > WireFormatNegotiator.java:88)
>> >     at org.apache.activemq.transport.MutexTransport.oneway(
>> > MutexTransport.java:43)
>> >     at org.apache.activemq.transport.ResponseCorrelator.asyncRequest (
>> > ResponseCorrelator.java:69)
>> >     at org.apache.activemq.transport.ResponseCorrelator.request(
>> > ResponseCorrelator.java:74)
>> >     at org.apache.activemq.ActiveMQConnection.syncSendPacket(
>> > ActiveMQConnection.java:1171)
>> >     ... 15 more
>> >
>> > Any ideas??
>> >
>> > Thnx ...
>> >
>> > David
>> >
>>
>>
>> --
>>
>> James
>> -------
>> http://radio.weblogs.com/0112098/
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Problems-with-amq-and-log4j-...-tf3224651s2354.html#a8995823
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Problems with amq and log4j ...

Posted by David Borja <ad...@gmail.com>.
Hi James ...

The version of active mq is the latest (apache-activemq-4.1.0-incubator),
and the activemq log seems normal (i think so ...):


2007-02-14 09:09:16,306 [main           ] INFO
BrokerService                  - ActiveMQ 4.1.0-incubator JMS Message Broker
(localhost) is starting
2007-02-14 09:09:16,306 [main           ] INFO
BrokerService                  - For help or more information please see:
http://incubator.apache.org/activemq/
2007-02-14 09:09:17,477 [JMX connector  ] INFO
ManagementContext              - JMX consoles can connect to
service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
2007-02-14 09:09:19,679 [main           ] INFO
JDBCPersistenceAdapter         - Database driver recognized:
[apache_derby_embedded_jdbc_driver]
2007-02-14 09:09:22,521 [main           ] INFO
DefaultDatabaseLocker          - Attempting to acquire the exclusive lock to
become the Master broker
2007-02-14 09:09:22,521 [main           ] INFO
DefaultDatabaseLocker          - Becoming the master on dataSource:
org.apache.derby.jdbc.EmbeddedDataSource@143bf3d
2007-02-14 09:09:22,771 [main           ] INFO
JournalPersistenceAdapter      - Journal Recovery Started from: Active
Journal: using 5 x 20.0 Megs at: C:\trabajo\instaladores\Apache\apache-
activemq-4.1.0-incubator\activemq-data\journal
2007-02-14 09:09:22,880 [main           ] INFO
JournalPersistenceAdapter      - Journal Recovered: 0 message(s) in
transactions recovered.
2007-02-14 09:09:23,083 [main           ] INFO
TransportServerThreadSupport   - Listening for connections at:
tcp://dllo-aborja:61616
2007-02-14 09:09:23,130 [main           ] INFO
TransportConnector             - Connector openwire Started
2007-02-14 09:09:23,146 [main           ] INFO
TransportServerThreadSupport   - Listening for connections at:
stomp://dllo-aborja:61613
2007-02-14 09:09:23,161 [main           ] INFO
TransportConnector             - Connector stomp Started
2007-02-14 09:09:23,286 [main           ] INFO
NetworkConnector               - Network Connector default-nc Started
2007-02-14 09:09:23,286 [main           ] INFO
BrokerService                  - ActiveMQ JMS Message Broker (localhost,
ID:dllo-aborja-1307-1171462155744-1:0) started

I send a normal message and it responds ....


Thanx!!!

David


On 2/14/07, James Strachan <ja...@gmail.com> wrote:
>
> Which version are you using? Also what appears in the broker's log
> file - it seems the broker side is not responding properly
>
> On 2/14/07, David Borja <ad...@gmail.com> wrote:
> > Hi activemq devs!!
> >
> > I'm having a problem with activemq and log4j ...
> >
> > this is my log4j.properties :
> >
> > log4j.appender.A1=org.apache.log4j.net.JMSAppender
> >
> log4j.appender.A1.InitialContextFactoryName=org.apache.activemq.jndi.ActiveMQInitialContextFactory
> > log4j.appender.A1.ProviderURL=tcp://dllo-aborja:61616
> > log4j.appender.A1.TopicBindingName=jms/log.queue
> > log4j.appender.A1.TopicConnectionFactoryBindingName=ConnectionFactory
> >
> > log4j.appender.A1.layout=lineai.base.jms.util.log4j.XMLLayout
> >
> > When i try to send log message, the following exception is thrown:
> >
> > log4j:ERROR Error while activating options for appender named [A1].
> > javax.jms.JMSException: Wire format negociation timeout: peer did not
> send
> > his wire format.
> >     at org.apache.activemq.util.JMSExceptionSupport.create(
> > JMSExceptionSupport.java:58)
> >     at org.apache.activemq.ActiveMQConnection.syncSendPacket(
> > ActiveMQConnection.java:1181)
> >     at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent (
> > ActiveMQConnection.java:1259)
> >     at org.apache.activemq.ActiveMQConnection.createSession(
> > ActiveMQConnection.java:274)
> >     at org.apache.activemq.ActiveMQConnection.createTopicSession(
> > ActiveMQConnection.java:960)
> >     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.PropertyConfigurator.configure (
> > PropertyConfigurator.java:336)
> >     at lineai.base.jms.util.log4j.LogTest.test(LogTest.java:12)
> >     at lineai.base.jms.util.log4j.LogTest.main(LogTest.java:24)
> > Caused by: java.io.IOException: Wire format negociation timeout: peer
> did
> > not send his wire format.
> >     at org.apache.activemq.transport.WireFormatNegotiator.oneway(
> > WireFormatNegotiator.java:88)
> >     at org.apache.activemq.transport.MutexTransport.oneway(
> > MutexTransport.java:43)
> >     at org.apache.activemq.transport.ResponseCorrelator.asyncRequest (
> > ResponseCorrelator.java:69)
> >     at org.apache.activemq.transport.ResponseCorrelator.request(
> > ResponseCorrelator.java:74)
> >     at org.apache.activemq.ActiveMQConnection.syncSendPacket(
> > ActiveMQConnection.java:1171)
> >     ... 15 more
> >
> > Any ideas??
> >
> > Thnx ...
> >
> > David
> >
>
>
> --
>
> James
> -------
> http://radio.weblogs.com/0112098/
>

Re: Problems with amq and log4j ...

Posted by James Strachan <ja...@gmail.com>.
Which version are you using? Also what appears in the broker's log
file - it seems the broker side is not responding properly

On 2/14/07, David Borja <ad...@gmail.com> wrote:
> Hi activemq devs!!
>
> I'm having a problem with activemq and log4j ...
>
> this is my log4j.properties :
>
> log4j.appender.A1=org.apache.log4j.net.JMSAppender
> log4j.appender.A1.InitialContextFactoryName=org.apache.activemq.jndi.ActiveMQInitialContextFactory
> log4j.appender.A1.ProviderURL=tcp://dllo-aborja:61616
> log4j.appender.A1.TopicBindingName=jms/log.queue
> log4j.appender.A1.TopicConnectionFactoryBindingName=ConnectionFactory
>
> log4j.appender.A1.layout=lineai.base.jms.util.log4j.XMLLayout
>
> When i try to send log message, the following exception is thrown:
>
> log4j:ERROR Error while activating options for appender named [A1].
> javax.jms.JMSException: Wire format negociation timeout: peer did not send
> his wire format.
>     at org.apache.activemq.util.JMSExceptionSupport.create(
> JMSExceptionSupport.java:58)
>     at org.apache.activemq.ActiveMQConnection.syncSendPacket(
> ActiveMQConnection.java:1181)
>     at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent (
> ActiveMQConnection.java:1259)
>     at org.apache.activemq.ActiveMQConnection.createSession(
> ActiveMQConnection.java:274)
>     at org.apache.activemq.ActiveMQConnection.createTopicSession(
> ActiveMQConnection.java:960)
>     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.PropertyConfigurator.configure (
> PropertyConfigurator.java:336)
>     at lineai.base.jms.util.log4j.LogTest.test(LogTest.java:12)
>     at lineai.base.jms.util.log4j.LogTest.main(LogTest.java:24)
> Caused by: java.io.IOException: Wire format negociation timeout: peer did
> not send his wire format.
>     at org.apache.activemq.transport.WireFormatNegotiator.oneway(
> WireFormatNegotiator.java:88)
>     at org.apache.activemq.transport.MutexTransport.oneway(
> MutexTransport.java:43)
>     at org.apache.activemq.transport.ResponseCorrelator.asyncRequest (
> ResponseCorrelator.java:69)
>     at org.apache.activemq.transport.ResponseCorrelator.request(
> ResponseCorrelator.java:74)
>     at org.apache.activemq.ActiveMQConnection.syncSendPacket(
> ActiveMQConnection.java:1171)
>     ... 15 more
>
> Any ideas??
>
> Thnx ...
>
> David
>


-- 

James
-------
http://radio.weblogs.com/0112098/