JBoss 4.0.2 Final ClassCastException
Problem:
Wenn Sie Ihr Programm, das EJBs (EnterpriseJavaBeans) beinhaltet, auf dem JBoss Application-Server nach dem Deployment ausführen wollen, kommt folgende Fehlermeldung:
java.lang.ClassCastException
at com.sun.corba.se.impl.javax.rmi.
PortableRemoteObject.narrow(PortableRemoteObject.java:229)
at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
at org.apache.jsp.index_jsp._jspService(org.apache.jsp.index_jsp:57)
Ein Beispielcode für den Aufruf der EJB sieht in etwa so aus:
Context context = new InitialContext();
Object ref = context.lookup("InfoSessionFacade");
InfoSessionFacadeHome home = (InfoSessionFacadeHome) PortableRemoteObject.narrow(ref,
InfoSessionFacadeHome.class);
Lösung:
Setzten Sie die Eigenschaft “CallByValue” in den Einstellungsdateien /conf/jboss-service.xml und /deploy/ear-deployer.xml auf “true”.

November 26th, 2005 at 01:42
Wow! After couple hours in despair this was it! Thanks a lot!
Juli 9th, 2007 at 06:07
Did any one got any fix for this problem. I am also getting this error. I am stuck badly.
Juli 9th, 2007 at 06:25
This fixed my issue also. Thanks a ton.