1 Reply Latest reply on Sep 11, 2004 5:58 AM by Darran Lofthouse

    JNDI ERROR (3.2.5)

    rtiwari Newbie


      Trying to call session bean, and getting the error. Here is the snippets of my program which I am using . This is working in 3.0.8, but not in 3.2.5.

      static public InitialContext getInitialContext() throws Exception
      {

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

      InitialContext ic = new InitialContext(p);

      return ic;
      }
      public static void main(String [] args)
      {
      try
      {
      Context jndiContext = getInitialContext();
      //System.out.println("Got inital Contaxt" );
      Object ref = jndiContext.lookup("ContactManagementHomeRemote");

      System.out.println ("Got the reference");
      ContactManagementHomeRemote home = (ContactManagementHomeRemote)
      PortableRemoteObject.narrow(ref,ContactManagementHomeRemote.class);

      ..... }

      Error which I am getting are :

      [java] 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]
      [java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:629)
      [java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:472)
      [java] at javax.naming.InitialContext.lookup(InitialContext.java:347)
      [java] at com.nuvox.sfa.clients.Client_3.main(Client_3.java:37)
      [java] Caused by: java.io.InvalidClassException: org.jboss.proxy.ejb.GenericEJBInterceptor; local class incompatible: stream classdesc serialVersionUID = 3844706474734439975, local class serialVersionUID = 4582256576523491346
      [java] at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:463)
      [java] at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1521)
      [java] at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435)
      [java] at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1521)
      [java] at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435)
      [java] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1626)
      [java] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
      [java] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
      [java] at org.jboss.proxy.ClientContainer.readExternal(ClientContainer.java:104)
      [java] at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1686)
      [java] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1644)
      [java] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
      [java] at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
      [java] at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
      [java] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
      [java] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
      [java] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
      [java] at java.rmi.MarshalledObject.get(MarshalledObject.java:135)
      [java] at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:30)
      [java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:515)