Return-Path: X-Original-To: apmail-openjpa-dev-archive@www.apache.org Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0EC9110204 for ; Fri, 5 Jul 2013 20:41:49 +0000 (UTC) Received: (qmail 4407 invoked by uid 500); 5 Jul 2013 20:41:49 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 4375 invoked by uid 500); 5 Jul 2013 20:41:48 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 4367 invoked by uid 99); 5 Jul 2013 20:41:48 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Jul 2013 20:41:48 +0000 Date: Fri, 5 Jul 2013 20:41:48 +0000 (UTC) From: "Serdyn du Toit (JIRA)" To: dev@openjpa.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (OPENJPA-2407) Errors using MySql Cluster not present using HSqlDb (build-time enhancement and executing query) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/OPENJPA-2407?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13701108#comment-13701108 ] Serdyn du Toit commented on OPENJPA-2407: ----------------------------------------- Using MySql Cluster - sorry, my bug subject just said MySql - fixed. > Can you confirm if the entity is or not enhance even you see the error message? Yes, its getting enhanced. The entity's class was 2KB before, 6KB after. >From what class is the following? if (_meta.isEmbeddedOnly() && _meta.getIdentityType() == ClassMetaData.ID_APPLICATION) { _log.error(_loc.get("ID-field-in-embeddable-unsupported", _meta.toString())); } > For the second problem: The following two lines seem to refer to MySql Cluster custom extensions. From the documentation you sent I see the set of allowed values, but it also says that these are "plugin strings". Online example: http://www.clusterdb.com/mysql-cluster/using-clusterjpa-part-of-mysql-cluster-connector-for-java-%E2%80%93-a-tutorial/ I'm not (not being an OpenJpa commiter) sure how these values get translated to classes that get called at runtime. Do you think that it can be these custom extensions causing the problem, and not OpenJpa? If yes, then I can always raise an issue with the MySql Cluster team. Still, there doesn't seem to be anything MySql Cluster-like in the stacktrace (their classes start with com.mysql). But on the other hand - the code does work 100% with HSqlDb (and without these extensions in persistence.xml)...... > Errors using MySql Cluster not present using HSqlDb (build-time enhancement and executing query) > ------------------------------------------------------------------------------------------------ > > Key: OPENJPA-2407 > URL: https://issues.apache.org/jira/browse/OPENJPA-2407 > Project: OpenJPA > Issue Type: Bug > Components: Enhance > Affects Versions: 2.2.2 > Environment: Windows 8 using MySql Cluster > Reporter: Serdyn du Toit > Attachments: sandbox-mysqlc4.zip > > > Hi, > I'm seeing some problems when my persistence.xml is populated with details for MySql Cluster - but when I work against HSqlDb everything is working great. > First issue during build-time enhancement: > I get the following even though I don't have any @Embeddables in my code > [openjpac] 407 testdb ERROR [main] openjpa.Enhance - The identity field defined in the code.shared.DataBean Embeddable is not supported. > > Someone else has also encountered this issue: http://stackoverflow.com/questions/16619860/openjpa-enhance-the-identity-field-defined-in-the-0-embeddable-is-not-suppo > Second issue at runtime: > During the second invocation of a method that should return everything from a table I get the following stacktrace: > 1797 testdb TRACE [main] openjpa.jdbc.JDBC - [1 ms] close > org.apache.openjpa.persistence.PersistenceException: null > at org.apache.openjpa.kernel.QueryImpl.compileForCompilation(QueryImpl.java:625) > at org.apache.openjpa.kernel.QueryImpl.compileForExecutor(QueryImpl.java:682) > at org.apache.openjpa.kernel.QueryImpl.getOperation(QueryImpl.java:1529) > at org.apache.openjpa.kernel.DelegatingQuery.getOperation(DelegatingQuery.java:124) > at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:280) > at org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:302) > at test.OpenJpaTest.findAll(OpenJpaTest.java:60) > at test.OpenJpaTest.findAllAndAssertSizeOfOne(OpenJpaTest.java:65) > at test.OpenJpaTest.test(OpenJpaTest.java:45) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > at java.lang.reflect.Method.invoke(Unknown Source) > at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) > at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) > at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) > at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) > at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) > at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68) > at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47) > at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) > at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) > at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) > at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) > at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) > at org.junit.runners.ParentRunner.run(ParentRunner.java:300) > at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) > at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) > Caused by: java.lang.NullPointerException > at org.apache.openjpa.kernel.ExpressionStoreQuery.newCompilation(ExpressionStoreQuery.java:154) > at org.apache.openjpa.kernel.QueryImpl.newCompilation(QueryImpl.java:672) > at org.apache.openjpa.kernel.QueryImpl.compilationFromCache(QueryImpl.java:654) > at org.apache.openjpa.kernel.QueryImpl.compileForCompilation(QueryImpl.java:620) > ... 31 more > My persistence.xml > > > > org.apache.openjpa.persistence.PersistenceProviderImpl > code.TestDataBean > code.shared.DataBean > code.shared.AbstractDataBean > > > > > > > > > > > > > > > > > -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira