-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: AbstractMethodError on EntityManagerImpl.createNamedQuery
PostPosted: Fri May 18, 2012 4:37 pm 
Newbie

Joined: Mon Jun 20, 2011 10:29 am
Posts: 1
I'm getting the above error in a JBoss 5 container w/ a 1.5 jboss-j2ee.jar trying numerous Hibernate versions (this one w/ 4.1.3 as you can see from the classpath debug stmt) on this line of code
Code:
@PersistenceContext
private EntityManager em;
..
TypedQuery<ReportRequest> query = em.createNamedQuery(GET_REPORTS_BY_USER, ReportRequest.class);


Out of paranoia about Hibernate versions, I added a debug statement to print out the classpath to the EntityManagerImpl class which verifies it's using the 4.1.3 impl.
Code:
logger.debug(loader.getResource("org/hibernate/ejb/EntityManagerImpl.class"));
=>
16:06:29,188 DEBUG [ReportRequestDao] vfszip:/Users/donmit/craft/environment/jboss-5.1.0.GA/server/lycea/deploy/deploy.last/scholastic.dashboard-jboss-craft_spring3.0.ear/hibernate-entitymanager-4.1.3.Final.jar/org/hibernate/ejb/EntityManagerImpl.class
16:06:29,195 DEBUG [OpenEntityManagerInViewFilter] Closing JPA EntityManager in OpenEntityManagerInViewFilter
16:06:29,196 DEBUG [EntityManagerFactoryUtils] Closing JPA EntityManager
16:06:29,196 ERROR [ScholasticMetaFilter] Handler processing failed; nested exception is java.lang.AbstractMethodError: org.hibernate.ejb.EntityManagerImpl.createNamedQuery(Ljava/lang/String;Ljava/lang/Class;)Ljavax/persistence/TypedQuery;
org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.AbstractMethodError: org.hibernate.ejb.EntityManagerImpl.createNamedQuery(Ljava/lang/String;Ljava/lang/Class;)Ljavax/persistence/TypedQuery;


I don't understand how the error can occur and am at a loss what to do next. If the answer requires someone looking at my code or environment, I may be able to get funds. Hopefully we're moving to JBoss 7 in a month, but just in case, and in the interim, I need help.

I should mention that I can't get any Entity related Hibernate/JPA2 queries to work. NativeQuery works, but nothing using Entities. Here's another posting w/ more info if it helps:
http://stackoverflow.com/questions/10642868/persistence-unit-not-finding-managed-entity


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.