Hi all, I'm working in WL6.1 sp3 and I have a webapp deployed alone (without any ear). This Web app access an EJB Module inside an separate ear. The Web app calls an EJB Method and pass a Collection of Value Objects as parameter. I have an EJB Client Jar in the web app that have inside the Value Object class. When I call the method and inside the EJB Bean Class I try to cast every element I get an ClassCastException. Thanks a lot. Cristian.
I think what may be happening is that WebLogic is not Serializing the collection. WLS will serialize things if it can't see the same class from both ClassLoaders. Maybe because the Collection is in java.util it is not actually serializing that object, so its contents (your Value objects) are not being serialized and thus you get the ClassCastException. I can think of three ideas. You can force the serialization with a switch in the weblogic-ejb-jar.xml (I forget exactly, but check e-docs.bea.com). Or you could put your value class in system classpath. Or you could create a subclass of the Collection that you put in your ejb jar and client jar in the webapp. Pass the "MyCollection" rather than the java.util.Collection and maybe WLS will be "tricked" into serializing the thing. It could be as simple as
I think the force serialization switch is probably the best bet. [ November 22, 2002: Message edited by: Dave Landers ]