3 Replies Latest reply on Oct 24, 2005 9:44 AM by Markus Meisterernst

    javax.naming.CommunicationException

    anu katta Newbie

      Hi,
      I need help in fixing the following error in jboss4.0.0 and linux OS.
      javax.naming.CommunicationException [Root exception is java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
      java.io.InvalidClassException: org.jnp.interfaces.MarshalledValuePair; local class incompatible: stream classdesc serialVersionUID = -6485622724173581497, local class serialVersionUID = -3403843515711139134]
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:574)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:440)
      at javax.naming.InitialContext.lookup(InitialContext.java:347)
      at com.abcsinc.fwk.dbquery.DBQuerySBFactory.create(DBQuerySBFactory.java:42)
      at com.abcsinc.fwk.dbutils.TableUtil.openDataSet(TableUtil.java:58)
      at com.abcsinc.fwk.dbutils.ReorgTables.reorgTables(ReorgTables.java:51)
      at com.abcsinc.fwk.dbutils.ReorgTables.main(ReorgTables.java:394)
      Caused by: java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
      java.io.InvalidClassException: org.jnp.interfaces.MarshalledValuePair; local class incompatible: stream classdesc serialVersionUID = -6485622724173581497, local class serialVersionUID = -3403843515711139134
      at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:164)
      at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:456)
      ... 6 more
      Caused by: java.io.InvalidClassException: org.jnp.interfaces.MarshalledValuePair; local class incompatible: stream classdesc serialVersionUID = -6485622724173581497, local class serialVersionUID = -3403843515711139134
      at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:463)
      at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1521)
      at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1626)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
      at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:297)
      at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:146)
      ... 8 more
      ----
      I am sorry if it is not the correct place to post. Please suggest me where can I get help on this.
      Thank you.
      --Anu.

        • 1. Re: javax.naming.CommunicationException
          Dimitris Andreadis Master

          Your client and server libraries are probably different version. Check your client classpath.

          • 2. Re: javax.naming.CommunicationException
            anu katta Newbie

            Hi,
            I am actually running my program on the same machine. which has java 1.4.2_03 version.
            I started the jboss 4.0 through command line and in another command line I've tried to run my program, then I am getting the above error. And I checked with classspath also but couldn't really find anything critical in there.
            So what might be the cause for this error and how can I fix that.

            FYI: I am using redhat linux 9.0, java 1.4.2 and jboss 4.0.0
            and also it runs fine with jboss3.0.2 on the same machine.

            Any help is appreciated..
            Thank you.
            --Anu.

            • 3. Re: javax.naming.CommunicationException
              Markus Meisterernst Newbie

              Hi,

              make sure you supplied the correct host:port vlaue pairs to access the JNDI service using twiddle. Especially if you defined --host in run.conf to bind the jboss instance to a particular network address, you have to use that one.

              Example:
              ./twiddle.sh -s localhost:1099 get 'jboss.web:host=localhost,path=/jmx-console,type=Manager'

              might be different from:

              ./twiddle.sh -s jboss1:1099 get 'jboss.web:host=localhost,path=/jmx-console,type=Manager'