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:40:52 GMT
I will double check that. Thanks. John

2010/4/28 Heath Thomann <jpaheath@gmail.com>

> I've opened issue OPENJPA-1642 for this.  I've been able to create this
> issue with ease in eclipse using the property suggested by the user, and
> using other properties (e.g.
> 'org.apache.openjpa.jdbc.kernel.TableJDBCSeq').  I've not dug into this one
> in great depth but it does seem like openJPA is either performing a cast
> incorrectly, or the wrong config object is used by openJPA when a user sets
> the property.  It seems that the issue doesn't arise when using a
> programatic approach, e.g.:
>
>                JDBCConfiguration conf = new JDBCConfigurationImpl();
>                TableJDBCSeq seq = new TableJDBCSeq();
>                seq.setConfiguration(conf);
>                ................
>
> Thanks,
>
> Heath
>
> On Wed, Apr 28, 2010 at 11:17 AM, Rick Curtis <curtisr7@gmail.com> wrote:
>
> > 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