jms的問題,請高手幫忙解決一下,先謝了
程式片段
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)
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)
相關文章
- 關於資料庫的問題。請幫忙看下,在下先謝謝了資料庫
- 高手幫忙解決兩道JAVA題,跪謝!!Java
- 請高手幫忙了,關於javamail的問題JavaAI
- jive配置中的database問題?!請幫忙阿謝謝!Database
- 請教關於jive原始碼,請各位高手幫忙 ,謝謝!!!原始碼
- 有關javaAPI,請各位高手幫忙,拜謝JavaAPI
- 安裝時提示錯誤,請高手幫忙解決一下
- NIO Socket的2個問題?請高手幫忙!
- 請高手幫忙!
- 一個郵件的JAVABEAN問題,請高手幫忙JavaBean
- 實在是解決不了,請各位高手幫忙
- 急!!請高手幫忙
- jbuilder高手請幫忙UI
- 請各位高手幫忙!
- RMI物件繫結到JNDI的問題,請高手幫忙!物件
- 關於反射的問題,請高手幫忙!線上急等!反射
- 關於digest認證的問題,請高手幫忙
- 紅旗5.0的安裝問題。請高手幫忙(轉)
- 請大家幫忙,關於儲存過程分頁的問題...謝謝儲存過程
- 各位大哥,幫忙解決一下這個問題
- 分頁Bean的同步問題,,請大家幫忙解決Bean
- benq大哥,幫忙,請進入,謝謝!ENQ
- java學習中遇到的問題 請高手幫忙 線上等Java
- 請高手幫忙分析一個JSP小程式的問題JS
- 請各路高手幫忙,關於JAVA NIO的方面的問題Java
- JNDI中Context初始化的問題!請幫幫忙,急需解決!Context
- jboss3安裝有問題多謝幫忙看一下S3
- synchronized關鍵字問題?各位高手,幫幫忙!synchronized
- 請幫我看看呼叫webservice的問題謝謝!Web
- 關於jive的幾個小問題,請高手指點,多謝先。
- 請高手幫忙,關於多個連線的hibernate配置問題
- 一個寫xml的問題,高手幫忙啊!XML
- 高手、板主幫忙,一個加密的問題!!!加密
- 請高手幫幫忙,給點兒資訊也行
- 用jmeter測試webshere下面的jsf出現了問題,請幫忙解決。JMeterWebJS
- 各位高手請幫忙,不勝感激!!!!
- 希望高手幫助一下 ,小弟在這裡感謝了
- 高手幫忙