0 Replies Latest reply on Aug 21, 2007 11:24 AM by Chetan Pachpande

    Proxy ClassCastException while looking up EJB

    Chetan Pachpande Newbie

      Hi,
      I have EJB (in one application i.e in one .ear) and its client (in other application i.e in other ear) running on same JBoss server.

      For this scenarios I am using local call instead of remote calls.
      The client lookup is:
      EventRaiserBeanLocalHome eventRaiser = (EventRaiserBeanLocalHome) ctxt.lookup("java:comp/env/ejb/EventRaiserBean");

      my jboss-web.xml has:
      <ejb-ref>
      <ejb-ref-name>ejb/EventRaiserBean</ejb-ref-name>
      <jndi-name>ejb/orchestratorwithws/local/EventRaiserBean</jndi-name>
      </ejb-ref>

      and web.xml has:
      <ejb-ref id="resource-ref-6">
      <ejb-ref-name>ejb/EventRaiserBean</ejb-ref-name>
      <ejb-ref-type>Session</ejb-ref-type>
      com.j2fe.event.interfaces.EventRaiserBeanLocalHome
      com.j2fe.event.interfaces.EventRaiserBeanLocal
      </ejb-ref>


      But when the code executes I get java.lang.ClassCastException.

      java.lang.ClassCastException: $Proxy63 at fti.engine.transmitter.EJBTransmitter.sendMessage(EJBTransmitter.java:74) at.....


      My remote calls are working fine when both the applications are running on different JBoss installation.