aspose file tools*
The moose likes JBoss/WildFly and the fly likes JBoss client/EJB local class incompatible Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "JBoss client/EJB local class incompatible" Watch "JBoss client/EJB local class incompatible" New topic
Author

JBoss client/EJB local class incompatible

Alessandro Ilardo
Ranch Hand

Joined: Dec 23, 2005
Posts: 218
Hi there, from an application client I get this error

javax.naming.CommunicationException [Root exception is java.io.InvalidClassException: org.jboss.ejb3.remoting.BaseRemoteProxy; local class incompatible: stream classdesc serialVersionUID = 1126421850898582900, local class serialVersionUID = -2711693270411201590]
4984 [main] FATAL eu.virtualLab.util.dataMigrator.remote.dao.EjbFactory - eu.virtualLab.util.dataMigrator.remote.dao.EjbFactoryException: javax.naming.CommunicationException [Root exception is java.io.InvalidClassException: org.jboss.ejb3.remoting.BaseRemoteProxy; local class incompatible: stream classdesc serialVersionUID = 1126421850898582900, local class serialVersionUID = -2711693270411201590]
4984 [main] FATAL eu.virtualLab.util.dataMigrator.Workflow - eu.virtualLab.util.dataMigrator.remote.dao.EjbFactoryException: eu.virtualLab.util.dataMigrator.remote.dao.EjbFactoryException: javax.naming.CommunicationException [Root exception is java.io.InvalidClassException: org.jboss.ejb3.remoting.BaseRemoteProxy; local class incompatible: stream classdesc serialVersionUID = 1126421850898582900, local class serialVersionUID = -2711693270411201590]


After a search on the net I discovered that this error could means that I've got different classes between my classpath's client and the ear deployed.
This is not my case, they're the same, because I extract the jar from the ear and copied into the classpath's client.
However, I don't understand where those serialVersionUID come from. I've no entities on my jar with that number. They've completely different numbers, declared as static final.
Could it be the remote interface? If so, what would be the best approach?


trying to decode a woman mind....
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10263
    
168

Are you including any JBoss related jar files in your client's classpath? You have to ensure that these JBoss jar files are the same jars which are present on the server on which this EJB is deployed. I usually "copy" the jbossall-client.jar file, from %JBOSS_HOME%\client folder, to the client's classpath.
[ May 28, 2008: Message edited by: Jaikiran Pai ]

[My Blog] [JavaRanch Journal]
Alessandro Ilardo
Ranch Hand

Joined: Dec 23, 2005
Posts: 218
You're right.
I accidentally set the client libraries for JBoss 4.2.2 (production) while on my laptop I'm using the previuos version.

Thanks a lot.
Bye
Ifteqar Ald
Ranch Hand

Joined: Dec 26, 2011
Posts: 73
Hi I am also having the Same ERROR My client Jboss Version is Jboss 5.1.0 GA and Remote Jboss Version is JBoss EAP 4.3. Please help Urgent. Which Jars i need to Copy.
 
Consider Paul's rocket mass heater.
 
subject: JBoss client/EJB local class incompatible