openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tauqeer Ansari <tauqeer78...@gmail.com>
Subject OpenJPA 2.2.3 Jar Issue
Date Tue, 28 Jun 2016 23:59:23 GMT
Hi Team,

We were using openjpa-2.1.2 (Came with WebSphere 8.0) with WebSphere 8.0,
IBM Java 6 and PAI 5.0 and it was working fine.

Now, We have upgraded to WebSphere 8.5, PAI 5.5, IBM Java 7. openjpa-2.2.3
came with WebSphere 8.5. So, we have changed openjpa used in code to 2.2.3
by copying it from the WebSphere plugins folder and also changed other
plugins that came with WebSphere with 8.5 by replacing with 8.0 (old).

When we try execute the below query, it is throwing exception and
transaction get rolled back.

Attached JPA file shows the combination with status and also error/warning
we are getting.

The query that we are trying to execute is as follow.

public VariantContainerVersionBE readVCVersionForVCMasterAndCVMVersion(UUID
cvmVersionPK, UUID vcMasterPK) {

String queryString = "SELECT vcVersion FROM " +
VariantContainerVersionBE.ENTITY_NAME + " vcVersion "

+ " JOIN vcVersion." + VariantContainerVersionBE.CVMVERSIONVCVERSIONS + "
AS cvmv2vcv "

+ " JOIN cvmv2vcv." + CVMVersionVCVersionBE.COMPONENTVARIANTMASTERVERSION +
" AS cvmVersions "

+ " WHERE vcVersion." + VariantContainerVersionBE.VARIANTCONTAINERMASTER +
"."

+ VariantContainerMasterBE.PRIMARYKEY + "=:vcMasterPK" + " AND
 cvmVersions."

+ ComponentVariantMasterVersionBE.PRIMARYKEY + "=:cvmVersionPK";

Query q = em.createQuery(queryString);

q.setParameter("cvmVersionPK", cvmVersionPK.toString());

q.setParameter("vcMasterPK", vcMasterPK.toString());

return (VariantContainerVersionBE) q.getResultList().get(0);

}

We are tying to execute same query two times in a same transaction with
same UUID's. It should work as it was working with openjpa-2.1.2.

Just for your reference, if we add em.flush() before
em.createQuery(queryString); then it works.

We are getting error only for the above query and it is working fine with
other jpa queries.

I have also attached complete stacktrace file.

I have seen that the issue was there before 2.1.2 and solved in 2.1.2 and
2.2.0.

OPENJPA-2107 <https://issues.apache.org/jira/browse/OPENJPA-2107>

Is it the case that the issue reentered by anychance?

Can you please verify and suggest some steps to solve this issue?

Thanks and Regards,

Tauqeer

+91 9699522589

Mime
View raw message