Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8157603
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T17:20:26+00:00 2026-06-06T17:20:26+00:00

I have created very simple app with persistence context (hibernate as provider) to read

  • 0

I have created very simple app with persistence context (hibernate as provider) to read some value from database. I use Eclipse with Maven.

First, I get

Caused by: org.apache.openejb.OpenEJBException: java.lang.ClassCastException: org.hibernate.ejb.HibernatePersistence cannot be cast to javax.persistence.spi.PersistenceProvider:

and according to this topic
http://openejb.979440.n4.nabble.com/problem-with-hibernate-persistence-provider-td980429.html
I excluded hibernate-jpa-2.0-api. Now, my dependencies look

<dependency>
 <groupId>postgresql</groupId>
 <artifactId>postgresql</artifactId>
 <version>9.1-901.jdbc4</version>
</dependency>

<dependency>
 <groupId>org.hibernate</groupId>
 <artifactId>hibernate-entitymanager</artifactId>
 <version>4.1.3.Final</version>
  <exclusions>
    <exclusion>
      <groupId>org.hibernate.javax.persistence</groupId>
      <artifactId>hibernate-jpa-2.0-api</artifactId>
    </exclusion>
  </exclusions>
</dependency>

Now, I don’t know why…

Caused by: java.lang.ClassNotFoundException: org.hibernate.transaction.TransactionManagerLookup

But TransactionManagerLookup is in hibernate-core.
Please, can anybody tell me, how should look pom.xml to use hibernate in TomEE?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T17:20:27+00:00Added an answer on June 6, 2026 at 5:20 pm

    Try this:

    Add:

    • <tomee-home>/lib/antlr-2.7.7.jar
    • <tomee-home>/lib/dom4j-1.6.1.jar
    • <tomee-home>/lib/ehcache-core-2.5.1.jar
    • <tomee-home>/lib/ehcache-terracotta-2.5.1.jar
    • <tomee-home>/lib/hibernate-commons-annotations-4.0.1.Final.jar
    • <tomee-home>/lib/hibernate-core-4.1.4.Final.jar
    • <tomee-home>/lib/hibernate-ehcache-4.1.4.Final.jar
    • <tomee-home>/lib/hibernate-entitymanager-4.1.4.Final.jar
    • <tomee-home>/lib/hibernate-validator-4.3.0.Final.jar
    • <tomee-home>/lib/jboss-logging-3.1.0.GA.jar
    • <tomee-home>/lib/terracotta-toolkit-1.4-runtime-4.1.0.jar

    The ehcache jars might be optional, but haven’t tried without them.

    Remove (optional):

    • <tomee-home>/lib/asm-3.2.jar
    • <tomee-home>/lib/bval-core-0.4.jar
    • <tomee-home>/lib/bval-jsr303-0.4.jar
    • <tomee-home>/lib/commons-lang-2.6.jar
    • <tomee-home>/lib/openjpa-2.2.0.jar
    • <tomee-home>/lib/serp-1.13.1.jar
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ok, I have a very simple app created in Grails. I have a generated
I have created a very simple wpf app with mvvm light. I have rows
I have created a very simple Rails 3.1 app with basic stuffs like following:
I have created a very simple app to invite friends. This is my code:
i have created a very simple console application in vb.net that emails me some
I have created a very simple sharepoint timer job. All i want it to
I have created a very simple GUI project in Qt as follows: main: #include
I am using SQL Server 2008 Enterprise. I have created a very simple test
I have created a GUI for starting a Thread which does something very simple.
I am following a tutorial for building a very simple rails app. I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.