activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bbernard <bbernardi...@yahoo.com>
Subject Using SSL with AMQ 4.0.1
Date Thu, 06 Jul 2006 06:33:58 GMT

Hi all,

I tried to setup SSL connection using activemq-4.0.1 following guide found
here: http://www.activemq.org/site/how-do-i-use-ssl.html

However, I get the following exception when I tried to run my code (based on
sample Comsumer dan Producer in the distro):

Using version 4.0 seems to work OK, save for it complaining connection
closed by remote (which encourages me to try version 4.0.1 instead to get
around that issue), though all produced messages are comsumed just fine.

Any idea how to get around this one? Is there any lib I need to add other
than the distro's incubation-activemq-4.0.1.jar found in the downloaded
distro?

Where is this? Caused by:
java.lang.ClassNotFoundException:org.apache.activemq.openwire.v67174528.MarshallerFactory


Exception stack:
==========
in my broker console:
----------------------------------------------------------------------------------------------------------
C:\workexplore\incubator-activemq-4.0.1\bin>activemq
ACTIVEMQ_HOME: C:\workexplore\incubator-activemq-4.0.1\bin\..
Loading message broker from: xbean:activemq.xml
INFO  BrokerService                  - ActiveMQ 4.0.1 JMS Message Broker
(localh
ost) is starting
INFO  BrokerService                  - For help or more information please
see:
http://incubator.apache.org/activemq/
INFO  JDBCPersistenceAdapter         - Database driver recognized:
[apache_derby
_embedded_jdbc_driver]
INFO  JournalPersistenceAdapter      - Journal Recovery Started from: Active
Jou
rnal: using 5 x 20.0 Megs at:
C:\workexplore\incubator-activemq-4.0.1\activemq-d
ata\journal
INFO  JournalPersistenceAdapter      - Journal Recovered: 0 message(s) in
transa
ctions recovered.
INFO  TransportServerThreadSupport   - Listening for connections at:
tcp://kango
roo:61616
WARN  MulticastDiscoveryAgent        - brokerName not set
INFO  TransportConnector             - Connector default Started
INFO  TransportServerThreadSupport   - Listening for connections at:
tcp://kango
roo:61613?wireFormat=stomp
INFO  TransportConnector             - Connector stomp Started
INFO  NetworkConnector               - Network Connector default Started
INFO  BrokerService                  - ActiveMQ JMS Message Broker
(localhost, I
D:kangoroo-1388-1152165488216-1:0) started
Exception in thread "ActiveMQ Transport: tcp:///127.0.0.1:1390"
java.lang.Illega
lArgumentException: Invalid version: 67174528, could not load
org.apache.activem
q.openwire.v67174528.MarshallerFactory
        at
org.apache.activemq.openwire.OpenWireFormat.setVersion(OpenWireFormat
.java:329)
        at
org.apache.activemq.openwire.OpenWireFormat.renegociatWireFormat(Open
WireFormat.java:569)
        at
org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireForm
atNegotiator.java:100)
        at
org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityM
onitor.java:122)
        at
org.apache.activemq.transport.TransportSupport.doConsume(TransportSup
port.java:87)
        at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:
143)
        at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.ClassNotFoundException:
org.apache.activemq.openwire.v67174
528.MarshallerFactory
        at
org.apache.activemq.util.ClassLoading.loadClass(ClassLoading.java:104
)
        at
org.apache.activemq.openwire.OpenWireFormat.setVersion(OpenWireFormat
.java:327)
        ... 6 more
Exception in thread "ActiveMQ Transport: tcp:///127.0.0.1:1393"
java.lang.Illega
lArgumentException: Invalid version: 67174528, could not load
org.apache.activem
q.openwire.v67174528.MarshallerFactory
        at
org.apache.activemq.openwire.OpenWireFormat.setVersion(OpenWireFormat
.java:329)
        at
org.apache.activemq.openwire.OpenWireFormat.renegociatWireFormat(Open
WireFormat.java:569)
        at
org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireForm
atNegotiator.java:100)
        at
org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityM
onitor.java:122)
        at
org.apache.activemq.transport.TransportSupport.doConsume(TransportSup
port.java:87)
        at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:
143)
        at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.ClassNotFoundException:
org.apache.activemq.openwire.v67174
528.MarshallerFactory
        at
org.apache.activemq.util.ClassLoading.loadClass(ClassLoading.java:104
)
        at
org.apache.activemq.openwire.OpenWireFormat.setVersion(OpenWireFormat
.java:327)
        ... 6 more
----------------------------------------------------------------------------------------------------------


in my consumer client 
----------------------------------------------------------------------------------------------------------
Connecting to URL: ssl://localhost:61616
Consuming queue: TOOL.DEFAULT
Using non-durable subscription
Caught: javax.jms.JMSException: Could not connect to broker URL:
ssl://localhost:61616. Reason: javax.net.ssl.SSLException: Unrecognized SSL
message, plaintext connection?
javax.jms.JMSException: Could not connect to broker URL:
ssl://localhost:61616. Reason: javax.net.ssl.SSLException: Unrecognized SSL
message, plaintext connection?
        at
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:32)
        at
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:252)
        at
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:211)
        at
org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:158)
        at
com.ic.ntn.message.MsgSupport.createConnection(MsgSupport.java:60)
        at com.ic.ntn.message.MsgConsumer.run(MsgConsumer.java:89)
        at com.ic.ntn.message.MsgConsumer.main(MsgConsumer.java:79)
Caused by: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext
connection?
        at
com.sun.net.ssl.internal.ssl.InputRecord.handleUnknownRecord(InputRecord.java:525)
        at
com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:355)
        at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:723)
        at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1030)
        at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:622)
        at
com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:59)
        at
org.apache.activemq.transport.tcp.TcpBufferedOutputStream.flush(TcpBufferedOutputStream.java:108)
        at java.io.DataOutputStream.flush(DataOutputStream.java:106)
        at
org.apache.activemq.transport.tcp.TcpTransport.oneway(TcpTransport.java:125)
        at
org.apache.activemq.transport.InactivityMonitor.oneway(InactivityMonitor.java:141)
        at
org.apache.activemq.transport.WireFormatNegotiator.sendWireFormat(WireFormatNegotiator.java:128)
        at
org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:64)
        at
org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:52)
        at
org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:52)
        at
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:241)
        ... 5 more
Jul 6, 2006 2:24:05 PM org.apache.activemq.ActiveMQConnection
onAsyncException
WARNING: Async exception with no exception listener:
javax.net.ssl.SSLException: Connection has been shutdown:
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
javax.net.ssl.SSLException: Connection has been shutdown:
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
        at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.checkEOF(SSLSocketImpl.java:1173)
        at
com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:65)
        at
org.apache.activemq.transport.tcp.TcpBufferedInputStream.fill(TcpBufferedInputStream.java:48)
        at
org.apache.activemq.transport.tcp.TcpBufferedInputStream.read(TcpBufferedInputStream.java:55)
        at java.io.DataInputStream.readInt(DataInputStream.java:353)
        at
org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:274)
        at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:142)
        at java.lang.Thread.run(Thread.java:595)
Caused by: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext
connection?
        at
com.sun.net.ssl.internal.ssl.InputRecord.handleUnknownRecord(InputRecord.java:525)
        at
com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:355)
        at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:723)
        at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1030)
        at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:622)
        at
com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:59)
        at
org.apache.activemq.transport.tcp.TcpBufferedOutputStream.flush(TcpBufferedOutputStream.java:108)
        at java.io.DataOutputStream.flush(DataOutputStream.java:106)
        at
org.apache.activemq.transport.tcp.TcpTransport.oneway(TcpTransport.java:125)
        at
org.apache.activemq.transport.InactivityMonitor.oneway(InactivityMonitor.java:141)
        at
org.apache.activemq.transport.WireFormatNegotiator.sendWireFormat(WireFormatNegotiator.java:128)
        at
org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:64)
        at
org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:52)
        at
org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:52)
        at
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:241)
        at
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:211)
        at
org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:158)
        at
com.ic.ntn.message.MsgSupport.createConnection(MsgSupport.java:60)
        at com.ic.ntn.message.MsgConsumer.run(MsgConsumer.java:89)
        at com.ic.ntn.message.MsgConsumer.main(MsgConsumer.java:79)


Thanks,
/bernard
-- 
View this message in context: http://www.nabble.com/Using-SSL-with-AMQ-4.0.1-tf1898836.html#a5194487
Sent from the ActiveMQ - User forum at Nabble.com.


Mime
View raw message