i have two seam 2 applications which i try to run under JBoss 7
one is packaged as ear, the other is packaged as war.
The war application tries per jndi lookup a bean from the ear application.
The lookup is
InitialContext ctx = new InitialContext();
Object o = (Object) ctx.lookup("java:global/earpp/earapp.jar/LocalInteferfaceImpl");
LocalInteferfaceImpl is implementing LocalInteferface
but when i try to cast the object o to LocaInterface i got ClassCastException : LocalInterface$$$view12 cannot be cast to LocalInterface
The interface is packaged in both. the ear and the war file.
what am i doing wrong?
i moved the inteface class to a module
and add in both projects a dependency for this module.