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)