persistence.xml properties defined
Hi. My persistence.xml contained ConnectionDriverName and ConnectionURL properties defined for the unit that was not in use. But even when I added tags into config for another unit - the effect is the same. John
org.apache.openjpa.jdbc.kernel.TableJDBCSeq
It looks like the tool reports about successful creation of sequence table in hsqldb database. I found the database files in targeted directory. But when I executed this: select TABLE_NAME from INFORMATION_SCHEMA.TABLES; I haven't found a table with name "OPENJPA_SEQUENCE_TABLE". I used jdbc:hsqldb:file:/tmp/persist_backend;create=true as ConnectionURL for org.apache.openjpa.jdbc.kernel.TableJDBCSeq and jdbc:hsqldb:file:/tmp/persist_bacend for running main class. Any suggestions? John
Log4j
I still have trouble with log4j. Here are my arguments: -Dlog4j.appender.console=org.apache.log4j.ConsoleAppender -Dopenjpa.Log=log4j -Dlog4j.category.openjpa.Enhance=TRACE -Dlog4j.appender.console=org.apache.log4j.ConsoleAppender -Dopenjpa.Log=log4j -Dlog4j.category.openjpa.Enhance.MetaData=TRACE -Dlog4j.category.openjpa.jdbc.SQL=TRACE -Dlog4j.category.openjpa.jdbc.SQLDiag=TRACE -Dlog4j.category.openjpa.jdbc.JDBC=TRACE -Dlog4j.category.openjpa.jdbc.Schema=TRACE but got this: log4j:WARN No appenders could be found for logger (openjpa.Runtime). log4j:WARN Please initialize the log4j system properly. Please help anyone. John
HSQLDB sequence enforcing
Hi. I opened that hsqldb datbase with a database manager. It looks like the tool reports about creation of a table. But sequence related table is not created. John
OpenJPA tests
Here is a trace of tests: 439887 xml-persistence-unit WARN [main] openjpa.Enhance - Type "class org.apache.openjpa.persistence.jdbc.schema.TestSchemaGenerator" loaded by org.apache.openjpa.lib.util.temporaryclassloa...@390472f9 has no metadata; enhancing as persistence aware. If you intended for "class org.apache.openjpa.persistence.jdbc.schema.TestSchemaGenerator" to be persistence-capable, then this means that OpenJPA could not find any metadata for "class org.apache.openjpa.persistence.jdbc.schema.TestSchemaGenerator". This can happen if the directory containing your metadata is not in your CLASSPATH, or if your metadata files are not named properly. See the documentation on metadata placement for more information. 142 WARN [main] openjpa.Runtime - The configuration property named "openjpa.loglevel" was not recognized and will be ignored, although the name closely matches a valid property called "openjpa.Log". 24757 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.jpql.entities.XMLOrderedManyToManyEntity". Ignoring. 24760 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.jpql.entities.XMLOrderedOneToManyEntity". Ignoring. 24762 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.jpql.entities.XMLOrderedElementEntity". Ignoring. 24765 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.jpql.entities.XMLUnorderedNameEntity". Ignoring. 24766 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.jpql.entities.XMLOrderedNameEntity". Ignoring. 24840 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.access.xml.XMLAbstractMappedSuperField". Ignoring. 24852 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.access.xml.XMLAbstractMappedSuperProperty". Ignoring. 24854 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.access.xml.XMLMappedSuperField". Ignoring. 24855 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.access.xml.XMLMappedSuperProperty". Ignoring. 24857 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.access.xml.XMLMixedMappedSuper". Ignoring. 24860 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.access.xml.XMLFieldAccess". Ignoring. 24884 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.access.xml.XMLPropAccess". Ignoring. 24886 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.access.xml.XMLDefFieldMixedPropAccess". Ignoring. 24890 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.access.xml.XMLDefPropMixedFieldAccess". Ignoring. 24893 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.access.xml.XMLPropertySub". Ignoring. 24894 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.access.xml.XMLFieldSub". Ignoring. 24895 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.access.xml.XMLPropertySub2". Ignoring. 24896 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.access.xml.XMLFieldSub2". Ignoring. 24897 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.access.xml.XMLMixedFieldSub". Ignoring. 24898 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.access.xml.XMLSuperPropertyEntity". Ignoring. 24900 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.access.xml.XMLFieldSub3". Ignoring. 24901 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.access.xml.XMLSuperFieldEntity". Ignorin
Test run
Got the following notice when trying to run tests: enhance.all.entities: [echo] running enhancer 160 WARN [main] openjpa.Runtime - The configuration property named "openjpa.loglevel" was not recognized and will be ignored, although the name closely matches a valid property called "openjpa.Log". Logging not configured properly? John
Tests classes metadata
One more thing: ce-capable, then this means that OpenJPA could not find any metadata for "class org.apache.openjpa.persistence.jdbc.schema.TestSequenceGeneratorEnsureCapacityCall". This can happen if the directory containing your metadata is not in your CLASSPATH, or if your metadata files are not named properly. See the documentation on metadata placement for more information. 87961 xml-persistence-unit WARN [main] openjpa.Enhance - Type "class org.apache.openjpa.persistence.embed.EntityA_Coll_String$CreditRating" loaded by AntClassLoader[/home/webautomator/apache-openjpa-2.0.0-beta3-source/openjpa-persistence-jdbc/target/test-classes:/home/webautomator/apache-openjpa-2.0.0-beta3-source/openjpa-persistence-jdbc/target/classes:/home/webautomator/apache-openjpa-2.0.0-beta3-source/openjpa-jdbc/target/classes:/home/webautomator/apache-openjpa-2.0.0-beta3-source/openjpa-kernel/target/classes:/home/webautomator/apache-openjpa-2.0.0-beta3-source/openjpa-lib/target/classes:/root/.m2/repository/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar:/root/.m2/repository/commons-lang/commons-lang/2.1/commons-lang-2.1.jar:/root/.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar:/root/.m2/repository/net/sourceforge/serp/serp/1.13.1/serp-1.13.1.jar:/root/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar:/root/.m2/repository/org/apache/geronimo/specs/geronimo-jms_1.1_spec/1.1.1/geronimo-jms_1.1_spec-1.1.1.jar:/root/.m2/repository/org/apache/geronimo/specs/geronimo-jta_1.1_spec/1.1.1/geronimo-jta_1.1_spec-1.1.1.jar:/root/.m2/repository/commons-pool/commons-pool/1.5.3/commons-pool-1.5.3.jar:/home/webautomator/apache-openjpa-2.0.0-beta3-source/openjpa-persistence/target/classes:/root/.m2/repository/org/apache/geronimo/specs/geronimo-jpa_2.0_spec/1.0/geronimo-jpa_2.0_spec-1.0.jar:/root/.m2/repository/commons-dbcp/commons-dbcp/1.2.2/commons-dbcp-1.2.2.jar:/root/.m2/repository/jakarta-regexp/jakarta-regexp/1.4/jakarta-regexp-1.4.jar:/root/.m2/repository/javax/xml/bind/jaxb-api/2.0/jaxb-api-2.0.jar:/root/.m2/repository/javax/xml/bind/jsr173_api/1.0/jsr173_api-1.0.jar:/root/.m2/repository/javax/activation/activation/1.1/activation-1.1.jar:/root/.m2/repository/com/sun/xml/bind/jaxb-impl/2.0.5/jaxb-impl-2.0.5.jar:/root/.m2/repository/simple-jndi/simple-jndi/0.11.4/simple-jndi-0.11.4.jar:/root/.m2/repository/org/apache/derby/derby/10.5.3.0_1/derby-10.5.3.0_1.jar] has no metadata; enhancing as persistence aware. If you intended for "class org.apache.openjpa.persistence.embed.EntityA_Coll_String$CreditRating" to be persistence-capable, then this means that OpenJPA could not find any metadata for "class org.apache.openjpa.persistence.embed.EntityA_Coll_String$CreditRating". This can happen if the directory containing your metadata is not in your CLASSPATH, or if your metadata files are not named properly. See the documentation on metadata placement for more information. 87991 xml-persistence-unit WARN [main] openjpa.Enhance - Type "class org.apache.openjpa.persistence.enhance.TestNoNoArgs" loaded by org.apache.openjpa.lib.util.temporaryclassloa...@4e7c4246 has no metadata; enhancing as persistence aware. If you intended for "class org.apache.openjpa.persistence.enhance.TestNoNoArgs" to be persistence-capable, then this means that OpenJPA could not find any metadata for "class org.apache.openjpa.persistence.enhance.TestNoNoArgs". This can happen if the directory containing your metadata is not in your CLASSPATH, or if your metadata files are not named properly. See the documentation on metadata placement for more information. 88058 xml-persistence-unit WARN [main] openjpa.Enhance - Type "class org.apache.openjpa.persistence.simple.TestTableNamesDefaultToEntityNames" loaded by org.apache.openjpa.lib.util.temporaryclassloa...@4e7c4246 has no metadata; enhancing as persistence aware. If you intended for "class org.apache.openjpa.persistence.simple.TestTableNamesDefaultToEntityNames" to be persistence-capable, then this means that OpenJPA could not find any metadata for "class org.apache.openjpa.persistence.simple.TestTableNamesDefaultToEntityNames". This can happen if the directory containing your metadata is not in your CLASSPATH, or if your metadata files are not named properly. See the documentation on metadata placement for more information. 88098 xml-persistence-unit WARN [main] openjpa.Enhance - Type "class org.apache.openjpa.persistence.jdbc.sqlcache.TestPreparedQueryCache$QueryThread" loaded by org.apache.openjpa.lib.util.temporaryclassloa...@4e7c4246 has no metadata; enhancing as persistence aware. If you intended for "class org.apache.openjpa.persistence.jdbc.sqlcache.TestPreparedQueryCache$QueryThread" to be persistence-capable, then this means that OpenJPA could not find any metadata for "class org.apache.openjpa.persistence.jdbc.sqlcache.TestPreparedQueryCache$QueryThread". This can happen if the directory containing your metadata is not in your CLASSPATH, or i
Re: [jira] Commented: (OPENJPA-1563) Better parameter validation on StoreCache.pinAll() method
I have the following exception in junit tests: enhance.all.entities: [echo] running enhancer 283 WARN [main] openjpa.Runtime - The configuration property named "openjpa.loglevel" was not recognized and will be ignored, although the name closely matches a valid property called "openjpa.Log". org.apache.commons.lang.exception.NestableRuntimeException: Error extracting class information from "/home/webautomator/apache-openjpa-2.0.0-beta3-source/openjpa-persistence-jdbc/target/test-classes/org/apache/openjpa/persistence/jdbc/sqlcache/TestPreparedQueryCache$SQLAuditor.class". at org.apache.openjpa.lib.meta.ClassArgParser.parseTypeNames(ClassArgParser.java:226) at org.apache.openjpa.lib.meta.ClassArgParser.parseTypes(ClassArgParser.java:161) at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:4637) at org.apache.openjpa.ant.PCEnhancerTask.executeOn(PCEnhancerTask.java:89) at org.apache.openjpa.lib.ant.AbstractTask.execute(AbstractTask.java:171) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) at sun.reflect.GeneratedMethodAccessor22.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:357) at org.apache.tools.ant.Target.performTasks(Target.java:385) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337) at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) at org.apache.tools.ant.Project.executeTargets(Project.java:1189) at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416) at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) at sun.reflect.GeneratedMethodAccessor22.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:357) at org.apache.tools.ant.Target.performTasks(Target.java:385) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337) at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) at org.apache.tools.ant.Project.executeTargets(Project.java:1189) at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:357) at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:118) at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:98) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds
OpenJPA data store problems
People, please help me anyone with data store problems that I mentioned. Thanks. John
Re: Test run
My version is 2.0.0. Extracted from apache-openjpa-2.0.0-beta3-binary.zip. Thanks! John 2010/5/17 Michael Dick > Hi > > Which version of OpenJPA are you building? Last month (IIRC) we removed the > openjpa.loglevel property from the builds (1.2.x - trunk). If you have an > older version of one of the pom.xml files it might still show up though. > > FWIW the changes were done under > OPENJPA-1557<https://issues.apache.org/jira/browse/OPENJPA-1557> > . > > -mike > > On Mon, May 17, 2010 at 5:54 AM, Web developer >wrote: > > > Got the following notice when trying to run tests: > > > > enhance.all.entities: > > [echo] running enhancer > > 160 WARN [main] openjpa.Runtime - The configuration property named > > "openjpa.loglevel" was not recognized and will be ignored, although the > > name > > closely matches a valid property called "openjpa.Log". > > > > Logging not configured properly? John > > >
Re: HSQLDB sequence enforcing
*null**null**null**null*NONO*null*PUBLICINFORMATION_SCHEMATABLES VIEW*null**null**null**null**null*NONO*null*PUBLICINFORMATION_SCHEMA TRANSLATIONSVIEW*null**null**null**null**null*NONO*null*PUBLIC INFORMATION_SCHEMATRIGGER_COLUMN_USAGEVIEW*null**null**null**null**null*NONO *null*PUBLICINFORMATION_SCHEMATRIGGER_ROUTINE_USAGEVIEW*null**null**null** null**null*NONO*null*PUBLICINFORMATION_SCHEMATRIGGER_SEQUENCE_USAGEVIEW*null **null**null**null**null*NONO*null*PUBLICINFORMATION_SCHEMA TRIGGER_TABLE_USAGEVIEW*null**null**null**null**null*NONO*null*PUBLIC INFORMATION_SCHEMATRIGGERED_UPDATE_COLUMNSVIEW*null**null**null**null**null* NONO*null*PUBLICINFORMATION_SCHEMATRIGGERSVIEW*null**null**null**null**null* NONO*null*PUBLICINFORMATION_SCHEMAUSAGE_PRIVILEGESVIEW*null**null**null** null**null*NONO*null*PUBLICINFORMATION_SCHEMAUSER_DEFINED_TYPESVIEW*null** null**null**null**null*NONO*null*PUBLICINFORMATION_SCHEMAVIEW_COLUMN_USAGE VIEW*null**null**null**null**null*NONO*null*PUBLICINFORMATION_SCHEMA VIEW_ROUTINE_USAGEVIEW*null**null**null**null**null*NONO*null*PUBLIC INFORMATION_SCHEMAVIEW_TABLE_USAGEVIEW*null**null**null**null**null*NONO* null*PUBLICINFORMATION_SCHEMAVIEWSVIEW*null**null**null**null**null*NONO* null*PUBLICSYSTEM_LOBSBLOCKSBASE TABLE*null**null**null**null**null*YESNO* null*PUBLICSYSTEM_LOBSLOB_IDSBASE TABLE*null**null**null**null**null*YESNO* null*PUBLICSYSTEM_LOBSLOBSBASE TABLE*null**null**null**null**null*YESNO*null *(86 строки, 38 ms) So, as you can examine, there is no OPENJPA_SEQUENCE_TABLE in the database. But runtime says that it is not so(?!). John 2010/5/17 Rick Curtis > Should a sequence table have been created? What version of OpenJPA are you > running? What do the Entities look like that you're using? > > ... please post enough information to help us help you. :) > > Thanks, > Rick > > On Mon, May 17, 2010 at 5:24 AM, Web developer >wrote: > > > Hi. I opened that hsqldb datbase with a database manager. It looks like > the > > tool reports about creation of a table. But sequence related table is not > > created. John > > >
Re: Test run
I can get sources of needed version from trunk. Not kind if big deal. I will do as you recommend. John 2010/5/17 Michael Dick > Hi John, > > 2.0.0-beta3 predates the changes which fix this issue. The message is > benign > and can safely be ignored. You could merge the changes for revision > 923929<http://svn.apache.org/viewcvs?view=rev&rev=923929> back > to your copy of the source if you want - that should fix the problem. > > Regards, > -mike > > On Mon, May 17, 2010 at 9:54 AM, Web developer >wrote: > > > My version is 2.0.0. Extracted from > apache-openjpa-2.0.0-beta3-binary.zip. > > Thanks! John > > > > 2010/5/17 Michael Dick > > > > > Hi > > > > > > Which version of OpenJPA are you building? Last month (IIRC) we removed > > the > > > openjpa.loglevel property from the builds (1.2.x - trunk). If you have > an > > > older version of one of the pom.xml files it might still show up > though. > > > > > > FWIW the changes were done under > > > OPENJPA-1557<https://issues.apache.org/jira/browse/OPENJPA-1557> > > > . > > > > > > -mike > > > > > > On Mon, May 17, 2010 at 5:54 AM, Web developer < > webautomat...@gmail.com > > > >wrote: > > > > > > > Got the following notice when trying to run tests: > > > > > > > > enhance.all.entities: > > > > [echo] running enhancer > > > > 160 WARN [main] openjpa.Runtime - The configuration property named > > > > "openjpa.loglevel" was not recognized and will be ignored, although > the > > > > name > > > > closely matches a valid property called "openjpa.Log". > > > > > > > > Logging not configured properly? John > > > > > > > > > >
Re: persistence.xml properties defined
Here what I use: EntityManagerFactory emf = Persistence.createEntityManagerFactory("embeddables", System.getProperties()); EntityManager em = emf.createEntityManager(); init(em); runQueries(em); runner arguments: -DConnectionDriverName=org.hsqldb.jdbc.JDBCDriver -DConnectionURL=jdbc:hsqldb:file:/tmp/persist_bacend -DDynamicEnhancementAgent=false -DRuntimeUnenhancedClasses=unsupported My persistence.xml: http://java.sun.com/xml/ns/persistence"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; version="1.0"> hellojpa.Message org.apache.openjpa.persistence.PersistenceProviderImpl Address ContactInfo Phone User John 2010/5/17 Jeremy Bauer > John, > > Do you specify the persistence unit name when you create the entity manager > factory? If not, you may be picking up the default persistence unit which > likely has those properties defined. If you do specify the PU name could > you post your persistence.xml and the version of OpenJPA you are using? > > -Jeremy > > On Sat, May 15, 2010 at 2:35 AM, Web developer >wrote: > > > Hi. My persistence.xml contained ConnectionDriverName and ConnectionURL > > properties defined for the unit that was not in use. But even when I > added > > tags into config for another unit - the effect is the same. John > > >
Test trace
I checked out the latest build from general svn trunk. Here what I got: [WARNING] /root/openjpa/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/nullity/TestBasicFieldNullity.java:[29,45] com.sun.corba.se.spi.legacy.connection.GetEndPointInfoAgainException is Sun proprietary API and may be removed in a future release [INFO] [antrun:run {execution: default}] [INFO] Executing tasks enhance: enhance.all.entities: [echo] running enhancer 360 WARN [main] openjpa.Runtime - The configuration property named "openjpa.loglevel" was not recognized and will be ignored, although the name closely matches a valid property called "openjpa.Log". 128158 xml-persistence-unit WARN [main] openjpa.Runtime - Found no persistent property in "org.apache.openjpa.persistence.inheritance.entity.XMLCallback" 136248 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.access.xml.XMLDefPropMixedFieldAccess2". Ignoring. 136252 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.access.xml.XMLPropAccess2". Ignoring. 142857 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.access.xml.XMLFieldAccess2". Ignoring. 142860 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.access.xml.XMLDefFieldMixedPropAccess2". Ignoring. 155248 xml-persistence-unit WARN [main] openjpa.Enhance - Type "class org.apache.openjpa.persistence.fields.TestEnumQueryConstructor" loaded by org.apache.openjpa.lib.util.temporaryclassloa...@39139da8 has no metadata; enhancing as persistence aware. If you intended for "class org.apache.openjpa.persistence.fields.TestEnumQueryConstructor" to be persistence-capable, then this means that OpenJPA could not find any metadata for "class org.apache.openjpa.persistence.fields.TestEnumQueryConstructor". This can happen if the directory containing your metadata is not in your CLASSPATH, or if your metadata files are not named properly. See the documentation on metadata placement for more information. 155958 xml-persistence-unit WARN [main] openjpa.Enhance - Type "class org.apache.openjpa.persistence.embed.Item4$Catagory" loaded by AntClassLoader[/root/openjpa/openjpa-persistence-jdbc/target/test-classes:/root/openjpa/openjpa-persistence-jdbc/target/classes:/root/openjpa/openjpa-jdbc/target/classes:/root/openjpa/openjpa-kernel/target/classes:/root/openjpa/openjpa-lib/target/classes:/root/.m2/repository/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar:/root/.m2/repository/commons-lang/commons-lang/2.1/commons-lang-2.1.jar:/root/.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar:/root/.m2/repository/net/sourceforge/serp/serp/1.13.1/serp-1.13.1.jar:/root/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar:/root/.m2/repository/org/apache/geronimo/specs/geronimo-jms_1.1_spec/1.1.1/geronimo-jms_1.1_spec-1.1.1.jar:/root/.m2/repository/org/apache/geronimo/specs/geronimo-jta_1.1_spec/1.1.1/geronimo-jta_1.1_spec-1.1.1.jar:/root/.m2/repository/commons-pool/commons-pool/1.5.3/commons-pool-1.5.3.jar:/root/openjpa/openjpa-persistence/target/classes:/root/.m2/repository/org/apache/geronimo/specs/geronimo-jpa_2.0_spec/1.1/geronimo-jpa_2.0_spec-1.1.jar:/root/.m2/repository/commons-dbcp/commons-dbcp/1.2.2/commons-dbcp-1.2.2.jar:/root/.m2/repository/jakarta-regexp/jakarta-regexp/1.4/jakarta-regexp-1.4.jar:/root/.m2/repository/javax/xml/bind/jaxb-api/2.0/jaxb-api-2.0.jar:/root/.m2/repository/javax/xml/bind/jsr173_api/1.0/jsr173_api-1.0.jar:/root/.m2/repository/javax/activation/activation/1.1/activation-1.1.jar:/root/.m2/repository/com/sun/xml/bind/jaxb-impl/2.0.5/jaxb-impl-2.0.5.jar:/root/.m2/repository/simple-jndi/simple-jndi/0.11.4/simple-jndi-0.11.4.jar:/root/.m2/repository/org/apache/derby/derby/10.5.3.0_1/derby-10.5.3.0_1.jar] has no metadata; enhancing as persistence aware. If you intended for "class org.apache.openjpa.persistence.embed.Item4$Catagory" to be persistence-capable, then this means that OpenJPA could not find any metadata for "class org.apache.openjpa.persistence.embed.Item4$Catagory". This can happen if the directory containing your metadata is not in your CLASSPATH, or if your metadata files are not named properly. See the documentation on metadata placement for more information. 156580 xml-persistence-unit WARN [main] openjpa.Enhance - Type "class org.apache.openjpa.conf.TestCacheMarshallerEndToEnd" loaded by org.apache.openjpa.lib.util.temporaryclassloa...@39139da8 has no metadata; enhancing as persistence aware. If you intended for "class org.apache.openjpa.conf.TestCacheMarshallerEndToEnd" to be persistence-capable, then this means that OpenJPA could not find any metadata for "class org.apache.openjpa.c
Tests are ignored
Here is the end of trace output: 5957 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.access.xml.XMLPropertySub". Ignoring. 5958 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.access.xml.XMLFieldSub". Ignoring. 5959 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.access.xml.XMLPropertySub2". Ignoring. 5960 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.access.xml.XMLFieldSub2". Ignoring. 5961 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.access.xml.XMLMixedFieldSub". Ignoring. 5962 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.access.xml.XMLSuperPropertyEntity". Ignoring. 5993 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.access.xml.XMLFieldSub3". Ignoring. 5994 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.access.xml.XMLSuperFieldEntity". Ignoring. 5994 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.access.xml.XMLPropertySub3". Ignoring. 5995 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.access.xml.XMLPropEmbedEntity". Ignoring. 5996 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.access.xml.XMLFieldEmbedEntity". Ignoring. 5997 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.access.xml.XMLPropMixedEntity". Ignoring. 5997 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.access.xml.XMLEmbedFieldAccess". Ignoring. 5998 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.access.xml.XMLEmbedPropAccess". Ignoring. 5999 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.access.xml.XMLEmbedMixedAccess". Ignoring. 6017 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.Security1". Ignoring. 6018 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.Country1". Ignoring. 6018 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.Embed". Ignoring. 6037 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.jdbc.order.BaseTestElement2". Ignoring. 6038 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.jdbc.order.BaseTestEntity2". Ignoring. 6098 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.enhance.identity.Employee1Xml". Ignoring. 6098 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.enhance.identity.Dependent1Xml". Ignoring. 6099 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.enhance.identity.DependentId1Xml". Ignoring. 6134 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.access.xml.XMLDefPropMixedFieldAccess2". Ignoring. 6135 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.access.xml.XMLPropAccess2". Ignoring. 6160 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.access.xml.XMLFieldAccess2". Ignoring. 6161 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persistence.access.xml.XMLDefFieldMixedPropAccess2". Ignoring. 6188 xml-persistence-unit WARN [main] openjpa.MetaData - Found duplicate metadata or mapping for "class org.apache.openjpa.persiste
Re: Test run
But what I can't ignore is that bug with log4j config that I posted earlier. Especially with a sequence generator. It says that the table is created in HSQLDB database. But manual investigation shows no such table. But when generator is forced to re-create the (theoretically) existing sequence related table - it says that table is existing(?!). So I need help with that log4j bug to figure out what is happening. Looks like that it is sequence generator related bug. John 2010/5/17 Michael Dick > Hi John, > > 2.0.0-beta3 predates the changes which fix this issue. The message is > benign > and can safely be ignored. You could merge the changes for revision > 923929<http://svn.apache.org/viewcvs?view=rev&rev=923929> back > to your copy of the source if you want - that should fix the problem. > > Regards, > -mike > > On Mon, May 17, 2010 at 9:54 AM, Web developer >wrote: > > > My version is 2.0.0. Extracted from > apache-openjpa-2.0.0-beta3-binary.zip. > > Thanks! John > > > > 2010/5/17 Michael Dick > > > > > Hi > > > > > > Which version of OpenJPA are you building? Last month (IIRC) we removed > > the > > > openjpa.loglevel property from the builds (1.2.x - trunk). If you have > an > > > older version of one of the pom.xml files it might still show up > though. > > > > > > FWIW the changes were done under > > > OPENJPA-1557<https://issues.apache.org/jira/browse/OPENJPA-1557> > > > . > > > > > > -mike > > > > > > On Mon, May 17, 2010 at 5:54 AM, Web developer < > webautomat...@gmail.com > > > >wrote: > > > > > > > Got the following notice when trying to run tests: > > > > > > > > enhance.all.entities: > > > > [echo] running enhancer > > > > 160 WARN [main] openjpa.Runtime - The configuration property named > > > > "openjpa.loglevel" was not recognized and will be ignored, although > the > > > > name > > > > closely matches a valid property called "openjpa.Log". > > > > > > > > Logging not configured properly? John > > > > > > > > > >
Re: persistence.xml properties defined
I am passing that parameters threw JVM arguments: -DConnectionDriverName=org.hsqldb.jdbc.JDBCDriver -DConnectionURL=jdbc:hsqldb:file:/tmp/persist_bacend -DDynamicEnhancementAgent=false -DRuntimeUnenhancedClasses=unsupported 2010/5/20 Albert Lee > Shouldn't you be using "openjpa." prefix for the property names? e.g. > openjpa.ConnectionDriverName=. > > Albert Lee. > > On Mon, May 17, 2010 at 10:20 AM, Web developer >wrote: > > > Here what I use: > > > > EntityManagerFactory emf = > > Persistence.createEntityManagerFactory("embeddables", > > System.getProperties()); > >EntityManager em = emf.createEntityManager(); > >init(em); > >runQueries(em); > > > > runner arguments: > > > > -DConnectionDriverName=org.hsqldb.jdbc.JDBCDriver > > -DConnectionURL=jdbc:hsqldb:file:/tmp/persist_bacend > > -DDynamicEnhancementAgent=false -DRuntimeUnenhancedClasses=unsupported > > > > My persistence.xml: > > > > > > http://java.sun.com/xml/ns/persistence"; > >xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; > >version="1.0"> > > > > > > > > > > > > > >hellojpa.Message > > > > > > > > > > > value="org.apache.openjpa.jdbc.kernel.ClassTableJDBCSeq"/> > > > > > > > > transaction-type="RESOURCE_LOCAL"> > > > > > org.apache.openjpa.persistence.PersistenceProviderImpl > >Address > >ContactInfo > >Phone > >User > > > > > > > > John > > > > 2010/5/17 Jeremy Bauer > > > > > John, > > > > > > Do you specify the persistence unit name when you create the entity > > manager > > > factory? If not, you may be picking up the default persistence unit > > which > > > likely has those properties defined. If you do specify the PU name > could > > > you post your persistence.xml and the version of OpenJPA you are using? > > > > > > -Jeremy > > > > > > On Sat, May 15, 2010 at 2:35 AM, Web developer < > webautomat...@gmail.com > > > >wrote: > > > > > > > Hi. My persistence.xml contained ConnectionDriverName and > ConnectionURL > > > > properties defined for the unit that was not in use. But even when I > > > added > > > > tags into config for another unit - the effect is the same. John > > > > > > > > > > > > > -- > Albert Lee. >
Re: Tests are ignored
> > cd trunk/openjpa-parent > Interesting, and where is that directory in trunk?! I haven't found any... > mvn surefire-report:report-only -Daggregate=true > -- The results of this run can be found at > trunk/openjpa-parent/target/site/surefire-report.html > Surfire report gave me a page with zeros in all columns of a report table. John > > > On Mon, May 17, 2010 at 11:57 AM, Web developer >wrote: > > > Here is the end of trace output: > > > > /root/openjpa/openjpa-integration/validation/target/surefire-reports > > > > --- > > T E S T S > > --- > > There are no tests to run. > > > > Results : > > > > Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 > > > > [INFO] > > [INFO] > > [INFO] > > > > [INFO] Reactor Summary: > > [INFO] > > > > [INFO] OpenJPA Parent POM SUCCESS > > [12.491s] > > [INFO] OpenJPA Utilities Library . SUCCESS > > [2:37.916s] > > [INFO] OpenJPA Kernel SUCCESS > > [5:06.648s] > > [INFO] OpenJPA JDBC .. SUCCESS > > [2:15.165s] > > [INFO] OpenJPA Persistence ... SUCCESS > > [1:02.926s] > > [INFO] OpenJPA Persistence JDBC .. SUCCESS > > [18:41.375s] > > [INFO] OpenJPA Persistence Locking Tests . SUCCESS > > [8:21.789s] > > [INFO] OpenJPA XML Store . SUCCESS > > [2:39.756s] > > [INFO] OpenJPA Slice . SUCCESS > > [27.167s] > > [INFO] OpenJPA Aggregate Jar . SUCCESS > > [13.436s] > > [INFO] OpenJPA Aggregate Jar with Dependencies ... SUCCESS > > [1:37.557s] > > [INFO] OpenJPA Project Docs and Assemblies ... SUCCESS > > [17.748s] > > [INFO] OpenJPA Examples .. SUCCESS > > [7.545s] > > [INFO] OpenJPA Integration Tests . SUCCESS > > [0.132s] > > [INFO] OpenJPA Integration Tests - Daytrader . SUCCESS > > [35.845s] > > [INFO] OpenJPA Integration Tests - Examples .. SUCCESS > > [0.646s] > > [INFO] OpenJPA Integration Tests - JPA TCK ... SUCCESS > > [0.163s] > > [INFO] OpenJPA Integration Tests - Bean Validation ... SUCCESS > > [1:00.259s] > > [INFO] > > > > [INFO] > > > > [INFO] BUILD SUCCESSFUL > > [INFO] > > > > [INFO] Total time: 45 minutes 28 seconds > > [INFO] Finished at: Mon May 17 19:53:09 EEST 2010 > > [INFO] Final Memory: 126M/488M > > [INFO] > > > > > > According to output some tests are ignored. How can I force a test runner > > to > > interpret warnings as exceptions? Otherwise test are useless in case of > > deployment. John > > >
Re: persistence.xml properties defined
-Dopenjpa.DynamicEnhancementAgent=false > -Dopenjpa.RuntimeUnenhancedClasses=unsupported > > Kevin > > On Fri, May 21, 2010 at 7:47 AM, Web developer >wrote: > > > I am passing that parameters threw JVM arguments: > > > > -DConnectionDriverName=org.hsqldb.jdbc.JDBCDriver > > -DConnectionURL=jdbc:hsqldb:file:/tmp/persist_bacend > > -DDynamicEnhancementAgent=false -DRuntimeUnenhancedClasses=unsupported > > > > 2010/5/20 Albert Lee > > > > > Shouldn't you be using "openjpa." prefix for the property names? e.g. > > > openjpa.ConnectionDriverName=. > > > > > > Albert Lee. > > > > > > On Mon, May 17, 2010 at 10:20 AM, Web developer < > webautomat...@gmail.com > > > >wrote: > > > > > > > Here what I use: > > > > > > > > EntityManagerFactory emf = > > > > Persistence.createEntityManagerFactory("embeddables", > > > > System.getProperties()); > > > >EntityManager em = emf.createEntityManager(); > > > >init(em); > > > >runQueries(em); > > > > > > > > runner arguments: > > > > > > > > -DConnectionDriverName=org.hsqldb.jdbc.JDBCDriver > > > > -DConnectionURL=jdbc:hsqldb:file:/tmp/persist_bacend > > > > -DDynamicEnhancementAgent=false > -DRuntimeUnenhancedClasses=unsupported > > > > > > > > My persistence.xml: > > > > > > > > > > > > http://java.sun.com/xml/ns/persistence"; > > > >xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; > > > >version="1.0"> > > > > > > > > transaction-type="RESOURCE_LOCAL"> > > > > > > > > > > > > > > > > > > > >hellojpa.Message > > > > > > > > > > > > > > > > > > > > > > > value="org.apache.openjpa.jdbc.kernel.ClassTableJDBCSeq"/> > > > > > > > > > > > > > > > > > > transaction-type="RESOURCE_LOCAL"> > > > > > > > > > > > > > > org.apache.openjpa.persistence.PersistenceProviderImpl > > > >Address > > > >ContactInfo > > > >Phone > > > >User > > > > > > > > > > > > > > > > John > > > > > > > > 2010/5/17 Jeremy Bauer > > > > > > > > > John, > > > > > > > > > > Do you specify the persistence unit name when you create the entity > > > > manager > > > > > factory? If not, you may be picking up the default persistence > unit > > > > which > > > > > likely has those properties defined. If you do specify the PU name > > > could > > > > > you post your persistence.xml and the version of OpenJPA you are > > using? > > > > > > > > > > -Jeremy > > > > > > > > > > On Sat, May 15, 2010 at 2:35 AM, Web developer < > > > webautomat...@gmail.com > > > > > >wrote: > > > > > > > > > > > Hi. My persistence.xml contained ConnectionDriverName and > > > ConnectionURL > > > > > > properties defined for the unit that was not in use. But even > when > > I > > > > > added > > > > > > tags into config for another unit - the effect is the same. John > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > Albert Lee. > > > > > >
Log4j
I still can't understand how to get log4j work for, say, enhancer, which does not throw any exceptions. Please help me. John
persistence configuration in test suites
A big problem is that no meter if any overrides take place in running tests - the resulting, flatten config, which would show the equivalent, is not reported. And tests reports does not really show if the test is ignored or overrides are ignored. John
Re: Tests are ignored
I usually go to my ~ directory, make checkout from svn trunk: svn checkout http://svn.apache.org/repos/asf/openjpa/trunk openjpa After checkout is finished - I cd to 'openjpa' dub-dir. And make 'mvn test ...' from ~/openjpa, respectively under root (to have rights for 'ulimit -n 1'). John 2010/5/21 Rick Curtis > Hmm... when you checked out trunk, you must have checked it out into a > directory with a name other than openjpa-parent. When I refer to > openjpa-parent, that is the directory where the root pom.xml file is > located. Are you running 'mvn test' from that directory? >
Re: JPA and Scala
Interesting, and what is a practical purpose of application(s) that you develop? John 2010/5/21 Christopher Schmidt > Hi all, > I am working on a JPA wrapper for Scala and I think that I have found > an elegant way to use some ideas of JPA. > I managed to wrap EntityManager, EntitiyManagerFactory and Query. > > Unfortunately, there is no simple and elegant way to use Scala's > collections. Using Scala classes as entities works fine, as long they > are using java.lang.List (and the other collections that are > specified). > > My question is: What would it mean (in terms of effort and knowledge) > to allow a Scala collection (f.e. a Buffer) as a OneToMany entity > attribute? > > Regards Christopher > > > > PS: > > Buffer is Scala's mutable "List" implementation (see > > http://www.scala-lang.org/archives/downloads/distrib/files/nightly/docs/library/scala/collection/mutable/Buffer.html > ) > > If you are interested look at http://blog.fakod.eu/?p=855 > (description) and http://github.com/FaKod/JPA-for-Scala (code) >
Re: JPA and Scala
Who will use your application? What process it automates? John 2010/5/22 Christopher Schmidt > Just to be sure: what do you mean with practical purpose? > > Christopher > > Am 22.05.2010 13:49 schrieb "Web developer" : > > Interesting, and what is a practical purpose of application(s) that you > develop? John > > 2010/5/21 Christopher Schmidt > > > > Hi all, > > I am working on a JPA wrapper for Scala and I think that I have found > > an elegant way ... >
Re: Tests are ignored
2010/5/24 Donald Woods > I always use "mvn clean install" which will build and run all of the > tests by default. > > Which JVM and Maven version are you using? Any recent version of Sun > 1.6.0 and Maven 2.0.9+ or 2.2.1 should work. > > $ javac -version javac 1.6.0_15 $ mvn -version Apache Maven 2.2.1 (rdebian-1) Java version: 1.6.0_15 Java home: /usr/lib/jvm/java-6-sun-1.6.0.15/jre Default locale: ru_UA, platform encoding: UTF-8 OS name: "linux" version: "2.6.31-19-server" arch: "amd64" Family: "unix" > Do you have any overrides in your .m2/settings.xml which may be > disabling tests? > > My /etc/maven2/settings.xml(no settings.xml in ~/.m2): http://maven.apache.org/SETTINGS/1.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd";> "mvn clean install" command gave some new response: [INFO] [javacc:jjtree-javacc {execution: jjtree-javacc-jpql}] Java Compiler Compiler Version 4.0 (Tree Builder) (type "jjtree" with no arguments for help) Reading from file /root/openjpa/openjpa-kernel/src/main/jjtree/org/apache/openjpa/kernel/jpql/JPQL.jjt . . . File "/root/openjpa/openjpa-kernel/target/generated-sources/jjtree/org/apache/openjpa/kernel/jpql/Node.java" does not exist. Will create one. Annotated grammar generated successfully in /root/openjpa/openjpa-kernel/target/generated-sources/jjtree/org/apache/openjpa/kernel/jpql/JPQL.jj Java Compiler Compiler Version 4.0 (Parser Generator) (type "javacc" with no arguments for help) Reading from file /root/openjpa/openjpa-kernel/target/generated-sources/jjtree/org/apache/openjpa/kernel/jpql/JPQL.jj . . . Warning: Choice conflict in (...)* construct at line 935, column 17. Expansion nested within construct and expansion following construct have common prefixes, one of which is: "+" Consider using a lookahead of 2 or more for nested expansion. Warning: Choice conflict in (...)* construct at line 944, column 17. Expansion nested within construct and expansion following construct have common prefixes, one of which is: "*" Consider using a lookahead of 2 or more for nested expansion. File "TokenMgrError.java" does not exist. Will create one. Warning: ParseException.java: File is obsolete. Please rename or delete this file so that a new one can be generated for you. File "Token.java" does not exist. Will create one. File "JavaCharStream.java" does not exist. Will create one. Parser generated with 0 errors and 3 warnings. John > > -Donald > > > On 5/22/10 7:45 AM, Web developer wrote: > > I usually go to my ~ directory, make checkout from svn trunk: > > svn checkout http://svn.apache.org/repos/asf/openjpa/trunk openjpa > > > > After checkout is finished - I cd to 'openjpa' dub-dir. And make 'mvn > test > > ...' from ~/openjpa, respectively under root (to have rights for 'ulimit > -n > > 1'). John > > > > 2010/5/21 Rick Curtis > > > >> Hmm... when you checked out trunk, you must have checked it out into a > >> directory with a name other than openjpa-parent. When I refer to > >> openjpa-parent, that is the directory where the root pom.xml file is > >> located. Are you running 'mvn test' from that directory? > >> > > >
Re: Tests are ignored
1. Yes, surfire reports are generated in XML. Tests are executed. 2. Yes, the heap size issue caused an exception in past runs. I had to add -X... args. I will test if that works in complex. I will report the results, say. tomorrow. John 2010/5/24 Donald Woods > Those are expected outputs Did you get any test results with the > "mvn clean install" run? > > If you run "ulimit -n" does it report 8192 or greater? If not, you'll > need to up the file handle limits. > > Also, you need to set some heap sizes before running Maven - >export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=256m" > > > -Donald > > > On 5/24/10 12:54 PM, Web developer wrote: > > 2010/5/24 Donald Woods > > > >> I always use "mvn clean install" which will build and run all of the > >> tests by default. > >> > >> Which JVM and Maven version are you using? Any recent version of Sun > >> 1.6.0 and Maven 2.0.9+ or 2.2.1 should work. > >> > >> $ javac -version > > javac 1.6.0_15 > > $ mvn -version > > Apache Maven 2.2.1 (rdebian-1) > > Java version: 1.6.0_15 > > Java home: /usr/lib/jvm/java-6-sun-1.6.0.15/jre > > Default locale: ru_UA, platform encoding: UTF-8 > > OS name: "linux" version: "2.6.31-19-server" arch: "amd64" Family: "unix" > > > > > >> Do you have any overrides in your .m2/settings.xml which may be > >> disabling tests? > >> > >> My /etc/maven2/settings.xml(no settings.xml in ~/.m2): > > > > > > > > > > > > > > http://maven.apache.org/SETTINGS/1.0.0"; > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; > > xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 > > http://maven.apache.org/xsd/settings-1.0.0.xsd";> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > "mvn clean install" command gave some new response: > > > > [INFO] [javacc:jjtree-javacc {execution: jjtree-javacc-jpql}] > > Java Compiler Compiler Version 4.0 (Tree Builder) > > (type "jjtree" with no arguments for help) > > Reading from file > > > /root/openjpa/openjpa-kernel/src/main/jjtree/org/apache/openjpa/kernel/jpql/JPQL.jjt > > . . . > > File > > > "/root/openjpa/openjpa-kernel/target/generated-sources/jjtree/org/apache/openjpa/kernel/jpql/Node.java" > > does not exist. Will create one. > > Annotated grammar generated successfully in > > > /root/openjpa/openjpa-kernel/target/generated-sources/jjtree/org/apache/openjpa/kernel/jpql/JPQL.jj > > Java Compiler Compiler Version 4.0 (Parser Generator) > > (type "javacc" with no arguments for help) > > Reading from file > > > /root/openjpa/openjpa-kernel/target/generated-sources/jjtree/org/apache/openjpa/kernel/jpql/JPQL.jj > > . . . > > Warning: Choice conflict in (...)* construct at line 935, column 17. > > Expansion nested within construct and expansion following > construct > > have common prefixes, one of which is: "+" > > Consider using a lookahead of 2 or more for nested expansion. > > Warning: Choice conflict in (...)* construct at line 944, column 17. > > Expansion nested within construct and expansion following > construct > > have common prefixes, one of which is: "*" > > Consider using a lookahead of 2 or more for nested expansion. > > File "TokenMgrError.java" does not exist. Will create one. > > Warning: ParseException.java: File is obsolete. Please rename or delete > > this file so that a new one can be generated for you. > > File "Token.java" does not exist. Will create one. > > File "JavaCharStream.java" does not exist. Will create one. > > Parser generated with 0 errors and 3 warnings. > > > > John > > > >> > >> -Donald > >> > >> > >> On 5/22/10 7:45 AM, Web developer wrote: > >>> I usually go to my ~ directory, make checkout from svn trunk: > >>> svn checkout http://svn.apache.org/repos/asf/openjpa/trunk openjpa > >>> > >>> After checkout is finished - I cd to 'openjpa' dub-dir. And make 'mvn > >> test > >>> ...' from ~/openjpa, respectively under root (to have rights for > 'ulimit > >> -n > >>> 1'). John > >>> > >>> 2010/5/21 Rick Curtis > >>> > >>>> Hmm... when you checked out trunk, you must have checked it out into a > >>>> directory with a name other than openjpa-parent. When I refer to > >>>> openjpa-parent, that is the directory where the root pom.xml file is > >>>> located. Are you running 'mvn test' from that directory? > >>>> > >>> > >> > > >
Re: Tests are ignored
While using a "surfire-report:report-only" the following info came up: Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'. [INFO] Setting property: velocimacro.messages.on => 'false'. [INFO] Setting property: resource.loader => 'classpath'. [INFO] Setting property: resource.manager.logwhenfound => 'false'. [INFO] [remote-resources:process {execution: default}] [INFO] [site:attach-descriptor {execution: default-attach-descriptor}] [INFO] Unable to load parent project from a relative path: *Could not find the model file '/root/pom.xml'*. for project unknown [INFO] Parent project loaded from repository. [INFO] Preparing source:jar [WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation. [INFO] [enforcer:enforce {execution: default}] [INFO] [source:jar {execution: attach-sources}] [INFO] Preparing source:test-jar [WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation. [WARNING] Removing: test-jar from forked lifecycle, to prevent recursive invocation. [INFO] [enforcer:enforce {execution: default}] [INFO] [source:test-jar {execution: attach-sources}] John 2010/5/24 Web developer > 1. Yes, surfire reports are generated in XML. Tests are executed. > > 2. Yes, the heap size issue caused an exception in past runs. I had to add > -X... args. > > I will test if that works in complex. I will report the results, say. > tomorrow. John > > > 2010/5/24 Donald Woods > >> Those are expected outputs Did you get any test results with the >> "mvn clean install" run? >> >> If you run "ulimit -n" does it report 8192 or greater? If not, you'll >> need to up the file handle limits. >> >> Also, you need to set some heap sizes before running Maven - >>export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=256m" >> >> >> -Donald >> >> >> On 5/24/10 12:54 PM, Web developer wrote: >> > 2010/5/24 Donald Woods >> > >> >> I always use "mvn clean install" which will build and run all of the >> >> tests by default. >> >> >> >> Which JVM and Maven version are you using? Any recent version of Sun >> >> 1.6.0 and Maven 2.0.9+ or 2.2.1 should work. >> >> >> >> $ javac -version >> > javac 1.6.0_15 >> > $ mvn -version >> > Apache Maven 2.2.1 (rdebian-1) >> > Java version: 1.6.0_15 >> > Java home: /usr/lib/jvm/java-6-sun-1.6.0.15/jre >> > Default locale: ru_UA, platform encoding: UTF-8 >> > OS name: "linux" version: "2.6.31-19-server" arch: "amd64" Family: >> "unix" >> > >> > >> >> Do you have any overrides in your .m2/settings.xml which may be >> >> disabling tests? >> >> >> >> My /etc/maven2/settings.xml(no settings.xml in ~/.m2): >> > >> > >> > >> > >> > >> > >> > http://maven.apache.org/SETTINGS/1.0.0"; >> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; >> > xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 >> > http://maven.apache.org/xsd/settings-1.0.0.xsd";> >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > "mvn clean install" command gave some new response: >> > >> > [INFO] [javacc:jjtree-javacc {execution: jjtree-javacc-jpql}] >> > Java Compiler Compiler Version 4.0 (Tree Builder) >> > (type "jjtree" with no arguments for help) >> > Reading from file >> > >> /root/openjpa/openjpa-kernel/src/main/jjtree/org/apache/openjpa/kernel/jpql/JPQL.jjt >> > . . . >> > File >> > >> "/root/openjpa/openjpa-kernel/target/generated-sources/jjtree/org/apache/openjpa/kernel/jpql/Node.java" >> > does not exist. Will create one. >> > Annotated grammar generated successfully in >> > >> /root/openjpa/openjpa-kernel/target/generated-sources/jjtree/org/
Re: Tests are ignored
maven is executed from /root/openjpa currently. Why is it trying to find /root/openjpa/../pom.xml? Oh, and one more thing. xmlstore facility is not needed for me. How can I remove that from POMs after removing openjpa-xmlstore folder? Some external command? John 2010/5/25 Donald Woods > Nothing unexpected. Normal maven stuff. > > -Donald > > > On 5/25/10 11:40 AM, Web developer wrote: > > While using a "surfire-report:report-only" the following info came up: > > > > Setting property: classpath.resource.loader.class => > > 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'. > > [INFO] Setting property: velocimacro.messages.on => 'false'. > > [INFO] Setting property: resource.loader => 'classpath'. > > [INFO] Setting property: resource.manager.logwhenfound => 'false'. > > [INFO] [remote-resources:process {execution: default}] > > [INFO] [site:attach-descriptor {execution: default-attach-descriptor}] > > [INFO] Unable to load parent project from a relative path: *Could not > find > > the model file '/root/pom.xml'*. for project unknown > > [INFO] Parent project loaded from repository. > > [INFO] Preparing source:jar > > [WARNING] Removing: jar from forked lifecycle, to prevent recursive > > invocation. > > [INFO] [enforcer:enforce {execution: default}] > > [INFO] [source:jar {execution: attach-sources}] > > [INFO] Preparing source:test-jar > > [WARNING] Removing: jar from forked lifecycle, to prevent recursive > > invocation. > > [WARNING] Removing: test-jar from forked lifecycle, to prevent recursive > > invocation. > > [INFO] [enforcer:enforce {execution: default}] > > [INFO] [source:test-jar {execution: attach-sources}] > > > > John > > > > 2010/5/24 Web developer > > > >> 1. Yes, surfire reports are generated in XML. Tests are executed. > >> > >> 2. Yes, the heap size issue caused an exception in past runs. I had to > add > >> -X... args. > >> > >> I will test if that works in complex. I will report the results, say. > >> tomorrow. John > >> > >> > >> 2010/5/24 Donald Woods > >> > >>> Those are expected outputs Did you get any test results with the > >>> "mvn clean install" run? > >>> > >>> If you run "ulimit -n" does it report 8192 or greater? If not, you'll > >>> need to up the file handle limits. > >>> > >>> Also, you need to set some heap sizes before running Maven - > >>>export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=256m" > >>> > >>> > >>> -Donald > >>> > >>> > >>> On 5/24/10 12:54 PM, Web developer wrote: > >>>> 2010/5/24 Donald Woods > >>>> > >>>>> I always use "mvn clean install" which will build and run all of the > >>>>> tests by default. > >>>>> > >>>>> Which JVM and Maven version are you using? Any recent version of Sun > >>>>> 1.6.0 and Maven 2.0.9+ or 2.2.1 should work. > >>>>> > >>>>> $ javac -version > >>>> javac 1.6.0_15 > >>>> $ mvn -version > >>>> Apache Maven 2.2.1 (rdebian-1) > >>>> Java version: 1.6.0_15 > >>>> Java home: /usr/lib/jvm/java-6-sun-1.6.0.15/jre > >>>> Default locale: ru_UA, platform encoding: UTF-8 > >>>> OS name: "linux" version: "2.6.31-19-server" arch: "amd64" Family: > >>> "unix" > >>>> > >>>> > >>>>> Do you have any overrides in your .m2/settings.xml which may be > >>>>> disabling tests? > >>>>> > >>>>> My /etc/maven2/settings.xml(no settings.xml in ~/.m2): > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> http://maven.apache.org/SETTINGS/1.0.0"; > >>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; > >>>> xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 > >>>> http://maven.apache.org/xsd/settings-1.0.0.xsd";> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >&g
Fwd: Test run
-- Пересланное сообщение -- От кого: Web developer Дата: 27 мая 2010 г. 15:27 Тема: Re: Test run Кому: Rick Curtis >Since there are multiple persistence units defined in the p.xml file that you specified, we incorrectly try to create the >OPENJPA_SEQUENCE_TABLE multiple times. Not that big of a deal. Here is my updated persistence.xml: http://java.sun.com/xml/ns/persistence"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; version="1.0"> org.apache.openjpa.persistence.PersistenceProviderImpl Address ContactInfo Phone User 310 embeddables INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.H2Dictionary". 385 embeddables INFO [main] openjpa.Runtime - Creating sequence table. 1814 embeddables TRACE [main] openjpa.jdbc.SQL - executing stmnt 1260137319 CREATE TABLE OPENJPA_SEQUENCE_TABLE (ID TINYINT NOT NULL, SEQUENCE_VALUE BIGINT, PRIMARY KEY (ID)) 1826 embeddables TRACE [main] openjpa.jdbc.SQL - [12 ms] spent 163 embeddables INFO [main] openjpa.Runtime - Starting OpenJPA 2.0.0-beta3 346 embeddables INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.H2Dictionary". Exception in thread "main" org.apache.openjpa.persistence.RollbackException: The transaction has been rolled back. See the nested exceptions for details on the errors that occurred. at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:573) at Main.init(Main.java:55) at Main.main(Main.java:10) Caused by: org.apache.openjpa.persistence.PersistenceException: The transaction has been rolled back. See the nested exceptions for details on the errors that occurred. at org.apache.openjpa.kernel.BrokerImpl.newFlushException(BrokerImpl.java:2279) at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2122) at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:2020) at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1938) at org.apache.openjpa.kernel.LocalManagedRuntime.commit(LocalManagedRuntime.java:81) at org.apache.openjpa.kernel.BrokerImpl.commit(BrokerImpl.java:1462) at org.apache.openjpa.kernel.DelegatingBroker.commit(DelegatingBroker.java:924) at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:556) ... 2 more Caused by: org.apache.openjpa.persistence.PersistenceException: Таблица "USER0" не найдена Table "USER0" not found; SQL statement: INSERT INTO User0 (id, user, user_name, city, state, street, zip, number, type) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [42102-132] {INSERT INTO User0 (id, user, user_name, city, state, street, zip, number, type) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)} [code=42102, state=42S02] at org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:4827) at org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:4787) at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:136) at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:110) at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:62) at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flush(PreparedStatementManagerImpl.java:89) at org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:550) at org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:106) at org.apache.openjpa.jdbc.kernel.BatchingConstraintUpdateManager.flush(BatchingConstraintUpdateManager.java:59) at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:103) at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:76) at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:743) at org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:130) ... 9 more Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: Таблица "USER0" не найдена Table "USER0" not found; SQL statement: INSERT INTO User0 (id, user, user_name, city, state, street, zip, number, type) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [42102-132] {INSERT INTO User0 (id, user, user_name, city, state, street, zip, number, type) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)} [code=42102, state=42S02] at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:257) at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:237) at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$000(LoggingConnectionDecorator.java:70) at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection.prepareStatement(Loggi
Mapping tool
I still can't understand how to force a proper generation of sequence table. I can't understand why sequence table could not be found in my HSQLDB database. I added external builder to Eclipse (forces mapping tool to execute). Here goes: -classpath /home/webautomator/openjpa-all-2.0.0-beta3.jar:${workspace_loc:/openJPA/src}:${workspace_loc:/openJPA/bin}:/usr/share/java/log4j-1.2.15.jar org.apache.openjpa.enhance.PCEnhancer -directory ${workspace_loc:/openJPA/bin} User Phone Address ContactInfo -Dopenjpa.Log=SQL=trace -classpath /home/webautomator/openjpa-all-2.0.0-beta3.jar:/home/webautomator/hsqldb.jar:/usr/share/java/log4j-1.2.15.jar org.apache.openjpa.jdbc.kernel.TableJDBCSeq -p ${workspace_loc}/${project_name}/src/META-INF/persistence.xml -ConnectionDriverName org.hsqldb.jdbc.JDBCDriver -ConnectionURL jdbc:hsqldb:mem:persist_backend;create=true -Dopenjpa.ConnectionUserName=SA -a add -Dopenjpa.jdbc.Schema=SQL=TRACE -Dopenjpa.Log=SQL=TRACE -classpath /home/webautomator/openjpa-all-2.0.0-beta3.jar:${workspace_loc}/${project_name}/bin:/home/webautomator/hsqldb.jar org.apache.openjpa.jdbc.meta.MappingTool -sequences true -meta true -p ${workspace_loc}/${project_name}/src/META-INF/persistence.xml -ConnectionDriverName org.hsqldb.jdbc.JDBCDriver -ConnectionURL jdbc:hsqldb:mem:persist_backend -Dopenjpa.ConnectionUserName=SA Address.java ContactInfo.java Phone.java User.java -classpath /home/webautomator/openjpa-all-2.0.0-beta3.jar:${workspace_loc}/${project_name}/bin:/home/webautomator/hsqldb.jar org.apache.openjpa.jdbc.meta.MappingTool -action validate -p ${workspace_loc}/${project_name}/src/META-INF/persistence.xml -ConnectionDriverName org.hsqldb.jdbc.JDBCDriver -ConnectionURL jdbc:hsqldb:mem:persist_backend -Dopenjpa.ConnectionUserName=SA Address.java ContactInfo.java Phone.java User.java 318 embeddables INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.HSQLDictionary". 709 embeddables INFO [main] openjpa.Tool - Mapping tool running on type "class User" with action "buildSchema". 1360 embeddables INFO [main] openjpa.Tool - Mapping tool running on type "class ContactInfo" with action "buildSchema". 1376 embeddables INFO [main] openjpa.Tool - Mapping tool running on type "class Phone" with action "buildSchema". 1376 embeddables INFO [main] openjpa.Tool - Recording mapping and schema changes. 2763 embeddables TRACE [main] openjpa.jdbc.SQL - executing stmnt 1491218219 CREATE TABLE OPENJPA_SEQUENCE_TABLE (ID TINYINT NOT NULL, SEQUENCE_VALUE BIGINT, PRIMARY KEY (ID)) 2764 embeddables TRACE [main] openjpa.jdbc.SQL - [1 ms] spent 2766 embeddables TRACE [main] openjpa.jdbc.SQL - executing stmnt 65098484 CREATE TABLE User0 (id INTEGER NOT NULL, user VARCHAR(255), user_name VARCHAR(255), city VARCHAR(255), state VARCHAR(255), street VARCHAR(255), zip INTEGER, number VARCHAR(255), type VARCHAR(255), PRIMARY KEY (id)) 2769 embeddables TRACE [main] openjpa.jdbc.SQL - [2 ms] spent 2770 embeddables TRACE [main] openjpa.jdbc.SQL - executing stmnt 589734556 CREATE TABLE user_addresses (USER_ID INTEGER, city VARCHAR(255), state VARCHAR(255), street VARCHAR(255), zip INTEGER) 2771 embeddables TRACE [main] openjpa.jdbc.SQL - [1 ms] spent 2773 embeddables TRACE [main] openjpa.jdbc.SQL - executing stmnt 420745445 CREATE INDEX I_SR_DSSS_USER_ID ON user_addresses (USER_ID) 2773 embeddables TRACE [main] openjpa.jdbc.SQL - [0 ms] spent 353 embeddables INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.HSQLDictionary". 469 embeddables INFO [main] openjpa.Tool - Mapping tool running on type "class User" with action "validate". Exception in thread "main" org.apache.openjpa.util.MetaDataException: Errors encountered while resolving metadata. See nested exceptions for details. at org.apache.openjpa.meta.MetaDataRepository.resolve(MetaDataRepository.java:642) at org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:385) at org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:358) at org.apache.openjpa.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:355) at org.apache.openjpa.jdbc.meta.MappingTool.getMapping(MappingTool.java:679) at org.apache.openjpa.jdbc.meta.MappingTool.validate(MappingTool.java:737) at org.apache.openjpa.jdbc.meta.MappingTool.run(MappingTool.java:653) at org.apache.openjpa.jdbc.meta.MappingTool.run(MappingTool.java:1075) at org.apache.openjpa.jdbc.meta.MappingTool.run(MappingTool.java:989) at org.apache.openjpa.jdbc.meta.MappingTool$1.run(MappingTool.java:930) at org.apache.openjpa.lib.conf.Configurations.launchRunnable(Configurations.java:725) at org.apache.openjpa.lib.conf.Configurations.runAgainstAllAnchors(Configurations.java:715) at org.apache.openjpa.jdbc.meta.MappingTool.main(MappingTool.java:925) Caused by: org.apache.openjpa.util.MetaDataException: Table
Re: [OFF-LINE] Re: Test run
What else you need from me to explain? No mappings and sequence table generated for ANY database. It looks like runtime tools might work. But currently I am interested in external mapping configuration file for forced processing via mapping tool rather *.java or *.bin file processing. In any case I should care now only about manual mapping(no runtime). It just gives me more guarantee against runtime features. John P.S. Yes, I am still running samples. That's because batch tools in OpenJPA still do not work. Otherwise I would already move to Salient. 2010/5/27 Rick Curtis > Please describe what you are trying to do? > > 2010/5/27 Web developer > >> Here is how I changed the runner configuration: >> >> -Dopenjpa.jdbc.SynchronizeMappings=buildSchema >> -Dopenjpa.ConnectionDriverName=org.h2.Driver >> >> -Dopenjpa.ConnectionURL=jdbc:h2:/tmp/persist_backend >> -Dopenjpa.DynamicEnhancementAgent=false >> -Dopenjpa.RuntimeUnenhancedClasses=unsupported >> >> And here is the output: >> >> 212 embeddables INFO [main] openjpa.Runtime - Starting OpenJPA >> 2.0.0-beta3 >> 483 embeddables INFO [main] openjpa.jdbc.JDBC - Using dictionary class >> "org.apache.openjpa.jdbc.sql.H2Dictionary". >> Exception in thread "main" > user error> org.apache.openjpa.persistence.ArgumentException: An error >> occurred while parsing the query filter "SELECT u FROM User u , in >> (u.addresses) a WHERE a.coordinates.longitude='38'". Error message: No field >> named "coordinates" in "Address". Did you mean "city"? Expected one of the >> available field names in "Address": "[city, state, street, zip]". >> at >> org.apache.openjpa.kernel.exps.AbstractExpressionBuilder.parseException(AbstractExpressionBuilder.java:119) >> at >> org.apache.openjpa.kernel.exps.AbstractExpressionBuilder.traversePath(AbstractExpressionBuilder.java:296) >> at >> org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getPath(JPQLExpressionBuilder.java:1941) >> at >> org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getPathOrConstant(JPQLExpressionBuilder.java:1861) >> at >> org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.eval(JPQLExpressionBuilder.java:1169) >> at >> org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getValue(JPQLExpressionBuilder.java:2054) >> at >> org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getValue(JPQLExpressionBuilder.java:2040) >> at >> org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.eval(JPQLExpressionBuilder.java:1055) >> at >> org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getExpression(JPQLExpressionBuilder.java:1970) >> at >> org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.eval(JPQLExpressionBuilder.java:997) >> at >> org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.evalWhereClause(JPQLExpressionBuilder.java:668) >> at >> org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getQueryExpressions(JPQLExpressionBuilder.java:297) >> at org.apache.openjpa.kernel.jpql.JPQLParser.eval(JPQLParser.java:67) >> at >> org.apache.openjpa.kernel.ExpressionStoreQuery$DataStoreExecutor.(ExpressionStoreQuery.java:733) >> at >> org.apache.openjpa.kernel.ExpressionStoreQuery.newDataStoreExecutor(ExpressionStoreQuery.java:171) >> at >> org.apache.openjpa.kernel.QueryImpl.createExecutor(QueryImpl.java:747) >> at >> org.apache.openjpa.kernel.QueryImpl.compileForDataStore(QueryImpl.java:705) >> at >> org.apache.openjpa.kernel.QueryImpl.compileForExecutor(QueryImpl.java:687) >> at org.apache.openjpa.kernel.QueryImpl.compile(QueryImpl.java:587) >> at >> org.apache.openjpa.persistence.EntityManagerImpl.createQuery(EntityManagerImpl.java:976) >> at >> org.apache.openjpa.persistence.EntityManagerImpl.createQuery(EntityManagerImpl.java:962) >> at >> org.apache.openjpa.persistence.EntityManagerImpl.createQuery(EntityManagerImpl.java:98) >> at Main.runQueries(Main.java:21) >> at Main.main(Main.java:11) >> >> After removing earlier mentioned option previous exception about >> non-existing tables is gone. It looks like it really create something in >> database. I will check later what is in H2 database. John >> >> 2010/5/27 Rick Curtis >> >> Did you read my previous reply? In your previous emails you had two >>> problems. The first problem[1] was because you were running TableJDBCSeq >>> manually and there were multiple persistence units defined in your >>> persi
Testing
I tried to generate ant artifacts in project via "ant:ant" command. "eclipse:eclipse" would not help with dependencies. Currently "ant test" gives an acceptable testing run. I examined retrieved testing snapshots from inet. It looks like persistence.xml and other files are in META-INF sub-folder in *.jar(s). So those could be used via a simple junit test runner. Question: how to initiate tests like that? What's an easiest way? John
Log4j
I still can't understand how to correctly activate log4j logger. Can someone help me? John
Running test suites
It looks like test are running via ant. Or not? How to initiate testing without Maven? John
OpenJPA under Xen
Hi. I have figured out that there will be a training against HP related hardware/software in my town, start November 15th. There will also be a Xen related material. I am curious about: 1. Live migration of domU in PV mode with running instance(s) of OpenJPA based application 2. Multiple domUs on single host machine (some of those with Linux, some with Windows 2003 on board) for testing engeniering collaboration software for electric CAD development (OpenJPA for session management with message broker under virtual network) with pre-configured deployment to standalone bare metal testing machines and farther automatic testing (e.g. running JUnit tests on deployed instances). I am getting a bit more Xen user related experience - so I am curious if anyone from community would be interested in testing such a thing. John