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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T19:12:19+00:00 2026-05-30T19:12:19+00:00

I have Spring MVC App integrated with Hibernate. Everything was OK until I use

  • 0

I have Spring MVC App integrated with Hibernate. Everything was OK until I use @OneToMany annotation… I’m getting the following error:

Caused by: java.lang.NoSuchMethodError: javax.persistence.OneToMany.orphanRemoval()Z
at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:1912)
at org.hibernate.cfg.AnnotationBinder.processIdPropertiesIfNotAlready(AnnotationBinder.java:796)
at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:707)
at org.hibernate.cfg.Configuration$MetadataSourceQueue.processAnnotatedClassesQueue(Configuration.java:4035)
at org.hibernate.cfg.Configuration$MetadataSourceQueue.processMetadata(Configuration.java:3989)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1398)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1856)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:805)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:745)
at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:134)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
... 81 more

Here’s my WEB-INF/lib contents:

aopalliance-1.0.jar
commons-beanutils-1.8.3.jar
commons-collections-3.2.1.jar
commons-digester-2.1.jar
commons-logging-1.1.1.jar
dom4j-1.6.1.jar
h2-1.3.164.jar
hibernate-commons-annotations-3.2.0.Final.jar
hibernate-core-3.6.9.Final.jar
hibernate-jpa-2.0-api-1.0.1.Final.jar
javassist-3.12.1.GA.jar
log4j-1.2.16.jar
slf4j-api-1.6.4.jar
slf4j-log4j12-1.6.4.jar
spring-aop-3.1.1.RELEASE.jar
spring-asm-3.1.1.RELEASE.jar
spring-beans-3.1.1.RELEASE.jar
spring-context-3.1.1.RELEASE.jar
spring-core-3.1.1.RELEASE.jar
spring-expression-3.1.1.RELEASE.jar
spring-hibernate3-2.0.8.jar
spring-jdbc-3.1.1.RELEASE.jar
spring-orm-3.1.1.RELEASE.jar
spring-tx-3.1.1.RELEASE.jar
spring-web-3.1.1.RELEASE.jar
spring-webmvc-3.1.1.RELEASE.jar
spring-webmvc-3.1.1.RELEASE-sources.jar
tiles-api-2.2.2.jar
tiles-core-2.2.2.jar
tiles-jsp-2.2.2.jar
tiles-servlet-2.2.2.jar
tiles-template-2.2.2.jar

I saw that for some people helped ejb3-persitence.jar removing but my classpath doesn’t contain that jar.
There’s everythinh OK if I run this app under other application servers like JBoss or Glassfish.

  • 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-30T19:12:21+00:00Added an answer on May 30, 2026 at 7:12 pm

    That class is provided in several jar files so you need to ensure that your application is using the correct one.

    First you need to workout which one it is using. Try and remove it from your WEB-INF/lib folder and if you still get the same error then it means it is loaded from somewhere else.

    Also try and copy it to $TOMCAT_HOME/lib as a test to see what happens.

    If you are using Eclipse try and verify the JRE/JDK you are using because the javaee-api-5 also includes these classes. It might also be worth ensuring that the javaee-api is not being included when it is loaded by Tomcat.

    Examples of jar files to that can cause conflicts with your hibernate-jpa jar file is given below (could have different version numbers):

     persistence.jar
     toplink-essentials.jar
     ejb3-persistence-1.0.1.GA.jar
     ejb3-persistence-1.0.2.GA.jar
     ejb3-persistence-3.3.2.Beta1.jar
     geronimo-jpa_1.0_spec-1.1.2.jar
     geronimo-jpa_3.0_spec-1.0.jar
     geronimo-jpa_3.0_spec-1.1.1.jar
     geronimo-jpa_3.0_spec-1.1.jar
     persistence-api-1.0.jar
     geronimo-jpa_2.0_spec-1.0-PFD2.jar
     geronimo-jpa_3.0_spec-1.0-M1.jar
     glassfish-persistence-api-b32g.jar
     javaee-api-5.0-1.jar
     javaee-api-5.0-2.jar
     openjpa-all-2.0.0-M3.jar
     openejb-itests-standalone-client-3.0.1.jar
     openejb-itests-standalone-client-3.0.jar
     openejb-itests-standalone-client-3.1.1.jar
     openejb-itests-standalone-client-3.1.jar
    

    The issue is definitely caused by conflicts with the jar files you just need to try different situations to work out exactly where the conflict is.

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

Sidebar

Related Questions

I have a Spring 3 MVC app sing Hibernate as ORM. All works fine.
I have a bunch of Hibernate mapped objects in my Spring MVC app. Default
I have a Spring MVC based Web Application with Hibernate. Following is the directory
I am building a web app built on Spring MVC and Hibernate. I have
I have a Spring-MVC, Hibernate, (Postgres 9 db) Web app. An admin user can
I have a Spring MVC application trying to use a rich domain model, with
I use Spring MVC 3.0 and JSP. I have an object: public class ObjectWrapper
I basically have the following flow: XML -> JSON -> Spring MVC -> jsp
I have a spring mvc app that I want to refactor out, speficially removing
I'm building a Spring MVC app with Spring 3.0.3. I have data binding of

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.