-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: Upgrade to 3.5.1 - NoSuchMethodError: orphanRemoval()Z
PostPosted: Sun Apr 18, 2010 12:25 am 
Newbie

Joined: Sat Apr 17, 2010 11:17 pm
Posts: 8
I have a project that was using 3.3.2 till today when I decided to upgrade to 3.5.1 - the code compiles but I found myself in a pickle. When I run one of my test cases I ran into this(below)

I ran the test in Eclipse 3.5 and then thinking that this might be a classpath issue I deployed my app to Glassfish 2.1 running on JDK 1.6 07 , nothing changed, everytime the same error...

Is this a known bug ? Looks like either I miss a jar or an older JPA is in the path. I searched for *jpa* in my Glassfish install and found none so something else is going on. Any idea is welcome!

Code:
Caused by: java.lang.NoSuchMethodError: javax.persistence.OneToMany.orphanRemoval()Z
        at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:1830)
        at org.hibernate.cfg.AnnotationBinder.processIdPropertiesIfNotAlready(AnnotationBinder.java:762)
        at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:726)
        at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:636)
        at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:359)
        at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1206)
        at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:675)
        at com.jReward.util.hibernate.SessionFactoryBean.buildSessionFactory(SessionFactoryBean.java:39)
        at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1367)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1333)


Top
 Profile  
 
 Post subject: Re: Upgrade to 3.5.1 - NoSuchMethodError: orphanRemoval()Z
PostPosted: Sun Apr 18, 2010 2:08 am 
Newbie

Joined: Sat Apr 17, 2010 11:17 pm
Posts: 8
I think I get it. So I am out of luck. It won't work for me since I don't use JBOSS AS 6 ;-)

http://opensource.atlassian.com/project ... e/HHH-4955

So my best bet at this time remains 3.3.2 GA.


Top
 Profile  
 
 Post subject: Re: Upgrade to 3.5.1 - NoSuchMethodError: orphanRemoval()Z
PostPosted: Tue Jun 15, 2010 1:15 pm 
Newbie

Joined: Tue Mar 03, 2009 9:32 am
Posts: 7
I had a similar problem, but the reason was that I have included JPA1 jar together with JPA2 jar.

Actually, the JPA1 jar was part of Spring3 release, therefore I didn't notice at first that I have to remove it, but, hey, that's what made me look at your post and write down the solution here for everybody else who stumbles across this issue :)

_________________
Regards,
Uri Bar


Top
 Profile  
 
 Post subject: Re: Upgrade to 3.5.1 - NoSuchMethodError: orphanRemoval()Z
PostPosted: Mon Jun 21, 2010 2:54 pm 
Newbie

Joined: Thu Dec 17, 2009 2:46 pm
Posts: 5
Hi!

Try to remove ejb3-persistence.jar from your classpath. Worked for me :)


Top
 Profile  
 
 Post subject: Re: Upgrade to 3.5.1 - NoSuchMethodError: orphanRemoval()Z
PostPosted: Sat Dec 04, 2010 7:39 am 
Newbie

Joined: Thu Nov 18, 2010 2:13 am
Posts: 2
Hi!

Try to remove ejb3-persistence.jar from your classpath. Worked for me :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.