[jira] [Commented] (OPENJPA-2898) Cannot resolve the name 'orm:versionType'
[ https://issues.apache.org/jira/browse/OPENJPA-2898?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17816692#comment-17816692 ] Patrice DUROUX commented on OPENJPA-2898: - Hi Could you please consider this patch? Thanks! [^openjpa.patch] > Cannot resolve the name 'orm:versionType' > - > > Key: OPENJPA-2898 > URL: https://issues.apache.org/jira/browse/OPENJPA-2898 > Project: OpenJPA > Issue Type: Bug > Components: Enhance >Affects Versions: 3.2.1, 3.2.2 >Reporter: Patrice DUROUX >Priority: Major > Attachments: openjpa.patch > > > Hi, > Switching from 3.2.0 to 3.2.1 to not face anymore issue OPENJPA-2881 and > without any change in the source code, I am getting the following one: > {noformat} > [ERROR] Failed to execute goal > org.apache.openjpa:openjpa-maven-plugin:3.2.1:enhance (enhancer) on project > IMGTPersistence: Execution enhancer of goal > org.apache.openjpa:openjpa-maven-plugin:3.2.1:enhance failed: > org.xml.sax.SAXException: > file:/home/patrice/workspace-imgt/imgt/api/IMGTPersistence/target/classes/META-INF/taxonomy_orm.xml > [Location:Line: 6, C: 16]: org.xml.sax.SAXParseException; lineNumber: 73; > columnNumber: 46; src-resolve: Cannot resolve the name 'orm:versionType' to > a(n) 'type definition' component. -> [Help 1] > org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute > goal org.apache.openjpa:openjpa-maven-plugin:3.2.1:enhance (enhancer) on > project IMGTPersistence: Execution enhancer of goal > org.apache.openjpa:openjpa-maven-plugin:3.2.1:enhance failed: > org.xml.sax.SAXException: > file:/home/patrice/workspace-imgt/imgt/api/IMGTPersistence/target/classes/META-INF/taxonomy_orm.xml > [Location:Line: 6, C: 16]: org.xml.sax.SAXParseException; lineNumber: 73; > columnNumber: 46; src-resolve: Cannot resolve the name 'orm:versionType' to > a(n) 'type definition' component. > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:215) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:156) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:148) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:117) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:81) > at > org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build > (SingleThreadedBuilder.java:56) > at org.apache.maven.lifecycle.internal.LifecycleStarter.execute > (LifecycleStarter.java:128) > at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305) > at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) > at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) > at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957) > at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289) > at org.apache.maven.cli.MavenCli.main (MavenCli.java:193) > at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) > at jdk.internal.reflect.NativeMethodAccessorImpl.invoke > (NativeMethodAccessorImpl.java:62) > at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke > (DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke (Method.java:566) > at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced > (Launcher.java:282) > at org.codehaus.plexus.classworlds.launcher.Launcher.launch > (Launcher.java:225) > at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode > (Launcher.java:406) > at org.codehaus.plexus.classworlds.launcher.Launcher.main > (Launcher.java:347) > Caused by: org.apache.maven.plugin.PluginExecutionException: Execution > enhancer of goal org.apache.openjpa:openjpa-maven-plugin:3.2.1:enhance > failed: org.xml.sax.SAXException: > file:/home/patrice/workspace-imgt/imgt/api/IMGTPersistence/target/classes/META-INF/taxonomy_orm.xml > [Location:Line: 6, C: 16]: org.xml.sax.SAXParseException; lineNumber: 73; > columnNumber: 46; src-resolve: Cannot resolve the name 'orm:versionType' to > a(n) 'type definition' component. > at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo > (DefaultBuildPluginManager.java:148) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:210) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:156) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:148) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:117) > at >
[jira] [Updated] (OPENJPA-2898) Cannot resolve the name 'orm:versionType'
[ https://issues.apache.org/jira/browse/OPENJPA-2898?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Patrice DUROUX updated OPENJPA-2898: Attachment: openjpa.patch > Cannot resolve the name 'orm:versionType' > - > > Key: OPENJPA-2898 > URL: https://issues.apache.org/jira/browse/OPENJPA-2898 > Project: OpenJPA > Issue Type: Bug > Components: Enhance >Affects Versions: 3.2.1, 3.2.2 >Reporter: Patrice DUROUX >Priority: Major > Attachments: openjpa.patch > > > Hi, > Switching from 3.2.0 to 3.2.1 to not face anymore issue OPENJPA-2881 and > without any change in the source code, I am getting the following one: > {noformat} > [ERROR] Failed to execute goal > org.apache.openjpa:openjpa-maven-plugin:3.2.1:enhance (enhancer) on project > IMGTPersistence: Execution enhancer of goal > org.apache.openjpa:openjpa-maven-plugin:3.2.1:enhance failed: > org.xml.sax.SAXException: > file:/home/patrice/workspace-imgt/imgt/api/IMGTPersistence/target/classes/META-INF/taxonomy_orm.xml > [Location:Line: 6, C: 16]: org.xml.sax.SAXParseException; lineNumber: 73; > columnNumber: 46; src-resolve: Cannot resolve the name 'orm:versionType' to > a(n) 'type definition' component. -> [Help 1] > org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute > goal org.apache.openjpa:openjpa-maven-plugin:3.2.1:enhance (enhancer) on > project IMGTPersistence: Execution enhancer of goal > org.apache.openjpa:openjpa-maven-plugin:3.2.1:enhance failed: > org.xml.sax.SAXException: > file:/home/patrice/workspace-imgt/imgt/api/IMGTPersistence/target/classes/META-INF/taxonomy_orm.xml > [Location:Line: 6, C: 16]: org.xml.sax.SAXParseException; lineNumber: 73; > columnNumber: 46; src-resolve: Cannot resolve the name 'orm:versionType' to > a(n) 'type definition' component. > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:215) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:156) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:148) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:117) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:81) > at > org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build > (SingleThreadedBuilder.java:56) > at org.apache.maven.lifecycle.internal.LifecycleStarter.execute > (LifecycleStarter.java:128) > at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305) > at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) > at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) > at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957) > at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289) > at org.apache.maven.cli.MavenCli.main (MavenCli.java:193) > at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) > at jdk.internal.reflect.NativeMethodAccessorImpl.invoke > (NativeMethodAccessorImpl.java:62) > at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke > (DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke (Method.java:566) > at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced > (Launcher.java:282) > at org.codehaus.plexus.classworlds.launcher.Launcher.launch > (Launcher.java:225) > at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode > (Launcher.java:406) > at org.codehaus.plexus.classworlds.launcher.Launcher.main > (Launcher.java:347) > Caused by: org.apache.maven.plugin.PluginExecutionException: Execution > enhancer of goal org.apache.openjpa:openjpa-maven-plugin:3.2.1:enhance > failed: org.xml.sax.SAXException: > file:/home/patrice/workspace-imgt/imgt/api/IMGTPersistence/target/classes/META-INF/taxonomy_orm.xml > [Location:Line: 6, C: 16]: org.xml.sax.SAXParseException; lineNumber: 73; > columnNumber: 46; src-resolve: Cannot resolve the name 'orm:versionType' to > a(n) 'type definition' component. > at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo > (DefaultBuildPluginManager.java:148) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:210) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:156) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:148) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:117) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:81) >
[jira] [Commented] (OPENJPA-2898) Cannot resolve the name 'orm:versionType'
[ https://issues.apache.org/jira/browse/OPENJPA-2898?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17807722#comment-17807722 ] Patrice DUROUX commented on OPENJPA-2898: - Hi, I have tried again to look at this deeply by switching again from 3.2.0 to 3.2.2. What is strange is that the naming of the XSD ressource files are not all on the same schema when looking into the .jar content: $ find 3.2.2 -name "*.rsrc" 3.2.2/org/apache/openjpa/persistence/persistence_2_1.xsd.rsrc 3.2.2/org/apache/openjpa/persistence/orm-xsd.rsrc 3.2.2/org/apache/openjpa/persistence/persistence_2_2.xsd.rsrc 3.2.2/org/apache/openjpa/persistence/orm_2_2.xsd.rsrc 3.2.2/org/apache/openjpa/persistence/orm_2_1.xsd.rsrc 3.2.2/org/apache/openjpa/persistence/persistence-xsd.rsrc 3.2.2/org/apache/openjpa/persistence/persistence_2_0-xsd.rsrc 3.2.2/org/apache/openjpa/persistence/orm_2_0-xsd.rsrc 3.2.2/org/apache/openjpa/jdbc/sql/sql-keywords.rsrc 3.2.2/org/apache/openjpa/jdbc/sql/sql-invalid-column-names.rsrc 3.2.2/org/apache/openjpa/jdbc/meta/java-keywords.rsrc 3.2.2/org/apache/openjpa/jdbc/schema/schemas-doctype.rsrc Some have suffix '-xsd.rsrc' and some '.xsd.rsrc'. Searching into the source (current git clone), I found: $ rgrep "xsd.rsrc" openjpa-persistence/src/main/appended-resources/META-INF/LICENSE.vm: orm-xsd.rsrc - CDDL 1.0 - included in the openjpa jar, taken from: openjpa-persistence/src/main/appended-resources/META-INF/LICENSE.vm: orm_2_0-xsd.rsrc - CDDL 1.0 - included in the openjpa jar, taken from: openjpa-persistence/src/main/appended-resources/META-INF/LICENSE.vm: orm_2_1-xsd.rsrc - Eclipse Public License v1.0 - included in the openjpa jar, taken from: openjpa-persistence/src/main/appended-resources/META-INF/LICENSE.vm: orm_2_2-xsd.rsrc - Eclipse Public License v1.0 - included in the openjpa jar, taken from: openjpa-persistence/src/main/appended-resources/META-INF/LICENSE.vm: persistence-xsd.rsrc - CDDL 1.0 - included in the openjpa jar, taken from: openjpa-persistence/src/main/appended-resources/META-INF/LICENSE.vm: persistence_2_0-xsd.rsrc - CDDL 1.0 - included in the openjpa jar, taken from: openjpa-persistence/src/main/appended-resources/META-INF/LICENSE.vm: persistence_2_1-xsd.rsrc - Eclipse Public License v1.0 - included in the openjpa jar, taken from: openjpa-persistence/src/main/appended-resources/META-INF/LICENSE.vm: persistence_2_2-xsd.rsrc - Eclipse Public License v1.0 - included in the openjpa jar, taken from: openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java: String ormxsd = "orm_2_0-xsd.rsrc"; openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java: ormxsd = "orm-xsd.rsrc"; openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java: ormxsd = "orm_2_0-xsd.rsrc"; openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java: ormxsd = "orm_2_1.xsd.rsrc"; openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java: ormxsd = "orm_2_2.xsd.rsrc"; openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProductDerivation.java: String persistencexsd = "persistence-xsd.rsrc"; openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProductDerivation.java: persistencexsd = "persistence_2_0-xsd.rsrc"; openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProductDerivation.java: persistencexsd = "persistence_2_1-xsd.rsrc"; openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProductDerivation.java: persistencexsd = "persistence_2_2-xsd.rsrc"; openjpa-project/LICENSE: orm-xsd.rsrc - included in the openjpa jar, taken from: openjpa-project/LICENSE: orm_2_0-xsd.rsrc - included in the openjpa jar, taken from: openjpa-project/LICENSE: orm_2_1-xsd.rsrc - Eclipse Public License v1.0 - included in the openjpa jar, taken from: openjpa-project/LICENSE: orm_2_2-xsd.rsrc - Eclipse Public License v1.0 - included in the openjpa jar, taken from: openjpa-project/LICENSE: persistence-xsd.rsrc - included in the openjpa jar, taken from: openjpa-project/LICENSE: persistence_2_0-xsd.rsrc - included in the openjpa jar, taken from: openjpa-project/LICENSE: persistence_2_1-xsd.rsrc - Eclipse Public License v1.0 - included in the openjpa jar, taken from: openjpa-project/LICENSE: persistence_2_2-xsd.rsrc - Eclipse Public License v1.0 - included in the openjpa jar, taken from: openjpa-all/src/main/appended-resources/META-INF/LICENSE.vm: orm-xsd.rsrc - CDDL 1.0 - included in the openjpa jar, taken from: openjpa-all/src/main/appended-resources/META-INF/LICENSE.vm: orm_2_0-xsd.rsrc - CDDL 1.0 - included in the openjpa jar, taken
[jira] [Updated] (OPENJPA-2898) Cannot resolve the name 'orm:versionType'
[ https://issues.apache.org/jira/browse/OPENJPA-2898?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Patrice DUROUX updated OPENJPA-2898: Affects Version/s: 3.2.2 > Cannot resolve the name 'orm:versionType' > - > > Key: OPENJPA-2898 > URL: https://issues.apache.org/jira/browse/OPENJPA-2898 > Project: OpenJPA > Issue Type: Bug > Components: Enhance >Affects Versions: 3.2.1, 3.2.2 >Reporter: Patrice DUROUX >Priority: Major > > Hi, > Switching from 3.2.0 to 3.2.1 to not face anymore issue OPENJPA-2881 and > without any change in the source code, I am getting the following one: > {noformat} > [ERROR] Failed to execute goal > org.apache.openjpa:openjpa-maven-plugin:3.2.1:enhance (enhancer) on project > IMGTPersistence: Execution enhancer of goal > org.apache.openjpa:openjpa-maven-plugin:3.2.1:enhance failed: > org.xml.sax.SAXException: > file:/home/patrice/workspace-imgt/imgt/api/IMGTPersistence/target/classes/META-INF/taxonomy_orm.xml > [Location:Line: 6, C: 16]: org.xml.sax.SAXParseException; lineNumber: 73; > columnNumber: 46; src-resolve: Cannot resolve the name 'orm:versionType' to > a(n) 'type definition' component. -> [Help 1] > org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute > goal org.apache.openjpa:openjpa-maven-plugin:3.2.1:enhance (enhancer) on > project IMGTPersistence: Execution enhancer of goal > org.apache.openjpa:openjpa-maven-plugin:3.2.1:enhance failed: > org.xml.sax.SAXException: > file:/home/patrice/workspace-imgt/imgt/api/IMGTPersistence/target/classes/META-INF/taxonomy_orm.xml > [Location:Line: 6, C: 16]: org.xml.sax.SAXParseException; lineNumber: 73; > columnNumber: 46; src-resolve: Cannot resolve the name 'orm:versionType' to > a(n) 'type definition' component. > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:215) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:156) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:148) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:117) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:81) > at > org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build > (SingleThreadedBuilder.java:56) > at org.apache.maven.lifecycle.internal.LifecycleStarter.execute > (LifecycleStarter.java:128) > at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305) > at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) > at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) > at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957) > at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289) > at org.apache.maven.cli.MavenCli.main (MavenCli.java:193) > at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) > at jdk.internal.reflect.NativeMethodAccessorImpl.invoke > (NativeMethodAccessorImpl.java:62) > at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke > (DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke (Method.java:566) > at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced > (Launcher.java:282) > at org.codehaus.plexus.classworlds.launcher.Launcher.launch > (Launcher.java:225) > at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode > (Launcher.java:406) > at org.codehaus.plexus.classworlds.launcher.Launcher.main > (Launcher.java:347) > Caused by: org.apache.maven.plugin.PluginExecutionException: Execution > enhancer of goal org.apache.openjpa:openjpa-maven-plugin:3.2.1:enhance > failed: org.xml.sax.SAXException: > file:/home/patrice/workspace-imgt/imgt/api/IMGTPersistence/target/classes/META-INF/taxonomy_orm.xml > [Location:Line: 6, C: 16]: org.xml.sax.SAXParseException; lineNumber: 73; > columnNumber: 46; src-resolve: Cannot resolve the name 'orm:versionType' to > a(n) 'type definition' component. > at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo > (DefaultBuildPluginManager.java:148) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:210) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:156) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:148) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:117) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:81) > at >
[jira] [Commented] (OPENJPA-2903) compatibility with MariaDB Java Client 3.0.6
[ https://issues.apache.org/jira/browse/OPENJPA-2903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17571258#comment-17571258 ] Patrice DUROUX commented on OPENJPA-2903: - A while ago, I tried upgrading to 3.0.x and faced [https://jira.mariadb.org/browse/CONJ-935] So I went back to 2.7.x. Now that 3.0.4 closed the issue, I tried again with 3.0.6. The whole project has been working globally for weeks until one of the tools faced this recent issue. The fact here is that the query is a native SQL one and the java class CustomBeanLIGMDB is not an declared JPA Entity. May be I will try to isolate that part of the project. Thanks! > compatibility with MariaDB Java Client 3.0.6 > > > Key: OPENJPA-2903 > URL: https://issues.apache.org/jira/browse/OPENJPA-2903 > Project: OpenJPA > Issue Type: Wish >Affects Versions: 3.2.0 > Environment: Operating System: Ubuntu > JRE: OpenJDK Runtime Environment (build 11.0.16+8-post-Ubuntu-0ubuntu1) >Reporter: Patrice DUROUX >Priority: Trivial > > Hi, > Here is what I got at runtime upgrading the MariaDB Java Client from 2.7.6 to > 3.0.6: > > {noformat} > > org.apache.openjpa.persistence.ArgumentException: There was an error packing > the projection and/or aggregate results of the query into result type "class > org.imgt.model.genedb2.CustomBeanLIGMDB". See the nested Throwable exception > for details. FailedObject: SELECT sa.gene AS gene,sa.species AS > species,sa.exon AS exon,sa.number AS alleleNumber,se.seqnuc AS > fullSeq,fe2.feadeb AS posDeb,fe2.feafin AS posFin,sa.numacc AS > numacc,fe2.phase AS phase,sa.taxon AS taxon,fe2.partial AS > partiality,fe2.complement AS rc,sa.ordre AS exonorder FROM genedb.seqalleles > sa,ligmdb_v12.sequences se,ligmdb_v12.features fe1,ligmdb_v12.features > fe2,ontology.labels la1,ontology.labels la2 WHERE sa.is_ref=1 AND > sa.numacc=se.numacc AND sa.numacc=fe1.numacc AND sa.feanum=fe1.feanum AND > sa.labcode=fe1.labcode AND la1.label=sa.exon AND la1.labcode=la2.labcode AND > la2.labcode=fe2.labcode AND sa.numacc=fe2.numacc AND fe1.feadeb<=fe2.feadeb > AND fe2.feafin<=fe1.feafin AND sa.gene=? AND sa.species=? AND sa.numacc=? AND > sa.exon=? [java.lang.String] at > org.apache.openjpa.kernel.ResultPacker.packUserType(ResultPacker.java:299) at > org.apache.openjpa.kernel.ResultPacker.pack(ResultPacker.java:262) at > org.apache.openjpa.jdbc.kernel.SQLProjectionResultObjectProvider.getResultObject(SQLProjectionResultObjectProvider.java:98) > at > org.apache.openjpa.lib.rop.EagerResultList.(EagerResultList.java:38) at > org.apache.openjpa.kernel.QueryImpl.toResult(QueryImpl.java:1314) at > org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:1061) at > org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:911) at > org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:842) at > org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:601) > at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:297) at > org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:314) at > org.imgt.dao.GENEDBDAO.getLIGMDBentries(GENEDBDAO.java:590) at > org.imgt.dao.GENEDBDAO.getLIGMDBentries(GENEDBDAO.java:616) at > org.imgt.util.fasta.GeneFastaSeq2.getFastaSeq(GeneFastaSeq2.java:46) at > org.imgt.toolbox.genedb.GenedbFlatFile.run(GenedbFlatFile.java:81) at > org.imgt.tools.cmd.FFile.run(FFile.java:18) at > picocli.CommandLine.executeUserObject(CommandLine.java:1939) at > picocli.CommandLine.access$1300(CommandLine.java:145) at > picocli.CommandLine$RunAll.recursivelyExecuteUserObject(CommandLine.java:2431) > at > picocli.CommandLine$RunAll.recursivelyExecuteUserObject(CommandLine.java:2433) > at picocli.CommandLine$RunAll.handle(CommandLine.java:2428) at > picocli.CommandLine$RunAll.handle(CommandLine.java:2389) at > picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179) > at picocli.CommandLine$RunAll.execute(CommandLine.java:2391) at > picocli.CommandLine.execute(CommandLine.java:2078) at > org.imgt.tools.SeqTool.main(SeqTool.java:19) Caused by: > java.lang.ClassCastException: Cannot convert object > "org.mariadb.jdbc.MariaDbBlob@2178ae3b" of type "class > org.mariadb.jdbc.MariaDbBlob" into an instance of "class [B". at > org.apache.openjpa.kernel.Filters.convert(Filters.java:395) at > org.apache.openjpa.kernel.Filters.convert(Filters.java:271) at > org.apache.openjpa.kernel.ResultPacker.packUserType(ResultPacker.java:280) > ... 25 more{noformat} > Not sure on which side (OpenJPA? MariaDB Java Client?) the problem belongs to. > Regards, > Patrice -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (OPENJPA-2903) compatibility with MariaDB Java Client 3.0.6
[ https://issues.apache.org/jira/browse/OPENJPA-2903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17570879#comment-17570879 ] Patrice DUROUX commented on OPENJPA-2903: - I am using exclusively XML ORM mapping files, so may the OpenJPA enhancer doing that? > compatibility with MariaDB Java Client 3.0.6 > > > Key: OPENJPA-2903 > URL: https://issues.apache.org/jira/browse/OPENJPA-2903 > Project: OpenJPA > Issue Type: Wish >Affects Versions: 3.2.0 > Environment: Operating System: Ubuntu > JRE: OpenJDK Runtime Environment (build 11.0.16+8-post-Ubuntu-0ubuntu1) >Reporter: Patrice DUROUX >Priority: Trivial > > Hi, > Here is what I got at runtime upgrading the MariaDB Java Client from 2.7.6 to > 3.0.6: > > {noformat} > > org.apache.openjpa.persistence.ArgumentException: There was an error packing > the projection and/or aggregate results of the query into result type "class > org.imgt.model.genedb2.CustomBeanLIGMDB". See the nested Throwable exception > for details. FailedObject: SELECT sa.gene AS gene,sa.species AS > species,sa.exon AS exon,sa.number AS alleleNumber,se.seqnuc AS > fullSeq,fe2.feadeb AS posDeb,fe2.feafin AS posFin,sa.numacc AS > numacc,fe2.phase AS phase,sa.taxon AS taxon,fe2.partial AS > partiality,fe2.complement AS rc,sa.ordre AS exonorder FROM genedb.seqalleles > sa,ligmdb_v12.sequences se,ligmdb_v12.features fe1,ligmdb_v12.features > fe2,ontology.labels la1,ontology.labels la2 WHERE sa.is_ref=1 AND > sa.numacc=se.numacc AND sa.numacc=fe1.numacc AND sa.feanum=fe1.feanum AND > sa.labcode=fe1.labcode AND la1.label=sa.exon AND la1.labcode=la2.labcode AND > la2.labcode=fe2.labcode AND sa.numacc=fe2.numacc AND fe1.feadeb<=fe2.feadeb > AND fe2.feafin<=fe1.feafin AND sa.gene=? AND sa.species=? AND sa.numacc=? AND > sa.exon=? [java.lang.String] at > org.apache.openjpa.kernel.ResultPacker.packUserType(ResultPacker.java:299) at > org.apache.openjpa.kernel.ResultPacker.pack(ResultPacker.java:262) at > org.apache.openjpa.jdbc.kernel.SQLProjectionResultObjectProvider.getResultObject(SQLProjectionResultObjectProvider.java:98) > at > org.apache.openjpa.lib.rop.EagerResultList.(EagerResultList.java:38) at > org.apache.openjpa.kernel.QueryImpl.toResult(QueryImpl.java:1314) at > org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:1061) at > org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:911) at > org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:842) at > org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:601) > at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:297) at > org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:314) at > org.imgt.dao.GENEDBDAO.getLIGMDBentries(GENEDBDAO.java:590) at > org.imgt.dao.GENEDBDAO.getLIGMDBentries(GENEDBDAO.java:616) at > org.imgt.util.fasta.GeneFastaSeq2.getFastaSeq(GeneFastaSeq2.java:46) at > org.imgt.toolbox.genedb.GenedbFlatFile.run(GenedbFlatFile.java:81) at > org.imgt.tools.cmd.FFile.run(FFile.java:18) at > picocli.CommandLine.executeUserObject(CommandLine.java:1939) at > picocli.CommandLine.access$1300(CommandLine.java:145) at > picocli.CommandLine$RunAll.recursivelyExecuteUserObject(CommandLine.java:2431) > at > picocli.CommandLine$RunAll.recursivelyExecuteUserObject(CommandLine.java:2433) > at picocli.CommandLine$RunAll.handle(CommandLine.java:2428) at > picocli.CommandLine$RunAll.handle(CommandLine.java:2389) at > picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179) > at picocli.CommandLine$RunAll.execute(CommandLine.java:2391) at > picocli.CommandLine.execute(CommandLine.java:2078) at > org.imgt.tools.SeqTool.main(SeqTool.java:19) Caused by: > java.lang.ClassCastException: Cannot convert object > "org.mariadb.jdbc.MariaDbBlob@2178ae3b" of type "class > org.mariadb.jdbc.MariaDbBlob" into an instance of "class [B". at > org.apache.openjpa.kernel.Filters.convert(Filters.java:395) at > org.apache.openjpa.kernel.Filters.convert(Filters.java:271) at > org.apache.openjpa.kernel.ResultPacker.packUserType(ResultPacker.java:280) > ... 25 more{noformat} > Not sure on which side (OpenJPA? MariaDB Java Client?) the problem belongs to. > Regards, > Patrice -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Created] (OPENJPA-2903) compatibility with MariaDB Java Client 3.0.6
Patrice DUROUX created OPENJPA-2903: --- Summary: compatibility with MariaDB Java Client 3.0.6 Key: OPENJPA-2903 URL: https://issues.apache.org/jira/browse/OPENJPA-2903 Project: OpenJPA Issue Type: Wish Affects Versions: 3.2.0 Environment: Operating System: Ubuntu JRE: OpenJDK Runtime Environment (build 11.0.16+8-post-Ubuntu-0ubuntu1) Reporter: Patrice DUROUX Hi, Here is what I got at runtime upgrading the MariaDB Java Client from 2.7.6 to 3.0.6: {noformat} org.apache.openjpa.persistence.ArgumentException: There was an error packing the projection and/or aggregate results of the query into result type "class org.imgt.model.genedb2.CustomBeanLIGMDB". See the nested Throwable exception for details. FailedObject: SELECT sa.gene AS gene,sa.species AS species,sa.exon AS exon,sa.number AS alleleNumber,se.seqnuc AS fullSeq,fe2.feadeb AS posDeb,fe2.feafin AS posFin,sa.numacc AS numacc,fe2.phase AS phase,sa.taxon AS taxon,fe2.partial AS partiality,fe2.complement AS rc,sa.ordre AS exonorder FROM genedb.seqalleles sa,ligmdb_v12.sequences se,ligmdb_v12.features fe1,ligmdb_v12.features fe2,ontology.labels la1,ontology.labels la2 WHERE sa.is_ref=1 AND sa.numacc=se.numacc AND sa.numacc=fe1.numacc AND sa.feanum=fe1.feanum AND sa.labcode=fe1.labcode AND la1.label=sa.exon AND la1.labcode=la2.labcode AND la2.labcode=fe2.labcode AND sa.numacc=fe2.numacc AND fe1.feadeb<=fe2.feadeb AND fe2.feafin<=fe1.feafin AND sa.gene=? AND sa.species=? AND sa.numacc=? AND sa.exon=? [java.lang.String] at org.apache.openjpa.kernel.ResultPacker.packUserType(ResultPacker.java:299) at org.apache.openjpa.kernel.ResultPacker.pack(ResultPacker.java:262) at org.apache.openjpa.jdbc.kernel.SQLProjectionResultObjectProvider.getResultObject(SQLProjectionResultObjectProvider.java:98) at org.apache.openjpa.lib.rop.EagerResultList.(EagerResultList.java:38) at org.apache.openjpa.kernel.QueryImpl.toResult(QueryImpl.java:1314) at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:1061) at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:911) at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:842) at org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:601) at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:297) at org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:314) at org.imgt.dao.GENEDBDAO.getLIGMDBentries(GENEDBDAO.java:590) at org.imgt.dao.GENEDBDAO.getLIGMDBentries(GENEDBDAO.java:616) at org.imgt.util.fasta.GeneFastaSeq2.getFastaSeq(GeneFastaSeq2.java:46) at org.imgt.toolbox.genedb.GenedbFlatFile.run(GenedbFlatFile.java:81) at org.imgt.tools.cmd.FFile.run(FFile.java:18) at picocli.CommandLine.executeUserObject(CommandLine.java:1939) at picocli.CommandLine.access$1300(CommandLine.java:145) at picocli.CommandLine$RunAll.recursivelyExecuteUserObject(CommandLine.java:2431) at picocli.CommandLine$RunAll.recursivelyExecuteUserObject(CommandLine.java:2433) at picocli.CommandLine$RunAll.handle(CommandLine.java:2428) at picocli.CommandLine$RunAll.handle(CommandLine.java:2389) at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179) at picocli.CommandLine$RunAll.execute(CommandLine.java:2391) at picocli.CommandLine.execute(CommandLine.java:2078) at org.imgt.tools.SeqTool.main(SeqTool.java:19) Caused by: java.lang.ClassCastException: Cannot convert object "org.mariadb.jdbc.MariaDbBlob@2178ae3b" of type "class org.mariadb.jdbc.MariaDbBlob" into an instance of "class [B". at org.apache.openjpa.kernel.Filters.convert(Filters.java:395) at org.apache.openjpa.kernel.Filters.convert(Filters.java:271) at org.apache.openjpa.kernel.ResultPacker.packUserType(ResultPacker.java:280) ... 25 more{noformat} Not sure on which side (OpenJPA? MariaDB Java Client?) the problem belongs to. Regards, Patrice -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Created] (OPENJPA-2898) Cannot resolve the name 'orm:versionType'
Patrice DUROUX created OPENJPA-2898: --- Summary: Cannot resolve the name 'orm:versionType' Key: OPENJPA-2898 URL: https://issues.apache.org/jira/browse/OPENJPA-2898 Project: OpenJPA Issue Type: Bug Components: Enhance Affects Versions: 3.2.1 Reporter: Patrice DUROUX Hi, Switching from 3.2.0 to 3.2.1 to not face anymore issue OPENJPA-2881 and without any change in the source code, I am getting the following one: {noformat} [ERROR] Failed to execute goal org.apache.openjpa:openjpa-maven-plugin:3.2.1:enhance (enhancer) on project IMGTPersistence: Execution enhancer of goal org.apache.openjpa:openjpa-maven-plugin:3.2.1:enhance failed: org.xml.sax.SAXException: file:/home/patrice/workspace-imgt/imgt/api/IMGTPersistence/target/classes/META-INF/taxonomy_orm.xml [Location:Line: 6, C: 16]: org.xml.sax.SAXParseException; lineNumber: 73; columnNumber: 46; src-resolve: Cannot resolve the name 'orm:versionType' to a(n) 'type definition' component. -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.openjpa:openjpa-maven-plugin:3.2.1:enhance (enhancer) on project IMGTPersistence: Execution enhancer of goal org.apache.openjpa:openjpa-maven-plugin:3.2.1:enhance failed: org.xml.sax.SAXException: file:/home/patrice/workspace-imgt/imgt/api/IMGTPersistence/target/classes/META-INF/taxonomy_orm.xml [Location:Line: 6, C: 16]: org.xml.sax.SAXParseException; lineNumber: 73; columnNumber: 46; src-resolve: Cannot resolve the name 'orm:versionType' to a(n) 'type definition' component. at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289) at org.apache.maven.cli.MavenCli.main (MavenCli.java:193) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:566) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347) Caused by: org.apache.maven.plugin.PluginExecutionException: Execution enhancer of goal org.apache.openjpa:openjpa-maven-plugin:3.2.1:enhance failed: org.xml.sax.SAXException: file:/home/patrice/workspace-imgt/imgt/api/IMGTPersistence/target/classes/META-INF/taxonomy_orm.xml [Location:Line: 6, C: 16]: org.xml.sax.SAXParseException; lineNumber: 73; columnNumber: 46; src-resolve: Cannot resolve the name 'orm:versionType' to a(n) 'type definition' component. at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:148) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) at org.apache.maven.DefaultMaven.execute
[jira] [Commented] (OPENJPA-2898) Cannot resolve the name 'orm:versionType'
[ https://issues.apache.org/jira/browse/OPENJPA-2898?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17489410#comment-17489410 ] Patrice DUROUX commented on OPENJPA-2898: - just in case here is the header of the taxonomy_orm.xml: {{}} {{http://xmlns.jcp.org/xml/ns/persistence/orm"}} {{ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"}} {{ xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence/orm http://xmlns.jcp.org/xml/ns/persistence/orm_2_2.xsd"}} {{ version="2.2">}} {{...}} {{}} > Cannot resolve the name 'orm:versionType' > - > > Key: OPENJPA-2898 > URL: https://issues.apache.org/jira/browse/OPENJPA-2898 > Project: OpenJPA > Issue Type: Bug > Components: Enhance >Affects Versions: 3.2.1 >Reporter: Patrice DUROUX >Priority: Major > > Hi, > Switching from 3.2.0 to 3.2.1 to not face anymore issue OPENJPA-2881 and > without any change in the source code, I am getting the following one: > {noformat} > [ERROR] Failed to execute goal > org.apache.openjpa:openjpa-maven-plugin:3.2.1:enhance (enhancer) on project > IMGTPersistence: Execution enhancer of goal > org.apache.openjpa:openjpa-maven-plugin:3.2.1:enhance failed: > org.xml.sax.SAXException: > file:/home/patrice/workspace-imgt/imgt/api/IMGTPersistence/target/classes/META-INF/taxonomy_orm.xml > [Location:Line: 6, C: 16]: org.xml.sax.SAXParseException; lineNumber: 73; > columnNumber: 46; src-resolve: Cannot resolve the name 'orm:versionType' to > a(n) 'type definition' component. -> [Help 1] > org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute > goal org.apache.openjpa:openjpa-maven-plugin:3.2.1:enhance (enhancer) on > project IMGTPersistence: Execution enhancer of goal > org.apache.openjpa:openjpa-maven-plugin:3.2.1:enhance failed: > org.xml.sax.SAXException: > file:/home/patrice/workspace-imgt/imgt/api/IMGTPersistence/target/classes/META-INF/taxonomy_orm.xml > [Location:Line: 6, C: 16]: org.xml.sax.SAXParseException; lineNumber: 73; > columnNumber: 46; src-resolve: Cannot resolve the name 'orm:versionType' to > a(n) 'type definition' component. > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:215) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:156) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:148) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:117) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:81) > at > org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build > (SingleThreadedBuilder.java:56) > at org.apache.maven.lifecycle.internal.LifecycleStarter.execute > (LifecycleStarter.java:128) > at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305) > at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) > at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) > at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957) > at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289) > at org.apache.maven.cli.MavenCli.main (MavenCli.java:193) > at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) > at jdk.internal.reflect.NativeMethodAccessorImpl.invoke > (NativeMethodAccessorImpl.java:62) > at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke > (DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke (Method.java:566) > at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced > (Launcher.java:282) > at org.codehaus.plexus.classworlds.launcher.Launcher.launch > (Launcher.java:225) > at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode > (Launcher.java:406) > at org.codehaus.plexus.classworlds.launcher.Launcher.main > (Launcher.java:347) > Caused by: org.apache.maven.plugin.PluginExecutionException: Execution > enhancer of goal org.apache.openjpa:openjpa-maven-plugin:3.2.1:enhance > failed: org.xml.sax.SAXException: > file:/home/patrice/workspace-imgt/imgt/api/IMGTPersistence/target/classes/META-INF/taxonomy_orm.xml > [Location:Line: 6, C: 16]: org.xml.sax.SAXParseException; lineNumber: 73; > columnNumber: 46; src-resolve: Cannot resolve the name 'orm:versionType' to > a(n) 'type definition' component. > at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo > (DefaultBuildPluginManager.java:148) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:210) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:156) > at
[jira] [Commented] (OPENJPA-2881) runtime exception in org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource
[ https://issues.apache.org/jira/browse/OPENJPA-2881?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17445800#comment-17445800 ] Patrice DUROUX commented on OPENJPA-2881: - Ok. At least I know why now!(y) So will this be part of a fix? Do I reopen this issue? > runtime exception in > org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource > --- > > Key: OPENJPA-2881 > URL: https://issues.apache.org/jira/browse/OPENJPA-2881 > Project: OpenJPA > Issue Type: Improvement >Affects Versions: 3.1.2 >Reporter: Patrice DUROUX >Assignee: Maxim Solodovnik >Priority: Major > > Hi, > Similar to my previous post here: > [http://mail-archives.apache.org/mod_mbox/openjpa-users/202103.mbox/browser] > The runtime is broken due to the following: > > org.apache.openjpa.util.GeneralException: org.xml.sax.SAXException: > jar:file:[CUT]/META-INF/persistence.xml [Location:Line: 4, C: 16]: > org.xml.sax.SAXParseException; systemId: > http://www.oracle.com/splash/www/index.html; lineNumber: 1; columnNumber: 1; > Fin prématurée du fichier. > at > org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource(XMLMetaDataParser.java:435) > at > org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:355) > at > org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:332) > at > org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:301) > at > org.apache.openjpa.persistence.PersistenceProductDerivation$ConfigurationParser.parse(PersistenceProductDerivation.java:813) > at > org.apache.openjpa.persistence.PersistenceProductDerivation.parseResources(PersistenceProductDerivation.java:578) > at > org.apache.openjpa.persistence.PersistenceProductDerivation.load(PersistenceProductDerivation.java:530) > at > org.apache.openjpa.persistence.PersistenceProductDerivation.load(PersistenceProductDerivation.java:341) > at > org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:90) > at > org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:159) > at > org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:66) > at > javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:106) > at > javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:68) > [CUT] > Thanks, > Patrice -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Commented] (OPENJPA-2881) runtime exception in org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource
[ https://issues.apache.org/jira/browse/OPENJPA-2881?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17445762#comment-17445762 ] Patrice DUROUX commented on OPENJPA-2881: - Here is the head of admin_orm.xml: {{}} {{http://xmlns.jcp.org/xml/ns/persistence/orm"}} {{ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"}} {{ xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence/orm http://xmlns.jcp.org/xml/ns/persistence/orm_2_2.xsd"}} {{ version="2.2">}} The version of OpenJPA is shown at the beginning of the exception stack but here is mvn dep tree: {{[INFO] org.imgt:IMGTPersistence:jar:0.0.1-SNAPSHOT}} {{[INFO] +- org.json:json:jar:20210307:compile}} {{[INFO] +- org.imgt:IMGTJava6:jar:0.0.1-SNAPSHOT:compile}} {{[INFO] +- org.apache.geronimo.specs:geronimo-jpa_2.2_spec:jar:1.1:compile}} {{[INFO] +- org.apache.openjpa:openjpa:jar:3.2.0:compile}} {{[INFO] | +- net.sourceforge.serp:serp:jar:1.15.1:compile}} {{[INFO] | +- org.apache.geronimo.specs:geronimo-jms_1.1_spec:jar:1.1.1:compile}} {{[INFO] | +- org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.1.1:compile}} {{[INFO] | +- org.apache.commons:commons-pool2:jar:2.9.0:compile}} {{[INFO] | \- org.apache.xbean:xbean-asm9-shaded:jar:4.20:compile}} {{[INFO] +- org.mariadb.jdbc:mariadb-java-client:jar:2.7.4:runtime}} {{[INFO] +- org.apache.logging.log4j:log4j-api:jar:2.14.1:compile}} {{[INFO] +- org.apache.logging.log4j:log4j-core:jar:2.14.1:runtime}} {{[INFO] +- org.apache.logging.log4j:log4j-jcl:jar:2.14.1:runtime}} {{[INFO] | \- commons-logging:commons-logging:jar:1.2:runtime}} {{[INFO] +- org.apache.logging.log4j:log4j-slf4j-impl:jar:2.14.1:runtime}} {{[INFO] | \- org.slf4j:slf4j-api:jar:1.7.25:runtime}} {{[INFO] \- junit:junit:jar:4.13.2:test}} {{[INFO] \- org.hamcrest:hamcrest-core:jar:1.3:test}} When the trouble occurs on other projects that depend on this module, I also do a simple test on this one using {{mvn install}} that will run the OpenJPA enhance plugin and observe a similar failure. > runtime exception in > org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource > --- > > Key: OPENJPA-2881 > URL: https://issues.apache.org/jira/browse/OPENJPA-2881 > Project: OpenJPA > Issue Type: Improvement >Affects Versions: 3.1.2 >Reporter: Patrice DUROUX >Assignee: Maxim Solodovnik >Priority: Major > > Hi, > Similar to my previous post here: > [http://mail-archives.apache.org/mod_mbox/openjpa-users/202103.mbox/browser] > The runtime is broken due to the following: > > org.apache.openjpa.util.GeneralException: org.xml.sax.SAXException: > jar:file:[CUT]/META-INF/persistence.xml [Location:Line: 4, C: 16]: > org.xml.sax.SAXParseException; systemId: > http://www.oracle.com/splash/www/index.html; lineNumber: 1; columnNumber: 1; > Fin prématurée du fichier. > at > org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource(XMLMetaDataParser.java:435) > at > org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:355) > at > org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:332) > at > org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:301) > at > org.apache.openjpa.persistence.PersistenceProductDerivation$ConfigurationParser.parse(PersistenceProductDerivation.java:813) > at > org.apache.openjpa.persistence.PersistenceProductDerivation.parseResources(PersistenceProductDerivation.java:578) > at > org.apache.openjpa.persistence.PersistenceProductDerivation.load(PersistenceProductDerivation.java:530) > at > org.apache.openjpa.persistence.PersistenceProductDerivation.load(PersistenceProductDerivation.java:341) > at > org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:90) > at > org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:159) > at > org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:66) > at > javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:106) > at > javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:68) > [CUT] > Thanks, > Patrice -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Commented] (OPENJPA-2881) runtime exception in org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource
[ https://issues.apache.org/jira/browse/OPENJPA-2881?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17445338#comment-17445338 ] Patrice DUROUX commented on OPENJPA-2881: - After working for a time, problem is back now for me. Still a kind of random breakage. :( org.apache.openjpa.persistence.PersistenceException: org.xml.sax.SAXException: file:/home/patrice/workspace-imgt/imgt/api/IMGTPersistence/target/classes/META-INF/admin_orm.xml [Location:Line: 6, C: 16]: org.xml.sax.SAXParseException; systemId: http://www.oracle.com/splash/www/index.html; lineNumber: 1; columnNumber: 1; Fin prématurée du fichier. at org.apache.openjpa.persistence.PersistenceMetaDataFactory.parseXML(PersistenceMetaDataFactory.java:299) at org.apache.openjpa.persistence.PersistenceMetaDataFactory.load(PersistenceMetaDataFactory.java:232) at org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:592) at org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:402) at org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:394) at org.apache.openjpa.kernel.BrokerImpl.newObjectId(BrokerImpl.java:1350) at org.apache.openjpa.kernel.DelegatingBroker.newObjectId(DelegatingBroker.java:341) at org.apache.openjpa.persistence.EntityManagerImpl.find(EntityManagerImpl.java:581) at org.imgt.dao.ImgtDAO.find(ImgtDAO.java:32) at org.imgt.dao.StructDAO.getEntry(StructDAO.java:125) at org.imgt.test.TestDAO.testStructure(TestDAO.java:26) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at junit.framework.TestCase.runTest(TestCase.java:177) at junit.framework.TestCase.runBare(TestCase.java:142) at junit.framework.TestResult$1.protect(TestResult.java:122) at junit.framework.TestResult.runProtected(TestResult.java:142) at junit.framework.TestResult.run(TestResult.java:125) at junit.framework.TestCase.run(TestCase.java:130) at junit.framework.TestSuite.runTest(TestSuite.java:241) at junit.framework.TestSuite.run(TestSuite.java:236) at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:90) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:93) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:40) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:529) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:756) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:452) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210) Caused by: java.io.IOException: org.xml.sax.SAXException: file:/home/patrice/workspace-imgt/imgt/api/IMGTPersistence/target/classes/META-INF/admin_orm.xml [Location:Line: 6, C: 16]: org.xml.sax.SAXParseException; systemId: http://www.oracle.com/splash/www/index.html; lineNumber: 1; columnNumber: 1; Fin prématurée du fichier. at org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource(XMLMetaDataParser.java:435) at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:355) at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:332) at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:301) at org.apache.openjpa.persistence.XMLPersistenceMetaDataParser.parse(XMLPersistenceMetaDataParser.java:463) at org.apache.openjpa.persistence.PersistenceMetaDataFactory.parseXML(PersistenceMetaDataFactory.java:297) ... 29 more Caused by: org.xml.sax.SAXException: file:/home/patrice/workspace-imgt/imgt/api/IMGTPersistence/target/classes/META-INF/admin_orm.xml [Location:Line: 6, C: 16]: org.xml.sax.SAXParseException; systemId: http://www.oracle.com/splash/www/index.html; lineNumber: 1; columnNumber: 1; Fin prématurée du fichier. at org.apache.openjpa.lib.meta.XMLMetaDataParser.getException(XMLMetaDataParser.java:751) at org.apache.openjpa.lib.meta.XMLMetaDataParser.fatalError(XMLMetaDataParser.java:490) at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:180) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327) at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1473) at
[jira] [Created] (OPENJPA-2887) trouble mapping a map field using an XML ORM
Patrice DUROUX created OPENJPA-2887: --- Summary: trouble mapping a map field using an XML ORM Key: OPENJPA-2887 URL: https://issues.apache.org/jira/browse/OPENJPA-2887 Project: OpenJPA Issue Type: Bug Components: Enhance Affects Versions: 3.2.0, 3.1.2 Reporter: Patrice DUROUX Hi, On a property field (locations) that is a Map where C1 has a id class (composite key) that is an embeddable: But now if I try to apply the following mapping: Mapping is like loosing the "numacc" column while trying to insert values: Caused by: org.apache.openjpa.persistence.PersistenceException: (conn=64888979) Field 'numacc' doesn't have a default value \{prepstmnt 2064897338 INSERT INTO imgt2.locations (sequence_id, class_id, feanum) VALUES (?, ?, ?)} [code=1364, state=HY000] It is remaining me an old issue #1893 of mine where also some columns were lost in translation. ;) I admit myself being a little lost in among all the elements. Am I doing it right? A current working solution is to not have the 2 elements in the mapping and use the default JPA column names that are 'key0_numacc' and 'key0_feanum' as the physical column names in the corresponding table. But this is not the expected solution. Thanks, Patrice -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Commented] (OPENJPA-2881) runtime exception in org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource
[ https://issues.apache.org/jira/browse/OPENJPA-2881?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17434445#comment-17434445 ] Patrice DUROUX commented on OPENJPA-2881: - People are always surprising me! :) Again, many thanks!(y) > runtime exception in > org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource > --- > > Key: OPENJPA-2881 > URL: https://issues.apache.org/jira/browse/OPENJPA-2881 > Project: OpenJPA > Issue Type: Improvement >Affects Versions: 3.1.2 >Reporter: Patrice DUROUX >Assignee: Maxim Solodovnik >Priority: Major > > Hi, > Similar to my previous post here: > [http://mail-archives.apache.org/mod_mbox/openjpa-users/202103.mbox/browser] > The runtime is broken due to the following: > > org.apache.openjpa.util.GeneralException: org.xml.sax.SAXException: > jar:file:[CUT]/META-INF/persistence.xml [Location:Line: 4, C: 16]: > org.xml.sax.SAXParseException; systemId: > http://www.oracle.com/splash/www/index.html; lineNumber: 1; columnNumber: 1; > Fin prématurée du fichier. > at > org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource(XMLMetaDataParser.java:435) > at > org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:355) > at > org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:332) > at > org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:301) > at > org.apache.openjpa.persistence.PersistenceProductDerivation$ConfigurationParser.parse(PersistenceProductDerivation.java:813) > at > org.apache.openjpa.persistence.PersistenceProductDerivation.parseResources(PersistenceProductDerivation.java:578) > at > org.apache.openjpa.persistence.PersistenceProductDerivation.load(PersistenceProductDerivation.java:530) > at > org.apache.openjpa.persistence.PersistenceProductDerivation.load(PersistenceProductDerivation.java:341) > at > org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:90) > at > org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:159) > at > org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:66) > at > javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:106) > at > javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:68) > [CUT] > Thanks, > Patrice -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OPENJPA-2881) runtime exception in org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource
[ https://issues.apache.org/jira/browse/OPENJPA-2881?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17434430#comment-17434430 ] Patrice DUROUX commented on OPENJPA-2881: - I will do the upgrade, thanks! But probably I was confused by the following points taken here: [http://openjpa.apache.org/openjpa-3.1.x.html] in the «Changes in OpenJPA 3.1.0» section *OPENJPA-2710 - Create and update to geronimo-jpa_2.2_spec* *OPENJPA-2781 - OpenJPA need internet connection to read the persistence.xml* *OPENJPA-2747 - Upgrade to JPA 2.2 and use javax.persistence-api spec* *OPENJPA-2758 - JPA 2.2 compliance* > runtime exception in > org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource > --- > > Key: OPENJPA-2881 > URL: https://issues.apache.org/jira/browse/OPENJPA-2881 > Project: OpenJPA > Issue Type: Improvement >Affects Versions: 3.1.2 >Reporter: Patrice DUROUX >Assignee: Maxim Solodovnik >Priority: Major > > Hi, > Similar to my previous post here: > [http://mail-archives.apache.org/mod_mbox/openjpa-users/202103.mbox/browser] > The runtime is broken due to the following: > > org.apache.openjpa.util.GeneralException: org.xml.sax.SAXException: > jar:file:[CUT]/META-INF/persistence.xml [Location:Line: 4, C: 16]: > org.xml.sax.SAXParseException; systemId: > http://www.oracle.com/splash/www/index.html; lineNumber: 1; columnNumber: 1; > Fin prématurée du fichier. > at > org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource(XMLMetaDataParser.java:435) > at > org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:355) > at > org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:332) > at > org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:301) > at > org.apache.openjpa.persistence.PersistenceProductDerivation$ConfigurationParser.parse(PersistenceProductDerivation.java:813) > at > org.apache.openjpa.persistence.PersistenceProductDerivation.parseResources(PersistenceProductDerivation.java:578) > at > org.apache.openjpa.persistence.PersistenceProductDerivation.load(PersistenceProductDerivation.java:530) > at > org.apache.openjpa.persistence.PersistenceProductDerivation.load(PersistenceProductDerivation.java:341) > at > org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:90) > at > org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:159) > at > org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:66) > at > javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:106) > at > javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:68) > [CUT] > Thanks, > Patrice -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OPENJPA-2881) runtime exception in org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource
[ https://issues.apache.org/jira/browse/OPENJPA-2881?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17420709#comment-17420709 ] Patrice DUROUX commented on OPENJPA-2881: - Yes, here it is: {noformat} http://xmlns.jcp.org/xml/ns/persistence; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_2.xsd; version="2.2"> {noformat} I think it is the one indicated in JPA 2.2 spec here: [https://github.com/javaee/jpa-spec/blob/master/jsr338-MR/persistence_2_2.xsd] > runtime exception in > org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource > --- > > Key: OPENJPA-2881 > URL: https://issues.apache.org/jira/browse/OPENJPA-2881 > Project: OpenJPA > Issue Type: Improvement >Affects Versions: 3.1.2 >Reporter: Patrice DUROUX >Priority: Major > > Hi, > Similar to my previous post here: > [http://mail-archives.apache.org/mod_mbox/openjpa-users/202103.mbox/browser] > The runtime is broken due to the following: > > org.apache.openjpa.util.GeneralException: org.xml.sax.SAXException: > jar:file:[CUT]/META-INF/persistence.xml [Location:Line: 4, C: 16]: > org.xml.sax.SAXParseException; systemId: > http://www.oracle.com/splash/www/index.html; lineNumber: 1; columnNumber: 1; > Fin prématurée du fichier. > at > org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource(XMLMetaDataParser.java:435) > at > org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:355) > at > org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:332) > at > org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:301) > at > org.apache.openjpa.persistence.PersistenceProductDerivation$ConfigurationParser.parse(PersistenceProductDerivation.java:813) > at > org.apache.openjpa.persistence.PersistenceProductDerivation.parseResources(PersistenceProductDerivation.java:578) > at > org.apache.openjpa.persistence.PersistenceProductDerivation.load(PersistenceProductDerivation.java:530) > at > org.apache.openjpa.persistence.PersistenceProductDerivation.load(PersistenceProductDerivation.java:341) > at > org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:90) > at > org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:159) > at > org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:66) > at > javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:106) > at > javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:68) > [CUT] > Thanks, > Patrice -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OPENJPA-2881) runtime exception in org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource
[ https://issues.apache.org/jira/browse/OPENJPA-2881?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17420563#comment-17420563 ] Patrice DUROUX commented on OPENJPA-2881: - Thank you! Sorry but my XML is valid and it have been there without change for years. If you read the email posts, you should have some clue about what is going on. It should be nice that the validation may be deactivated for the runtime otherwise any network troubles like in such a case the access to the Oracle website for XML validation resources (XSD & co) may break applications in production. Similar trouble happens also during our dev breaking the class enhancement process. Is it more clear? > runtime exception in > org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource > --- > > Key: OPENJPA-2881 > URL: https://issues.apache.org/jira/browse/OPENJPA-2881 > Project: OpenJPA > Issue Type: Improvement >Affects Versions: 3.1.2 >Reporter: Patrice DUROUX >Priority: Major > > Hi, > Similar to my previous post here: > [http://mail-archives.apache.org/mod_mbox/openjpa-users/202103.mbox/browser] > The runtime is broken due to the following: > > org.apache.openjpa.util.GeneralException: org.xml.sax.SAXException: > jar:file:[CUT]/META-INF/persistence.xml [Location:Line: 4, C: 16]: > org.xml.sax.SAXParseException; systemId: > http://www.oracle.com/splash/www/index.html; lineNumber: 1; columnNumber: 1; > Fin prématurée du fichier. > at > org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource(XMLMetaDataParser.java:435) > at > org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:355) > at > org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:332) > at > org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:301) > at > org.apache.openjpa.persistence.PersistenceProductDerivation$ConfigurationParser.parse(PersistenceProductDerivation.java:813) > at > org.apache.openjpa.persistence.PersistenceProductDerivation.parseResources(PersistenceProductDerivation.java:578) > at > org.apache.openjpa.persistence.PersistenceProductDerivation.load(PersistenceProductDerivation.java:530) > at > org.apache.openjpa.persistence.PersistenceProductDerivation.load(PersistenceProductDerivation.java:341) > at > org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:90) > at > org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:159) > at > org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:66) > at > javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:106) > at > javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:68) > [CUT] > Thanks, > Patrice -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (OPENJPA-2881) runtime exception in org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource
Patrice DUROUX created OPENJPA-2881: --- Summary: runtime exception in org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource Key: OPENJPA-2881 URL: https://issues.apache.org/jira/browse/OPENJPA-2881 Project: OpenJPA Issue Type: Improvement Affects Versions: 3.1.2 Reporter: Patrice DUROUX Hi, Similar to my previous post here: [http://mail-archives.apache.org/mod_mbox/openjpa-users/202103.mbox/browser] The runtime is broken due to the following: org.apache.openjpa.util.GeneralException: org.xml.sax.SAXException: jar:file:[CUT]/META-INF/persistence.xml [Location:Line: 4, C: 16]: org.xml.sax.SAXParseException; systemId: http://www.oracle.com/splash/www/index.html; lineNumber: 1; columnNumber: 1; Fin prématurée du fichier. at org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource(XMLMetaDataParser.java:435) at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:355) at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:332) at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:301) at org.apache.openjpa.persistence.PersistenceProductDerivation$ConfigurationParser.parse(PersistenceProductDerivation.java:813) at org.apache.openjpa.persistence.PersistenceProductDerivation.parseResources(PersistenceProductDerivation.java:578) at org.apache.openjpa.persistence.PersistenceProductDerivation.load(PersistenceProductDerivation.java:530) at org.apache.openjpa.persistence.PersistenceProductDerivation.load(PersistenceProductDerivation.java:341) at org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:90) at org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:159) at org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:66) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:106) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:68) [CUT] Thanks, Patrice -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OPENJPA-2729) problem with ToUpperCase and ToLowerCase
[ https://issues.apache.org/jira/browse/OPENJPA-2729?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17216340#comment-17216340 ] Patrice DUROUX commented on OPENJPA-2729: - [^openjpa-test.zip] Sorry it took me awhile to come back to this trouble so here is my test case. The trouble is still there using 3.1.2. > problem with ToUpperCase and ToLowerCase > > > Key: OPENJPA-2729 > URL: https://issues.apache.org/jira/browse/OPENJPA-2729 > Project: OpenJPA > Issue Type: Bug > Components: query >Affects Versions: 2.4.2 > Environment: MySQL >Reporter: Patrice DUROUX >Priority: Major > Attachments: openjpa-test.zip > > > Hi, > An exception is thrown in the following method (here the one of ToLowerCase): > when the getValue() is a PCPath and ((PCPath) > getValue()).getFieldMapping(state).getColumns()[0]) > throws: > {{java.lang.ArrayIndexOutOfBoundsException: 0}}{{ > org.apache.openjpa.jdbc.kernel.exps.ToLowerCase.appendTo(ToLowerCase.java:47) > org.apache.openjpa.jdbc.kernel.exps.MatchesExpression.appendTo(MatchesExpression.java:97) > > org.apache.openjpa.jdbc.kernel.exps.AndExpression.appendTo(AndExpression.java:59)}} > > > {{ public void appendTo(Select sel, ExpContext ctx, ExpState state, }} > {{ SQLBuffer buf, int index) {}} > {{ DBDictionary dict = ctx.store.getDBDictionary();}} > {{ String func = dict.toLowerCaseFunction;}} > {{ dict.assertSupport(func != null, "ToLowerCaseFunction");}} > {{ if (getValue() instanceof PCPath) {}} > {{ func = dict.getCastFunction(getValue(), func, ((PCPath) > getValue()).getFieldMapping(state).getColumns()[0]);}} > {{ } else {}} > {{ func = dict.getCastFunction(getValue(), func);}} > {{ }}} > {{ int idx = func.indexOf("\{0}");}} > {{ buf.append(func.substring(0, idx));}} > {{ getValue().appendTo(sel, ctx, state, buf, index);}} > {{ buf.append(func.substring(idx + 3));}} > {{ }}} > The part of code that generate the exception is: > Path authorPath = from.join("references").join("authors"); > predicateList.add(cb.like(cb.lower(authorPath), cb.literal('%' + > value + '%'))); > If I change this code to use another string function like trim(), it works > (ie. the SQL query is correctly generated). > > Regards, > Patrice > ps: remark that the only uses of DBDictionary.getCastFunction(Val val, String > func, Column col) are for those classes. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (OPENJPA-2729) problem with ToUpperCase and ToLowerCase
[ https://issues.apache.org/jira/browse/OPENJPA-2729?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Patrice DUROUX updated OPENJPA-2729: Attachment: openjpa-test.zip > problem with ToUpperCase and ToLowerCase > > > Key: OPENJPA-2729 > URL: https://issues.apache.org/jira/browse/OPENJPA-2729 > Project: OpenJPA > Issue Type: Bug > Components: query >Affects Versions: 2.4.2 > Environment: MySQL >Reporter: Patrice DUROUX >Priority: Major > Attachments: openjpa-test.zip > > > Hi, > An exception is thrown in the following method (here the one of ToLowerCase): > when the getValue() is a PCPath and ((PCPath) > getValue()).getFieldMapping(state).getColumns()[0]) > throws: > {{java.lang.ArrayIndexOutOfBoundsException: 0}}{{ > org.apache.openjpa.jdbc.kernel.exps.ToLowerCase.appendTo(ToLowerCase.java:47) > org.apache.openjpa.jdbc.kernel.exps.MatchesExpression.appendTo(MatchesExpression.java:97) > > org.apache.openjpa.jdbc.kernel.exps.AndExpression.appendTo(AndExpression.java:59)}} > > > {{ public void appendTo(Select sel, ExpContext ctx, ExpState state, }} > {{ SQLBuffer buf, int index) {}} > {{ DBDictionary dict = ctx.store.getDBDictionary();}} > {{ String func = dict.toLowerCaseFunction;}} > {{ dict.assertSupport(func != null, "ToLowerCaseFunction");}} > {{ if (getValue() instanceof PCPath) {}} > {{ func = dict.getCastFunction(getValue(), func, ((PCPath) > getValue()).getFieldMapping(state).getColumns()[0]);}} > {{ } else {}} > {{ func = dict.getCastFunction(getValue(), func);}} > {{ }}} > {{ int idx = func.indexOf("\{0}");}} > {{ buf.append(func.substring(0, idx));}} > {{ getValue().appendTo(sel, ctx, state, buf, index);}} > {{ buf.append(func.substring(idx + 3));}} > {{ }}} > The part of code that generate the exception is: > Path authorPath = from.join("references").join("authors"); > predicateList.add(cb.like(cb.lower(authorPath), cb.literal('%' + > value + '%'))); > If I change this code to use another string function like trim(), it works > (ie. the SQL query is correctly generated). > > Regards, > Patrice > ps: remark that the only uses of DBDictionary.getCastFunction(Val val, String > func, Column col) are for those classes. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (OPENJPA-2805) unable to map self-related class with discrepancy between the annotation and XML ORMs
[ https://issues.apache.org/jira/browse/OPENJPA-2805?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17097615#comment-17097615 ] Patrice DUROUX commented on OPENJPA-2805: - I also post 2 messages connected to this problem: [http://mail-archives.apache.org/mod_mbox/openjpa-dev/202003.mbox/%3CCAGKjw9LUq0ngMBNewnLfwyU6jd_7rh6d39ojRqPTrANsKghuLw%40mail.gmail.com%3E] [http://mail-archives.apache.org/mod_mbox/openjpa-dev/202003.mbox/%3C1584789523706-0.post%40n2.nabble.com%3E] > unable to map self-related class with discrepancy between the annotation and > XML ORMs > - > > Key: OPENJPA-2805 > URL: https://issues.apache.org/jira/browse/OPENJPA-2805 > Project: OpenJPA > Issue Type: Bug >Affects Versions: 2.4.3, 3.0.0 >Reporter: Patrice DUROUX >Priority: Major > Attachments: node.zip > > > Dear OpenJPA developers, > I've been beating around the bush for a long time and hesitating to repport a > bug until now. > My problem is a much larger project but it can be summed up in the following > situation. I would like to map such a class using an XML ORM onto a specific > relational schema (I mean to not have any preferred column names for the > corresponding join table). > > {noformat} > public class Node2 implements Serializable { > private static final long serialVersionUID = -3038751343463495553L; > private Long id; > public Long getId() { > return id; > } > public void setId(Long id) { > this.id = id; > } > private Node2 parent; > public Node2 getParent() { > return parent; > } > public void setParent(Node2 parent) { > this.parent = parent; > } > private Set childs; > public Set getChilds() { > return childs; > } > public void setChilds(Set childs) { > this.childs = childs; > } > @Override > public int hashCode() { > final int prime = 31; > int result = 1; > result = prime * result + ((id == null) ? 0 : id.hashCode()); > return result; > } > @Override > public boolean equals(Object obj) { > if (this == obj) > return true; > if (obj == null) > return false; > if (getClass() != obj.getClass()) > return false; > Node2 other = (Node2) obj; > if (id == null) { > if (other.id != null) > return false; > } else if (!id.equals(other.id)) > return false; > return true; > } > public Node2() { > this.childs = new LinkedHashSet<>(); > } > } > {noformat} > I have a small Maven project with many persistence units as cases that are > not given me the expected result (working or not). But doing this, I am also > facing strange discrepancy between the annotation and the XML approaches > (that are supposed to be equivalent to me for case1 and case2 if I am not > wrong). > Also I tried both using a runtime enhancement and a static one. > I am have a zip of a small Maven project with a JUnit test for the different > cases to check. > In the larger project, I created a view to solve part of the problem. But > then sure I cannot use the mapping to it to modify the persisted objects. > Regards, > Patrice -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (OPENJPA-2805) unable to map self-related class with discrepancy between the annotation and XML ORMs
[ https://issues.apache.org/jira/browse/OPENJPA-2805?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Patrice DUROUX updated OPENJPA-2805: Attachment: node.zip > unable to map self-related class with discrepancy between the annotation and > XML ORMs > - > > Key: OPENJPA-2805 > URL: https://issues.apache.org/jira/browse/OPENJPA-2805 > Project: OpenJPA > Issue Type: Bug >Affects Versions: 2.4.3, 3.0.0 >Reporter: Patrice DUROUX >Priority: Major > Attachments: node.zip > > > Dear OpenJPA developers, > I've been beating around the bush for a long time and hesitating to repport a > bug until now. > My problem is a much larger project but it can be summed up in the following > situation. I would like to map such a class using an XML ORM onto a specific > relational schema (I mean to not have any preferred column names for the > corresponding join table). > > {noformat} > public class Node2 implements Serializable { > private static final long serialVersionUID = -3038751343463495553L; > private Long id; > public Long getId() { > return id; > } > public void setId(Long id) { > this.id = id; > } > private Node2 parent; > public Node2 getParent() { > return parent; > } > public void setParent(Node2 parent) { > this.parent = parent; > } > private Set childs; > public Set getChilds() { > return childs; > } > public void setChilds(Set childs) { > this.childs = childs; > } > @Override > public int hashCode() { > final int prime = 31; > int result = 1; > result = prime * result + ((id == null) ? 0 : id.hashCode()); > return result; > } > @Override > public boolean equals(Object obj) { > if (this == obj) > return true; > if (obj == null) > return false; > if (getClass() != obj.getClass()) > return false; > Node2 other = (Node2) obj; > if (id == null) { > if (other.id != null) > return false; > } else if (!id.equals(other.id)) > return false; > return true; > } > public Node2() { > this.childs = new LinkedHashSet<>(); > } > } > {noformat} > I have a small Maven project with many persistence units as cases that are > not given me the expected result (working or not). But doing this, I am also > facing strange discrepancy between the annotation and the XML approaches > (that are supposed to be equivalent to me for case1 and case2 if I am not > wrong). > Also I tried both using a runtime enhancement and a static one. > I am have a zip of a small Maven project with a JUnit test for the different > cases to check. > In the larger project, I created a view to solve part of the problem. But > then sure I cannot use the mapping to it to modify the persisted objects. > Regards, > Patrice -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (OPENJPA-2805) unable to map self-related class with discrepancy between the annotation and XML ORMs
[ https://issues.apache.org/jira/browse/OPENJPA-2805?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Patrice DUROUX updated OPENJPA-2805: Description: Dear OpenJPA developers, I've been beating around the bush for a long time and hesitating to repport a bug until now. My problem is a much larger project but it can be summed up in the following situation. I would like to map such a class using an XML ORM onto a specific relational schema (I mean to not have any preferred column names for the corresponding join table). {noformat} public class Node2 implements Serializable { private static final long serialVersionUID = -3038751343463495553L; private Long id; public Long getId() { return id; } public void setId(Long id) { this.id = id; } private Node2 parent; public Node2 getParent() { return parent; } public void setParent(Node2 parent) { this.parent = parent; } private Set childs; public Set getChilds() { return childs; } public void setChilds(Set childs) { this.childs = childs; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((id == null) ? 0 : id.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Node2 other = (Node2) obj; if (id == null) { if (other.id != null) return false; } else if (!id.equals(other.id)) return false; return true; } public Node2() { this.childs = new LinkedHashSet<>(); } } {noformat} I have a small Maven project with many persistence units as cases that are not given me the expected result (working or not). But doing this, I am also facing strange discrepancy between the annotation and the XML approaches (that are supposed to be equivalent to me for case1 and case2 if I am not wrong). Also I tried both using a runtime enhancement and a static one. I am have a zip of a small Maven project with a JUnit test for the different cases to check. In the larger project, I created a view to solve part of the problem. But then sure I cannot use the mapping to it to modify the persisted objects. Regards, Patrice was: Dear OpenJPA developers, I've been beating around the bush for a long time and hesitating to repport a bug until now. My problem is a much larger project but it can be summed up in the following situation. I would like to map such a class using an XML ORM onto a specific relational schema (I mean to not have any preferred column names for the corresponding join table). {noformat} public class Node2 implements Serializable { private static final long serialVersionUID = -3038751343463495553L; private Long id;public Long getId() { return id; } public void setId(Long id) { this.id = id; } private Node2 parent; public Node2 getParent() { return parent; } public void setParent(Node2 parent) { this.parent = parent; } private Set childs; public Set getChilds() { return childs; } public void setChilds(Set childs) { this.childs = childs; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((id == null) ? 0 : id.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Node2 other = (Node2) obj; if (id == null) { if (other.id != null) return false; } else if (!id.equals(other.id)) return false; return true; } public Node2() { this.childs = new LinkedHashSet<>(); } } {noformat} I have a small Maven project with many persistence units as cases that are not given me the expected result (working or not). But doing this, I am also facing
[jira] [Updated] (OPENJPA-2805) unable to map self-related class with discrepancy between the annotation and XML ORMs
[ https://issues.apache.org/jira/browse/OPENJPA-2805?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Patrice DUROUX updated OPENJPA-2805: Description: Dear OpenJPA developers, I've been beating around the bush for a long time and hesitating to repport a bug until now. My problem is a much larger project but it can be summed up in the following situation. I would like to map such a class using an XML ORM onto a specific relational schema (I mean to not have any preferred column names for the corresponding join table). {noformat} public class Node2 implements Serializable { private static final long serialVersionUID = -3038751343463495553L; private Long id; public Long getId() { return id; } public void setId(Long id) { this.id = id; } private Node2 parent; public Node2 getParent() { return parent; } public void setParent(Node2 parent) { this.parent = parent; } private Set childs; public Set getChilds() { return childs; } public void setChilds(Set childs) { this.childs = childs; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((id == null) ? 0 : id.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Node2 other = (Node2) obj; if (id == null) { if (other.id != null) return false; } else if (!id.equals(other.id)) return false; return true; } public Node2() { this.childs = new LinkedHashSet<>(); } } {noformat} I have a small Maven project with many persistence units as cases that are not given me the expected result (working or not). But doing this, I am also facing strange discrepancy between the annotation and the XML approaches (that are supposed to be equivalent to me for case1 and case2 if I am not wrong). Also I tried both using a runtime enhancement and a static one. I am have a zip of a small Maven project with a JUnit test for the different cases to check. In the larger project, I created a view to solve part of the problem. But then sure I cannot use the mapping to it to modify the persisted objects. Regards, Patrice was: Dear OpenJPA developers, I've been beating around the bush for a long time and hesitating to repport a bug until now. My problem is a much larger project but it can be summed up in the following situation. I would like to map such a class using an XML ORM onto a specific relational schema (I mean to not have any preferred column names for the corresponding join table). {noformat} public class Node2 implements Serializable { private static final long serialVersionUID = -3038751343463495553L; private Long id; public Long getId() { return id; } public void setId(Long id) { this.id = id; } private Node2 parent; public Node2 getParent() { return parent; } public void setParent(Node2 parent) { this.parent = parent; } private Set childs; public Set getChilds() { return childs; } public void setChilds(Set childs) { this.childs = childs; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((id == null) ? 0 : id.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Node2 other = (Node2) obj; if (id == null) { if (other.id != null) return false; } else if (!id.equals(other.id)) return false; return true; } public Node2() { this.childs = new LinkedHashSet<>(); } } {noformat} I have a small Maven project with many persistence units as cases that are not given me the expected result (working or not). But
[jira] [Created] (OPENJPA-2805) unable to map self-related class with discrepancy between the annotation and XML ORMs
Patrice DUROUX created OPENJPA-2805: --- Summary: unable to map self-related class with discrepancy between the annotation and XML ORMs Key: OPENJPA-2805 URL: https://issues.apache.org/jira/browse/OPENJPA-2805 Project: OpenJPA Issue Type: Bug Affects Versions: 3.0.0, 2.4.3 Reporter: Patrice DUROUX Dear OpenJPA developers, I've been beating around the bush for a long time and hesitating to repport a bug until now. My problem is a much larger project but it can be summed up in the following situation. I would like to map such a class using an XML ORM onto a specific relational schema (I mean to not have any preferred column names for the corresponding join table). {noformat} public class Node2 implements Serializable { private static final long serialVersionUID = -3038751343463495553L; private Long id;public Long getId() { return id; } public void setId(Long id) { this.id = id; } private Node2 parent; public Node2 getParent() { return parent; } public void setParent(Node2 parent) { this.parent = parent; } private Set childs; public Set getChilds() { return childs; } public void setChilds(Set childs) { this.childs = childs; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((id == null) ? 0 : id.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Node2 other = (Node2) obj; if (id == null) { if (other.id != null) return false; } else if (!id.equals(other.id)) return false; return true; } public Node2() { this.childs = new LinkedHashSet<>(); } } {noformat} I have a small Maven project with many persistence units as cases that are not given me the expected result (working or not). But doing this, I am also facing strange discrepancy between the annotation and the XML approaches (that are supposed to be equivalent to me for case1 and case2 if I am not wrong). Also I tried both using a runtime enhancement and a static one. I am have a zip of a small Maven project with a JUnit test for the different cases to check. In the larger project, I created a view to solve part of the problem. But then sure I cannot use the mapping to it to modify the persisted objects. Regards, Patrice -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (OPENJPA-2729) problem with ToUpperCase and ToLowerCase
[ https://issues.apache.org/jira/browse/OPENJPA-2729?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Patrice DUROUX updated OPENJPA-2729: Summary: problem with ToUpperCase and ToLowerCase (was: problem with ToUperCase and ToLowerCase) > problem with ToUpperCase and ToLowerCase > > > Key: OPENJPA-2729 > URL: https://issues.apache.org/jira/browse/OPENJPA-2729 > Project: OpenJPA > Issue Type: Bug > Components: query >Affects Versions: 2.4.2 > Environment: MySQL >Reporter: Patrice DUROUX >Priority: Major > > Hi, > An exception is thrown in the following method (here the one of ToLowerCase): > when the getValue() is a PCPath and ((PCPath) > getValue()).getFieldMapping(state).getColumns()[0]) > throws: > {{java.lang.ArrayIndexOutOfBoundsException: 0}}{{ > org.apache.openjpa.jdbc.kernel.exps.ToLowerCase.appendTo(ToLowerCase.java:47) > org.apache.openjpa.jdbc.kernel.exps.MatchesExpression.appendTo(MatchesExpression.java:97) > > org.apache.openjpa.jdbc.kernel.exps.AndExpression.appendTo(AndExpression.java:59)}} > > > {{ public void appendTo(Select sel, ExpContext ctx, ExpState state, }} > {{ SQLBuffer buf, int index) {}} > {{ DBDictionary dict = ctx.store.getDBDictionary();}} > {{ String func = dict.toLowerCaseFunction;}} > {{ dict.assertSupport(func != null, "ToLowerCaseFunction");}} > {{ if (getValue() instanceof PCPath) {}} > {{ func = dict.getCastFunction(getValue(), func, ((PCPath) > getValue()).getFieldMapping(state).getColumns()[0]);}} > {{ } else {}} > {{ func = dict.getCastFunction(getValue(), func);}} > {{ }}} > {{ int idx = func.indexOf("\{0}");}} > {{ buf.append(func.substring(0, idx));}} > {{ getValue().appendTo(sel, ctx, state, buf, index);}} > {{ buf.append(func.substring(idx + 3));}} > {{ }}} > The part of code that generate the exception is: > Path authorPath = from.join("references").join("authors"); > predicateList.add(cb.like(cb.lower(authorPath), cb.literal('%' + > value + '%'))); > If I change this code to use another string function like trim(), it works > (ie. the SQL query is correctly generated). > > Regards, > Patrice > ps: remark that the only uses of DBDictionary.getCastFunction(Val val, String > func, Column col) are for those classes. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (OPENJPA-2729) problem with ToUperCase and ToLowerCase
Patrice DUROUX created OPENJPA-2729: --- Summary: problem with ToUperCase and ToLowerCase Key: OPENJPA-2729 URL: https://issues.apache.org/jira/browse/OPENJPA-2729 Project: OpenJPA Issue Type: Bug Components: query Affects Versions: 2.4.2 Environment: MySQL Reporter: Patrice DUROUX Hi, An exception is thrown in the following method (here the one of ToLowerCase): when the getValue() is a PCPath and ((PCPath) getValue()).getFieldMapping(state).getColumns()[0]) throws: {{java.lang.ArrayIndexOutOfBoundsException: 0}}{{ org.apache.openjpa.jdbc.kernel.exps.ToLowerCase.appendTo(ToLowerCase.java:47) org.apache.openjpa.jdbc.kernel.exps.MatchesExpression.appendTo(MatchesExpression.java:97) org.apache.openjpa.jdbc.kernel.exps.AndExpression.appendTo(AndExpression.java:59)}} {{ public void appendTo(Select sel, ExpContext ctx, ExpState state, }} {{ SQLBuffer buf, int index) {}} {{ DBDictionary dict = ctx.store.getDBDictionary();}} {{ String func = dict.toLowerCaseFunction;}} {{ dict.assertSupport(func != null, "ToLowerCaseFunction");}} {{ if (getValue() instanceof PCPath) {}} {{ func = dict.getCastFunction(getValue(), func, ((PCPath) getValue()).getFieldMapping(state).getColumns()[0]);}} {{ } else {}} {{ func = dict.getCastFunction(getValue(), func);}} {{ }}} {{ int idx = func.indexOf("\{0}");}} {{ buf.append(func.substring(0, idx));}} {{ getValue().appendTo(sel, ctx, state, buf, index);}} {{ buf.append(func.substring(idx + 3));}} {{ }}} The part of code that generate the exception is: Path authorPath = from.join("references").join("authors"); predicateList.add(cb.like(cb.lower(authorPath), cb.literal('%' + value + '%'))); If I change this code to use another string function like trim(), it works (ie. the SQL query is correctly generated). Regards, Patrice ps: remark that the only uses of DBDictionary.getCastFunction(Val val, String func, Column col) are for those classes. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] Created: (OPENJPA-1893) Missing join clause in query with collection-table with two join-columns
Missing join clause in query with collection-table with two join-columns Key: OPENJPA-1893 URL: https://issues.apache.org/jira/browse/OPENJPA-1893 Project: OpenJPA Issue Type: Bug Affects Versions: 2.0.1 Reporter: Patrice DUROUX Considering the following mapping: entity class=Feature table name=features / attributes embedded-id name=id / element-collection name=attributes collection-table name=qualifiers / /element-collection /attributes /entity Without specifying any JoinColumn element in the CollectionTable element, I got the query: (...) INNER JOIN qualifiers t3 ON t0.index = t3.FEATURE_INDEX AND t0.oid = t3.FEATURE_OID (...) but changing the mapping by: collection-table name=qualifiers join-column name=oid / join-column name=index / /collection-table I got: (...) INNER JOIN qualifiers t3 ON t0.index = t3.index (...) where is missing the first JoinColumn. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1893) Missing join clause in query with collection-table with two join-columns
[ https://issues.apache.org/jira/browse/OPENJPA-1893?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Patrice DUROUX updated OPENJPA-1893: Attachment: FeatureId.java Feature.java Attribute.java Here are the corresponding Java classes. Missing join clause in query with collection-table with two join-columns Key: OPENJPA-1893 URL: https://issues.apache.org/jira/browse/OPENJPA-1893 Project: OpenJPA Issue Type: Bug Affects Versions: 2.0.1 Reporter: Patrice DUROUX Attachments: Attribute.java, Feature.java, FeatureId.java Considering the following mapping: entity class=Feature table name=features / attributes embedded-id name=id / element-collection name=attributes collection-table name=qualifiers / /element-collection /attributes /entity Without specifying any JoinColumn element in the CollectionTable element, I got the query: (...) INNER JOIN qualifiers t3 ON t0.index = t3.FEATURE_INDEX AND t0.oid = t3.FEATURE_OID (...) but changing the mapping by: collection-table name=qualifiers join-column name=oid / join-column name=index / /collection-table I got: (...) INNER JOIN qualifiers t3 ON t0.index = t3.index (...) where is missing the first JoinColumn. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.