-
1. Re: Incompatible local class org.jboss.remoting.InvokerLocat
tonylmai Apr 4, 2007 2:53 PM (in response to tonylmai)I'd like to clarify that this client app threw the exception while looking up an EJB remote.
I have another tester that uses pure JMS and this client had problem starting up and publishing messages to the JBoss server.
Thanks -
2. Re: Incompatible local class org.jboss.remoting.InvokerLocat
clebert.suconic Apr 4, 2007 3:05 PM (in response to tonylmai)You must have some classPath problem.
You probably have an older version of JBossRemoting in your client classpath somehow. -
3. Re: Incompatible local class org.jboss.remoting.InvokerLocat
tonylmai Apr 4, 2007 3:42 PM (in response to tonylmai)It did sound suspicious. Yet my client referenced only 3 jar files two of which are JBoss's (jboss-j2ee.jar and jboss-messaging-client.jar). jboss-j2ee.jar is picked it up from jboss.home\client while jboss-messaging-client.jar is from jboss-messaging-1.2.0.sp1 installed directory. The 3rd jar is my application which includes the EJB beans. I opened this jar and it had no JBoss's classes in it.
On the hand, I ran the jboss-messaging-1.2.0.sp1\example\stateless which did a sessionbean lookup and that ran successfully.
Any idea?
Thanks -
4. Re: Incompatible local class org.jboss.remoting.InvokerLocat
tonylmai Apr 4, 2007 3:47 PM (in response to tonylmai)I must have gone mad. I mistyped the second posting.
My JMS client had NO problem publishing to the server. It's EJB client that HAD problem looking up an EJB remote.I have another tester that uses pure JMS and this client had problem starting up and publishing messages to the JBoss server.
-
5. Re: Incompatible local class org.jboss.remoting.InvokerLocat
clebert.suconic Apr 4, 2007 3:57 PM (in response to tonylmai)Are you using UnifiedInvoker in your EJB?
-
6. Re: Incompatible local class org.jboss.remoting.InvokerLocat
tonylmai Apr 4, 2007 4:07 PM (in response to tonylmai)How would I find out which Invoker I used? I took the default that came with JBoss 4.0.5GA. My EJBs does not declare any Invoker and so do my ejb config files.
I searched JBoss's output and found the following:
12:54:19,531 INFO [SocketServerInvoker] Invoker started for locator: InvokerLocator [socket://192.168.1.101:3873/]
12:54:45,562 INFO [TomcatDeployer] deploy, ctxPath=/invoker, warUrl=.../deploy/http-invoker.sar/invoker.war/
12:55:07,625 WARN [BisocketClientInvoker] Unable to send ping: shutting down PingTimerTask
Do those mean anything to you?
Thanks -
7. Re: Incompatible local class org.jboss.remoting.InvokerLocat
clebert.suconic Apr 4, 2007 4:12 PM (in response to tonylmai)By default you have JRMP.. you would have to change standardjboss.xml to change the invoker used.
Don't you have the regular jboss-all-client.jar in your client-classpath for that EJB?
If you have jboss-messaging-client.jar as the first one on the list of your classPath you will probably have this working. -
8. Re: Incompatible local class org.jboss.remoting.InvokerLocat
tonylmai Apr 4, 2007 4:30 PM (in response to tonylmai)I found a posting on this board not to use jboss-all-client.jar so I removed it from my computer totally. My client only used those 3 jars I mentioned.
Here is the client output. Notice the fourth jar in the list is for the client itself.D:\dev\exchange\bin>java -classpath ..\\build\jar\exchange.jar;D:\JBoss\jboss-4.0.5.GA\client\jboss-j2ee.jar;..\\lib\jboss-messaging-client.jar;..\\lib\judots-common.jar com.judots.exchange.client.commandline.ExchCommandlineClient
Unable to connect to remote server. Exception:Unable to lookup Exchange's Maintenance Server. Please shutdown application and try again.
com.judots.exchange.api.config.ServiceLocatorException: Unable to lookup Exchange's Maintenance Server. Please shutdown application and try again.
at com.judots.exchange.api.config.admin.ExchangeAdminServiceLocator.open(ExchangeAdminServiceLocator.java:26)
at com.judots.exchange.client.commandline.ExchAppController.init(ExchAppController.java:54)
at com.judots.exchange.client.commandline.ExchCommandlineClient.run(ExchCommandlineClient.java:89)
at com.judots.exchange.client.commandline.ExchCommandlineClient.main(ExchCommandlineClient.java:137)
Caused by: javax.naming.CommunicationException [Root exception is java.io.InvalidClassException: org.jboss.remoting.InvokerLocator; local class incompatible: stream classdesc serialVersionUID = -2909329895029296248, local class serialVersio
nUID = -4977622166779282521]
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:723)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:588)
at javax.naming.InitialContext.lookup(Unknown Source)
at com.judots.exchange.api.config.admin.ExchangeAdminServiceLocator.open(ExchangeAdminServiceLocator.java:24)
... 3 more
Caused by: java.io.InvalidClassException: org.jboss.remoting.InvokerLocator; local class incompatible: stream classdesc serialVersionUID = -2909329895029296248, local class serialVersionUID = -4977622166779282521
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.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.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:72)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:653)
... 6 more
D:\dev\exchange\bin>
I agree that it is highly an err on my client's end. I just can't figure out where it could be.
Thanks -
9. Re: Incompatible local class org.jboss.remoting.InvokerLocat
tonylmai Apr 4, 2007 4:46 PM (in response to tonylmai)I looked at all the jar files relating to jboss.remoting on the server.
I found one jboss-remoting.jar resided in the server\messaging\lib (595KB, dated today probably because I'd just reinstalled JBoss + JBoss Messaging)
I also found another copy of jboss-remoting.jar in server\messaging\deploy\jboss-messaging.sar (848KB, dated 03/28/2007).
Are they supposed to be where they are? And why are they different in sizes? -
10. Re: Incompatible local class org.jboss.remoting.InvokerLocat
clebert.suconic Apr 4, 2007 4:49 PM (in response to tonylmai)If you have a small example replicating your problem I could try it here.
I could of course construct one based in your description, but if you already have it, it would save me some time. -
11. Re: Incompatible local class org.jboss.remoting.InvokerLocat
clebert.suconic Apr 4, 2007 4:54 PM (in response to tonylmai)We are using jboss-remoting 2.0, that has several features needed for messaging, while other components are not compatible with jboss-remoting 2.0 (aka webServices).
You could try replacing that jboss-remoting.jar by the one sent by jboss-messaging.sar. Maybe that will fix the problem for you, but we can't standardize the version yet on jboss 4.0 (we are doing it on 4.2 and 5) -
12. Re: Incompatible local class org.jboss.remoting.InvokerLocat
tonylmai Apr 4, 2007 7:04 PM (in response to tonylmai)From the exception thrown:
local class incompatible: stream classdesc serialVersionUID = -2909329895029296248, local class serialVersionUID = -4977622166779282521
server version = -2909329895029296248 == Long.valueOf(0xd79ffbdff05ab388L);
local version = -4977622166779282521 == Long.valueOf(0xbaebef030b02bba7L);
By looking at the code,public class InvokerLocator { ... static { if(Version.getDefaultVersion() == 1) serialVersionUID = 0xd79ffbdff05ab388L; <--- server version else serialVersionUID = 0xbaebef030b02bba7L; <--- local version } }
So version from server is set to 1. Why?public class Version { ... public static int getDefaultVersion() { return defaultByteVersion; } ... defaultByteVersion = 22; <----- default boolean precompatibleFlag = false; String precompatible = System.getProperty("jboss.remoting.pre_2_0_compatible"); if(precompatible != null && precompatible.length() > 0) precompatibleFlag = Boolean.valueOf(precompatible).booleanValue(); if(precompatibleFlag) { defaultByteVersion = 1; <----- set to 1 performVersioning = false; } else { String userDefinedVersion = System.getProperty("jboss.remoting.version"); if(userDefinedVersion != null && userDefinedVersion.length() > 0) { byte userByteVersion = (new Byte(userDefinedVersion)).byteValue(); <-- could be 1 .... }
So either the server is running with jboss.remoting.pre_2_0_compatible flagged to true or jboss.remoting.version is set to 1.
Does that sound right?
Yet I couldn't find any reference to either one of them in the server's scripts.
Any idea? -
13. Re: Incompatible local class org.jboss.remoting.InvokerLocat
tonylmai Apr 4, 2007 7:28 PM (in response to tonylmai)Based on that finding, I hardwired the following system property -Djboss.remoting.version=2 and now my client is connecting alright.
Don't know if that would cause any consequences. We'll see.
Thanks -
14. Re: Incompatible local class org.jboss.remoting.InvokerLocat
tonylmai Apr 5, 2007 9:26 PM (in response to tonylmai)Just an update on the "consequences".
The version seemed to depend on which component in JBoss got invoked first. Too unpredictable to hardwired the version like I mentioned before.
I am using a tester to "prime" the server with EJB component first. It worked for now.