You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by InquisitiveAlex <a_...@mail.ru> on 2008/01/28 18:30:06 UTC
Using ActiveMQ in java applets
Hello. I am trying to use Active MQ 4.1 to create applet, which listen JMS
messages. I have several pages with this applet. When applet starts it
creates connection, topic, session and subscriber. When applet stops, it
closes them. However, when I open and close web pages, where applet
presents, IllegalStateException occurs.
Exception in thread "ActiveMQ Transport: tcp:///127.0.0.2:61616"
java.lang.IllegalStateException: Timer already cancelled.
at java.util.Timer.sched(Timer.java:354)
at java.util.Timer.scheduleAtFixedRate(Timer.java:296)
at
org.apache.activemq.thread.Scheduler.executePeriodically(Scheduler.java:48)
at
org.apache.activemq.transport.InactivityMonitor.startMonitorThreads(InactivityMonitor.java:186)
at
org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:128)
at
org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
at
org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:185)
at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:172)
at java.lang.Thread.run(Thread.java:595)
And then:
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:1183)
at
org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1262)
at
org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:292)
...
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:85)
at
org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:40)
at
org.apache.activemq.transport.ResponseCorrelator.asyncRequest(ResponseCorrelator.java:70)
at
org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:75)
at
org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1172)
... 4 more
After that applet can not receive any message, even if connection reopened.
Please help.
--
View this message in context: http://www.nabble.com/Using-ActiveMQ-in-java-applets-tp15140178s2354p15140178.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Using ActiveMQ in java applets
Posted by odonnell <od...@yahoo.co.uk>.
Hi,
I have exactly the same problem and stack trace when using ActiveMQ 5.0.0
The applet runs perfectly first time and I am cleaning up my resources
correctly when the applet is destroyed. Subsequently loading the applet
within the same browser session causes the problem described below. If the
browser is closed and reopened then the applet will run correctly again.
The problem exists in both Internet Explorer 7 and FireFox 2.0.0.14
If you found a solution to this problem then please let me know.
Thanks.
InquisitiveAlex wrote:
>
> Hello. I am trying to use Active MQ 4.1 to create applet, which listen JMS
> messages. I have several pages with this applet. When applet starts it
> creates connection, topic, session and subscriber. When applet stops, it
> closes them. However, when I open and close web pages, where applet
> presents, IllegalStateException occurs.
>
> Exception in thread "ActiveMQ Transport: tcp:///127.0.0.2:61616"
> java.lang.IllegalStateException: Timer already cancelled.
> at java.util.Timer.sched(Timer.java:354)
> at java.util.Timer.scheduleAtFixedRate(Timer.java:296)
> at
> org.apache.activemq.thread.Scheduler.executePeriodically(Scheduler.java:48)
> at
> org.apache.activemq.transport.InactivityMonitor.startMonitorThreads(InactivityMonitor.java:186)
> at
> org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:128)
> at
> org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
> at
> org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:185)
> at
> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:172)
> at java.lang.Thread.run(Thread.java:595)
>
> And then:
>
> 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:1183)
> at
> org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1262)
> at
> org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:292)
> ...
> 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:85)
> at
> org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:40)
> at
> org.apache.activemq.transport.ResponseCorrelator.asyncRequest(ResponseCorrelator.java:70)
> at
> org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:75)
> at
> org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1172)
> ... 4 more
> After that applet can not receive any message, even if connection
> reopened.
> Please help.
>
--
View this message in context: http://www.nabble.com/Using-ActiveMQ-in-java-applets-tp15140178s2354p17316709.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.