1 Reply Latest reply on Dec 3, 2005 4:57 PM by Scott Stark

    Local EJB Lookup

    arvind p Newbie

      Hi EveryOne,

      When I'm trying to look up the Local EJB through a Servlet and I'm getting the java.lang.ClassCastException.

      Here is my Client Code

      try {
       Context context = new InitialContext();
       Object object = context.lookup("LoginSLHome");
       logger.info("Object ::: "+object.getClass().getName());
       LoginSLHome home = (LoginSLHome) object;
      } catch (Exception exception) {
       logger.error("Exception while locating Home Object: ");

      Output of the above logger statement is
      Object ::: $Proxy128

      In jboss.xml


      In ejb-jar.xml

      I have made changes to the followinf files in Jboss i.e.

      1) default/conf/jboss-service.xml, changed to true for the following CallByValue (JNDI Configuration)
      2) default/deploy/ear-deployer.xml, changed to true for the following CallByValue
      3) Edit deploy\jbossweb-tomcat55.sar\META-INF\jboss-service.xml , and changed Java2ClassLoadingCompilance and UseJbossWebLoader attributes as true

      Please help me to solve this problem.

      Thanks and Regards