I make a BMP with jb6 from a CMP,The CMP is work well in Weblogic61,But the BMP is error: Start server side stack trace: java.rmi.RemoteException: EJB Exception:; nested exception is: java.lang.NullPointerException java.lang.NullPointerException at testbmp2.CabinBean.ejbCreate(CabinBean.java:31) at testbmp2.CabinBean_12m8qx_Impl.ejbCreate(CabinBean_12m8qx_Impl.java:172) at java.lang.reflect.Method.invoke(Native Method) at weblogic.ejb20.manager.DBManager.create(DBManager.java:492) at weblogic.ejb20.manager.DBManager.remoteCreate(DBManager.java:462) at weblogic.ejb20.internal.EntityEJBHome.create(EntityEJBHome.java:190) at testbmp2.CabinBean_12m8qx_HomeImpl.create(CabinBean_12m8qx_HomeImpl.java:75) at testbmp2.CabinBean_12m8qx_HomeImpl_WLSkel.invoke(Unknown Source) at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:298) at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:93) at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:267) at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120) End server side stack trace
Originally posted by flaying ma: But at line31,is a testClient load a remote Bean's mothed! Some one tell me there is't have a remote mothed,So the error is "NullPointerException" Why! help me! Thanks a lots!
Show us the code around that error. Perhaps we can see if you are accessing the bean correctly.
By my reckoning "conn" is still null when you invoke prepareStatement(). Possibly related is the fact that although you catch exceptions attempting to initialize conn, you then go ahead and attempt to use it anyway. If conn didn't initialize, you really ought to just throw an EJBCreateException, since you can't do anything further anyway. [ March 11, 2002: Message edited by: Tim Holloway ]
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.
A sonic boom would certainly ruin a giant souffle. But this tiny ad would protect it:
a bit of art, as a gift, that will fit in a stocking