Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.lang.AbstractMethodError: oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerImpl.create

 
Siegfried Heintze
Ranch Hand
Posts: 408
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm getting similar errors from toplink/MSSQLServer, eclipselink/MSSQLServer and toplink/Oracle from my sample JPA program. I want it to the little ddl dance and create the appropriate tables in these empty database.

Can someone guide me on my selection of jpa providers and help me correct this problem? This program (with a similar persistence.xml) works with Hypersonic SQL and ObjectDB.



Here is my META-INF/persistence.xml file


Here is the fragment of code that is failing:
 
T Mishra
Ranch Hand
Posts: 108
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

[TopLink Info]: 2013.03.07 11:04:10.258--ServerSession(988804)--file:/c:/Users/siegfried/Documents/WinOOP/groovy/ORM-GuestbookPUTopLinkMSSQL login successful
Caught: java.lang.AbstractMethodError: oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerImpl.createQuery(Ljava/lang/String;Ljava/lang/Class;)Ljavax/persistence/TypedQuery

The error suggests a problem with the sql query.
 
Siegfried Heintze
Ranch Hand
Posts: 408
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can someone help me with the queries? I'm new to HQL and JPA QL. These queries worked with ObjectDB and HSQL (I think I got them to work in H2 too -- not sure) and I was expecting them to work with other databases like Oracle/MSSQL.
Is that not a reasonable expectation?
I think these are HQL or JPA QL statements -- are not they?

Here they are. Can you help me rewrite them so they will work with JPA QL and Oracle and MSSQL?
Thanks
Siegfried
 
Siegfried Heintze
Ranch Hand
Posts: 408
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, so I commented out some code and tried executing a persist function instead of a query statement and I get this error:


I think I need to do something different to toplink but I'm not sure what.
Thanks
Siegfried
 
James Sutherland
Ranch Hand
Posts: 553
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The first error seemed to be related to your code being compiled with JPA 2.0, but your runtime using TopLink Essentials that only support JPA 1.0.
Consider upgrading to EclipseLink (TopLink 11g).

Your second error seemed to occur because you have not packaged or deployed your application correctly. Ensure you list your classes in the persistence.xml, and that they are annotated with @Entity.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic