4
(使用https://github.com/jmesnil/stomp-websocket)下面的測試客戶端代碼可以產生在JBoss的7.0.1異常:HornetQ報告在帶有stomp-websocket客戶端的JBoss 7中無效的STOMP框架?
var client = Stomp.client("ws://192.168.0.4:61614/stomp");
client.connect("guest", "guest", function() {
client.send("/queue/test", {priority: 9}, "Hello world!");
});
client.subscribe("/queue/test", function(message) {
alert(message.body);
});
它還與下面的單線發生的情況:
new WebSocket("ws://192.168.0.4:61614/stomp");
爲什麼JBoss的HornetQ的報告以下例外?
08:56:55,732 ERROR [org.hornetq.core.protocol.stomp.StompProtocolManager] (Old I/O server worker (parentId: 17267825, [id: 0x01077c71, france/192.168.0.4:61614])) Failed to decode: org.hornetq.core.protocol.stomp.StompException: Invalid STOMP frame: G,E,T,32,/,s,t,o,m,p,32,H,T,T,P,/,1,.,1,13,10,U,p,g,r,a,d,e,:,32,w,e,b,s,o,c,k,e,t,13,10,C,o,n,n,e,c,t,i,o,n,:,32,U,p,g,r,a,d,e,13,10,H,o,s,t,:,32,1,9,2,.,1,6,8,.,0,.,4,:,6,1,6,1,4,13,10,S,e,c,-,W,e,b,S,o,c,k,e,t,-,O,r,i,g,i,n,:,32,n,u,l,l,13,10,S,e,c,-,W,e,b,S,o,c,k,e,t,-,K,e,y,:,32,J,9,d,h,k,4,a,w,c,Z,l,y,d,p,0,k,b,X,P,u,s,Q,=,=,13,10,S,e,c,-,W,e,b,S,o,c,k,e,t,-,V,e,r,s,i,o,n,:,32,8,13,10,13,10,
at org.hornetq.core.protocol.stomp.StompDecoder.throwInvalid(StompDecoder.java:566) [hornetq-core-2.2.7.Final.jar:]
at org.hornetq.core.protocol.stomp.StompDecoder.decode(StompDecoder.java:367) [hornetq-core-2.2.7.Final.jar:]
at org.hornetq.core.protocol.stomp.StompProtocolManager.handleBuffer(StompProtocolManager.java:161) [hornetq-core-2.2.7.Final.jar:]
at org.hornetq.core.protocol.stomp.StompConnection.bufferReceived(StompConnection.java:269) [hornetq-core-2.2.7.Final.jar:]
at org.hornetq.core.remoting.server.impl.RemotingServiceImpl$DelegatingBufferHandler.bufferReceived(RemotingServiceImpl.java:458) [hornetq-core-2.2.7.Final.jar:]
at org.hornetq.core.remoting.impl.netty.HornetQChannelHandler.messageReceived(HornetQChannelHandler.java:73) [hornetq-core-2.2.7.Final.jar:]
at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:100) [netty-3.2.3.Final.jar:]
at org.jboss.netty.channel.StaticChannelPipeline.sendUpstream(StaticChannelPipeline.java:362) [netty-3.2.3.Final.jar:]
at org.jboss.netty.channel.StaticChannelPipeline.sendUpstream(StaticChannelPipeline.java:357) [netty-3.2.3.Final.jar:]
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:274) [netty-3.2.3.Final.jar:]
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:261) [netty-3.2.3.Final.jar:]
at org.jboss.netty.channel.socket.oio.OioWorker.run(OioWorker.java:90) [netty-3.2.3.Final.jar:]
at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) [netty-3.2.3.Final.jar:]
at org.jboss.netty.util.internal.IoWorkerRunnable.run(IoWorkerRunnable.java:46) [netty-3.2.3.Final.jar:]
at org.jboss.netty.util.VirtualExecutorService$ChildExecutorRunnable.run(VirtualExecutorService.java:181) [netty-3.2.3.Final.jar:]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [:1.7.0]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [:1.7.0]
at java.lang.Thread.run(Thread.java:722) [:1.7.0]
謝謝。我使用該配置在org.jboss.netty.handler.codec.http.HttpCodecUtil.validateHeaderValue(HttpCodecUtil.java:102)上獲得了一個NPE。如果我將協議值更改爲stomp而不是stomp_ws,那麼我會得到原始錯誤。 – rich
然後你應該提出一個問題(JIRA)。這應該很好。 –
提出。謝謝。 https://issues.jboss.org/browse/HORNETQ-784 – rich