1 Reply Latest reply on Oct 10, 2003 3:45 AM by g-child

    trouble invoking remote session bean - javax.naming.Communic

    g-child Newbie

      I'm trying to invoke a stateless session bean and I keep getting next exception:

      javax.naming.CommunicationException [Root exception is java.io.InvalidClassException: org.jboss.proxy.ejb.GenericEJBInterceptor; local class incompatible: stream classdesc serialVersionUID = 3844706474734439975, local class serialVersionUID = 4582256576523491346]

      The code is:

      package org.compiere.apps;

      import oria.ekatalog.interfaces.*;
      import org.dom4j.Document;
      import org.jboss.proxy.ejb.*;
      import org.jnp.interfaces.*;
      import org.jboss.naming.*;

      import javax.naming.*;
      import javax.rmi.PortableRemoteObject;
      import java.util.Properties;


      public class EkatalogSynch {

      private EkSHome ekatSesHome = null;
      private EkS ekatSes = null;
      private String err = "";
      private UserData uData = new UserData("bora", "bora32");

      public EkatalogSynch() { }
      private void init() {
      ItemLocal item = null;
      Properties env = new Properties();
      env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
      env.put(Context.PROVIDER_URL, "10.0.2.31:1099");
      env.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");

      try {
      Context context = new InitialContext(env);
      Object ref = context.lookup("/ejb/oria/ekatalog/EkS");
      ekatSesHome = (EkSHome) PortableRemoteObject.narrow(ref, EkSHome.class);
      ekatSes = ekatSesHome.create();
      }
      catch(Exception e) {System.out.println(e);}
      }

      public void Synchronize(ItemData iData, UserData uData) {
      init();
      try {
      ekatSes.setItemData (iData, uData);
      }
      catch (Exception e){System.out.println(e);}
      }
      }

      Does anybody know what is causing the problem? I am asking for as detailed answer as possible, since I am not very expirienced.

      P.S.: When I run similar (almost identical code) from the Jbuilder everything works just fine.