1 Reply Latest reply on Jun 12, 2003 6:59 AM by vasset

    Problems looking up the bean...

    vasset Newbie

      I'm trying out JBoss 3.2.1 with a simple Hello SessionBean, but I get the following error when lookup the bean from my client:

      javax.naming.CommunicationException. Root exception is java.io.InvalidClassException: org.jboss.proxy.Interceptor; local class incompatible: stream classdesc serialVersionUID = 4358098404672505200, local class serialVersionUID = 8774269974037850782

      What does this mean?

      My client code:
      Hashtable env = new Hashtable();
      env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
      env.put(Context.PROVIDER_URL, "localhost:1099");
      env.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");

      try {
      // Get the Hello bean
      Context initial = new InitialContext(env);
      Object objref = initial.lookup("Hello");
      HelloHome home = (HelloHome) PortableRemoteObject.narrow(objref, HelloHome.class);
      Hello hello = home.create();

      // Lets try the magic
      System.out.println(hello.sayHello());
      hello.remove();