How to fix java.io.InvalidClassException error when accessing Oracle ACM Case API via JDeveloper

Here is a quick and useful tip. This was an error I got when I was running a custom java client to query the Oracle Adaptive Case Management API.

executing runQueryCase for addtionalJPQLWhereClause: caseHeader.state = 'ACTIVE' and caseHeader.caseDefinitionName like '%%'
Exception thrown: failed to unmarshal class oracle.bpm.casemgmt.CaseList; nested exception is:
java.io.InvalidClassException: oracle.bpm.casemgmt.persistence.model.CaseStakeHolderMember; local class incompatible: stream classdesc serialVersionUID = 4454729826681704302, local class serialVersionUID = -349197598855774208; nested exception is: java.io.InvalidClassException: oracle.bpm.casemgmt.persistence.model.CaseStakeHolderMember; local class incompatible: stream classdesc serialVersionUID = 4454729826681704302, local class serialVersionUID = -349197598855774208
javax.ejb.EJBException: failed to unmarshal class oracle.bpm.casemgmt.CaseList; nested exception is:
java.io.InvalidClassException: oracle.bpm.casemgmt.persistence.model.CaseStakeHolderMember; local class incompatible: stream classdesc serialVersionUID = 4454729826681704302, local class serialVersionUID = -349197598855774208; nested exception is: java.io.InvalidClassException: oracle.bpm.casemgmt.persistence.model.CaseStakeHolderMember; local class incompatible: stream classdesc serialVersionUID = 4454729826681704302, local class serialVersionUID = -349197598855774208

From a sort-of related metalink on Oracle which says :

Although the problem couldn't be recreated by the development team on demand, from the exception is clear that the root cause of the problem is the differnce of the version of the org.eclipse.persistence jar distributed with Oracle JDeveloper and Oracle WLS.

I figured this was something to do with the version of eclipselink libraries currently running on the soa server were different from Jdeveloper install.

In my JDeveloper project, I had some libraries and classpath pointing to my JDeveloper install and some others pointing to my SOA middleware home install for example

C:Oracle_Middlewarejdevelopersoamodulesoracle.bpm.client_11.1.1oracle.bpm.bpm-services.client.jar

So I was able to resolve this by changing the library reference to the same as the SOA server (C:Oracle_MiddlewareOracle_SOA1) for example

C:Oracle_MiddlewareOracle_SOA1soamodulesoracle.bpm.client_11.1.1oracle.bpm.bpm-services.client.jar
Vikram
1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Pradeep Sashital

Very well explained, thanks