Using Sun's RI on NT4.0...
Session bean calling entity bean.
_dataHome = lookup(...)
_dataHome.create(...)
ejbCreate in _dataHome gets called and after 15 seconds...
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.RemoteException: Exception creating EJBObject: ; nested exception is:
java.lang.RuntimeException: Unable to create reference java.lang.ClassCastException
Seems like after creating DB entry, it fails to instantiate and the EJBObject.
Could this be a classpath problem? I've made sure that the DOS window j2ee -verbose is running in contains the .ear file which contains the ejbObject class file.
What else am I missing?
Thanks
David
-
home.create() problems (4 messages)
- Posted by: david lu
- Posted on: October 17 2000 16:34 EDT
Threaded Messages (4)
- home.create() problems by Dharma Subramanian on October 17 2000 17:50 EDT
- home.create() problems by david lu on October 18 2000 09:01 EDT
-
home.create() problems by Vid Desibhatla on October 19 2000 10:17 EDT
- home.create() problems by Dharma Subramanian on October 19 2000 01:49 EDT
-
home.create() problems by Vid Desibhatla on October 19 2000 10:17 EDT
- home.create() problems by david lu on October 18 2000 09:01 EDT
-
home.create() problems[ Go to top ]
- Posted by: Dharma Subramanian
- Posted on: October 17 2000 17:50 EDT
- in response to david lu
What EJB version are you using? In 1.1, you need to call PortableRemoteObject.narrow(..) method, if you haven't done so.
-
home.create() problems[ Go to top ]
- Posted by: david lu
- Posted on: October 18 2000 09:01 EDT
- in response to Dharma Subramanian
I am. -
home.create() problems[ Go to top ]
- Posted by: Vid Desibhatla
- Posted on: October 19 2000 10:17 EDT
- in response to david lu
A few checkpoints:
Check your pri-key-class in your ejb-jar.xml if it is a BMP.
Check if the object returned by your PortableRemoteObject.narrow method is being cast correctly. Check if you are importing the correct entity bean package in your session bean.
I use weblogic (NT) app server to deploy my stateful session and Entity beans all the time and these are some points that I keep check. I have had no problems. -
home.create() problems[ Go to top ]
- Posted by: Dharma Subramanian
- Posted on: October 19 2000 13:49 EDT
- in response to Vid Desibhatla
Why do I get ClassCastException when I locate my home interface using the PortableRemoteObject.narrow()?
My sample programs used to work before but this particular bean code is throwing that exception. I can't seem to figure out why.
Any inputs?