1 Reply Latest reply on Oct 2, 2006 2:45 PM by alrubinger

    Embedded EJB3 Proxy and EJB3-RC9 server

    dhartford

      Hi all,
      I'm trying to use the embedded EJB3 jars in an application that will require both local/embed server access as well as remote server access.

      Using Embed RC9-Alpha and a 4.0.4.GA patched jbossas with EJB3-RC9 I keep getting the following error on the client side when trying to communicate with the server:

      javax.naming.CommunicationException [Root exception is java.io.InvalidClassException: org.jboss.ejb3.stateless.StatelessLocalProxy; local class incompatible: stream classdesc serialVersionUID = -3241008127518089831, local class serialVersionUID = -3824844512835539077]
      



      Using the following contexts for testing:

       private static Hashtable getLocalContextProperties()
       {
       Hashtable props = new Hashtable();
       props.put("java.naming.factory.initial", "org.jnp.interfaces.LocalOnlyContextFactory");
       props.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
       return props;
       }
      
       private static Hashtable getRemoteContextProperties(){
       Hashtable env = new Hashtable();
       env.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
       env.put("java.naming.provider.url", "my.remote.server:1099");
       env.put("java.naming.factory.url.pkgs", "org.jnp.interfaces");
       return env;
      
       }
      


      If I use embed, is there something special I need to do to also use remote ejb3?

        • 1. Re: Embedded EJB3 Proxy and EJB3-RC9 server
          alrubinger

          Came across this last week after upgrading to RC9; I wasn't careful to ensure that my client libs for EJB3 were identical to those used by the server.

          In my case:

          The serializable proxy currently isn't specifying a serialVersionUID, and mixing-n-matching versions of the EJB3 JARs led to the error. This is documented in http://jira.jboss.com/jira/browse/EJBTHREE-402.

          Try checking that your EJB3 JARs on your client's classpath are the same as being used by the deployer on the server?

          S,
          ALR