3 Replies Latest reply on Mar 18, 2005 4:53 AM by Mohankumar G

    javax.naming.CommunicationException

    Claudio Newbie


      Hi everybody, I have written a simple Session Bean and i have some
      trouble.
      When I try contact it from a standalone client a have this error report:
      Can anyone help me ? e-mail kaioh83@icqmail.com

      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]
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:574)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:440)
      at javax.naming.InitialContext.lookup(Unknown Source)
      at Client.main(Client.java:26)
      Caused by: java.io.InvalidClassException: org.jboss.proxy.ejb.GenericEJBInterceptor; local class incompatible: stream classdesc serialVersionUID = 3844706474734439975, local class serialVersionUID = 4582256576523491346
      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.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.readObject(Unknown Source)
      at org.jboss.proxy.ClientContainer.readExternal(ClientContainer.java:104)
      at java.io.ObjectInputStream.readExternalData(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:30)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:460)
      ... 3 more

      Client:

      h.put(Context.PROVIDER_URL, "jnp://140.105.63.22:1099");
      //"java.naming.provider.url"
      h.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
      //"java.naming.factory.initial"
      h.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
      //"java.naming.factory.url.pkgs" "org.jboss.naming:org.jnp.interfaces"
      System.out.println("Parametri= " + h);

      InitialContext jndi = new InitialContext(h);
      System.out.println("2. Retrieve the lookup");

      Object prova=jndi.lookup("DemoBean");

      //////ERROR ON LOOKUP!!!!