1 Reply Latest reply on Jun 25, 2006 8:50 AM by Bill Burke

    problem with ejb3

    hadi mougy Newbie

      i've been tring over 2 weeks to apply the example in chapter 4 (TravelAgent)
      in jbossIDE but every time i got the same exception i set the classpath for the client as it is in the build.xml


      here is my client:
      package com.client;

      import java.util.Properties;

      import javax.naming.Context;
      import javax.naming.InitialContext;
      import javax.naming.NamingException;

      import com.hadi.TravelAgent;

      public class Client {
      public static void main(String args[]) throws NamingException{

      Properties p = new Properties();
      p.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
      p.put(Context.PROVIDER_URL, "localhost:1099");
      p.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");


      InitialContext ctx = new InitialContext();
      Calc calc = (Calc) ctx.lookup("TravelAgentBean/remote");

      //the rest of the code
      }


      }




      and here te exception:



      Exception in thread "main" javax.naming.CommunicationException [Root exception is java.io.InvalidClassException: org.jboss.ejb3.remoting.IsLocalInterceptor; local class incompatible: stream classdesc serialVersionUID = 595045557897063404, local class serialVersionUID = -3758782076801249473]
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:722)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
      at javax.naming.InitialContext.lookup(Unknown Source)
      at com.client.Client.main(Client.java:21)
      Caused by: java.io.InvalidClassException: org.jboss.ejb3.remoting.IsLocalInterceptor; local class incompatible: stream classdesc serialVersionUID = 595045557897063404, local class serialVersionUID = -3758782076801249473
      at java.io.ObjectStreamClass.initNonProxy(Unknown Source)
      at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
      at java.io.ObjectInputStream.readClassDesc(Unknown Source)
      at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
      at java.io.ObjectInputStream.readObject0(Unknown Source)
      at java.io.ObjectInputStream.readArray(Unknown Source)
      at java.io.ObjectInputStream.readObject0(Unknown Source)
      at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
      at java.io.ObjectInputStream.readSerialData(Unknown Source)
      at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
      at java.io.ObjectInputStream.readObject0(Unknown Source)
      at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
      at java.io.ObjectInputStream.readSerialData(Unknown Source)
      at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
      at java.io.ObjectInputStream.readObject0(Unknown Source)
      at java.io.ObjectInputStream.readObject(Unknown Source)
      at java.rmi.MarshalledObject.get(Unknown Source)
      at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:72)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:652)
      ... 3 more



      please need help