The moose likes Object Relational Mapping and the fly likes  java.lang.AbstractMethodError: oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerImpl.create Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark " java.lang.AbstractMethodError: oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerImpl.create" Watch " java.lang.AbstractMethodError: oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerImpl.create" New topic

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

Siegfried Heintze
Ranch Hand

Joined: Aug 11, 2000
Posts: 381
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

Joined: Apr 04, 2006
Posts: 108

[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.

Tushar (SCJP 1.5)
Siegfried Heintze
Ranch Hand

Joined: Aug 11, 2000
Posts: 381
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?
Siegfried Heintze
Ranch Hand

Joined: Aug 11, 2000
Posts: 381
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.
James Sutherland
Ranch Hand

Joined: Oct 01, 2007
Posts: 553
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.

TopLink : EclipseLink : Book:Java Persistence : Blog:Java Persistence Performance
I agree. Here's the link: http://aspose.com/file-tools
subject: java.lang.AbstractMethodError: oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerImpl.create
Similar Threads
How to Create Auto Schema
Changing Session to EntityManager (hiberante)
EJB & JPA Unexpected Results
JPA - How to persist new table without exception (SE) environment
Glassfish Eclipselink an Hibernate