openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Curtis <curti...@gmail.com>
Subject Re: DataSource initialization error
Date Wed, 28 Apr 2010 17:17:41 GMT
Try changing:
<property name="openjpa.Sequence"
value="org.apache.openjpa.jdbc.kernel.ClassTableJDBCSeq()"/>
to
<property name="openjpa.Sequence"
value="org.apache.openjpa.jdbc.kernel.ClassTableJDBCSeq"/>

If that doesn't work, will you post the contents of your persistence.xml?
-- 
Thanks,
Rick

2010/4/25 Ян Программист <webautomator@gmail.com>

> I added following line to my configuration:
>
> <property name="openjpa.Sequence"
> value="org.apache.openjpa.jdbc.kernel.ClassTableJDBCSeq()"/>
>
> Following exception was thrown:
>
> embeddables  ERROR  [main] openjpa.Runtime - Failed to create a provider
> for
> "embeddables".
> java.lang.RuntimeException: There were errors initializing your
> configuration: java.lang.ClassCastException:
> org.apache.openjpa.conf.OpenJPAConfigurationImpl cannot be cast to
> org.apache.openjpa.jdbc.conf.JDBCConfiguration
> at
>
> org.apache.openjpa.jdbc.kernel.TableJDBCSeq.setConfiguration(TableJDBCSeq.java:239)
> at
>
> org.apache.openjpa.lib.conf.Configurations.configureInstance(Configurations.java:475)
> at
>
> org.apache.openjpa.lib.conf.Configurations.configureInstance(Configurations.java:432)
> 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:1390)
> 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:294)
> at
>
> org.apache.openjpa.conf.OpenJPAConfigurationImpl.instantiateAll(OpenJPAConfigurationImpl.java:1602)
> 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:324)
> at
>
> org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:100)
> at
>
> org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:154)
> at
>
> org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:65)
> at
>
> javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:150)
> at
>
> javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:70)
> at embeddables.Main.main(Main.java:31)
>
> at
>
> org.apache.openjpa.lib.conf.ConfigurationImpl.instantiateAll(ConfigurationImpl.java:308)
> at
>
> org.apache.openjpa.conf.OpenJPAConfigurationImpl.instantiateAll(OpenJPAConfigurationImpl.java:1602)
> 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:324)
> at
>
> org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:100)
> at
>
> org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:154)
> at
>
> org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:65)
> at
>
> javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:150)
> at
>
> javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:70)
> at embeddables.Main.main(Main.java:31)
> Exception in thread "main" javax.persistence.PersistenceException: Explicit
> persistence provider error(s) occurred for "embeddables" after trying the
> following discovered implementations:
> org.apache.openjpa.persistence.PersistenceProviderImpl from provider:
> org.apache.openjpa.persistence.PersistenceProviderImpl
> at
>
> javax.persistence.Persistence.createPersistenceException(Persistence.java:242)
> at
>
> javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:184)
> at
>
> javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:70)
> at embeddables.Main.main(Main.java:31)
> Caused by: java.lang.RuntimeException: There were errors initializing your
> configuration: java.lang.ClassCastException:
> org.apache.openjpa.conf.OpenJPAConfigurationImpl cannot be cast to
> org.apache.openjpa.jdbc.conf.JDBCConfiguration
> at
>
> org.apache.openjpa.jdbc.kernel.TableJDBCSeq.setConfiguration(TableJDBCSeq.java:239)
> at
>
> org.apache.openjpa.lib.conf.Configurations.configureInstance(Configurations.java:475)
> at
>
> org.apache.openjpa.lib.conf.Configurations.configureInstance(Configurations.java:432)
> 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:1390)
> 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:294)
> at
>
> org.apache.openjpa.conf.OpenJPAConfigurationImpl.instantiateAll(OpenJPAConfigurationImpl.java:1602)
> 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:324)
> at
>
> org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:100)
> at
>
> org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:154)
> at
>
> org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:65)
> at
>
> javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:150)
> at
>
> javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:70)
> at embeddables.Main.main(Main.java:31)
>
> at
>
> org.apache.openjpa.lib.conf.ConfigurationImpl.instantiateAll(ConfigurationImpl.java:308)
> at
>
> org.apache.openjpa.conf.OpenJPAConfigurationImpl.instantiateAll(OpenJPAConfigurationImpl.java:1602)
> 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:324)
> at
>
> org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:100)
> at
>
> org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:154)
> at
>
> org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:65)
> at
>
> javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:150)
> ... 2 more
>
> John
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message