First, thanks to anyone that can help me out! Next, the problem...
I have an EAR file that runs under JBoss 2.4.3. I need to upgrade to JBoss to 2.4.4. When I tried deploying the exact same EAR under JBoss 2.4.4, I get a ClassCastException from a call to PortableRemoteObject.narrow(). I have scoured newsgroup postings and have attempted the various things others have tried so I am now at a loss...here's what I know...
1. In JBoss 2.4.3, the narrow() method returns successfully. In JBoss 2.4.4, the narrow() method returns successfully IF I narrow it to EJBHome but not to my specific class.
2. Looking at the implementation of the narrow() method, it calls a method obj1.isAssignableFrom(obj2). In JBoss 2.4.3, this method returns true. In JBoss 2.4.4, this method is returning false.
It seems that the proxy stub that JBoss is generating does not subclass my Home interface properly (???)...I included the structure of my EAR file below. The Home class actually resides in a few locations but I verified that they are in fact identical in case JBoss was loading the class from two different locations.
myapp.ear - myapp.war - aclientlib.jar - this jar contains classes required by clients using the ejb - Home.class - aejb.jar - this jar is the ejb! - Home.class - aclientlib.jar - this jar contains classes required by clients using the ejb - Home.class
- Kelly [ May 11, 2007: Message edited by: Bear Bibeault ]
Joined: Jan 09, 2005
Originally posted by Kelly Dolan:
That exception occurs when the WAR file includes any EJB-related classes, either in WEB-INF/lib or WEB-INF/classes folder. Remove any EJB-related JARs/Classes from the WAR and it should work fine.