users@glassfish.java.net

EJB lookup mistery

From: Felipe Gaścho <fgaucho_at_gmail.com>
Date: Thu, 18 Feb 2010 20:43:26 +0100

--------- on the server side I have:

@Local
public interface PujInstitutionFacade extends
PujEntityFacade<PujInstitutionEntity> { ... }

@Stateless
public class PujInstitutionFacadeImpl extends
CRUDEntityFacade<PujInstitutionEntity> implements PujInstitutionFacade
{ ... }


--------- on the client side I have only the local interface (client-jar)

the lookup works, but it returns a proxy.. and when I try to cast the
proxy to my local interface, it throws an exception:


[#|2010-02-18T20:24:48.860+0100|SEVERE|glassfishv3.0|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID=28;_ThreadName=Thread-1;|java.lang.ClassCastException:
$Proxy1086 cannot be cast to
com.kenai.puj.arena.model.entity.facade.PujInstitutionFacade
       at com.kenai.puj.arena.vraptor.controller.IndexController.<init>(IndexController.java:48)
       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

what is missed ?

* the interface implementation code is not available in the client side..

* everything running in the same Glassfish V3