10 Replies Latest reply on Jan 7, 2009 11:51 AM by Brendan Farragher

    ClassCastException from PortableRemoteObject.narrow in JBoss

    Enrique Ferreyra Newbie


      Im trying to make work the JBoos IDE Tutorial (FiboBean), i acomplish several things like put to work a JBoss AS in e250 Sun server with Solaris 8, i use eclipse with JBoss plugins in my PC (W2000) i can debug from my eclipse the EJB in the appserver, etc.

      My problem is i get a ClassCastException in this code:
      Context ctx = new InitialContext();
      Object ref = ctx.lookup("java:comp/env/ejb/Fibo");
      home = (FiboHome) PortableRemoteObject.narrow(ref, FiboHome.class);

      I dont know where to find this problem (im begginer with Java too) ...
      JBoss AS 4.0.3RC1
      Eclipse 3.1.0 Build id: I20050627-1435
      JBossIDE 1.5M2 (mixed with old 1.4.1 features)

      Thanks for any help.
      Enrique Ferreyra