Bug #69814 Failure to issue queries (selects) multiple times using OpenJpa
Submitted: 22 Jul 2013 21:06 Modified: 4 Oct 2013 23:54
Reporter: Serdyn du Toit Email Updates:
Status: Closed Impact on me:
Category:MySQL Cluster: Cluster/J Severity:S1 (Critical)
Version:MySql Cluster 7.3.2 OS:Microsoft Windows (Windows 8)
Assigned to: Craig Russell
Tags: openjpa

[22 Jul 2013 21:06] Serdyn du Toit
NdbOpenJPAStoreManager no longer seems to be compatible with the latest OpenJpa.

Please see https://issues.apache.org/jira/browse/OPENJPA-2407 for details.  See the last attached file for a test illustrating the problem and a possible solution - to be reviewed by Oracle.

Also see a discussion surrounding the issue here (and preceding this post in the thread):

How to repeat:
Please see last attachment to the OpenJpa bug.

Suggested fix:
Please see NdbOpenJPAStoreManager override in the last attachment to the OpenJpa bug.  Or just review it in this post: http://lists.mysql.com/cluster/8580

The fix did not work when I had OpenJpa 1 on my classpath (and not the latest OpenJpa 2) as NdbOpenJPAStoreManager now references new classes incorporated into OpenJpa 2.

If you have familiarized yourself with the details - an alternative solution I guess is to just always return NdbOpenJPAStoreQuery irregardless of the "language".  Might be less efficient though, but will be backwards compatible :/
[23 Jul 2013 17:28] Sveta Smirnova
Thank you for the report.

File name should be sandbox-mysqlc08.zip?

I get following error when run ant:

 [openjpac] 73  testdb  INFO   [main] openjpa.Tool - Enhancer running on type "code.TestDataBean".
 [openjpac] java.lang.IllegalArgumentException: java.lang.ClassNotFoundException: code.TestDataBean
[23 Jul 2013 19:41] Serdyn du Toit
The latest file is: sandbox-mysqlc16.zip (the OpenJpa gui doesn't seem to order the files by date)

You can use either buildtime enhancement using the Ant file or runtime enhancement.  You might just need to specify the correct native library location (if you are an Eclipse user by modifying the .classpath file after importing the project as is into Eclipse)

The test case included in the project should succeed - as the project includes the custom NdbOpenJPAStoreManager which the classloader will automatically use in preference to the NdbOpenJPAStoreManager in the .jar files.

Let me know of anything blocking your progress and I'll see what I can do to help from this side.  Many thanks :)
[1 Oct 2013 18:55] Craig Russell
This issue has been resolved with revno: 4842 pushed to 7.1 branch Tue 2013-08-13 14:06:00 -0700.

Thanks for the report!