jms的問題,請高手幫忙解決一下,先謝了

lina發表於2003-05-05
程式片段
Hashtable props = new Hashtable();
props.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
props.put(Context.PROVIDER_URL, "192.168.1.55");
Context context = new InitialContext(props);
TopicConnectionFactory topicFactory =(TopicConnectionFactory)context.lookup
(factoryJNDI);
topicConnection = topicFactory.createTopicConnection("guest","guest"); //make error
on standalone application
topicSession = topicConnection.createTopicSession(false,Session.AUTO_ACKNOWLEDGE);
topic = (Topic)context.lookup(topicJNDI);
topicPublisher = topicSession.createPublisher(topic);

在jboss3.2下如上一段程式碼透過一個寫的session bean 呼叫時能正確執行,但是當在一個獨立的應用
伺服器時卻報如下的錯誤,請問是什麼原因,怎麼能解決,謝謝
org.jboss.mq.SpyJMSException: Cannot authenticate user; - nested throwable:
(java.net.SocketException: Option unsupported by protocol: connect)

org.jboss.mq.SpyJMSException: Cannot authenticate user; - nested throwable:
(java.net.SocketException: Option unsupported by protocol: connect)

at org.jboss.mq.Connection.authenticate(Connection.java:769)

at org.jboss.mq.Connection.<init>(Connection.java:233)

at org.jboss.mq.SpyConnection.<init>(SpyConnection.java:48)

at org.jboss.mq.SpyConnectionFactory.createTopicConnection
(SpyConnectionFactory.java:97)

at testmdb.HelloPublisher.<init>(HelloPublisher.java:33)

at testmdb.HelloPublisher.main(HelloPublisher.java:53)

+ nested throwable: java.net.SocketException: Option unsupported by protocol: connect

at java.net.PlainSocketImpl.socketConnect(Native Method)

at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:320)

at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:133)

at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:120)

at java.net.Socket.<init>(Socket.java:273)

at java.net.Socket.<init>(Socket.java:127)

at javax.net.DefaultSocketFactory.createSocket(SocketFactory.java:189)

at org.jboss.mq.il.oil.OILServerIL.createConnection(OILServerIL.java:557)

at org.jboss.mq.il.oil.OILServerIL.checkConnection(OILServerIL.java:501)

at org.jboss.mq.il.oil.OILServerIL.authenticate(OILServerIL.java:289)

at org.jboss.mq.Connection.authenticate(Connection.java:762)

at org.jboss.mq.Connection.<init>(Connection.java:233)

at org.jboss.mq.SpyConnection.<init>(SpyConnection.java:48)

at org.jboss.mq.SpyConnectionFactory.createTopicConnection
(SpyConnectionFactory.java:97)

at testmdb.HelloPublisher.<init>(HelloPublisher.java:33)

at testmdb.HelloPublisher.main(HelloPublisher.java:53)

相關文章