3 Replies Latest reply on Apr 22, 2003 5:42 PM by Joel Rives

    Embedded Tomcat vs. Remote Client Lookup Problem

    Joel Rives Newbie

      THe following is based on using jboss-3.2.0_tomcat-4.1.24:

      I am invoking the following code from within a servlet in the embedded Tomcat and it works just fine. However, when I try to invoke it from a remote client, I get the exception listed below the code fragment

      private static final String NAMING_FACTORY = "org.jnp.interfaces.NamingContextFactory";
      private static final String PROVIDER_URL = "jnp://localhost:1099";
      private static final String FACTORY_URL_PACKAGES = "org.jboss.naming:org.jnp.interfaces";

      public CourseService getCourseService()
      {
      CourseService service = null;
      try
      {
      Properties contextEnv = new Properties();
      contextEnv.put(Context.INITIAL_CONTEXT_FACTORY, NAMING_FACTORY);
      contextEnv.put(Context.PROVIDER_URL, PROVIDER_URL);
      contextEnv.put(Context.URL_PKG_PREFIXES, FACTORY_URL_PACKAGES);
      InitialContext context = new InitialContext(contextEnv);
      Object objRef = context.lookup(CourseServiceHome.JNDI_NAME);
      CourseServiceHome home = (CourseServiceHome) PortableRemoteObject.narrow(objRef, CourseServiceHome.class);
      service = home.create();
      }
      catch (Exception e)
      {
      e.printStackTrace();
      }
      return service;
      }



      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