• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Running unit tests and getting NoSuchMethodError: javax.persistence.OneToMany.orphanRemoval()Z

 
Ranch Hand
Posts: 820
IntelliJ IDE VI Editor Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Of course I found several posts that say this is because I have persistence-api-1.0.jar somewhere in my classpath somewhere, but I don't (at least I can't find it )
I also read that this a symptom of not having a JPA 2 enabled web server, but I'm just running a unit test here.

I read that I need a jpa2 jar and I downloaded the Geronimo one ( geronimo-jpa_2.0_spec-1.0-PFD2.jar ) that definitely has the orphanRemoval() method but I'm still getting the error, which means that some other jar is providing the OneToMany class.

I can't find that other jar!

I'm running this from intelliJ IDEA
Here is a list of all the jars on my classpath:

antlr-3.2.jar
asm-3.3.jar
cglib-2.2.jar
commons-beanutils-1.8.3.jar
commons-collections-3.2.1.jar
dom4j-1.6.1.jar
hibernate-jpa-2.0-api-1.0.0.Final.jar
hibernate3.jar
javassist.jar
jstl-1.1.2.jar
saxon9he.jar
slf4j-api-1.6.1.jar
slf4j-simple-1.6.1.jar
activation.jar
ant-contrib.jar
antelope.jar
ecj.jar
jalopy.jar
jsp-api.jar
log4j.jar
mail.jar
portal-impl.jar
qdox.jar
saxon9he.jar
serializer.jar
servlet-api.jar
xalan.jar
xercesImpl.jar
xml-apis.jar
activation.jar
annotations.jar
container.jar
hsql.jar
jms.jar
jta.jar
jtds.jar
mail.jar
mysql.jar
portal-kernel.jar
portal-service.jar
portlet-container.jar
portlet.jar
postgresql.jar
saw-api.jar

antlr-3.2.jar
asm-3.3.jar
asm-analysis-3.3.jar
asm-commons-3.3.jar
asm-tree-3.3.jar
asm-util-3.3.jar
asm-xml-3.3.jar
cglib-2.2.jar
commons-beanutils-1.8.3.jar
commons-beanutils-bean-collections-1.8.3.jar
commons-beanutils-core-1.8.3.jar
commons-collections-3.2.1.jar
dom4j-1.6.1.jar
hibernate3.jar
javassist.jar
slf4j-api-1.6.1.jar
slf4j-log4j12-1.6.1.jar
\liferay\hibernate_liferay\portal-impl.jar
hibernate-jpa-2.0-api-1.0.0.Final.jar
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic