You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by Tauqeer Ansari <ta...@gmail.com> on 2016/06/28 11:23:42 UTC

OpenJPA 2.2.3 Jar Issue

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

Re: OpenJPA 2.2.3 Jar Issue

Posted by Tauqeer Ansari <ta...@gmail.com>.
I will contact IBM but it seems that the problem is with JPA only because I
tried using OpenJPA 2.2.3 with WebSphere 8.0 (Old WebSphere) also but the
issue remains the same.

Does anyone has any idea why the issue is there or how can we solve this
issue?



--
View this message in context: http://openjpa.208410.n2.nabble.com/OpenJPA-2-2-3-Jar-Issue-tp7589267p7589274.html
Sent from the OpenJPA Developers mailing list archive at Nabble.com.

Re: OpenJPA 2.2.3 Jar Issue

Posted by Jody Grassel <fy...@gmail.com>.
Since you are executing in a WebSphere environment, I would encourage you
engage with your IBM support contact and open a PMR.  Please note that
manually replacing any of the jar files in the plugins directory is a
violation of the support agreement, so you will first be required to
restore the original jar that shipped with your WebSphere installation.