openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Krzysztof <yaz...@gmail.com>
Subject 2.1.0 from maven repository woes
Date Tue, 01 Mar 2011 16:34:25 GMT
Hello,
We experience quite cryptic exception about the "Sequence" option while
using maven fetched jars from time to time. 2.1.0 jars broke code that
worked with 2.0.1. 
Layout of both seems the same at first glance, I cannot see any missing
packages in new jars.

Actually, it does not look like being dependent on the code at all as it
seems purely openjpa configuration problem. 

For example: code, persistence.xml that worked with 2.0.1 ivy dependencies
like:
<ivy.xml>
...

		<dependency org="org.apache.openjpa" name="openjpa-jdbc"
			rev="2.0.1" />
		<dependency org="org.apache.openjpa" name="openjpa-kernel"
			rev="2.0.1" />
		<dependency org="org.apache.openjpa" name="openjpa-lib"
			rev="2.0.1" />
		<dependency org="org.apache.openjpa" name="openjpa-persistence"
			rev="2.0.1" />
		<dependency org="org.apache.openjpa" name="openjpa-persistence-jdbc"
			rev="2.0.1" />
		<dependency org="org.apache.openjpa" name="openjpa-slice"
			rev="2.0.1" />
		<dependency org="org.apache.openjpa" name="openjpa-xmlstore"
			rev="2.0.1" />
...
</ivy.xml>

 - causes error when version is replaced with 2.1.0, as shown below. This
error also happened in the past and was dependent on the order of jars on
the classpath. This time, reordering, adding/removing openjpa-all does not
help. 

Environment: MacOS 10.6, JVM1.6-64bit.

There was an old Jira and a thread once with similar error, but not sure if
that issue could be linked with this one.
 
(http://markmail.org/thread/maoxchxfxx73cwjv#query:+page:1+mid:qvknf6hvxq23hv6h+state:results)
(https://issues.apache.org/jira/browse/OPENJPA-73)

Should I open Jira for this as it re-occurs from time to time causing major
headaches?

<error>
5  pu-name  TRACE  [main] openjpa.Runtime - Setting the following properties
from "file:code/conf/META-INF/persistence.xml" into configuration:
{openjpa.BrokerFact
ory=jdbc, openjpa.DynamicDataStructs=true,
openjpa.RuntimeUnenhancedClasses=supported,
javax.persistence.provider=org.apache.openjpa.persistence.PersistenceProviderImpl,
openjpa.jdbc.Schema=user, openjpa.jdbc.SchemaFactory=nati
ve(foreignKeys=true), openjpa.jdbc.FetchDirection=forward,
openjpa.Log=DefaultLevel=TRACE, Runtime=TRACE, Tool=INFO, SQL=TRACE,
openjpa.jdbc.DBDictionary=batchLimit=500, PersistenceVersion=1.0,
openjpa.ConnectionUserName=user, 
openjpa.Id=pu-name,
openjpa.jdbc.SynchronizeMappings=buildSchema(SchemaAction='drop,add',primaryKeys=true,foreignKeys=true,indexes=true),
openjpa.jdbc.LRSSize=last, openjpa.ConnectionPassword=pwd, openj
pa.ConnectionDriverName=org.postgresql.Driver,
openjpa.jdbc.ResultSetType=forward-only,
openjpa.MetaDataFactory=jpa(Types=gaia.cu7.om.AbstractCatalog;gaia.cu7.om.Catalog;gaia.cu7.om.SurveyCatalog;gaia.cu7.om.Survey;gaia.cu7.om.inp
ut.TimeSeriesType;gaia.cu7.om.input.Source;gaia.cu7.om.input.ObservedSource;gaia.cu7.om.input.TimeSeries),
openjpa.Sequence=native(Allocate=500, Increment=1),
openjpa.FetchBatchSize=-1, openjpa.jdbc.MappingDefaults=ForeignKeyDelet
eAction=cascade,
JoinForeignKeyDeleteAction=cascade,IndexLogicalForeignKeys=true,
openjpa.ProxyManager=AssertAllowedType=false,
openjpa.ConnectionURL=jdbc:postgresql://db:5433/schema}
28  pu-name  TRACE  [main] openjpa.Runtime -
org.apache.openjpa.enhance.InstrumentationFactory.getInstrumentation()
_inst:null _dynamicallyInstall:true
29  pu-name  TRACE  [main] openjpa.Runtime -
org.apache.openjpa.enhance.InstrumentationFactory.findToolsJar() -- couldn't
find default
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/tool
s.jar
30  pu-name  TRACE  [main] openjpa.Runtime -
org.apache.openjpa.enhance.InstrumentationFactory.findToolsJar() -- found
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar
1  pu-name  TRACE  [main] openjpa.Runtime - Setting the following properties
from "file:code/conf/META-INF/persistence.xml" into configuration:
{openjpa.DynamicDat
aStructs=true, openjpa.RuntimeUnenhancedClasses=supported,
javax.persistence.provider=org.apache.openjpa.persistence.PersistenceProviderImpl,
openjpa.jdbc.Schema=user,
openjpa.jdbc.SchemaFactory=native(foreignKeys=true), openjp
a.jdbc.FetchDirection=forward, openjpa.Log=DefaultLevel=TRACE,
Runtime=TRACE, Tool=INFO, SQL=TRACE,
openjpa.jdbc.DBDictionary=batchLimit=500, PersistenceVersion=1.0,
openjpa.ConnectionUserName=user, openjpa.Id=mapping-user-s
urveys-gd0-2,
openjpa.jdbc.SynchronizeMappings=buildSchema(SchemaAction='drop,add',primaryKeys=true,foreignKeys=true,indexes=true),
openjpa.jdbc.LRSSize=last, openjpa.ConnectionPassword=userpwd,
openjpa.ConnectionDriverName=org.
postgresql.Driver, openjpa.jdbc.ResultSetType=forward-only,
openjpa.MetaDataFactory=jpa(Types=gaia.cu7.om.AbstractCatalog;gaia.cu7.om.Catalog;gaia.cu7.om.SurveyCatalog;gaia.cu7.om.Survey;gaia.cu7.om.input.TimeSeriesType;gaia.cu7.o
m.input.Source;gaia.cu7.om.input.ObservedSource;gaia.cu7.om.input.TimeSeries),
openjpa.Sequence=native(Allocate=500, Increment=1),
openjpa.FetchBatchSize=-1,
openjpa.jdbc.MappingDefaults=ForeignKeyDeleteAction=cascade, JoinForeign
KeyDeleteAction=cascade,IndexLogicalForeignKeys=true,
openjpa.ProxyManager=AssertAllowedType=false,
openjpa.ConnectionURL=jdbc:postgresql://db:5433/surveys}
409  pu-name  ERROR  [main] openjpa.Runtime - Failed to create a provider
for "pu-name".
java.lang.RuntimeException: There were errors initializing your
configuration: org.apache.openjpa.lib.util.ParseException: There was an
error while setting up the configuration plugin option "Sequence". The
plugin was of type "org
.apache.openjpa.kernel.TimeSeededSeq". Setter methods for the following
plugin properties were not available in that type: [Allocate]. Possible
plugin properties are: [Increment, TYPE_CONTIGUOUS, TYPE_DEFAULT,
TYPE_NONTRANSACTIONA
L, TYPE_TRANSACTIONAL, Type].
Ensure that your plugin configuration string uses key values that correspond
to setter methods in the plugin class.
	at
org.apache.openjpa.lib.conf.Configurations.configureInstance(Configurations.java:515)
	at
org.apache.openjpa.lib.conf.Configurations.configureInstance(Configurations.java:443)
	at
org.apache.openjpa.lib.conf.PluginValue.instantiate(PluginValue.java:104)
	at org.apache.openjpa.lib.conf.ObjectValue.instantiate(ObjectValue.java:83)
	at
org.apache.openjpa.conf.OpenJPAConfigurationImpl.getSequenceInstance(OpenJPAConfigurationImpl.java:1400)
	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.openjpa.lib.conf.ConfigurationImpl.instantiateAll(ConfigurationImpl.java:295)
	at
org.apache.openjpa.conf.OpenJPAConfigurationImpl.instantiateAll(OpenJPAConfigurationImpl.java:1652)
	at
org.apache.openjpa.enhance.PCEnhancerAgent.registerClassLoadEnhancer(PCEnhancerAgent.java:185)
	at
org.apache.openjpa.enhance.PCEnhancerAgent.premain(PCEnhancerAgent.java:145)
	at
org.apache.openjpa.enhance.PCEnhancerAgent.loadDynamicAgent(PCEnhancerAgent.java:98)
	at
org.apache.openjpa.persistence.PersistenceProviderImpl.loadAgent(PersistenceProviderImpl.java:306)
	at
org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:101)
	at
org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:157)
	at
org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:66)
	at
javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:152)
	at
javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:72)
	at
gaia.cu7.om.dal.DbVariStore.createPersistenceFactory(DbVariStore.java:84)
	at
gaia.cu7.om.dal.test.InputOMMappingTest.PersistSourceInUnit(InputOMMappingTest.java:81)
	at
gaia.cu7.om.dal.test.InputOMMappingTest.PersistsSourcePostgres90(InputOMMappingTest.java:73)
	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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
	at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
	at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
	at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
	at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
	at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73)
	at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
	at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
	at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
	at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
	at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
	at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

	at
org.apache.openjpa.lib.conf.ConfigurationImpl.instantiateAll(ConfigurationImpl.java:309)
	at
org.apache.openjpa.conf.OpenJPAConfigurationImpl.instantiateAll(OpenJPAConfigurationImpl.java:1652)
	at
org.apache.openjpa.enhance.PCEnhancerAgent.registerClassLoadEnhancer(PCEnhancerAgent.java:185)
	at
org.apache.openjpa.enhance.PCEnhancerAgent.premain(PCEnhancerAgent.java:145)
	at
org.apache.openjpa.enhance.PCEnhancerAgent.loadDynamicAgent(PCEnhancerAgent.java:98)
	at
org.apache.openjpa.persistence.PersistenceProviderImpl.loadAgent(PersistenceProviderImpl.java:306)
	at
org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:101)
	at
org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:157)
	at
org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:66)
	at
javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:152)
	at
javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:72)

</error>

Best regards,
Krzysztof

-- 
View this message in context: http://openjpa.208410.n2.nabble.com/2-1-0-from-maven-repository-woes-tp6077834p6077834.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Mime
View raw message