6 Replies Latest reply on Sep 4, 2003 6:28 PM by stephen

    Usage of RMIConnector!

    stephen Newbie

      I am using the RMIConnector to retrieve a static Object in my mbean. This static object itself contain some static fields. Whenever i try to invoke the method to return the object i get the following errors.

      Whereas, if i try to return an object which doesn't contain static object in itself. it's works fine.

      Could someone show me, if i have done it wrong!

      Thanks

      java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
      java.io.InvalidClassException: my.com.shinyang.eply.context.AbstractContextManager; local class incompatible: stream classdesc serialVersionUID = -5693566174795313008, local class serialVersionUID = -5598626853284665873
      at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:164)
      at org.jboss.jmx.adaptor.rmi.RMIAdaptorImpl_Stub.invoke(Unknown Source)
      at org.jboss.jmx.connector.rmi.RMIConnectorImpl.invoke(RMIConnectorImpl.java:459)
      at my.com.shinyang.eply.test.MBeanTest.getContext(MBeanTest.java:137)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at junit.framework.TestCase.runTest(TestCase.java:154)
      at junit.framework.TestCase.runBare(TestCase.java:127)
      at junit.framework.TestResult$1.protect(TestResult.java:106)
      at junit.framework.TestResult.runProtected(TestResult.java:124)
      at junit.framework.TestResult.run(TestResult.java:109)
      at junit.framework.TestCase.run(TestCase.java:118)
      at junit.framework.TestSuite.runTest(TestSuite.java:208)
      at junit.framework.TestSuite.run(TestSuite.java:203)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:392)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:276)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:167)
      Caused by: java.io.InvalidClassException: my.com.shinyang.eply.context.AbstractContextManager; local class incompatible: stream classdesc serialVersionUID = -5693566174795313008, local class serialVersionUID = -5598626853284665873
      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.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)object is null

      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)
      ... 18 more