[jira] Created: (OPENJPA-186) Build failure of OpenJPA sources from trunk
Build failure of OpenJPA sources from trunk --- Key: OPENJPA-186 URL: https://issues.apache.org/jira/browse/OPENJPA-186 Project: OpenJPA Issue Type: Bug Components: build / infrastructure Affects Versions: 0.9.7 Reporter: Jacek Laskowski (I have sent it to the mailing list on March 26th, but it didn't get through) As I'm not alone with the build failure, see http://www.nabble.com/error-building-openjpa-tf3478705.html, here goes the issue report. I've been trying to build OpenJPA source from trunk for a couple of days and no joy so far. Anything missing? [EMAIL PROTECTED] /cygdrive/c/oss/openjpa $ svn up At revision 522565. [EMAIL PROTECTED] /cygdrive/c/oss/openjpa $ svn status [EMAIL PROTECTED] /cygdrive/c/oss/openjpa $ mvn clean install [INFO] Executing tasks [echo] Revision: 406193:522097 [INFO] Executed tasks [INFO] [antrun:run {execution: delete sun.misc.Perf}] [INFO] Executing tasks [INFO] Executed tasks [INFO] [resources:testResources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:testCompile] [INFO] Compiling 33 source files to c:\oss\openjpa\openjpa-lib\target\test-classes [INFO] [surefire:test] [INFO] Surefire report directory: c:\oss\openjpa\openjpa-lib\target\surefire-reports [INFO] Building jar: c:\DOCUME~1\JLASKO~1\LOCALS~1\Temp\surefirebooter30238.jar java.lang.NoClassDefFoundError: org/apache/maven/surefire/booter/SurefireBooter Exception in thread "main" [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] There are test failures. [INFO] [INFO] For more information, run Maven with the -e switch [INFO] [INFO] Total time: 16 seconds [INFO] Finished at: Mon Mar 26 19:16:09 CEST 2007 [INFO] Final Memory: 21M/254M [INFO] [EMAIL PROTECTED] /cygdrive/c/oss/openjpa $ mvn -v Maven version: 2.0.5 [EMAIL PROTECTED] /cygdrive/c/oss/openjpa $ java -version java version "1.5.0_11" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03) Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Created: (OPENJPA-187) MEMBER OF query fails on OpenJPA, but works fine with TopLink and Hibernate EM
MEMBER OF query fails on OpenJPA, but works fine with TopLink and Hibernate EM -- Key: OPENJPA-187 URL: https://issues.apache.org/jira/browse/OPENJPA-187 Project: OpenJPA Issue Type: Bug Components: query Affects Versions: 0.9.7 Reporter: Jacek Laskowski What's wrong with the following query? Query query = em.createQuery("SELECT DISTINCT o FROM Osoba o WHERE :projekt MEMBER OF o.projekty"); query.setParameter("projekt", new Projekt("Apache OpenEJB", RodzajProjektu.OTWARTY)); List osoby = query.getResultList(); assert osoby.size() == 1 : "Otrzymano " + osoby.size(); where Projekt is an entity where @Id is of type String (the first input parameter in the two-param constructor above). TopLink 2.0 BUILD 40 and Hibernate EntityManager 3.3.0.GA work fine whereas OpenJPA 0.9.7-SNAPSHOT finishes with the java.lang.AssertionError error (it's the test itself actually, but since the query returns 0 elements the issue originates in OpenJPA). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Created: (OPENJPA-188) Positional parameters (in)order within query and query.setParameter (in)order
Positional parameters (in)order within query and query.setParameter (in)order - Key: OPENJPA-188 URL: https://issues.apache.org/jira/browse/OPENJPA-188 Project: OpenJPA Issue Type: Bug Components: query Affects Versions: 0.9.7 Reporter: Jacek Laskowski According to the JPA 1.0 spec - 4.6.4.1 Positional Parameters - p. 90: Note that the same parameter can be used more than once in the query string and that the ordering of the use of parameters within the query string need not conform to the order of the positional parameters. So, keeping it in mind, I can't explain why the following fails: Query query = em.createQuery("SELECT DISTINCT o FROM Osoba o, IN(o.projekty) p WHERE o.imie LIKE ?2 AND p.rodzajProjektu = ?1"); query.setParameter(1, RodzajProjektu.OTWARTY); query.setParameter(2, "J%"); with the following error: --- Test set: pl.jaceklaskowski.jpa.chapter4_6.ConditionalExpressionsTest --- Tests run: 3, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 4.203 sec <<< FAILURE! testPositionalParameters(pl.jaceklaskowski.jpa.chapter4_6.ConditionalExpressionsTest) Time elapsed: 0.125 sec <<< FAILURE! <4|false|0.9.7-incubating-SNAPSHOT> org.apache.openjpa.persistence.ArgumentException: The parameter "1" is of type "java.lang.String", but the declaration in the query is for type "pl.jaceklaskowski.jpa.entity.RodzajProjektu". at org.apache.openjpa.persistence.QueryImpl.validateParameter(QueryImpl.java:257) at org.apache.openjpa.persistence.QueryImpl.validateParameters(QueryImpl.java:237) at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:218) at org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:264) at pl.jaceklaskowski.jpa.chapter4_6.ConditionalExpressionsTest.testPositionalParameters(ConditionalExpressionsTest.java:115) I have tested it out against Hibernate EntityManager 3.3.0.GA and TopLink Essentials 2.0 BUILD 40 and I don't see the trouble there. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Created: (OPENJPA-189) EXISTS conditional operator and subquery don't return values, but they do exist
EXISTS conditional operator and subquery don't return values, but they do exist --- Key: OPENJPA-189 URL: https://issues.apache.org/jira/browse/OPENJPA-189 Project: OpenJPA Issue Type: Bug Components: query Affects Versions: 0.9.7 Reporter: Jacek Laskowski The test says it all. When the line where the condition is checked is removed the test fails with Apache OpenJPA 0.9.7-SNAPSHOT. public void testExists() { Query query = em.createQuery("SELECT DISTINCT p FROM Projekt p WHERE EXISTS (SELECT zaleznosc FROM Projekt zaleznosc WHERE zaleznosc MEMBER OF p.zaleznosci AND zaleznosc.rodzajProjektu = pl.jaceklaskowski.jpa.entity.RodzajProjektu.OTWARTY)"); // Apache OpenJPA 0.9.7-SNAPSHOT workaround so the test passes // TopLink Essentials 2.0 BUILD 40 i Hibernate EntityManager 3.3.0.GA work fine if (!em.getClass().getCanonicalName().equals("org.apache.openjpa.persistence.EntityManagerImpl")) { List projekty = query.getResultList(); assert projekty.size() == 1 : projekty.size() + " projects received"; assert projekty.get(0).getNazwa().equals("Apache Geronimo") : "Should be 'Apache Geronimo', but was " + projekty.get(0).getNazwa(); } } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-186) Build failure of OpenJPA sources from trunk
[ https://issues.apache.org/jira/browse/OPENJPA-186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12484823 ] Jacek Laskowski commented on OPENJPA-186: - What?! Please appologize my lack of understanding, but comments like this "Try building another maven project and see if the same problem occurs. I recommend re-installing maven." doesn't apply in this scenario. I'm building Apache Geronimo and Apache OpenEJB almost every day with success (they're built with M2) and there are other M2-ized projects that work fine (with OpenJPA as a dependency, too) and I can't understand why re-installing M2 would help here if everything but OpenJPA builds fine? Please have a look at the attachment with the output of executing 'mvn -e -X clean install' command. > Build failure of OpenJPA sources from trunk > --- > > Key: OPENJPA-186 > URL: https://issues.apache.org/jira/browse/OPENJPA-186 > Project: OpenJPA > Issue Type: Bug > Components: build / infrastructure >Affects Versions: 0.9.7 >Reporter: Jacek Laskowski > > (I have sent it to the mailing list on March 26th, but it didn't get through) > As I'm not alone with the build failure, see > http://www.nabble.com/error-building-openjpa-tf3478705.html, here goes the > issue report. > I've been trying to build OpenJPA source from trunk for a couple of days and > no joy so far. Anything missing? > [EMAIL PROTECTED] /cygdrive/c/oss/openjpa > $ svn up > At revision 522565. > [EMAIL PROTECTED] /cygdrive/c/oss/openjpa > $ svn status > [EMAIL PROTECTED] /cygdrive/c/oss/openjpa > $ mvn clean install > [INFO] Executing tasks > [echo] Revision: 406193:522097 > [INFO] Executed tasks > [INFO] [antrun:run {execution: delete sun.misc.Perf}] > [INFO] Executing tasks > [INFO] Executed tasks > [INFO] [resources:testResources] > [INFO] Using default encoding to copy filtered resources. > [INFO] [compiler:testCompile] > [INFO] Compiling 33 source files to > c:\oss\openjpa\openjpa-lib\target\test-classes > [INFO] [surefire:test] > [INFO] Surefire report directory: > c:\oss\openjpa\openjpa-lib\target\surefire-reports > [INFO] Building jar: > c:\DOCUME~1\JLASKO~1\LOCALS~1\Temp\surefirebooter30238.jar > java.lang.NoClassDefFoundError: > org/apache/maven/surefire/booter/SurefireBooter > Exception in thread "main" > [INFO] > > [ERROR] BUILD FAILURE > [INFO] > > [INFO] There are test failures. > [INFO] > > [INFO] For more information, run Maven with the -e switch > [INFO] > > [INFO] Total time: 16 seconds > [INFO] Finished at: Mon Mar 26 19:16:09 CEST 2007 > [INFO] Final Memory: 21M/254M > [INFO] > > [EMAIL PROTECTED] /cygdrive/c/oss/openjpa > $ mvn -v > Maven version: 2.0.5 > [EMAIL PROTECTED] /cygdrive/c/oss/openjpa > $ java -version > java version "1.5.0_11" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03) > Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Reopened: (OPENJPA-186) Build failure of OpenJPA sources from trunk
[ https://issues.apache.org/jira/browse/OPENJPA-186?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacek Laskowski reopened OPENJPA-186: - The attachment contains all that's necessary to back up the reopening. > Build failure of OpenJPA sources from trunk > --- > > Key: OPENJPA-186 > URL: https://issues.apache.org/jira/browse/OPENJPA-186 > Project: OpenJPA > Issue Type: Bug > Components: build / infrastructure >Affects Versions: 0.9.7 >Reporter: Jacek Laskowski > > (I have sent it to the mailing list on March 26th, but it didn't get through) > As I'm not alone with the build failure, see > http://www.nabble.com/error-building-openjpa-tf3478705.html, here goes the > issue report. > I've been trying to build OpenJPA source from trunk for a couple of days and > no joy so far. Anything missing? > [EMAIL PROTECTED] /cygdrive/c/oss/openjpa > $ svn up > At revision 522565. > [EMAIL PROTECTED] /cygdrive/c/oss/openjpa > $ svn status > [EMAIL PROTECTED] /cygdrive/c/oss/openjpa > $ mvn clean install > [INFO] Executing tasks > [echo] Revision: 406193:522097 > [INFO] Executed tasks > [INFO] [antrun:run {execution: delete sun.misc.Perf}] > [INFO] Executing tasks > [INFO] Executed tasks > [INFO] [resources:testResources] > [INFO] Using default encoding to copy filtered resources. > [INFO] [compiler:testCompile] > [INFO] Compiling 33 source files to > c:\oss\openjpa\openjpa-lib\target\test-classes > [INFO] [surefire:test] > [INFO] Surefire report directory: > c:\oss\openjpa\openjpa-lib\target\surefire-reports > [INFO] Building jar: > c:\DOCUME~1\JLASKO~1\LOCALS~1\Temp\surefirebooter30238.jar > java.lang.NoClassDefFoundError: > org/apache/maven/surefire/booter/SurefireBooter > Exception in thread "main" > [INFO] > > [ERROR] BUILD FAILURE > [INFO] > > [INFO] There are test failures. > [INFO] > > [INFO] For more information, run Maven with the -e switch > [INFO] > > [INFO] Total time: 16 seconds > [INFO] Finished at: Mon Mar 26 19:16:09 CEST 2007 > [INFO] Final Memory: 21M/254M > [INFO] > > [EMAIL PROTECTED] /cygdrive/c/oss/openjpa > $ mvn -v > Maven version: 2.0.5 > [EMAIL PROTECTED] /cygdrive/c/oss/openjpa > $ java -version > java version "1.5.0_11" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03) > Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-186) Build failure of OpenJPA sources from trunk
[ https://issues.apache.org/jira/browse/OPENJPA-186?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacek Laskowski updated OPENJPA-186: Attachment: OPENJPA-186.buildfailure.txt > Build failure of OpenJPA sources from trunk > --- > > Key: OPENJPA-186 > URL: https://issues.apache.org/jira/browse/OPENJPA-186 > Project: OpenJPA > Issue Type: Bug > Components: build / infrastructure >Affects Versions: 0.9.7 >Reporter: Jacek Laskowski > Attachments: OPENJPA-186.buildfailure.txt > > > (I have sent it to the mailing list on March 26th, but it didn't get through) > As I'm not alone with the build failure, see > http://www.nabble.com/error-building-openjpa-tf3478705.html, here goes the > issue report. > I've been trying to build OpenJPA source from trunk for a couple of days and > no joy so far. Anything missing? > [EMAIL PROTECTED] /cygdrive/c/oss/openjpa > $ svn up > At revision 522565. > [EMAIL PROTECTED] /cygdrive/c/oss/openjpa > $ svn status > [EMAIL PROTECTED] /cygdrive/c/oss/openjpa > $ mvn clean install > [INFO] Executing tasks > [echo] Revision: 406193:522097 > [INFO] Executed tasks > [INFO] [antrun:run {execution: delete sun.misc.Perf}] > [INFO] Executing tasks > [INFO] Executed tasks > [INFO] [resources:testResources] > [INFO] Using default encoding to copy filtered resources. > [INFO] [compiler:testCompile] > [INFO] Compiling 33 source files to > c:\oss\openjpa\openjpa-lib\target\test-classes > [INFO] [surefire:test] > [INFO] Surefire report directory: > c:\oss\openjpa\openjpa-lib\target\surefire-reports > [INFO] Building jar: > c:\DOCUME~1\JLASKO~1\LOCALS~1\Temp\surefirebooter30238.jar > java.lang.NoClassDefFoundError: > org/apache/maven/surefire/booter/SurefireBooter > Exception in thread "main" > [INFO] > > [ERROR] BUILD FAILURE > [INFO] > > [INFO] There are test failures. > [INFO] > > [INFO] For more information, run Maven with the -e switch > [INFO] > > [INFO] Total time: 16 seconds > [INFO] Finished at: Mon Mar 26 19:16:09 CEST 2007 > [INFO] Final Memory: 21M/254M > [INFO] > > [EMAIL PROTECTED] /cygdrive/c/oss/openjpa > $ mvn -v > Maven version: 2.0.5 > [EMAIL PROTECTED] /cygdrive/c/oss/openjpa > $ java -version > java version "1.5.0_11" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03) > Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Reopened: (OPENJPA-186) Build failure of OpenJPA sources from trunk
[ https://issues.apache.org/jira/browse/OPENJPA-186?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacek Laskowski reopened OPENJPA-186: - Alas, the build went further, but still fails. See the attached output of 'mvn clean install' command. > Build failure of OpenJPA sources from trunk > --- > > Key: OPENJPA-186 > URL: https://issues.apache.org/jira/browse/OPENJPA-186 > Project: OpenJPA > Issue Type: Bug > Components: build / infrastructure >Affects Versions: 0.9.7 >Reporter: Jacek Laskowski > Assigned To: Marc Prud'hommeaux > Fix For: 0.9.7 > > Attachments: OPENJPA-186-builderror-2.txt, > OPENJPA-186.buildfailure.txt > > > (I have sent it to the mailing list on March 26th, but it didn't get through) > As I'm not alone with the build failure, see > http://www.nabble.com/error-building-openjpa-tf3478705.html, here goes the > issue report. > I've been trying to build OpenJPA source from trunk for a couple of days and > no joy so far. Anything missing? > [EMAIL PROTECTED] /cygdrive/c/oss/openjpa > $ svn up > At revision 522565. > [EMAIL PROTECTED] /cygdrive/c/oss/openjpa > $ svn status > [EMAIL PROTECTED] /cygdrive/c/oss/openjpa > $ mvn clean install > [INFO] Executing tasks > [echo] Revision: 406193:522097 > [INFO] Executed tasks > [INFO] [antrun:run {execution: delete sun.misc.Perf}] > [INFO] Executing tasks > [INFO] Executed tasks > [INFO] [resources:testResources] > [INFO] Using default encoding to copy filtered resources. > [INFO] [compiler:testCompile] > [INFO] Compiling 33 source files to > c:\oss\openjpa\openjpa-lib\target\test-classes > [INFO] [surefire:test] > [INFO] Surefire report directory: > c:\oss\openjpa\openjpa-lib\target\surefire-reports > [INFO] Building jar: > c:\DOCUME~1\JLASKO~1\LOCALS~1\Temp\surefirebooter30238.jar > java.lang.NoClassDefFoundError: > org/apache/maven/surefire/booter/SurefireBooter > Exception in thread "main" > [INFO] > > [ERROR] BUILD FAILURE > [INFO] > > [INFO] There are test failures. > [INFO] > > [INFO] For more information, run Maven with the -e switch > [INFO] > > [INFO] Total time: 16 seconds > [INFO] Finished at: Mon Mar 26 19:16:09 CEST 2007 > [INFO] Final Memory: 21M/254M > [INFO] > > [EMAIL PROTECTED] /cygdrive/c/oss/openjpa > $ mvn -v > Maven version: 2.0.5 > [EMAIL PROTECTED] /cygdrive/c/oss/openjpa > $ java -version > java version "1.5.0_11" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03) > Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-186) Build failure of OpenJPA sources from trunk
[ https://issues.apache.org/jira/browse/OPENJPA-186?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacek Laskowski updated OPENJPA-186: Attachment: OPENJPA-186-builderror-2.txt > Build failure of OpenJPA sources from trunk > --- > > Key: OPENJPA-186 > URL: https://issues.apache.org/jira/browse/OPENJPA-186 > Project: OpenJPA > Issue Type: Bug > Components: build / infrastructure >Affects Versions: 0.9.7 >Reporter: Jacek Laskowski > Assigned To: Marc Prud'hommeaux > Fix For: 0.9.7 > > Attachments: OPENJPA-186-builderror-2.txt, > OPENJPA-186.buildfailure.txt > > > (I have sent it to the mailing list on March 26th, but it didn't get through) > As I'm not alone with the build failure, see > http://www.nabble.com/error-building-openjpa-tf3478705.html, here goes the > issue report. > I've been trying to build OpenJPA source from trunk for a couple of days and > no joy so far. Anything missing? > [EMAIL PROTECTED] /cygdrive/c/oss/openjpa > $ svn up > At revision 522565. > [EMAIL PROTECTED] /cygdrive/c/oss/openjpa > $ svn status > [EMAIL PROTECTED] /cygdrive/c/oss/openjpa > $ mvn clean install > [INFO] Executing tasks > [echo] Revision: 406193:522097 > [INFO] Executed tasks > [INFO] [antrun:run {execution: delete sun.misc.Perf}] > [INFO] Executing tasks > [INFO] Executed tasks > [INFO] [resources:testResources] > [INFO] Using default encoding to copy filtered resources. > [INFO] [compiler:testCompile] > [INFO] Compiling 33 source files to > c:\oss\openjpa\openjpa-lib\target\test-classes > [INFO] [surefire:test] > [INFO] Surefire report directory: > c:\oss\openjpa\openjpa-lib\target\surefire-reports > [INFO] Building jar: > c:\DOCUME~1\JLASKO~1\LOCALS~1\Temp\surefirebooter30238.jar > java.lang.NoClassDefFoundError: > org/apache/maven/surefire/booter/SurefireBooter > Exception in thread "main" > [INFO] > > [ERROR] BUILD FAILURE > [INFO] > > [INFO] There are test failures. > [INFO] > > [INFO] For more information, run Maven with the -e switch > [INFO] > > [INFO] Total time: 16 seconds > [INFO] Finished at: Mon Mar 26 19:16:09 CEST 2007 > [INFO] Final Memory: 21M/254M > [INFO] > > [EMAIL PROTECTED] /cygdrive/c/oss/openjpa > $ mvn -v > Maven version: 2.0.5 > [EMAIL PROTECTED] /cygdrive/c/oss/openjpa > $ java -version > java version "1.5.0_11" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03) > Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-190) org.apache.openjpa.persistence.ArgumentException when using query "SELECT t FROM Teacher t, IN(t.courses) c WHERE c = ?1"
[ https://issues.apache.org/jira/browse/OPENJPA-190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacek Laskowski updated OPENJPA-190: Summary: org.apache.openjpa.persistence.ArgumentException when using query "SELECT t FROM Teacher t, IN(t.courses) c WHERE c = ?1" (was: org.apache.openjpa.persistence.ArgumentException when using query "SELECT Teacher t, IN(t.courses) c WHERE c = ?") Correction to the misleading title > org.apache.openjpa.persistence.ArgumentException when using query "SELECT t > FROM Teacher t, IN(t.courses) c WHERE c = ?1" > - > > Key: OPENJPA-190 > URL: https://issues.apache.org/jira/browse/OPENJPA-190 > Project: OpenJPA > Issue Type: Bug > Components: kernel >Affects Versions: 0.9.6 > Environment: JDK 1.5.0_09, Spring 2.0.3, OpenJPA 0.9.6, JpaCriteria > 0.6b >Reporter: Maxim Butov > > ENTITIES: > @Entity(name = "Teacher") > @Table(name = "teacher") > public class Teacher extends AbstractEntity { > @Id > @Column(name = "teacher_id") > private Integer id; > @Column(name = "name") > private String name; > @OneToMany(targetEntity = Course.class, mappedBy = "teacher") > private Set courses; > } > @Entity(name = "Course") > @Table(name = "course") > public class Course extends AbstractEntity { > @Id > @Column(name = "course_id") > private Integer id; > @Column(name = "code") > private String code; > @Column(name = "description") > private String description; > @ManyToOne > @JoinColumn(name = "teacher_id") > private Teacher teacher; > @OneToMany(targetEntity = Enrolment.class, mappedBy = "course") > private Set enrolments; > } > QUERY: > SELECT t FROM Teacher t, IN(t.courses) c WHERE c = ?1 > LOG: > 20:21:48.265 ERROR AbstractJpaCriteriaTests Pattern query did not execute > succesfully > org.springframework.dao.InvalidDataAccessApiUsageException: The parameter "0" > is of type "net.sf.jpacriteria.Course", but the declaration in the query is > for type "java.util.Set". ; nested exception is <4|false|0.0.0> > org.apache.openjpa.persistence.ArgumentException: The parameter "0" is of > type "net.sf.jpacriteria.Course", but the declaration in the query is for > type "java.util.Set". > Caused by: > <4|false|0.0.0> org.apache.openjpa.persistence.ArgumentException: The > parameter "0" is of type "net.sf.jpacriteria.Course", but the declaration in > the query is for type "java.util.Set". > at > org.apache.openjpa.persistence.QueryImpl.validateParameter(QueryImpl.java:245) > at > org.apache.openjpa.persistence.QueryImpl.validateParameters(QueryImpl.java:225) > at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:206) > at > org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:251) > at > org.springframework.orm.jpa.JpaTemplate$9.doInJpa(JpaTemplate.java:313) > at org.springframework.orm.jpa.JpaTemplate.execute(JpaTemplate.java:191) > at > org.springframework.orm.jpa.JpaTemplate.executeFind(JpaTemplate.java:158) > at org.springframework.orm.jpa.JpaTemplate.find(JpaTemplate.java:305) > at > net.sf.jpacriteria.AbstractJpaCriteriaTests.assertCorrect(AbstractJpaCriteriaTests.java:189) > at > net.sf.jpacriteria.AbstractCriterionTests.testNullPropertyEq(AbstractCriterionTests.java:235) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at junit.framework.TestCase.runTest(TestCase.java:168) > at junit.framework.TestCase.runBare(TestCase.java:134) > at > org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:69) > at > org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests.access$001(AbstractAnnotationAwareTransactionalTests.java:47) > at > org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests$1.run(AbstractAnnotationAwareTransactionalTests.java:115) > at > org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests.runTest(AbstractAnnotationAwareTransactionalTests.java:180) > at > org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests.runTestTimed(AbstractAnnotationAwareTransactionalTests.java:153) > at > org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests.runBare(AbstractAnnotationAwareTransactionalTests.java:111) > at > org.springframework.test.jpa.AbstractJpaTests.runBare(AbstractJ
[jira] Commented: (OPENJPA-190) org.apache.openjpa.persistence.ArgumentException when using query "SELECT t FROM Teacher t, IN(t.courses) c WHERE c = ?1"
[ https://issues.apache.org/jira/browse/OPENJPA-190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12484953 ] Jacek Laskowski commented on OPENJPA-190: - I'm not a OpenJPA developer, but since I'm here taking care of the issue I reported, let me add to it. It seems that the missing piece of information might be the parameter itself which is set via Query.setParameter that's not of a valid type. Is it you who set the parameter or does it happen via Spring (I see Spring involved so there might be an issue with the integration). I think the real culprit is the parameter - its type - of Query.setParameter. Also, is there a way to bump up the version of OpenJPA to 0.9.7-SNAPSHOT? > org.apache.openjpa.persistence.ArgumentException when using query "SELECT t > FROM Teacher t, IN(t.courses) c WHERE c = ?1" > - > > Key: OPENJPA-190 > URL: https://issues.apache.org/jira/browse/OPENJPA-190 > Project: OpenJPA > Issue Type: Bug > Components: kernel >Affects Versions: 0.9.6 > Environment: JDK 1.5.0_09, Spring 2.0.3, OpenJPA 0.9.6, JpaCriteria > 0.6b >Reporter: Maxim Butov > > ENTITIES: > @Entity(name = "Teacher") > @Table(name = "teacher") > public class Teacher extends AbstractEntity { > @Id > @Column(name = "teacher_id") > private Integer id; > @Column(name = "name") > private String name; > @OneToMany(targetEntity = Course.class, mappedBy = "teacher") > private Set courses; > } > @Entity(name = "Course") > @Table(name = "course") > public class Course extends AbstractEntity { > @Id > @Column(name = "course_id") > private Integer id; > @Column(name = "code") > private String code; > @Column(name = "description") > private String description; > @ManyToOne > @JoinColumn(name = "teacher_id") > private Teacher teacher; > @OneToMany(targetEntity = Enrolment.class, mappedBy = "course") > private Set enrolments; > } > QUERY: > SELECT t FROM Teacher t, IN(t.courses) c WHERE c = ?1 > LOG: > 20:21:48.265 ERROR AbstractJpaCriteriaTests Pattern query did not execute > succesfully > org.springframework.dao.InvalidDataAccessApiUsageException: The parameter "0" > is of type "net.sf.jpacriteria.Course", but the declaration in the query is > for type "java.util.Set". ; nested exception is <4|false|0.0.0> > org.apache.openjpa.persistence.ArgumentException: The parameter "0" is of > type "net.sf.jpacriteria.Course", but the declaration in the query is for > type "java.util.Set". > Caused by: > <4|false|0.0.0> org.apache.openjpa.persistence.ArgumentException: The > parameter "0" is of type "net.sf.jpacriteria.Course", but the declaration in > the query is for type "java.util.Set". > at > org.apache.openjpa.persistence.QueryImpl.validateParameter(QueryImpl.java:245) > at > org.apache.openjpa.persistence.QueryImpl.validateParameters(QueryImpl.java:225) > at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:206) > at > org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:251) > at > org.springframework.orm.jpa.JpaTemplate$9.doInJpa(JpaTemplate.java:313) > at org.springframework.orm.jpa.JpaTemplate.execute(JpaTemplate.java:191) > at > org.springframework.orm.jpa.JpaTemplate.executeFind(JpaTemplate.java:158) > at org.springframework.orm.jpa.JpaTemplate.find(JpaTemplate.java:305) > at > net.sf.jpacriteria.AbstractJpaCriteriaTests.assertCorrect(AbstractJpaCriteriaTests.java:189) > at > net.sf.jpacriteria.AbstractCriterionTests.testNullPropertyEq(AbstractCriterionTests.java:235) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at junit.framework.TestCase.runTest(TestCase.java:168) > at junit.framework.TestCase.runBare(TestCase.java:134) > at > org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:69) > at > org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests.access$001(AbstractAnnotationAwareTransactionalTests.java:47) > at > org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests$1.run(AbstractAnnotationAwareTransactionalTests.java:115) > at > org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests.runTest(AbstractAnnotationAwareTransactionalTests.java:180) > at > org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests.runTestTimed(AbstractAnn
[jira] Commented: (OPENJPA-186) Build failure of OpenJPA sources from trunk
[ https://issues.apache.org/jira/browse/OPENJPA-186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12484972 ] Jacek Laskowski commented on OPENJPA-186: - It's something pertaining to the way Ant is executed from within M2, and OpenJPA build runs into troubles. I could reproduce it with a simple, almost empty project. When build.xml is executed directly with ant it runs fine. When it's executed from M2 it fails with the following error message. Any hints on how to work it out? [EMAIL PROTECTED] /cygdrive/c/OPENJPA-186 $ ant -version Apache Ant version 1.7.0 compiled on December 13 2006 [EMAIL PROTECTED] /cygdrive/c/OPENJPA-186 $ mvn -v Maven version: 2.0.5 [EMAIL PROTECTED] /cygdrive/c/OPENJPA-186 $ echo $CLASSPATH [EMAIL PROTECTED] /cygdrive/c/OPENJPA-186 $ echo $JAVA_HOME /cygdrive/c/apps/java5 [EMAIL PROTECTED] /cygdrive/c/OPENJPA-186 $ java -version java version "1.5.0_11" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03) Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode) [EMAIL PROTECTED] /cygdrive/c/OPENJPA-186 $ ant Buildfile: build.xml compile: [javac] Compiling 1 source file BUILD SUCCESSFUL Total time: 0 seconds [EMAIL PROTECTED] /cygdrive/c/OPENJPA-186 $ mvn integration-test [INFO] Scanning for projects... [INFO] [INFO] Building OpenJPA Examples Integration Tests [INFO]task-segment: [integration-test] [INFO] [INFO] [site:attach-descriptor] [INFO] [antrun:run {execution: run-examples}] [INFO] Executing tasks [echo] Running OpenJPA Examples compile: [javac] Compiling 1 source file [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Error executing ant tasks Embedded error: The following error occurred while executing this line: C:\OPENJPA-186\build.xml:4: Unable to find a javac compiler; com.sun.tools.javac.Main is not on the classpath. Perhaps JAVA_HOME does not point to the JDK [INFO] [INFO] For more information, run Maven with the -e switch [INFO] [INFO] Total time: 1 second [INFO] Finished at: Wed Mar 28 21:36:02 CEST 2007 [INFO] Final Memory: 4M/254M [INFO] $ cat pom.xml http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";> 4.0.0 xxx examples pom 1.0 OpenJPA Examples Integration Tests maven-antrun-plugin run-examples integration-test Running OpenJPA Examples run [EMAIL PROTECTED] /cygdrive/c/OPENJPA-186 $ cat build.xml > Build failure of OpenJPA sources from trunk > --- > > Key: OPENJPA-186 > URL: https://issues.apache.org/jira/browse/OPENJPA-186 > Project: OpenJPA > Issue Type: Bug > Components: build / infrastructure >Affects Versions: 0.9.7 >Reporter: Jacek Laskowski > Assigned To: Marc Prud'hommeaux > Fix For: 0.9.7 > > Attachments: OPENJPA-186-builderror-2.txt, > OPENJPA-186.buildfailure.txt > > > (I have sent it to the mailing list on March 26th, but it didn't get through) > As I'm not alone with the build failure, see > http://www.nabble.com/error-building-openjpa-tf3478705.html, here goes the > issue report. > I've been trying to build OpenJPA source from trunk for a couple of days and > no joy so far. Anything missing? > [EMAIL PROTECTED] /cygdrive/c/oss/openjpa > $ svn up > At revision 522565. > [EMAIL PROTECTED] /cygdrive/c/oss/openjpa > $ svn status > [EMAIL PROTECTED] /cygdrive/c/oss/openjpa > $ mvn clean install > [INFO] Executing tasks > [echo] Revision: 406193:522097 > [INFO] Executed tasks > [INFO] [antrun:run {execution: delete sun.misc.Perf}] > [INFO] Executing tasks > [INFO] Executed tasks > [INFO] [resources:testResources] > [INFO] Using default encoding to copy filtered resources. > [INFO] [compiler:testCompile] >
[jira] Updated: (OPENJPA-186) Build failure of OpenJPA sources from trunk
[ https://issues.apache.org/jira/browse/OPENJPA-186?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacek Laskowski updated OPENJPA-186: Attachment: OPENJPA-186.patch Applying the patch lets you go on with the build until another BUILD ERROR: [INFO] [INFO] Building OpenJPA JPA TCK Integration Tests [INFO]task-segment: [clean, install] [INFO] [INFO] [clean:clean] [INFO] Deleting directory c:\oss\openjpa\openjpa-integration\tck\target [INFO] Deleting directory c:\oss\openjpa\openjpa-integration\tck\target\classes [INFO] Deleting directory c:\oss\openjpa\openjpa-integration\tck\target\test-classes [INFO] [site:attach-descriptor] [INFO] [antrun:run {execution: run-tck}] [INFO] Executing tasks [echo] Running Sun JPA TCK [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Error executing ant tasks Embedded error: The TCK file C:\.m2/../privaterepos/jpa-1_0a-tck.zip does not exist. This file must be downloaded separately in order to be able to run the JPA TCK [INFO] [INFO] For more information, run Maven with the -e switch [INFO] [INFO] Total time: 3 minutes 33 seconds [INFO] Finished at: Wed Mar 28 21:58:01 CEST 2007 [INFO] Final Memory: 35M/254M [INFO] I wonder how non-committers build OpenJPA?! Could the tck modue be moved to a profile that's executed for some? > Build failure of OpenJPA sources from trunk > --- > > Key: OPENJPA-186 > URL: https://issues.apache.org/jira/browse/OPENJPA-186 > Project: OpenJPA > Issue Type: Bug > Components: build / infrastructure >Affects Versions: 0.9.7 >Reporter: Jacek Laskowski > Assigned To: Marc Prud'hommeaux > Fix For: 0.9.7 > > Attachments: OPENJPA-186-builderror-2.txt, > OPENJPA-186.buildfailure.txt, OPENJPA-186.patch > > > (I have sent it to the mailing list on March 26th, but it didn't get through) > As I'm not alone with the build failure, see > http://www.nabble.com/error-building-openjpa-tf3478705.html, here goes the > issue report. > I've been trying to build OpenJPA source from trunk for a couple of days and > no joy so far. Anything missing? > [EMAIL PROTECTED] /cygdrive/c/oss/openjpa > $ svn up > At revision 522565. > [EMAIL PROTECTED] /cygdrive/c/oss/openjpa > $ svn status > [EMAIL PROTECTED] /cygdrive/c/oss/openjpa > $ mvn clean install > [INFO] Executing tasks > [echo] Revision: 406193:522097 > [INFO] Executed tasks > [INFO] [antrun:run {execution: delete sun.misc.Perf}] > [INFO] Executing tasks > [INFO] Executed tasks > [INFO] [resources:testResources] > [INFO] Using default encoding to copy filtered resources. > [INFO] [compiler:testCompile] > [INFO] Compiling 33 source files to > c:\oss\openjpa\openjpa-lib\target\test-classes > [INFO] [surefire:test] > [INFO] Surefire report directory: > c:\oss\openjpa\openjpa-lib\target\surefire-reports > [INFO] Building jar: > c:\DOCUME~1\JLASKO~1\LOCALS~1\Temp\surefirebooter30238.jar > java.lang.NoClassDefFoundError: > org/apache/maven/surefire/booter/SurefireBooter > Exception in thread "main" > [INFO] > > [ERROR] BUILD FAILURE > [INFO] > > [INFO] There are test failures. > [INFO] > > [INFO] For more information, run Maven with the -e switch > [INFO] > > [INFO] Total time: 16 seconds > [INFO] Finished at: Mon Mar 26 19:16:09 CEST 2007 > [INFO] Final Memory: 21M/254M > [INFO] > > [EMAIL PROTECTED] /cygdrive/c/oss/openjpa > $ mvn -v > Maven version: 2.0.5 > [EMAIL PROTECTED] /cygdrive/c/oss/openjpa > $ java -version > java version "1.5.0_11" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03) > Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-186) Build failure of OpenJPA sources from trunk
[ https://issues.apache.org/jira/browse/OPENJPA-186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12485012 ] Jacek Laskowski commented on OPENJPA-186: - mvn package -Dtest=false did the trick. mvn clean package works now too! mvn install fails. See the following build error (after the successful build message). It looks install isn't for faint-hearted. It should be documented somewhere on the website. [INFO] [INFO] Reactor Summary: [INFO] [INFO] OpenJPA ... SUCCESS [1.328s] [INFO] OpenJPA Utilities . SUCCESS [29.250s] [INFO] OpenJPA Kernel SUCCESS [15.453s] [INFO] OpenJPA JDBC .. SUCCESS [12.203s] [INFO] OpenJPA XML Store . SUCCESS [0.407s] [INFO] OpenJPA Kernel 1.5 SUCCESS [0.312s] [INFO] OpenJPA JDBC 1.5 .. SUCCESS [0.297s] [INFO] OpenJPA JPA ... SUCCESS [2.015s] [INFO] OpenJPA JPA JDBC .. SUCCESS [11.203s] [INFO] OpenJPA Aggregate Jar . SUCCESS [20.438s] [INFO] OpenJPA Persistence Examples .. SUCCESS [0.562s] [INFO] OpenJPA Distribution .. SUCCESS [35.578s] [INFO] OpenJPA Integration Tests . SUCCESS [0.000s] [INFO] OpenJPA Examples Integration Tests SUCCESS [0.000s] [INFO] OpenJPA JPA TCK Integration Tests . SUCCESS [0.000s] [INFO] [INFO] [INFO] BUILD SUCCESSFUL [INFO] [INFO] Total time: 2 minutes 9 seconds [INFO] Finished at: Thu Mar 29 00:07:18 CEST 2007 [INFO] Final Memory: 26M/254M [INFO] [echo] Running Sun JPA TCK [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Error executing ant tasks Embedded error: The TCK file C:\.m2/../privaterepos/jpa-1_0a-tck.zip does not exist. This file must be downloaded separately in order to be able to run the JPA TCK [INFO] [INFO] For more information, run Maven with the -e switch [INFO] [INFO] Total time: 3 minutes 36 seconds [INFO] Finished at: Thu Mar 29 00:18:28 CEST 2007 [INFO] Final Memory: 35M/254M [INFO] > Build failure of OpenJPA sources from trunk > --- > > Key: OPENJPA-186 > URL: https://issues.apache.org/jira/browse/OPENJPA-186 > Project: OpenJPA > Issue Type: Bug > Components: build / infrastructure >Affects Versions: 0.9.7 >Reporter: Jacek Laskowski > Assigned To: Marc Prud'hommeaux > Fix For: 0.9.7 > > Attachments: OPENJPA-186-builderror-2.txt, > OPENJPA-186.buildfailure.txt, OPENJPA-186.patch > > > (I have sent it to the mailing list on March 26th, but it didn't get through) > As I'm not alone with the build failure, see > http://www.nabble.com/error-building-openjpa-tf3478705.html, here goes the > issue report. > I've been trying to build OpenJPA source from trunk for a couple of days and > no joy so far. Anything missing? > [EMAIL PROTECTED] /cygdrive/c/oss/openjpa > $ svn up > At revision 522565. > [EMAIL PROTECTED] /cygdrive/c/oss/openjpa > $ svn status > [EMAIL PROTECTED] /cygdrive/c/oss/openjpa > $ mvn clean install > [INFO] Executing tasks > [echo] Revision: 406193:522097 > [INFO] Executed tasks > [INFO] [antrun:run {execution: delete sun.misc.Perf}] > [INFO] Executing tasks > [INFO] Executed tasks > [INFO] [resources:testResources] > [INFO] Using default encoding to copy filtered resources. > [INFO] [compiler:testCompile] > [INFO] Compiling 33 source files to > c:\oss\openjpa\openjpa-lib\target\test-classes > [INFO] [surefire:test] > [INFO] Surefire report directory: > c:\oss\openjpa\openjpa-lib\target\surefire-reports > [INFO] Building jar: > c:\DOCUME~1\JLASKO~1\LOCALS~1\Temp\surefirebooter30238.jar > java.lang.NoClassDefFoundError: > org/apache/maven/surefire/booter/SurefireBooter > Exception in thread "main" > [INFO]
[jira] Created: (OPENJPA-195) Add failonerror="true" to the java task example at enhancingwithmaven.html
Add failonerror="true" to the java task example at enhancingwithmaven.html -- Key: OPENJPA-195 URL: https://issues.apache.org/jira/browse/OPENJPA-195 Project: OpenJPA Issue Type: Improvement Components: docs Affects Versions: 0.9.7 Reporter: Jacek Laskowski Add failonerror="true" to the java task for PCEnhancer as presented at http://incubator.apache.org/openjpa/enhancingwithmaven.html. When PCEnhancer fails, M2 will go on and eventually report errors that don't reveal the real cause. BTW: I'm still unable to send email to open-jpa-dev mailing list. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Created: (OPENJPA-197) @Version property doesn't ensure integrity when performing the merge operation
@Version property doesn't ensure integrity when performing the merge operation -- Key: OPENJPA-197 URL: https://issues.apache.org/jira/browse/OPENJPA-197 Project: OpenJPA Issue Type: Bug Components: jpa Affects Versions: 0.9.7 Reporter: Jacek Laskowski See the simple test case: { Query query = em.createQuery("SELECT o FROM Osoba o WHERE o.imie = 'Jacek' AND o.nazwisko = 'Laskowski'"); final Osoba osoba = (Osoba) query.getSingleResult(); final Long numerOsoby = osoba.getNumer(); // numer is the pk long wersja = osoba.getWersja(); // wersja is a versioned property { EntityTransaction tx = em.getTransaction(); tx.begin(); Osoba osobaWersja0 = em.find(Osoba.class, numerOsoby); assert osobaWersja0.getWersja() == wersja; osobaWersja0.setImie("change"); em.flush(); wersja++; assert osobaWersja0.getWersja() == wersja; tx.commit(); assert osobaWersja0.getWersja() == wersja; em.refresh(osobaWersja0); assert osobaWersja0.getWersja() == wersja; } { em.clear(); // osoba is now detached final String noweImie = "Yet another name change"; osoba.setImie(noweImie); EntityTransaction tx = em.getTransaction(); tx.begin(); Osoba osobaWersja1 = em.find(Osoba.class, numerOsoby); osobaWersja1.setImie("and another"); tx.commit(); // change is on its way to database wersja++; assert osobaWersja1.getWersja() == wersja; assert osobaWersja1.getWersja() != osoba.getWersja(); if (em.getClass().getCanonicalName().equals("org.apache.openjpa.persistence.EntityManagerImpl")) { Osoba osobaPoMerge = em.merge(osoba); assert osobaPoMerge.getImie().equals(osoba.getImie()); assert osobaPoMerge.getImie().equals(noweImie); em.getTransaction().begin(); try { em.flush(); assert false; } catch (/* OptimisticLock */Exception oczekiwano) { em.getTransaction().rollback(); } } } } It works fine with Apache OpenJPA 0.9.7-SNAPSHOT with the sources on the past Friday. Hibernate EntityManager 3.3.1 and TopLink Essentials 2.0 BUILD 40 throw exception as the detached entity is merged to em. According to the spec 9.1.17 Version Annotation p. 178 (and the javadoc - http://java.sun.com/javaee/5/docs/api/javax/persistence/Version.html - too): The Version annotation specifies the version field or property of an entity class that serves as its optimistic lock value. The version is used to ensure integrity when performing the merge operation and for optimistic concurrency control. So, I think that it's a bug in OpenJPA. BTW, I'm still unable to send emails to open-jpa-dev. Who should I contact to in order to fix it? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-197) @Version property doesn't ensure integrity when performing the merge operation
[ https://issues.apache.org/jira/browse/OPENJPA-197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12486087 ] Jacek Laskowski commented on OPENJPA-197: - Hibernate and TopLink will fail once you get rid of the if statement. It's because according to the spec (and my understanding) merge should rise exception when the versioned property is outdated. The spec doesn't say about any deferred check (at flush or commit time) against a versioned property and therefore I think it's a bug in OpenJPA. > @Version property doesn't ensure integrity when performing the merge operation > -- > > Key: OPENJPA-197 > URL: https://issues.apache.org/jira/browse/OPENJPA-197 > Project: OpenJPA > Issue Type: Bug > Components: jpa >Affects Versions: 0.9.7 >Reporter: Jacek Laskowski > > See the simple test case: > { > Query query = em.createQuery("SELECT o FROM Osoba o WHERE o.imie > = 'Jacek' AND o.nazwisko = 'Laskowski'"); > final Osoba osoba = (Osoba) query.getSingleResult(); > final Long numerOsoby = osoba.getNumer(); // numer is the pk > long wersja = osoba.getWersja(); // wersja is a versioned property > { > EntityTransaction tx = em.getTransaction(); > tx.begin(); > Osoba osobaWersja0 = em.find(Osoba.class, numerOsoby); > assert osobaWersja0.getWersja() == wersja; > osobaWersja0.setImie("change"); > em.flush(); > wersja++; > assert osobaWersja0.getWersja() == wersja; > tx.commit(); > assert osobaWersja0.getWersja() == wersja; > em.refresh(osobaWersja0); > assert osobaWersja0.getWersja() == wersja; > } > { > em.clear(); // osoba is now detached > final String noweImie = "Yet another name change"; > osoba.setImie(noweImie); > EntityTransaction tx = em.getTransaction(); > tx.begin(); > Osoba osobaWersja1 = em.find(Osoba.class, numerOsoby); > osobaWersja1.setImie("and another"); > tx.commit(); // change is on its way to database > wersja++; > assert osobaWersja1.getWersja() == wersja; > assert osobaWersja1.getWersja() != osoba.getWersja(); > if > (em.getClass().getCanonicalName().equals("org.apache.openjpa.persistence.EntityManagerImpl")) > { > Osoba osobaPoMerge = em.merge(osoba); > assert osobaPoMerge.getImie().equals(osoba.getImie()); > assert osobaPoMerge.getImie().equals(noweImie); > em.getTransaction().begin(); > try { > em.flush(); > assert false; > } catch (/* OptimisticLock */Exception oczekiwano) { > em.getTransaction().rollback(); > } > } > } > } > It works fine with Apache OpenJPA 0.9.7-SNAPSHOT with the sources on the past > Friday. Hibernate EntityManager 3.3.1 and TopLink Essentials 2.0 BUILD 40 > throw exception as the detached entity is merged to em. According to the > spec 9.1.17 Version Annotation p. 178 (and the javadoc - > http://java.sun.com/javaee/5/docs/api/javax/persistence/Version.html - too): > The Version annotation specifies the version field or property of an entity > class that serves as its optimistic lock value. The version is used to ensure > integrity when performing the merge operation and for optimistic concurrency > control. > So, I think that it's a bug in OpenJPA. > BTW, I'm still unable to send emails to open-jpa-dev. Who should I contact to > in order to fix it? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-197) @Version property doesn't ensure integrity when performing the merge operation
[ https://issues.apache.org/jira/browse/OPENJPA-197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12486089 ] Jacek Laskowski commented on OPENJPA-197: - As I'm unable to write to the dev mailing list I'm responding to Abe White's comment here that reads "No, the exception can be deferred until flush/commit. Read section 3.2.4.1." The spec says in 3.2.4.1 p. 52: Any Version columns used by the entity must be checked by the persistence runtime implementation during the merge operation and/or at flush or commit time. So, one could agree with Abe (the and/or is the key). Reading about it further, the spec says in 9.1.17 p. 178: "The version is used to ensure integrity when performing the merge operation and for optimistic concurrency control." and there's nothing about flush/commit time. Also, verifying it against RI (which is alas TopLink Essentials) leads to the same conclusion and it seems that it's only OpenJPA who thinks differently. I wish I could give it a shot with other JPA providers than OpenJPA, TopLink and Hibernate (but would that change anything?). > @Version property doesn't ensure integrity when performing the merge operation > -- > > Key: OPENJPA-197 > URL: https://issues.apache.org/jira/browse/OPENJPA-197 > Project: OpenJPA > Issue Type: Bug > Components: jpa >Affects Versions: 0.9.7 >Reporter: Jacek Laskowski > > See the simple test case: > { > Query query = em.createQuery("SELECT o FROM Osoba o WHERE o.imie > = 'Jacek' AND o.nazwisko = 'Laskowski'"); > final Osoba osoba = (Osoba) query.getSingleResult(); > final Long numerOsoby = osoba.getNumer(); // numer is the pk > long wersja = osoba.getWersja(); // wersja is a versioned property > { > EntityTransaction tx = em.getTransaction(); > tx.begin(); > Osoba osobaWersja0 = em.find(Osoba.class, numerOsoby); > assert osobaWersja0.getWersja() == wersja; > osobaWersja0.setImie("change"); > em.flush(); > wersja++; > assert osobaWersja0.getWersja() == wersja; > tx.commit(); > assert osobaWersja0.getWersja() == wersja; > em.refresh(osobaWersja0); > assert osobaWersja0.getWersja() == wersja; > } > { > em.clear(); // osoba is now detached > final String noweImie = "Yet another name change"; > osoba.setImie(noweImie); > EntityTransaction tx = em.getTransaction(); > tx.begin(); > Osoba osobaWersja1 = em.find(Osoba.class, numerOsoby); > osobaWersja1.setImie("and another"); > tx.commit(); // change is on its way to database > wersja++; > assert osobaWersja1.getWersja() == wersja; > assert osobaWersja1.getWersja() != osoba.getWersja(); > if > (em.getClass().getCanonicalName().equals("org.apache.openjpa.persistence.EntityManagerImpl")) > { > Osoba osobaPoMerge = em.merge(osoba); > assert osobaPoMerge.getImie().equals(osoba.getImie()); > assert osobaPoMerge.getImie().equals(noweImie); > em.getTransaction().begin(); > try { > em.flush(); > assert false; > } catch (/* OptimisticLock */Exception oczekiwano) { > em.getTransaction().rollback(); > } > } > } > } > It works fine with Apache OpenJPA 0.9.7-SNAPSHOT with the sources on the past > Friday. Hibernate EntityManager 3.3.1 and TopLink Essentials 2.0 BUILD 40 > throw exception as the detached entity is merged to em. According to the > spec 9.1.17 Version Annotation p. 178 (and the javadoc - > http://java.sun.com/javaee/5/docs/api/javax/persistence/Version.html - too): > The Version annotation specifies the version field or property of an entity > class that serves as its optimistic lock value. The version is used to ensure > integrity when performing the merge operation and for optimistic concurrency > control. > So, I think that it's a bug in OpenJPA. > BTW, I'm still unable to send emails to open-jpa-dev. Who should I contact to > in order to fix it? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-197) @Version property doesn't ensure integrity when performing the merge operation
[ https://issues.apache.org/jira/browse/OPENJPA-197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12486112 ] Jacek Laskowski commented on OPENJPA-197: - Please close the issue with WON'T FIX or alike due to the section in JPA spec - 3.4.2 Version Attributes page 55: The persistence provider's implementation of the merge operation must examine the version attribute when an entity is being merged and throw an OptimisticLockException if it is discovered that the object being merged is a stale copy of the entity—i.e. that the entity has been updated since the entity became detached. Depending on the implementation strategy used, it is possible that this exception may not be thrown until flush is called or commit time, whichever happens first. The relevant part is the last sentence. Sorry for bothering. > @Version property doesn't ensure integrity when performing the merge operation > -- > > Key: OPENJPA-197 > URL: https://issues.apache.org/jira/browse/OPENJPA-197 > Project: OpenJPA > Issue Type: Bug > Components: jpa >Affects Versions: 0.9.7 >Reporter: Jacek Laskowski > > See the simple test case: > { > Query query = em.createQuery("SELECT o FROM Osoba o WHERE o.imie > = 'Jacek' AND o.nazwisko = 'Laskowski'"); > final Osoba osoba = (Osoba) query.getSingleResult(); > final Long numerOsoby = osoba.getNumer(); // numer is the pk > long wersja = osoba.getWersja(); // wersja is a versioned property > { > EntityTransaction tx = em.getTransaction(); > tx.begin(); > Osoba osobaWersja0 = em.find(Osoba.class, numerOsoby); > assert osobaWersja0.getWersja() == wersja; > osobaWersja0.setImie("change"); > em.flush(); > wersja++; > assert osobaWersja0.getWersja() == wersja; > tx.commit(); > assert osobaWersja0.getWersja() == wersja; > em.refresh(osobaWersja0); > assert osobaWersja0.getWersja() == wersja; > } > { > em.clear(); // osoba is now detached > final String noweImie = "Yet another name change"; > osoba.setImie(noweImie); > EntityTransaction tx = em.getTransaction(); > tx.begin(); > Osoba osobaWersja1 = em.find(Osoba.class, numerOsoby); > osobaWersja1.setImie("and another"); > tx.commit(); // change is on its way to database > wersja++; > assert osobaWersja1.getWersja() == wersja; > assert osobaWersja1.getWersja() != osoba.getWersja(); > if > (em.getClass().getCanonicalName().equals("org.apache.openjpa.persistence.EntityManagerImpl")) > { > Osoba osobaPoMerge = em.merge(osoba); > assert osobaPoMerge.getImie().equals(osoba.getImie()); > assert osobaPoMerge.getImie().equals(noweImie); > em.getTransaction().begin(); > try { > em.flush(); > assert false; > } catch (/* OptimisticLock */Exception oczekiwano) { > em.getTransaction().rollback(); > } > } > } > } > It works fine with Apache OpenJPA 0.9.7-SNAPSHOT with the sources on the past > Friday. Hibernate EntityManager 3.3.1 and TopLink Essentials 2.0 BUILD 40 > throw exception as the detached entity is merged to em. According to the > spec 9.1.17 Version Annotation p. 178 (and the javadoc - > http://java.sun.com/javaee/5/docs/api/javax/persistence/Version.html - too): > The Version annotation specifies the version field or property of an entity > class that serves as its optimistic lock value. The version is used to ensure > integrity when performing the merge operation and for optimistic concurrency > control. > So, I think that it's a bug in OpenJPA. > BTW, I'm still unable to send emails to open-jpa-dev. Who should I contact to > in order to fix it? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Created: (OPENJPA-212) Constructor expression permits no other expressions in SELECT clause
Constructor expression permits no other expressions in SELECT clause Key: OPENJPA-212 URL: https://issues.apache.org/jira/browse/OPENJPA-212 Project: OpenJPA Issue Type: Bug Components: query Affects Versions: 0.9.7 Reporter: Jacek Laskowski It seems that it's impossible to run a query with constructor expression beside other expressions in SELECT clause. Take a look at the following test that finishes with ClassCastException when the first element of resultQuery is returned (the 2nd line of the snippet). Am I doing something plain wrong? It doesn't work with Hibernate EntityManager 3.3.1, either yet TopLink Essentials 2.0 BUILD 40 runs fine. Query query = em.createQuery("SELECT NEW pl.jaceklaskowski.jpa.PewnaKlasa(p.nazwa, o.imie, o.nazwisko, o.numer), o, p.nazwa FROM Projekt p JOIN p.chair o"); List resultQuery = query.getResultList(); final Object[] firstElementInQueryResult = resultQuery.get(0); assert firstElementInQueryResult.length == 3; final Object firstElement = resultQuery.get(0)[0]; assert firstElement instanceof PewnaKlasa; final Object secondElement = resultQuery.get(0)[1]; assert secondElement instanceof Osoba; final Object thirdElement = resultQuery.get(0)[2]; assert thirdElement instanceof String; The exception is as follows (the line number is different though as the test above is incomplete - no class, imports and alike are shown): java.lang.ClassCastException: pl.jaceklaskowski.jpa.PewnaKlasa at pl.jaceklaskowski.jpa.OpenJPATest.testConstructorExpr(OpenJPATest.java:19) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Created: (OPENJPA-213) @Column with precision and scale should result in NUMERIC(precision, scale)
@Column with precision and scale should result in NUMERIC(precision, scale) --- Key: OPENJPA-213 URL: https://issues.apache.org/jira/browse/OPENJPA-213 Project: OpenJPA Issue Type: Improvement Components: jpa Affects Versions: 0.9.7 Reporter: Jacek Laskowski @Column provides the precision and scale attributes, but there's no (easy) way to figure out how it affects the way OpenJPA works if any. It looks like OpenJPA reads the type of a persistent field and when it's double it maps it to DOUBLE in Derby regardless of the other attributes. When precision and scale are specified, a DDL should use NUMERIC(precision, scale) or its synonim - DECIMAL(precision, scale). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Created: (OPENJPA-216) ArgumentException when no identification variable given in UPDATE clause
ArgumentException when no identification variable given in UPDATE clause Key: OPENJPA-216 URL: https://issues.apache.org/jira/browse/OPENJPA-216 Project: OpenJPA Issue Type: Bug Components: query Affects Versions: 0.9.8 Reporter: Jacek Laskowski According to the spec - 4.10 Bulk Update and Delete Operations page 104: update_statement ::= update_clause [where_clause] update_clause ::= UPDATE abstract_schema_name [[AS] identification_variable] SET update_item {, update_item}* update_item ::= [identification_variable.]{state_field | single_valued_association_field} = new_value The identification_variable is optional, but it doesn't seem to be true for OpenJPA 0.9.8-SNAPSHOT rev 528437. $ svn up Updated to revision 528437. $ mvn -Dtest=false clean install ... [INFO] [INFO] [INFO] BUILD SUCCESSFUL [INFO] [INFO] Total time: 2 minutes 12 seconds [INFO] Finished at: Fri Apr 13 13:00:04 CEST 2007 [INFO] Final Memory: 35M/254M [INFO] $ mvn -Dtest=OpenJPATest clean test ... 0 derbyPU INFO [main] openjpa.Runtime - Starting OpenJPA 0.9.8-incubating-SNAPSHOT ... [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] There are test failures. [INFO] [INFO] For more information, run Maven with the -e switch [INFO] [INFO] Total time: 33 seconds [INFO] Finished at: Fri Apr 13 13:02:11 CEST 2007 [INFO] Final Memory: 11M/254M [INFO] $ cat target/surefire-reports/pl.jaceklaskowski.jpa.issue.OpenJPATest.txt --- Test set: pl.jaceklaskowski.jpa.issue.OpenJPATest --- Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.437 sec <<< FAILURE! testUpdate(pl.jaceklaskowski.jpa.issue.OpenJPATest) Time elapsed: 0.063 sec <<< FAILURE! <0.9.8-incubating-SNAPSHOT nonfatal user error> org.apache.openjpa.persistence.ArgumentException: An error occurred while parsing the query filter 'UPDATE Osoba SET imie = 'JACEK' WHERE imie = 'Jacek''. Error message: <0.9.8-incubating-SNAPSHOT nonfatal user error> org.apache.openjpa.kernel.jpql.ParseException: Encountered "=" at character 23, but expected: ["."]. at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder$ParsedJPQL.parse(JPQLExpressionBuilder.java:1656) at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder$ParsedJPQL.(JPQLExpressionBuilder.java:1636) at org.apache.openjpa.kernel.jpql.JPQLParser.parse(JPQLParser.java:44) at org.apache.openjpa.kernel.ExpressionStoreQuery.newCompilation(ExpressionStoreQuery.java:141) at org.apache.openjpa.kernel.QueryImpl.newCompilation(QueryImpl.java:645) at org.apache.openjpa.kernel.QueryImpl.compilationFromCache(QueryImpl.java:613) at org.apache.openjpa.kernel.QueryImpl.compileForCompilation(QueryImpl.java:593) at org.apache.openjpa.kernel.QueryImpl.compileForExecutor(QueryImpl.java:655) at org.apache.openjpa.kernel.QueryImpl.getOperation(QueryImpl.java:1480) at org.apache.openjpa.kernel.DelegatingQuery.getOperation(DelegatingQuery.java:120) at org.apache.openjpa.persistence.QueryImpl.executeUpdate(QueryImpl.java:297) at pl.jaceklaskowski.jpa.issue.OpenJPATest.testUpdate(OpenJPATest.java:23) $ cat src/test/java/pl/jaceklaskowski/jpa/issue/OpenJPATest.java package pl.jaceklaskowski.jpa.issue; import javax.persistence.Query; import org.testng.annotations.Test; import pl.jaceklaskowski.jpa.BaseTest; public class OpenJPATest extends BaseTest { @Test(dependsOnMethods = { "utworzPracownikow" }) public void testUpdate() { Query query; em.getTransaction().begin(); try { String identificationVariableUpdateQL = "UPDATE Osoba o SET o.imie = 'JACEK' WHERE o.imie = 'Jacek'"; query = em.createQuery(identificationVariableUpdateQL); assert query.executeUpdate() == 1; String noIdentificationVariableUpdateQL = "UPDATE Osoba SET imie = 'JACEK' WHERE imie = 'Jacek'"; query = em.createQuery(noIdentificationVariableUpdateQL); assert query.executeUpdate() == 1; } finally { e
[jira] Commented: (OPENJPA-217) query param value issue in select query
[ https://issues.apache.org/jira/browse/OPENJPA-217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12488863 ] Jacek Laskowski commented on OPENJPA-217: - I have tested it out with the latest version of OpenJPA built from the sources and it worked fine. 31 derbyPU INFO [main] openjpa.Runtime - Starting OpenJPA 0.9.8-incubating-SNAPSHOT Here're my test files for reference: package pl.jaceklaskowski.jpa.entity; import javax.persistence.Entity; import javax.persistence.Id; @Entity public class A { long id; String str1; String str2; @Id public long getId() { return id; } public void setId(long id) { this.id = id; } public String getStr1() { return str1; } public void setStr1(String str1) { this.str1 = str1; } public String getStr2() { return str2; } public void setStr2(String str2) { this.str2 = str2; } public String toString() { return "id=" + getId() + ", str1=" + getStr1() + ", str2=" + getStr2(); } } and the test itself: package pl.jaceklaskowski.jpa.issue; import javax.persistence.Query; import org.testng.annotations.Test; import pl.jaceklaskowski.jpa.BaseTest; import pl.jaceklaskowski.jpa.entity.A; public class Openjpa217 extends BaseTest { @Test(dependsOnMethods = { "utworzPracownikow" }) public void testStringLengthQueryParam() { { A a = new A(); a.setStr2("23"); em.getTransaction().begin(); em.persist(a); em.getTransaction().commit(); } { Query q = em.createQuery("SELECT t from A t where t.str2 = :paramvalue"); q.setParameter("paramvalue", "23"); A a = (A) q.getSingleResult(); assert a.getStr2().length() == 2; } { Query q = em.createQuery("SELECT t from A t where t.str2 = :paramvalue"); q.setParameter("paramvalue", "23 "); A a = (A) q.getSingleResult(); assert a.getStr2().length() == 2; } } } I kept getting BUILD SUCCESSFUL with no test errors inbetween. $ mvn -Dtest=Openjpa217 clean test ... --- T E S T S --- Running pl.jaceklaskowski.jpa.issue.Openjpa217 ... [INFO] [INFO] BUILD SUCCESSFUL [INFO] [INFO] Total time: 9 seconds [INFO] Finished at: Sat Apr 14 15:24:35 CEST 2007 [INFO] Final Memory: 11M/254M [INFO] I attempted to run it against the version in question - 0.9.6-incubating, but couldn't get it to work as far as the schema generation's concerned so I left it as an exercise for others to try out. 47 INFO [main] openjpa.Runtime - Starting OpenJPA 0.9.6-incubating The solution is to upgrade the OpenJPA version to the latest one available from m2 repo or the download page or build it locally from the sources. 47 derbyPU INFO [main] openjpa.Runtime - Starting OpenJPA 0.9.7-incubating-SNAPSHOT I verified that 0.9.7-incubating-SNAPSHOT and 0.9.8-incubating-SNAPSHOT worked fine. > query param value issue in select query > --- > > Key: OPENJPA-217 > URL: https://issues.apache.org/jira/browse/OPENJPA-217 > Project: OpenJPA > Issue Type: Bug > Components: jpa, query >Affects Versions: 0.9.6 >Reporter: sharath.h >Priority: Minor > > Consider a scenario where we have an entity class as shown below: > class A > { > long id; > String str1; > String str2; > } > Say for str2 attribute there will be length constraint something like > > > > Now say i have a jpql select query as shown below : > Query q = em.createQuery("select t from A t where t.str2:paramvalue"); > q.setParameter("paramvalue", "23"); > The above query return empty result set even though the records are present > in table. > But when i set the value from "23" to "23 " (i.e. with trailing 2 spaces) it > works. > Can the padding of additional empty spaces be taken care default by jpa > itself for select kind of queries. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-224) columnDefinition on @Column doesn't work
[ https://issues.apache.org/jira/browse/OPENJPA-224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12490094 ] Jacek Laskowski commented on OPENJPA-224: - What database do you use? I ran a test case with an entity annotated with @Column(name = "C_APPLICATION_NUMBER", columnDefinition="nvarchar(250)") and guess what I'd got: Tests run: 3, Failures: 1, Errors: 0, Skipped: 2, Time elapsed: 4.062 sec <<< FAILURE! setUp(pl.jaceklaskowski.jpa.issue.ATest) Time elapsed: 0 sec <<< FAILURE! <0.9.8-incubating-SNAPSHOT nonfatal general error> org.apache.openjpa.persistence.PersistenceException: Feature not implemented: NATIONAL CHAR VARYING. {stmnt 19762893 CREATE TABLE A (id BIGINT NOT NULL, C_APPLICATION_NUMBER nvarchar(250), col2 VARCHAR(4), PRIMARY KEY (id))} [code=3, state=0A000] at org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:543) at org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:443) at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.synchronizeMappings(JDBCBrokerFactory.java:167) at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.newBrokerImpl(JDBCBrokerFactory.java:127) at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:171) at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:139) at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:187) at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:140) at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:52) at pl.jaceklaskowski.jpa.BaseTest.setUp(BaseTest.java:37) ... It works with OpenJPA 0.9.8-incubating-SNAPSHOT and Derby that doesn't support nvarchar (I think some db dictionary translation is involved here so the type of DB is important to note). Could you give 0.9.8-incubator-SNAPSHOT a shot? You'll need to build it from the sources. > columnDefinition on @Column doesn't work > > > Key: OPENJPA-224 > URL: https://issues.apache.org/jira/browse/OPENJPA-224 > Project: OpenJPA > Issue Type: Bug > Components: jpa >Affects Versions: 0.9.6 >Reporter: Daniel Gajdos > > I tried to specify @Column(name = "C_APPLICATION_NUMBER", > columnDefinition="nvarchar(250)") but it still generates C_APPLICATION_NUMBER > VARCHAR2(255) as column declaration. I need to user NVARCHAR2(250) to support > national charset. Any idea why it doesn't work? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.