关于使用JBOSS写JMS的奇怪问题

liwei_snake 04-08-04

首先感谢大家能进来看看.
我遇到了这样的问题:在使用JBOSS服务器的条件下写JMS我在程序中指定了消息队列发送和接收队列为testQueue,但运行时一直出错说testQueue没有bound.而且无论我改成哪个都不行,我试过在jboss的jmx中配myQueue和在配置文件中配myQueue两种方法都没通过,但是没有道理啊,请大侠们赐教,我使用的JMS的程序是JBUILDER10中直接生成的,以下是出错的堆栈():
log4j:WARN No appenders could be found for logger (org.jboss.mq.referenceable.SpyConnectionFactoryObjectFactory).

log4j:WARN Please initialize the log4j system properly.

javax.naming.NameNotFoundException: testQueue not bound

at org.jnp.server.NamingServer.getBinding(NamingServer.java:495)

at org.jnp.server.NamingServer.getBinding(NamingServer.java:503)

at org.jnp.server.NamingServer.getObject(NamingServer.java:509)

at org.jnp.server.NamingServer.lookup(NamingServer.java:282)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:324)

at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)

at sun.rmi.transport.Transport$1.run(Transport.java:148)

at java.security.AccessController.doPrivileged(Native Method)

at sun.rmi.transport.Transport.serviceCall(Transport.java:144)

at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)

at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)

at java.lang.Thread.run(Thread.java:536)

at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)

at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)

at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)

at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)

at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:530)

at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:509)

at javax.naming.InitialContext.lookup(InitialContext.java:347)

at datatransfer.Jms.getSendQueue(Jms.java:122)

at datatransfer.Jms.getQueueSender(Jms.java:107)

at datatransfer.Jms.sendText(Jms.java:91)

at datatransfer.JmsClient.transfer(JmsClient.java:93)

at datatransfer.JmsClient.mutiTransfer(JmsClient.java:69)

at datatransfer.testJmsCilent.main(testJmsCilent.java:22)

banq
2004-08-10 12:44

需要配置JBoss,如何配置可参考原创教程。