title: EntityManager.unwrap() throws java.lang.AbstractMethodError
body: <p>I'm having some issues implementing JPA 2.0 in my app. I'm using Criteria queries and I need to grab the session from the EntityManager. I do it in the following way (according to <a href="http://docs.jboss.org/hibernate/entitymanager/3.5/reference/en/html/objectstate.html#d0e1799%29" rel="nofollow">this</a>)
      Session ses = entityManager.unwrap(Session.class);</p>
  
  <p>After running on top of Tomcat 7.0.8 I get the following:</p>
  
  <pre><code>Struts has detected an unhandled exception:
  # Messages:     org.hibernate.ejb.EntityManagerImpl.unwrap(Ljava/lang/Class;)Ljava/lang/Object;
  
  Stacktraces 
  java.lang.reflect.InvocationTargetException
  java.lang.AbstractMethodError: org.hibernate.ejb.EntityManagerImpl.unwrap(Ljava/lang/Class;)Ljava/lang/Object; sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  </code></pre>
  
  <p>Also I'm referencing the following Hibernate-related dependencies (where I suspect the problem is):</p>
  
  <pre><code>hibernate-3.2.5.ga.jar
  hibernate-annotations-3.4.0.GA.jar
  hibernate-commons-annotations-3.1.0.GA.jar
  hibernate-core-3.3.0.GA.jar
  hibernate-entitymanager-3.4.0.GA.jar
  hibernate-jpa-2.0-api-1.0.0.Final.jar
  </code></pre>
  
  <p>Any idea about this?</p>