6 Replies Latest reply on Feb 9, 2004 4:40 AM by harsh_pandit

    error:javax.naming.CommunicationException

    harsh_pandit

      the following error found to run client program


      error: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]

      my program is
      import javax.naming.Context;
      import javax.naming.InitialContext;
      import javax.rmi.PortableRemoteObject;
      import java.util.Properties;

      public class ConverterClient throws NamingException

      {
      public static void main(String args[])
      {
      try
      {

      Properties props = new Properties();
      props.put (Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");

      props.put(Context.PROVIDER_URL,"127.0.0.1:1099");

      props.put (Context.URL_PKG_PREFIXES,"org.jboss.naming:org.jnp.interfaces");

      System.out.println("got properties");

      Context initial=new InitialContext(props);

      System.out.println("got Context");

      /*****FROM THIS LINE ABOVE ERROR EXCUTED*/

      ConverterHome home=(ConverterHome)initial.lookup("Converterfirstejb");

      System.out.println("Home Interface Got.");

      Converter currencyConverter=home.create();

      System.out.println("Remote Interface Got.");

      double amount=currencyConverter.dollartoyen(100);

      System.out.println(amount);
      }
      catch( Exception e)
      {
      System.out.println("error:"+e );
      }
      }
      }

      Please help me urgently.becoz this is my live project in j2ee
      thanks