jms的问题,请高手帮忙解决一下,先谢了

03-05-05 lina
    

程序片段

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)

    

banq
2003-05-05 17:37

可能有关security问题,你要设置一下。

lina
2003-05-05 22:27

how to do ?

please give me a hand.

thx

banq
2003-05-06 13:25

具体我也没有碰过,真的没发帮你,只是给你解决问题提供一个努力的方向

Jevang
2003-05-06 14:26

Hmm, maybe it requires you to provide a security authentication, suggest you search -Djava.security.auth.login.config =

Maybe you need to specify this option during start the standalone java client.

Just guess.

-Wanchun

2Go 1 2 下一页