atom feed26 messages in org.apache.incubator.qpid-usersRe: HermesJMS Configuration
FromSent OnAttachments
Brent VillalobosMar 3, 2008 6:01 pm 
Gordon SimMar 4, 2008 12:55 am 
Rajith AttapattuMar 4, 2008 8:04 am 
Brent VillalobosMar 4, 2008 2:36 pm 
Brent VillalobosMar 4, 2008 4:30 pm 
Brent VillalobosMar 4, 2008 5:34 pm 
Carl TrieloffMar 4, 2008 5:54 pm 
Brent VillalobosMar 4, 2008 6:00 pm 
Carl TrieloffMar 4, 2008 6:22 pm 
Gordon SimMar 5, 2008 12:30 am 
Martin RitchieMar 5, 2008 1:36 am 
Brent VillalobosMar 5, 2008 11:07 am 
Brent VillalobosMar 5, 2008 11:16 am 
Aidan SkinnerMar 5, 2008 11:20 am 
Brent VillalobosMar 5, 2008 11:27 am 
Aidan SkinnerMar 5, 2008 12:11 pm 
Robert GreigMar 5, 2008 1:50 pm 
Martin RitchieMar 6, 2008 5:49 pm 
Martin RitchieMar 7, 2008 6:56 am 
Aidan SkinnerMar 7, 2008 7:03 am 
Brent VillalobosMar 10, 2008 10:15 am 
Brent VillalobosMar 10, 2008 10:39 am 
Martin RitchieMar 10, 2008 10:56 am 
Brent VillalobosMar 10, 2008 10:59 am 
Martin RitchieMar 10, 2008 12:04 pm 
Martin RitchieMar 10, 2008 1:47 pm 
Subject:Re: HermesJMS Configuration
From:Martin Ritchie (ritc@apache.org)
Date:Mar 10, 2008 12:04:12 pm
List:org.apache.incubator.qpid-users

Hi Brent,

The problem in the stack trace below is that you still have the slf4j-jdk1.0.1 jar in your lib directory this is uses an older slf4j interface that does not have the Trace level:

java.lang.AbstractMethodError: org.slf4j.impl.JDK14LoggerAdapter.isTraceEnabled

Our upcoming M2.1 release removes all the Trace logging so will be compatible with these older interfaces. In the mean time if you remove the slf4j-jdk14-1.0.1.jar and ensure you have the listed slfj4 replacements that ship with the Qpid M2, then all should be good: slf4j-api-1.4.0.jar slf4j-log4j12-1.4.0.jar

Once you are connected to the broker you will need to ensure that the Queue you wish to send to has been created before you send the message. If you queues are not going to be dynamically changing whilst the broker is running my recommendation would be to configure the virtualhosts.xml file to include the queues you wish to include. More details are here : http://cwiki.apache.org/qpid/configure-the-virtual-hosts-via-virtualhostsxml.html

Some of our documentation may be a little more geared to people with a good understanding of Qpid. If that is the case then please let me know and I shall endeavour to improve them as it is important that new users be able to quickly pick up Qpid and get it working. Something I feel we still have some work to do to get right.

Let me know how you get on.

Martin

On 10/03/2008, Brent Villalobos <Bren@pdi.dreamworks.com> wrote:

I replaced those jar files and Hermes recognized that they were different and processed them accordingly. However, I'm still getting a lot of errors when trying to connect to queue that I created. I'm quite new to QPID, but am I suppose to create a queue manually (for example, with a python script) and then create a destination of the same name in Hermes? Or do I create the queue in Hermes first under "Destinations" for my QPID session before I start sending messages to it? Below is the log details of my error (long):

Mar 10, 2008 10:56:04 AM org.apache.qpid.client.AMQConnection <init> INFO: Connection:amqp://guest:********@changeling1205171764904/?brokerlist='tcp://localhost:5672' Mar 10, 2008 10:56:04 AM

org.apache.qpid.client.transport.SocketTransportConnection connect INFO: Using SimpleByteBufferAllocator

Mar 10, 2008 10:56:04 AM

org.apache.qpid.client.transport.TransportConnection$1 newSocketConnector INFO: Using Mina NIO

Mar 10, 2008 10:56:05 AM

org.apache.qpid.client.transport.SocketTransportConnection connect INFO: send-buffer-size = 32768

Mar 10, 2008 10:56:05 AM

org.apache.qpid.client.transport.SocketTransportConnection connect INFO: recv-buffer-size = 32768

Mar 10, 2008 10:56:05 AM

org.apache.qpid.client.transport.SocketTransportConnection connect INFO: Attempting connection to localhost/127.0.0.1:5672

Mar 10, 2008 10:56:05 AM

org.apache.qpid.client.security.CallbackHandlerRegistry <init> INFO: Callback handlers available for SASL mechanisms: CRAM-MD5 CRAM-MD5-HASHED PLAIN

Mar 10, 2008 10:56:05 AM

org.apache.qpid.client.protocol.AMQProtocolHandler exceptionCaught INFO: Protocol Exception caught NOT going to attempt failover as cause isn't AMQConnectionClosedException: org.apache.mina.filter.codec.ProtocolEncoderException:

java.lang.AbstractMethodError: org.slf4j.impl.JDK14LoggerAdapter.isTraceEnabled()Z

org.apache.mina.filter.codec.ProtocolEncoderException:

java.lang.AbstractMethodError: org.slf4j.impl.JDK14LoggerAdapter.isTraceEnabled()Z

at org.apache.mina.filter.codec.ProtocolCodecFilter.filterWrite(ProtocolCodecFilter.java:241) at org.apache.mina.common.support.AbstractIoFilterChain.callPreviousFilterWrite(AbstractIoFilterChain.java:573) at org.apache.mina.common.support.AbstractIoFilterChain.access$1200(AbstractIoFilterChain.java:52) at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.filterWrite(AbstractIoFilterChain.java:789) at org.apache.mina.common.support.AbstractIoFilterChain$2.filterWrite(AbstractIoFilterChain.java:213) at org.apache.mina.common.support.AbstractIoFilterChain.callPreviousFilterWrite(AbstractIoFilterChain.java:573) at org.apache.mina.common.support.AbstractIoFilterChain.fireFilterWrite(AbstractIoFilterChain.java:564) at org.apache.mina.transport.socket.nio.SocketSessionImpl.write0(SocketSessionImpl.java:186) at org.apache.mina.common.support.BaseIoSession.write(BaseIoSession.java:146) at org.apache.mina.common.support.BaseIoSession.write(BaseIoSession.java:132) at org.apache.qpid.client.protocol.AMQProtocolSession.writeFrame(AMQProtocolSession.java:319) at org.apache.qpid.client.protocol.AMQProtocolSession.writeFrame(AMQProtocolSession.java:314) at org.apache.qpid.client.handler.ConnectionStartMethodHandler.methodReceived(ConnectionStartMethodHandler.java:162) at org.apache.qpid.client.state.AMQStateManager.methodReceived(AMQStateManager.java:183) at org.apache.qpid.client.protocol.AMQProtocolHandler.messageReceived(AMQProtocolHandler.java:429) at org.apache.mina.common.support.AbstractIoFilterChain$2.messageReceived(AbstractIoFilterChain.java:189) at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:502) at org.apache.mina.common.support.AbstractIoFilterChain.access$1000(AbstractIoFilterChain.java:52) at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:777) at org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(SimpleProtocolDecoderOutput.java:60) at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:185) at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:502) at org.apache.mina.common.support.AbstractIoFilterChain.access$1000(AbstractIoFilterChain.java:52) at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:777) at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java:243) at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(ExecutorFilter.java:305) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690) at java.lang.Thread.run(Unknown Source)

Caused by: java.lang.AbstractMethodError: org.slf4j.impl.JDK14LoggerAdapter.isTraceEnabled()Z

at org.apache.qpid.framing.FieldTable.writeToBuffer(FieldTable.java:709) at org.apache.qpid.framing.EncodingUtils.writeFieldTableBytes(EncodingUtils.java:362) at org.apache.qpid.framing.ConnectionStartOkBody.writeMethodPayload(ConnectionStartOkBody.java:163) at org.apache.qpid.framing.AMQMethodBody.writePayload(AMQMethodBody.java:77) at org.apache.qpid.framing.AMQFrame.writePayload(AMQFrame.java:55) at org.apache.qpid.framing.AMQDataBlock.toByteBuffer(AMQDataBlock.java:48) at org.apache.qpid.framing.AMQDataBlockEncoder.encode(AMQDataBlockEncoder.java:47) at org.apache.qpid.codec.AMQEncoder.encode(AMQEncoder.java:56) at org.apache.mina.filter.codec.ProtocolCodecFilter.filterWrite(ProtocolCodecFilter.java:219) ... 28 more

Mar 10, 2008 10:56:05 AM org.apache.qpid.client.AMQConnection

exceptionReceived SEVERE: Throwable Received but no listener set:

java.lang.AbstractMethodError: org.slf4j.impl.JDK14LoggerAdapter.isTraceEnabled()ZMar 10, 2008 10:56:05

AM org.apache.qpid.client.AMQConnection exceptionReceived

INFO: Closing AMQConnection due to :java.lang.AbstractMethodError: org.slf4j.impl.JDK14LoggerAdapter.isTraceEnabled()Z Mar 10, 2008 10:56:35 AM org.apache.qpid.client.state.AMQStateManager

attainState WARNING: State not achieved within permitted time. Current state AMQState: id = 2 name: CONNECTION_NOT_TUNED, desired state: AMQState: id = 4 name: CONNECTION_OPEN

Mar 10, 2008 10:56:35 AM org.apache.qpid.client.AMQConnection <init>

INFO: Unable to connect to broker at tcp://localhost:5672

Mar 10, 2008 10:56:35 AM

org.apache.qpid.client.transport.SocketTransportConnection connect INFO: Using SimpleByteBufferAllocator

Mar 10, 2008 10:56:35 AM

org.apache.qpid.client.transport.TransportConnection$1 newSocketConnector INFO: Using Mina NIO

Mar 10, 2008 10:56:35 AM

org.apache.qpid.client.transport.SocketTransportConnection connect INFO: send-buffer-size = 32768

Mar 10, 2008 10:56:35 AM

org.apache.qpid.client.transport.SocketTransportConnection connect INFO: recv-buffer-size = 32768

Mar 10, 2008 10:56:35 AM

org.apache.qpid.client.transport.SocketTransportConnection connect INFO: Attempting connection to localhost/127.0.0.1:5672

Mar 10, 2008 10:56:35 AM

org.apache.qpid.client.protocol.AMQProtocolHandler exceptionCaught INFO: Protocol Exception caught NOT going to attempt failover as cause isn't AMQConnectionClosedException: org.apache.mina.filter.codec.ProtocolEncoderException:

java.lang.AbstractMethodError: org.slf4j.impl.JDK14LoggerAdapter.isTraceEnabled()Z

org.apache.mina.filter.codec.ProtocolEncoderException:

java.lang.AbstractMethodError: org.slf4j.impl.JDK14LoggerAdapter.isTraceEnabled()Z

at org.apache.mina.filter.codec.ProtocolCodecFilter.filterWrite(ProtocolCodecFilter.java:241) at org.apache.mina.common.support.AbstractIoFilterChain.callPreviousFilterWrite(AbstractIoFilterChain.java:573) at org.apache.mina.common.support.AbstractIoFilterChain.access$1200(AbstractIoFilterChain.java:52) at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.filterWrite(AbstractIoFilterChain.java:789) at org.apache.mina.common.support.AbstractIoFilterChain$2.filterWrite(AbstractIoFilterChain.java:213) at org.apache.mina.common.support.AbstractIoFilterChain.callPreviousFilterWrite(AbstractIoFilterChain.java:573) at org.apache.mina.common.support.AbstractIoFilterChain.fireFilterWrite(AbstractIoFilterChain.java:564) at org.apache.mina.transport.socket.nio.SocketSessionImpl.write0(SocketSessionImpl.java:186) at org.apache.mina.common.support.BaseIoSession.write(BaseIoSession.java:146) at org.apache.mina.common.support.BaseIoSession.write(BaseIoSession.java:132) at org.apache.qpid.client.protocol.AMQProtocolSession.writeFrame(AMQProtocolSession.java:319) at org.apache.qpid.client.protocol.AMQProtocolSession.writeFrame(AMQProtocolSession.java:314) at org.apache.qpid.client.handler.ConnectionStartMethodHandler.methodReceived(ConnectionStartMethodHandler.java:162) at org.apache.qpid.client.state.AMQStateManager.methodReceived(AMQStateManager.java:183) at org.apache.qpid.client.protocol.AMQProtocolHandler.messageReceived(AMQProtocolHandler.java:429) at org.apache.mina.common.support.AbstractIoFilterChain$2.messageReceived(AbstractIoFilterChain.java:189) at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:502) at org.apache.mina.common.support.AbstractIoFilterChain.access$1000(AbstractIoFilterChain.java:52) at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:777) at org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(SimpleProtocolDecoderOutput.java:60) at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:185) at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:502) at org.apache.mina.common.support.AbstractIoFilterChain.access$1000(AbstractIoFilterChain.java:52) at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:777) at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java:243) at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(ExecutorFilter.java:305) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690) at java.lang.Thread.run(Unknown Source)

Caused by: java.lang.AbstractMethodError: org.slf4j.impl.JDK14LoggerAdapter.isTraceEnabled()Z

at org.apache.qpid.framing.FieldTable.writeToBuffer(FieldTable.java:709) at org.apache.qpid.framing.EncodingUtils.writeFieldTableBytes(EncodingUtils.java:362) at org.apache.qpid.framing.ConnectionStartOkBody.writeMethodPayload(ConnectionStartOkBody.java:163) at org.apache.qpid.framing.AMQMethodBody.writePayload(AMQMethodBody.java:77) at org.apache.qpid.framing.AMQFrame.writePayload(AMQFrame.java:55) at org.apache.qpid.framing.AMQDataBlock.toByteBuffer(AMQDataBlock.java:48) at org.apache.qpid.framing.AMQDataBlockEncoder.encode(AMQDataBlockEncoder.java:47) at org.apache.qpid.codec.AMQEncoder.encode(AMQEncoder.java:56) at org.apache.mina.filter.codec.ProtocolCodecFilter.filterWrite(ProtocolCodecFilter.java:219) ... 28 more

Mar 10, 2008 10:56:35 AM org.apache.qpid.client.AMQConnection

exceptionReceived SEVERE: Throwable Received but no listener set:

java.lang.AbstractMethodError: org.slf4j.impl.JDK14LoggerAdapter.isTraceEnabled()ZMar 10, 2008 10:56:35

AM org.apache.qpid.client.AMQConnection exceptionReceived

INFO: Closing AMQConnection due to :java.lang.AbstractMethodError: org.slf4j.impl.JDK14LoggerAdapter.isTraceEnabled()Z Mar 10, 2008 10:57:05 AM org.apache.qpid.client.state.AMQStateManager

attainState WARNING: State not achieved within permitted time. Current state AMQState: id = 2 name: CONNECTION_NOT_TUNED, desired state: AMQState: id = 4 name: CONNECTION_OPEN

Mar 10, 2008 10:57:05 AM org.apache.qpid.client.AMQConnection <init>

INFO: Unable to connect to broker at tcp://localhost:5672

Martin Ritchie wrote:

On 05/03/2008, Robert Greig <robe@gmail.com> wrote:

On 05/03/2008, Aidan Skinner <aid@apache.org> wrote:

On Wed, Mar 5, 2008 at 7:28 PM, Brent Villalobos <Bren@pdi.dreamworks.com> wrote:

Oops, I posted the wrong log. This is the log I should have posted (and I do have the qpid broker running and I can telnet into it). Again, this is using Java6 and Hermes v1.13 with the M2 qpid broker. -Brent

This is the error that get thrown to the console:

That's a bit of a rubbish error (which should be much better in M2.1). It looks like it can't find an slf4j implementation, it might work if you add slf4j-simple or slf4j-log4j to your classpath.

Is it not that there is a version mismatch with slf4j rather than it is missing? Does Hermes use an older version of slf4j? If so replacing that jar with a newer version (e.g. the one bundled with qpid client) should help.

RG

Hi Brent,

It has been a long time since I last looked at HermesJMS. In that time it has moved on quite a lot. The good news in short is that I have managed to make it work.

The problems you are facing are all classpath issues. HermesJMS 1.13 ships with the following incompatible Jars: slf4j-jdk14-1.0.1.jar mina-core-1.1.0-SNAPSHOT.jar mina-java5-1.1.0-SNAPSHOT.jar

If you remove these jars from the lib dir and replace them with the following jars from M2: mina-core-1.0.0.jar mina-java5-1.0.0.jar slf4j-api-1.4.0.jar slf4j-log4j12-1.4.0.jar

This will allow things to work for you. Even though M2 supports Queue browsing it may be prudent to use check the 'Use consumer' box in the session configuration as our wiki describes as we have recently discovered a bug in M2 when browsing a queue with no messages will cause the client to hang.

If you are looking to interact with more than just Qpid with this modified HermeJMS install then it may not work as the the downgrade in mina may include API changes which may be incompatible with the built in connectors.

If you have time to try out these changes to HermesJMS that would be great.

If you have questions then please don't hesitate to get back to us.

Regards,