openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ян Программист <webautoma...@gmail.com>
Subject Re: DataSource initialization error
Date Wed, 28 Apr 2010 17:16:49 GMT
<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

even if I paste arguments - the exception is the same. John

28 апреля 2010 г. 20:13 пользователь C N Davies <cnd@cndavies.com>
написал:

> I think you are supposed to set the property to class-table not the actual
> class name of he generator.
>
> <property name="openjpa.Sequence" value="class-table"/>
>
>
> Chris
>
>
>
> -----Original Message-----
> From: Ян Программист [mailto:webautomator@gmail.com]
> Sent: Thursday, 29 April 2010 2:35 AM
> To: users@openjpa.apache.org
> Subject: DataSource initialization error
>
> 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.ja
> va: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(OpenJPA
> ConfigurationImpl.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(ConfigurationIm
> pl.java:294)
> at
>
> org.apache.openjpa.conf.OpenJPAConfigurationImpl.instantiateAll(OpenJPAConfi
> gurationImpl.java:1602)
> at
>
> org.apache.openjpa.enhance.PCEnhancerAgent.registerClassLoadEnhancer(PCEnhan
> cerAgent.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(Persistence
> ProviderImpl.java:324)
> at
>
> org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFa
> ctory(PersistenceProviderImpl.java:100)
> at
>
> org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFa
> ctory(PersistenceProviderImpl.java:154)
> at
>
> org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFa
> ctory(PersistenceProviderImpl.java:65)
> at
>
> javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:15
> 0)
> at
>
> javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:70
> )
> at embeddables.Main.main(Main.java:31)
> at
>
> org.apache.openjpa.lib.conf.ConfigurationImpl.instantiateAll(ConfigurationIm
> pl.java:308)
> at
>
> org.apache.openjpa.conf.OpenJPAConfigurationImpl.instantiateAll(OpenJPAConfi
> gurationImpl.java:1602)
> at
>
> org.apache.openjpa.enhance.PCEnhancerAgent.registerClassLoadEnhancer(PCEnhan
> cerAgent.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(Persistence
> ProviderImpl.java:324)
> at
>
> org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFa
> ctory(PersistenceProviderImpl.java:100)
> at
>
> org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFa
> ctory(PersistenceProviderImpl.java:154)
> at
>
> org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFa
> ctory(PersistenceProviderImpl.java:65)
> at
>
> javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:15
> 0)
> 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:24
> 2)
> at
>
> javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:18
> 4)
> 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.ja
> va: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(OpenJPA
> ConfigurationImpl.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(ConfigurationIm
> pl.java:294)
> at
>
> org.apache.openjpa.conf.OpenJPAConfigurationImpl.instantiateAll(OpenJPAConfi
> gurationImpl.java:1602)
> at
>
> org.apache.openjpa.enhance.PCEnhancerAgent.registerClassLoadEnhancer(PCEnhan
> cerAgent.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(Persistence
> ProviderImpl.java:324)
> at
>
> org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFa
> ctory(PersistenceProviderImpl.java:100)
> at
>
> org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFa
> ctory(PersistenceProviderImpl.java:154)
> at
>
> org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFa
> ctory(PersistenceProviderImpl.java:65)
> at
>
> javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:15
> 0)
> at
>
> javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:70
> )
> at embeddables.Main.main(Main.java:31)
> at
>
> org.apache.openjpa.lib.conf.ConfigurationImpl.instantiateAll(ConfigurationIm
> pl.java:308)
> at
>
> org.apache.openjpa.conf.OpenJPAConfigurationImpl.instantiateAll(OpenJPAConfi
> gurationImpl.java:1602)
> at
>
> org.apache.openjpa.enhance.PCEnhancerAgent.registerClassLoadEnhancer(PCEnhan
> cerAgent.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(Persistence
> ProviderImpl.java:324)
> at
>
> org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFa
> ctory(PersistenceProviderImpl.java:100)
> at
>
> org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFa
> ctory(PersistenceProviderImpl.java:154)
> at
>
> org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFa
> ctory(PersistenceProviderImpl.java:65)
> at
>
> javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:15
> 0)
> ... 2 more
>
> Please help anyone.
>
> John
>
>

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