RE: OPEN-JPA and Toplink 2.0.XX
I found what I had missed. I am also using Spring and in the applicationContext is the reference to Toplink. Removed that and replaced it with the open JPA and bingo. We should think about adding a small blurb on the site about configuring for Spring since it is likely to be heavily used. I only found this information on the maven forums. Maybe in the FAQs just throw the entity and transaction manager setup as examples. I can supply them but cannot post Phill -Original Message- From: Phill Moran [mailto:[EMAIL PROTECTED] Sent: March 26, 2007 6:49 PM To: open-jpa-dev@incubator.apache.org Subject: RE: OPEN-JPA and Toplink 2.0.XX No I have org.apache.openjpa.persistence.PersistenceProviderImpl aspectj aspectjrt 1.5.3 aspectj aspectjweaver 1.5.3 mysql mysql-connector-java 5.0.4 org.springframework spring 2.0.3 org.springframework spring-agent 2.0.3 org.springframework spring-aspects 2.0.3 org.springframework spring-mock 2.0.3 junit junit 4.2 commons-logging commons-logging 1.1 org.apache.openjpa openjpa-all 0.9.6-incubating javax.mail mail 1.4 javax.j2ee javaee 1.5 com.sun tools 1.6 -Original Message- From: Patrick Linskey [mailto:[EMAIL PROTECTED] Sent: March 26, 2007 5:27 PM To: open-jpa-dev@incubator.apache.org Subject: RE: OPEN-JPA and Toplink 2.0.XX Do you maybe have path.to.ToplinkPersistenceProviderImpl in your persistence.xml? If so, what happens if you remove it / change it to point to org.apache.openjpa.persistence.PersistenceProviderImpl? -Patrick -- Patrick Linskey BEA Systems, Inc. ___ Notice: This email message, together with any attachments, may contain information of BEA Systems, Inc., its subsidiaries and affiliated entities, that may be confidential, proprietary, copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it. > -Original Message- > From: Phill Moran [mailto:[EMAIL PROTECTED] > Sent: Monday, March 26, 2007 2:25 PM > To: 'Phill Moran'; open-jpa-dev@incubator.apache.org > Subject: RE: OPEN-JPA and Toplink 2.0.XX > > Odd response to the removal of the toplink jar. The same code with > only this change no longer runs the tests. Complains about can't find > entity manager. I am starting my investigations but thought I would > throw this in the loop to see if someone has seen this before > > Phill > > -Original Message- > From: Phill Moran [mailto:[EMAIL PROTECTED] > Sent: March 25, 2007 10:24 PM > To: 'open-jpa-dev@incubator.apache.org' > Subject: RE: OPEN-JPA and Toplink 2.0.XX > > This is exactly what happened and I added my own implementation when I > tried to test and got nothing. Well bye bye toplink > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: March 25, 2007 10:04 PM > To: open-jpa-dev@incubator.apache.org > Subject: Re: OPEN-JPA and Toplink 2.0.XX > > > On Mar 25, 2007, at 3:24 PM, Phill Moran wrote: > > > >> This is interesting thanks for the information. Firstly I > thought > >> that one needed both toplink and JPA to make use of JPA in an > >> application. I think I found this on the Glassfish site, can't > >> remember now. This is why I posted this here. > >> > Glass
RE: OPEN-JPA and Toplink 2.0.XX
No I have org.apache.openjpa.persistence.PersistenceProviderImpl aspectj aspectjrt 1.5.3 aspectj aspectjweaver 1.5.3 mysql mysql-connector-java 5.0.4 org.springframework spring 2.0.3 org.springframework spring-agent 2.0.3 org.springframework spring-aspects 2.0.3 org.springframework spring-mock 2.0.3 junit junit 4.2 commons-logging commons-logging 1.1 org.apache.openjpa openjpa-all 0.9.6-incubating javax.mail mail 1.4 javax.j2ee javaee 1.5 com.sun tools 1.6 -Original Message- From: Patrick Linskey [mailto:[EMAIL PROTECTED] Sent: March 26, 2007 5:27 PM To: open-jpa-dev@incubator.apache.org Subject: RE: OPEN-JPA and Toplink 2.0.XX Do you maybe have path.to.ToplinkPersistenceProviderImpl in your persistence.xml? If so, what happens if you remove it / change it to point to org.apache.openjpa.persistence.PersistenceProviderImpl? -Patrick -- Patrick Linskey BEA Systems, Inc. ___ Notice: This email message, together with any attachments, may contain information of BEA Systems, Inc., its subsidiaries and affiliated entities, that may be confidential, proprietary, copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it. > -Original Message- > From: Phill Moran [mailto:[EMAIL PROTECTED] > Sent: Monday, March 26, 2007 2:25 PM > To: 'Phill Moran'; open-jpa-dev@incubator.apache.org > Subject: RE: OPEN-JPA and Toplink 2.0.XX > > Odd response to the removal of the toplink jar. The same code with > only this change no longer runs the tests. Complains about can't find > entity manager. I am starting my investigations but thought I would > throw this in the loop to see if someone has seen this before > > Phill > > -Original Message- > From: Phill Moran [mailto:[EMAIL PROTECTED] > Sent: March 25, 2007 10:24 PM > To: 'open-jpa-dev@incubator.apache.org' > Subject: RE: OPEN-JPA and Toplink 2.0.XX > > This is exactly what happened and I added my own implementation when I > tried to test and got nothing. Well bye bye toplink > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: March 25, 2007 10:04 PM > To: open-jpa-dev@incubator.apache.org > Subject: Re: OPEN-JPA and Toplink 2.0.XX > > > On Mar 25, 2007, at 3:24 PM, Phill Moran wrote: > > > >> This is interesting thanks for the information. Firstly I > thought > >> that one needed both toplink and JPA to make use of JPA in an > >> application. I think I found this on the Glassfish site, can't > >> remember now. This is why I posted this here. > >> > Glassfish distributes TopLink Essentials bundled with the JPA spec > jar, so you might have unwittingly acquired TopLink Essentials along > with the spec jar and not unsurprisingly, figured that they were the > same. > > Since that experiment at the beginning of the official RI distribution > of Java EE 5, the JPA spec jar has been unbundled and is available > separately from TopLink Essentials. You are free to use any > implementation of the spec that you choose. > > Craig > > Craig Russell > DB PMC, OpenJPA PPMC > [EMAIL PROTECTED] http://db.apache.org/jdo > > > > Notice: Th
Re: OPEN-JPA and Toplink 2.0.XX
Well, you still need the implementation of the persistence api jar in your classpath. You can download the api jar by itself (without the toplink stuff) from https://maven-repository.dev.java.net/nonav/repository/ javax.persistence/jars/persistence-api-1.0.jar Craig On Mar 26, 2007, at 2:24 PM, Phill Moran wrote: Odd response to the removal of the toplink jar. The same code with only this change no longer runs the tests. Complains about can't find entity manager. I am starting my investigations but thought I would throw this in the loop to see if someone has seen this before Phill -Original Message- From: Phill Moran [mailto:[EMAIL PROTECTED] Sent: March 25, 2007 10:24 PM To: 'open-jpa-dev@incubator.apache.org' Subject: RE: OPEN-JPA and Toplink 2.0.XX This is exactly what happened and I added my own implementation when I tried to test and got nothing. Well bye bye toplink -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: March 25, 2007 10:04 PM To: open-jpa-dev@incubator.apache.org Subject: Re: OPEN-JPA and Toplink 2.0.XX On Mar 25, 2007, at 3:24 PM, Phill Moran wrote: This is interesting thanks for the information. Firstly I thought that one needed both toplink and JPA to make use of JPA in an application. I think I found this on the Glassfish site, can't remember now. This is why I posted this here. Glassfish distributes TopLink Essentials bundled with the JPA spec jar, so you might have unwittingly acquired TopLink Essentials along with the spec jar and not unsurprisingly, figured that they were the same. Since that experiment at the beginning of the official RI distribution of Java EE 5, the JPA spec jar has been unbundled and is available separately from TopLink Essentials. You are free to use any implementation of the spec that you choose. Craig Craig Russell DB PMC, OpenJPA PPMC [EMAIL PROTECTED] http://db.apache.org/jdo Craig Russell Architect, Sun Java Enterprise System http://java.sun.com/products/jdo 408 276-5638 mailto:[EMAIL PROTECTED] P.S. A good JDO? O, Gasp! smime.p7s Description: S/MIME cryptographic signature
RE: OPEN-JPA and Toplink 2.0.XX
Do you maybe have path.to.ToplinkPersistenceProviderImpl in your persistence.xml? If so, what happens if you remove it / change it to point to org.apache.openjpa.persistence.PersistenceProviderImpl? -Patrick -- Patrick Linskey BEA Systems, Inc. ___ Notice: This email message, together with any attachments, may contain information of BEA Systems, Inc., its subsidiaries and affiliated entities, that may be confidential, proprietary, copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it. > -Original Message- > From: Phill Moran [mailto:[EMAIL PROTECTED] > Sent: Monday, March 26, 2007 2:25 PM > To: 'Phill Moran'; open-jpa-dev@incubator.apache.org > Subject: RE: OPEN-JPA and Toplink 2.0.XX > > Odd response to the removal of the toplink jar. The same code > with only this > change no longer runs the tests. Complains about can't find > entity manager. I am > starting my investigations but thought I would throw this in > the loop to see if > someone has seen this before > > Phill > > -Original Message- > From: Phill Moran [mailto:[EMAIL PROTECTED] > Sent: March 25, 2007 10:24 PM > To: 'open-jpa-dev@incubator.apache.org' > Subject: RE: OPEN-JPA and Toplink 2.0.XX > > This is exactly what happened and I added my own > implementation when I tried to > test and got nothing. Well bye bye toplink > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: March 25, 2007 10:04 PM > To: open-jpa-dev@incubator.apache.org > Subject: Re: OPEN-JPA and Toplink 2.0.XX > > > On Mar 25, 2007, at 3:24 PM, Phill Moran wrote: > > > >> This is interesting thanks for the information. Firstly I > thought > >> that one needed both toplink and JPA to make use of JPA in an > >> application. I think I found this on the Glassfish site, can't > >> remember now. This is why I posted this here. > >> > Glassfish distributes TopLink Essentials bundled with the JPA > spec jar, so you > might have unwittingly acquired TopLink Essentials along with > the spec jar and > not unsurprisingly, figured that they were the same. > > Since that experiment at the beginning of the official RI > distribution of Java > EE 5, the JPA spec jar has been unbundled and is available > separately from > TopLink Essentials. You are free to use any implementation of > the spec that you > choose. > > Craig > > Craig Russell > DB PMC, OpenJPA PPMC > [EMAIL PROTECTED] http://db.apache.org/jdo > > > > Notice: This email message, together with any attachments, may contain information of BEA Systems, Inc., its subsidiaries and affiliated entities, that may be confidential, proprietary, copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it.
RE: OPEN-JPA and Toplink 2.0.XX
Odd response to the removal of the toplink jar. The same code with only this change no longer runs the tests. Complains about can't find entity manager. I am starting my investigations but thought I would throw this in the loop to see if someone has seen this before Phill -Original Message- From: Phill Moran [mailto:[EMAIL PROTECTED] Sent: March 25, 2007 10:24 PM To: 'open-jpa-dev@incubator.apache.org' Subject: RE: OPEN-JPA and Toplink 2.0.XX This is exactly what happened and I added my own implementation when I tried to test and got nothing. Well bye bye toplink -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: March 25, 2007 10:04 PM To: open-jpa-dev@incubator.apache.org Subject: Re: OPEN-JPA and Toplink 2.0.XX > On Mar 25, 2007, at 3:24 PM, Phill Moran wrote: > >> This is interesting thanks for the information. Firstly I thought >> that one needed both toplink and JPA to make use of JPA in an >> application. I think I found this on the Glassfish site, can't >> remember now. This is why I posted this here. >> Glassfish distributes TopLink Essentials bundled with the JPA spec jar, so you might have unwittingly acquired TopLink Essentials along with the spec jar and not unsurprisingly, figured that they were the same. Since that experiment at the beginning of the official RI distribution of Java EE 5, the JPA spec jar has been unbundled and is available separately from TopLink Essentials. You are free to use any implementation of the spec that you choose. Craig Craig Russell DB PMC, OpenJPA PPMC [EMAIL PROTECTED] http://db.apache.org/jdo
RE: OPEN-JPA and Toplink 2.0.XX
This is exactly what happened and I added my own implementation when I tried to test and got nothing. Well bye bye toplink -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: March 25, 2007 10:04 PM To: open-jpa-dev@incubator.apache.org Subject: Re: OPEN-JPA and Toplink 2.0.XX > On Mar 25, 2007, at 3:24 PM, Phill Moran wrote: > >> This is interesting thanks for the information. Firstly I thought >> that one needed both toplink and JPA to make use of JPA in an >> application. I think I found this on the Glassfish site, can't >> remember now. This is why I posted this here. >> Glassfish distributes TopLink Essentials bundled with the JPA spec jar, so you might have unwittingly acquired TopLink Essentials along with the spec jar and not unsurprisingly, figured that they were the same. Since that experiment at the beginning of the official RI distribution of Java EE 5, the JPA spec jar has been unbundled and is available separately from TopLink Essentials. You are free to use any implementation of the spec that you choose. Craig Craig Russell DB PMC, OpenJPA PPMC [EMAIL PROTECTED] http://db.apache.org/jdo
Re: OPEN-JPA and Toplink 2.0.XX
On Mar 25, 2007, at 3:24 PM, Phill Moran wrote: This is interesting thanks for the information. Firstly I thought that one needed both toplink and JPA to make use of JPA in an application. I think I found this on the Glassfish site, can't remember now. This is why I posted this here. Glassfish distributes TopLink Essentials bundled with the JPA spec jar, so you might have unwittingly acquired TopLink Essentials along with the spec jar and not unsurprisingly, figured that they were the same. Since that experiment at the beginning of the official RI distribution of Java EE 5, the JPA spec jar has been unbundled and is available separately from TopLink Essentials. You are free to use any implementation of the spec that you choose. Craig Craig Russell DB PMC, OpenJPA PPMC [EMAIL PROTECTED] http://db.apache.org/jdo smime.p7s Description: S/MIME cryptographic signature
RE: OPEN-JPA and Toplink 2.0.XX
However, note that you may well want to use JPA when using Toplink. Both Toplink and OpenJPA are implementations of the JPA specification, so you might choose to write your application to use JPA (javax.persistence.*) in your code, and then use either OpenJPA or Toplink as implementations of the interfaces in javax.persistence. -Patrick -- Patrick Linskey BEA Systems, Inc. ___ Notice: This email message, together with any attachments, may contain information of BEA Systems, Inc., its subsidiaries and affiliated entities, that may be confidential, proprietary, copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it. > -Original Message- > From: Marc Prud'hommeaux [mailto:[EMAIL PROTECTED] On > Behalf Of Marc Prud'hommeaux > Sent: Sunday, March 25, 2007 3:27 PM > To: open-jpa-dev@incubator.apache.org > Subject: Re: OPEN-JPA and Toplink 2.0.XX > > Phill- > > No, you don't need TopLink to use OpenJPA. > > > On Mar 25, 2007, at 3:24 PM, Phill Moran wrote: > > > This is interesting thanks for the information. Firstly I thought > > that one > > needed both toplink and JPA to make use of JPA in an > application. I > > think I > > found this on the Glassfish site, can't remember now. This > is why I > > posted this > > here. > > > > So there is no reliance on toplink for JPA if OpenJPA is used? I > > use only JPA > > annotations in the code > > > > Phill > > > > -Original Message- > > From: Marc Prud'hommeaux [mailto:[EMAIL PROTECTED] On > > Behalf Of Marc > > Prud'hommeaux > > Sent: March 25, 2007 3:00 PM > > To: open-jpa-dev@incubator.apache.org > > Subject: Re: OPEN-JPA and Toplink 2.0.XX > > > > Phill- > > > > The error you get seems to indicate that TopLink doesn't support > > table per class > > inheritance (which is an optional feature of the JPA spec). Note > > that this is a > > forum for OpenJPA, which, like TopLink, is a JPA implementation, > > but people here > > aren't TopLink experts so we might not be the best people to help. > > > > Note, though, that OpenJPA does support table per class > > inheritance, so if you > > were to switch from TopLink to OpenJPA, you probably wouldn't get > > this error > > anymore :) > > > > > > > > > > On Mar 25, 2007, at 10:45 AM, Phill Moran wrote: > > > >> It is a reported as a toplink exception and since the > toplink jar is > >> all I changed to resolve it this is my top candidate. Here is the > >> trace from one of the tests but since I use table per class > >> throughout > >> my application all persisting test cases fail > >> > >> Here is the trace > >> > >> > >> org.springframework.beans.factory.BeanCreationException: Error > >> creating bean with name 'categoryFactory' defined in file > >> [/BidSpec/applications/emall/target/test-classes/ > >> applicationContext.xml]: Cannot > >> resolve reference to bean 'bidSpecEntityManagerFactory' > while setting > >> bean property 'entityManagerFactory'; nested exception is > >> org.springframework.beans.factory.BeanCreationException: Error > >> creating bean with name 'bidSpecEntityManagerFactory' > defined in file > >> [/BidSpec/applications/emall/target/test-classes/ > >> applicationContext.xml]: > >> Invocation of init method failed; nested exception is > >> javax.persistence.PersistenceException: Exception [TOPLINK-28018] > >> (Oracle TopLink Essentials - 2.0 (Build 40 (03/21/2007))): > >> oracle.toplink.essentials.exceptions.EntityManagerSetupException > >> Exception Description: predeploy for PersistenceUnit > >> [BidSpecPersistenceUnit] failed. > >> Internal Exception: Exception [TOPLINK-7152] (Oracle TopLink > >> Essentials - 2.0 (Build 40 (03/21/2007))): > >> oracle.toplink.essentials.exceptions.ValidationException > >> Exception Description: Table per class inheritance is not > supported. > >> Entity class [class ca.BidSpec.emall.categories.AttributeType]. > >> Caused by: org.springframework.beans.factory.BeanCreationException: > >> Error > >> creating bean with name 'bidSpec
Re: OPEN-JPA and Toplink 2.0.XX
Phill- No, you don't need TopLink to use OpenJPA. On Mar 25, 2007, at 3:24 PM, Phill Moran wrote: This is interesting thanks for the information. Firstly I thought that one needed both toplink and JPA to make use of JPA in an application. I think I found this on the Glassfish site, can't remember now. This is why I posted this here. So there is no reliance on toplink for JPA if OpenJPA is used? I use only JPA annotations in the code Phill -Original Message- From: Marc Prud'hommeaux [mailto:[EMAIL PROTECTED] On Behalf Of Marc Prud'hommeaux Sent: March 25, 2007 3:00 PM To: open-jpa-dev@incubator.apache.org Subject: Re: OPEN-JPA and Toplink 2.0.XX Phill- The error you get seems to indicate that TopLink doesn't support table per class inheritance (which is an optional feature of the JPA spec). Note that this is a forum for OpenJPA, which, like TopLink, is a JPA implementation, but people here aren't TopLink experts so we might not be the best people to help. Note, though, that OpenJPA does support table per class inheritance, so if you were to switch from TopLink to OpenJPA, you probably wouldn't get this error anymore :) On Mar 25, 2007, at 10:45 AM, Phill Moran wrote: It is a reported as a toplink exception and since the toplink jar is all I changed to resolve it this is my top candidate. Here is the trace from one of the tests but since I use table per class throughout my application all persisting test cases fail Here is the trace org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'categoryFactory' defined in file [/BidSpec/applications/emall/target/test-classes/ applicationContext.xml]: Cannot resolve reference to bean 'bidSpecEntityManagerFactory' while setting bean property 'entityManagerFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bidSpecEntityManagerFactory' defined in file [/BidSpec/applications/emall/target/test-classes/ applicationContext.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.0 (Build 40 (03/21/2007))): oracle.toplink.essentials.exceptions.EntityManagerSetupException Exception Description: predeploy for PersistenceUnit [BidSpecPersistenceUnit] failed. Internal Exception: Exception [TOPLINK-7152] (Oracle TopLink Essentials - 2.0 (Build 40 (03/21/2007))): oracle.toplink.essentials.exceptions.ValidationException Exception Description: Table per class inheritance is not supported. Entity class [class ca.BidSpec.emall.categories.AttributeType]. Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bidSpecEntityManagerFactory' defined in file [/BidSpec/applications/emall/target/test-classes/ applicationContext.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.0 (Build 40 (03/21/2007))): oracle.toplink.essentials.exceptions.EntityManagerSetupException Exception Description: predeploy for PersistenceUnit [BidSpecPersistenceUnit] failed. Internal Exception: Exception [TOPLINK-7152] (Oracle TopLink Essentials - 2.0 (Build 40 (03/21/2007))): oracle.toplink.essentials.exceptions.ValidationException Exception Description: Table per class inheritance is not supported. Entity class [class ca.BidSpec.emall.categories.AttributeType]. Caused by: javax.persistence.PersistenceException: Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.0 (Build 40 (03/21/2007))): oracle.toplink.essentials.exceptions.EntityManagerSetupException Exception Description: predeploy for PersistenceUnit [BidSpecPersistenceUnit] failed. Internal Exception: Exception [TOPLINK-7152] (Oracle TopLink Essentials - 2.0 (Build 40 (03/21/2007))): oracle.toplink.essentials.exceptions.ValidationException Exception Description: Table per class inheritance is not supported. Entity class [class ca.BidSpec.emall.categories.AttributeType]. at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.pr e deploy(Ent ityManagerSetupImpl.java:615) at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.creat e ContainerE ntityManagerFactory(EntityManagerFactoryProvider.java:178) at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.cr e ateNativeE ntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:214) at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPro p ertiesSet( AbstractEntityManagerFactoryBean.java:251) at org.springframework.beans.factory.support.AbstractAutowireCapableBean F actory.inv okeInitMethods(AbstractAutowireCapableBeanFactory.java:1143) at org.springframework.beans.factory.support.AbstractAutowireCa
RE: OPEN-JPA and Toplink 2.0.XX
This is interesting thanks for the information. Firstly I thought that one needed both toplink and JPA to make use of JPA in an application. I think I found this on the Glassfish site, can't remember now. This is why I posted this here. So there is no reliance on toplink for JPA if OpenJPA is used? I use only JPA annotations in the code Phill -Original Message- From: Marc Prud'hommeaux [mailto:[EMAIL PROTECTED] On Behalf Of Marc Prud'hommeaux Sent: March 25, 2007 3:00 PM To: open-jpa-dev@incubator.apache.org Subject: Re: OPEN-JPA and Toplink 2.0.XX Phill- The error you get seems to indicate that TopLink doesn't support table per class inheritance (which is an optional feature of the JPA spec). Note that this is a forum for OpenJPA, which, like TopLink, is a JPA implementation, but people here aren't TopLink experts so we might not be the best people to help. Note, though, that OpenJPA does support table per class inheritance, so if you were to switch from TopLink to OpenJPA, you probably wouldn't get this error anymore :) On Mar 25, 2007, at 10:45 AM, Phill Moran wrote: > It is a reported as a toplink exception and since the toplink jar is > all I changed to resolve it this is my top candidate. Here is the > trace from one of the tests but since I use table per class throughout > my application all persisting test cases fail > > Here is the trace > > > org.springframework.beans.factory.BeanCreationException: Error > creating bean with name 'categoryFactory' defined in file > [/BidSpec/applications/emall/target/test-classes/ > applicationContext.xml]: Cannot > resolve reference to bean 'bidSpecEntityManagerFactory' while setting > bean property 'entityManagerFactory'; nested exception is > org.springframework.beans.factory.BeanCreationException: Error > creating bean with name 'bidSpecEntityManagerFactory' defined in file > [/BidSpec/applications/emall/target/test-classes/ > applicationContext.xml]: > Invocation of init method failed; nested exception is > javax.persistence.PersistenceException: Exception [TOPLINK-28018] > (Oracle TopLink Essentials - 2.0 (Build 40 (03/21/2007))): > oracle.toplink.essentials.exceptions.EntityManagerSetupException > Exception Description: predeploy for PersistenceUnit > [BidSpecPersistenceUnit] failed. > Internal Exception: Exception [TOPLINK-7152] (Oracle TopLink > Essentials - 2.0 (Build 40 (03/21/2007))): > oracle.toplink.essentials.exceptions.ValidationException > Exception Description: Table per class inheritance is not supported. > Entity class [class ca.BidSpec.emall.categories.AttributeType]. > Caused by: org.springframework.beans.factory.BeanCreationException: > Error > creating bean with name 'bidSpecEntityManagerFactory' defined in file > [/BidSpec/applications/emall/target/test-classes/ > applicationContext.xml]: > Invocation of init method failed; nested exception is > javax.persistence.PersistenceException: Exception [TOPLINK-28018] > (Oracle TopLink Essentials - 2.0 (Build 40 (03/21/2007))): > oracle.toplink.essentials.exceptions.EntityManagerSetupException > Exception Description: predeploy for PersistenceUnit > [BidSpecPersistenceUnit] failed. > Internal Exception: Exception [TOPLINK-7152] (Oracle TopLink > Essentials - 2.0 (Build 40 (03/21/2007))): > oracle.toplink.essentials.exceptions.ValidationException > Exception Description: Table per class inheritance is not supported. > Entity class [class ca.BidSpec.emall.categories.AttributeType]. > Caused by: javax.persistence.PersistenceException: Exception > [TOPLINK-28018] (Oracle TopLink Essentials - 2.0 (Build 40 > (03/21/2007))): > oracle.toplink.essentials.exceptions.EntityManagerSetupException > Exception Description: predeploy for PersistenceUnit > [BidSpecPersistenceUnit] failed. > Internal Exception: Exception [TOPLINK-7152] (Oracle TopLink > Essentials - 2.0 (Build 40 (03/21/2007))): > oracle.toplink.essentials.exceptions.ValidationException > Exception Description: Table per class inheritance is not supported. > Entity class [class ca.BidSpec.emall.categories.AttributeType]. > at > oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.pre > deploy(Ent > ityManagerSetupImpl.java:615) > at > oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.create > ContainerE > ntityManagerFactory(EntityManagerFactoryProvider.java:178) > at > org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.cre > ateNativeE > ntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:214) > at > org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterProp > ertiesSet( > AbstractEntityManagerFactoryBean.java:251) > at >
Re: OPEN-JPA and Toplink 2.0.XX
) ... 52 more Caused by: Exception [TOPLINK-7152] (Oracle TopLink Essentials - 2.0 (Build 40 (03/21/2007))): oracle.toplink.essentials.exceptions.ValidationException Exception Description: Table per class inheritance is not supported. Entity class [class ca.BidSpec.emall.categories.AttributeType]. at oracle.toplink.essentials.exceptions.ValidationException.tablePerClass Inheritanc eNotSupported(ValidationException.java:1422) at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataValidator .throwTabl ePerClassInheritanceNotSupported(MetadataValidator.java:372) at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataDescripto r.setInher itanceStrategy(MetadataDescriptor.java:901) at oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.ClassAc cessor.pro cessInheritance(ClassAccessor.java:952) at oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.ClassAc cessor.pro cessTableAndInheritance(ClassAccessor.java:1412) at oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.ClassAc cessor.pro cess(ClassAccessor.java:464) at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataProcessor .processAn notations(MetadataProcessor.java:225) at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcesso r.processO RMetadata(PersistenceUnitProcessor.java:354) at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.pre deploy(Ent ityManagerSetupImpl.java:584) ... 51 more -Original Message- From: Marc Prud'hommeaux [mailto:[EMAIL PROTECTED] On Behalf Of Marc Prud'hommeaux Sent: March 25, 2007 1:18 PM To: open-jpa-dev@incubator.apache.org Subject: Re: OPEN-JPA and Toplink 2.0.XX Phill- I'm a little confused. Is this an error from OpenJPA or TopLink? Can you post the entire stack trace of the error you are seeing? On Mar 25, 2007, at 10:03 AM, Phill Moran wrote: I have been struggling with an exception when running my JUnit 4.2 tests. It complains about not supporting table per class inheritance not supported when running under Maven. I was not getting the same error when I ran all the same code and and tests under eclipse. The only difference was I was using the older 9.1 versions of toplink/toplink agent jars. When I switched my dependency to the 9.1 in Maven the problem went away. I am assuming this is a bug in the new 2.0.X.X toplink jars. I am not sure if this has been flagged although I know it is not in Jira for 0.96. Phill
RE: OPEN-JPA and Toplink 2.0.XX
sor.pro cessInheritance(ClassAccessor.java:952) at oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.ClassAccessor.pro cessTableAndInheritance(ClassAccessor.java:1412) at oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.ClassAccessor.pro cess(ClassAccessor.java:464) at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataProcessor.processAn notations(MetadataProcessor.java:225) at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.processO RMetadata(PersistenceUnitProcessor.java:354) at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.predeploy(Ent ityManagerSetupImpl.java:584) ... 51 more -Original Message- From: Marc Prud'hommeaux [mailto:[EMAIL PROTECTED] On Behalf Of Marc Prud'hommeaux Sent: March 25, 2007 1:18 PM To: open-jpa-dev@incubator.apache.org Subject: Re: OPEN-JPA and Toplink 2.0.XX Phill- I'm a little confused. Is this an error from OpenJPA or TopLink? Can you post the entire stack trace of the error you are seeing? On Mar 25, 2007, at 10:03 AM, Phill Moran wrote: > I have been struggling with an exception when running my JUnit 4.2 > tests. It complains about not supporting table per class inheritance > not supported when running under Maven. I was not getting the same > error when I ran all the same code and and tests under eclipse. The > only difference was I was using the older > 9.1 versions of toplink/toplink agent jars. When I switched my > dependency to the > 9.1 in Maven the problem went away. > > I am assuming this is a bug in the new 2.0.X.X toplink jars. I am not > sure if this has been flagged although I know it is not in Jira for > 0.96. > > Phill
Re: OPEN-JPA and Toplink 2.0.XX
Phill- I'm a little confused. Is this an error from OpenJPA or TopLink? Can you post the entire stack trace of the error you are seeing? On Mar 25, 2007, at 10:03 AM, Phill Moran wrote: I have been struggling with an exception when running my JUnit 4.2 tests. It complains about not supporting table per class inheritance not supported when running under Maven. I was not getting the same error when I ran all the same code and and tests under eclipse. The only difference was I was using the older 9.1 versions of toplink/toplink agent jars. When I switched my dependency to the 9.1 in Maven the problem went away. I am assuming this is a bug in the new 2.0.X.X toplink jars. I am not sure if this has been flagged although I know it is not in Jira for 0.96. Phill