This content has been marked as final. Show 2 replies
I have deployed an EAR with, among other components, some EJB statefull session beans.
Then, from a WAR deployed as a sibling to the previous EAR, i perform a lookup to any of those beans and i get the following exception:
Caused by: java.lang.ClassCastException: com.events.serviciosUI.autenticacion.ServicesAutenticacionRemote$$$view5 cannot be cast to com.events.serviciosUI.autenticacion.ServicesAutenticacionRemote
The same lookup works fine if the WAR is deployed within the EAR.
The error tells me that I am being served with a wrapper or view of the clas that does not implements ServicesAutentiaccionRemote. Why is that?
I am using the GLOBAL JNDI name for JBoss AS 7 as described in manuals:
* Deployment that works:
+- webapp1.war(doing lookup to a parent EAR.ear)
* Deployment that does NOT works:
+- webapp1.war (doing lookup to a sibling EAR.ear)
Hope anyone can help.