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 3678852
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T03:23:26+00:00 2026-05-19T03:23:26+00:00

We sucessfully implementedSpring , hibernate +jpa in our application with Xa transcation.but we trying

  • 0

We sucessfully implementedSpring , hibernate +jpa in our application with Xa transcation.but we trying to implement criteria in our application we are facing one error that ,

java.lang.NoSuchMethodError: javax.persistence.EntityManager.getCriteriaBuilder()

So could you tell which implementation classes are using in hybernate for javax.persistence.criteria.CriteriaBuilder interface
listed few jar file we are using ,

hibernate 3.3 , jpa 2.0
spring-orm 3.0.2
hibernate-entitymanager

Update:

I changed my hibernate jar into( hibernate-core-3.6.0.CR2,hibernate-entitymanager-3.6.0.CR2 versions ) but still same exception is coming ,

CriteriaBuilder criteriaBuilder= this.getJpaTemplate().getEntityManagerFactory().getCriteriaBuilder();

In my config file:

<beans:bean id="jpaTemplate" class="org.springframework.orm.jpa.JpaTemplate">
    <beans:property name="entityManagerFactory">
        <beans:ref bean="entityManagerFactory" />
    </beans:property>
</beans:bean>


<beans:bean id="entityManagerFactory"
    class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
    <!-- added by shiju  for getting atomoikas xa datasource-->
    <beans: property name="dataSource">
        <beans: ref bean="dataSource"/>
    </beans: property>
    <beans: property name="persistenceUnitName" value="payhub" />
    <beans: property name="jpaVendorAdapter">
        <beans:bean
            class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
            <beans: property name="generateDdl" value="false" />
            <beans: property name="showSql" value="true" />
            <beans: property name="databasePlatform" value="${database.target}" />
        </beans:bean>
    </beans: property>
    <beans: property name="persistenceXmlLocation">
        <beans:value>classpath:META-INF/persistence.xml</beans:value>
    </beans:property>
</beans:bean>

java.lang.NoSuchMethodError: javax.persistence.EntityManagerFactory.getCriteriaBuilder()Ljavax/persistence/criteria/CriteriaBuilder;…

Could you give any other solution?

  • 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-05-19T03:23:27+00:00Added an answer on May 19, 2026 at 3:23 am

    I’m pretty sure Hibernate 3.3 doesn’t implement JPA 2. You’ll need to upgrade to something more recent (e.g. 3.6)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using localtime.js sucessfully on my app but now that ive started to
I've got a model that's migrating sucessfully but is taking 15-20 seconds. (Obviously this
I have PKCS#12 keystore that I've sucessfully imported in my browser for accessing a
I'm trying to style a custom menu within drupal. I've sucessfully styled to display
I have sucessfully made and used RadioGroup's before in xml, but each time there
Here the problem: the layer gets sucessfully hidden, but when I click the button
Ruby Enterprise Edition fails to compile from sources with GCC 4.5, but sucessfully compiles
I have a varchar column that has generally has a decimal value, but some
i have a note which can share it to evernote,i done it sucessfully.but there
I have a Linq provider that sucessfully goes and gets data from my chosen

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.