JBOSS JMS的问题lookup("ConnectionFactory")出错

03-12-19 jyogou
有哪位高手熟悉JBOSS中JMS使用的吗?
我是用JBOSS的all模式启动的,在获取QueueConnectionFactory时出错
请指点

代码如下
InitialContext ctx = getContext();
QueueConnectionFactory factory=(QueueConnectionFactory)ctx.lookup("ConnectionFactory");

出错信息
javax.naming.CommunicationException [Root exception is java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
java.lang.ClassNotFoundException: org.jboss.mq.referenceable.ObjectRefAddr (no security manager: RMI class loader disabled)]
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:611)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:471)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at au.com.tusc.mdb.RequestMDBClient.testMDBBean(RequestMDBClient.java:47)
at au.com.tusc.mdb.RequestMDBClient.main(RequestMDBClient.java:38)
Caused by: java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
java.lang.ClassNotFoundException: org.jboss.mq.referenceable.ObjectRefAddr (no security manager: RMI class loader disabled)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:169)
at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:492)
... 4 more
Caused by: java.lang.ClassNotFoundException: org.jboss.mq.referenceable.ObjectRefAddr (no security manager: RMI class loader disabled)
at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:371)
at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:165)
at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:631)
at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:257)
at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:200)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1513)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1626)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1603)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1271)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:297)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:146)
... 6 more

lyojbuilder
2003-12-19 19:51
不是说了吗
"ClassNotFoundException: org.jboss.mq.referenceable.ObjectRefAddr "把mq这个包考过来就行了

jyogou
2003-12-22 09:27
小弟对jboss不太熟悉
org.jboss.mq.referenceable.ObjectRefAddr这各类从哪里可以得到
拷贝到哪里
jboss自己找不到这个类吗?
我用的是jboss3.2.1

请指教

jyogou
2003-12-22 09:27
小弟对jboss不太熟悉
org.jboss.mq.referenceable.ObjectRefAddr这各类从哪里可以得到
拷贝到哪里
jboss自己找不到这个类吗?
我用的是jboss3.2.1

请指教

jyogou
2003-12-22 09:27
小弟对jboss不太熟悉
org.jboss.mq.referenceable.ObjectRefAddr这各类从哪里可以得到
拷贝到哪里
jboss自己找不到这个类吗?
我用的是jboss3.2.1

请指教

leon_089
2005-10-19 19:51
your must include a jar file jbossmq.jar into your classpath. this jar file is under $JBOSS321_HOME/server/all/lib.
lihua gao