I have two EnterpriseApplications deployed in 2 different EAR-Files but they both call each other. Eg one application creates a stateful session bean and put a java object into it. The other EJB-Application access the first EJB through a handle and call a getter to receive the java object. I put the java object into a jar in jboss/lib/ext so that both application can share it. Now I get a class cast exception when the first ejb tries to create that object.
Did you specify the jar that contains the class definition for the object in the manifest.mf of the calling ejb.jar file? For example:
Created-By: Ant 1.4.1
This example assumes that I have added the targeted jar file to my ear file in the lib folder.
Hope this helps...