调用EJB的问题

05-09-25 xiaobao198112
在JBuilder9中,写client程序调用EJB,EJB部署已成功。出错如下:

D:\bea\jdk141_03\bin\javaw -classpath "D:\MyJProject\selectstudent\classes;D:\bea\weblogic81\server\lib\weblogic_sp.jar;D:\bea\weblogic81\server\lib\weblogic.jar;D:\bea\weblogic81\server\lib\webservices.jar;D:\bea\jdk141_03\jre\lib\charsets.jar;D:\bea\jdk141_03\jre\lib\ext\dnsns.jar;D:\bea\jdk141_03\jre\lib\ext\ldapsec.jar;D:\bea\jdk141_03\jre\lib\ext\localedata.jar;D:\bea\jdk141_03\jre\lib\ext\sunjce_provider.jar;D:\bea\jdk141_03\jre\lib\im\indicim.jar;D:\bea\jdk141_03\jre\lib\jaws.jar;D:\bea\jdk141_03\jre\lib\jce.jar;D:\bea\jdk141_03\jre\lib\jsse.jar;D:\bea\jdk141_03\jre\lib\rt.jar;D:\bea\jdk141_03\jre\lib\sunrsasign.jar;D:\bea\jdk141_03\lib\dt.jar;D:\bea\jdk141_03\lib\tools.jar;D:\bea\jdk141_03\lib\htmlconverter.jar" selectstudent.SelectTestClient1

weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ Environment not found on thread ]

at weblogic.jndi.internal.NamingNodeReplicaHandler.<init>(NamingNodeReplicaHandler.java:150)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

at java.lang.reflect.Constructor.newInstance(Constructor.java:274)

at java.lang.Class.newInstance0(Class.java:306)

at java.lang.Class.newInstance(Class.java:259)

at weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:93)

at weblogic.common.internal.ChunkedObjectInputStream.readObjectWL(ChunkedObjectInputStream.java:162)

at weblogic.common.internal.ChunkedObjectInputStream$NestedObjectInputStream.readObjectWL(ChunkedObjectInputStream.java:330)

at weblogic.rmi.cluster.ReplicaAwareRemoteRef.readExternal(ReplicaAwareRemoteRef.java:381)

at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1686)

at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1644)

at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)

at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)

at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:452)

at weblogic.rmi.internal.StubInfo.readObject(StubInfo.java:116)

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 java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:824)

at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746)

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 weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:114)

at weblogic.common.internal.ChunkedObjectInputStream.readObjectWL(ChunkedObjectInputStream.java:162)

at weblogic.common.internal.ChunkedObjectInputStream$NestedObjectInputStream.readObjectWL(ChunkedObjectInputStream.java:330)

at weblogic.jndi.internal.WLContextImpl.readExternal(WLContextImpl.java:425)

at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1686)

at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1644)

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 weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:114)

at weblogic.rjvm.ResponseImpl.getThrowable(ResponseImpl.java:115)

at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:106)

at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:284)

at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:244)

at selectstudent.Select_z3w3k8_EOImpl_811_WLStub.SelectStudent(Unknown Source)

at selectstudent.SelectTestClient1.main(SelectTestClient1.java:69)

weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ Environment not found on thread ]

at weblogic.jndi.internal.NamingNodeReplicaHandler.<init>(NamingNodeReplicaHandler.java:150)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

at java.lang.reflect.Constructor.newInstance(Constructor.java:274)

at java.lang.Class.newInstance0(Class.java:306)

at java.lang.Class.newInstance(Class.java:259)

at weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:93)

at weblogic.common.internal.ChunkedObjectInputStream.readObjectWL(ChunkedObjectInputStream.java:162)

at weblogic.common.internal.ChunkedObjectInputStream$NestedObjectInputStream.readObjectWL(ChunkedObjectInputStream.java:330)

at weblogic.rmi.cluster.ReplicaAwareRemoteRef.readExternal(ReplicaAwareRemoteRef.java:381)

at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1686)

at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1644)

at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)

at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)

at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:452)

at weblogic.rmi.internal.StubInfo.readObject(StubInfo.java:116)

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 java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:824)

at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746)

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 weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:114)

at weblogic.common.internal.ChunkedObjectInputStream.readObjectWL(ChunkedObjectInputStream.java:162)

at weblogic.common.internal.ChunkedObjectInputStream$NestedObjectInputStream.readObjectWL(ChunkedObjectInputStream.java:330)

at weblogic.jndi.internal.WLContextImpl.readExternal(WLContextImpl.java:425)

at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1686)

at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1644)

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 weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:114)

at weblogic.rjvm.ResponseImpl.getThrowable(ResponseImpl.java:115)

at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:106)

at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:284)

at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:244)

at selectstudent.Select_z3w3k8_EOImpl_811_WLStub.SelectStudent(Unknown Source)

at selectstudent.SelectTestClient1.main(SelectTestClient1.java:69)

Exception in thread "main"

xiaobao198112
2005-09-25 17:34
跪求。。。。

banq
2005-09-27 17:22
日志不齐全,只有上帝知道问题在哪里。

xiaobao198112
2005-09-27 20:19
谢谢band,我已经找到问题的症结了,我的程序除了有的EJB的JNDI之外,还有数据源,我只配了数据池而没有配数据源,现在已经成功运行了,呵呵,还是网上的热心人多啊。

猜你喜欢