Caused by: java.lang.NoSuchMethodError: javax.persistence.OneToOne.orphanRemoval()Z

General support questions
Post Reply
alterseiba
Posts: 3
Joined: 2017/05/26 09:37:09

Caused by: java.lang.NoSuchMethodError: javax.persistence.OneToOne.orphanRemoval()Z

Post by alterseiba » 2017/06/28 22:10:13

Hi,

I had a problem with the different behavior of two servers with Centos 6.9 OS.
I'm using Spring Maven project using hibernate 3.6.10.Final and Jetty 9.2.17 and running on Java 1.7_80 JVM (Oracle).
In my local environment Windows 10 and Centos 6.9(Server 1) it works perfectly with the same sha1 of the war file. But when I deploy to Centos 6.9(Server 2) it gives me an error in Caused by: java.lang.NoSuchMethodError: javax.persistence.OneToOne.orphanRemoval()Z.

I did some changes in pom xml with regards conflicting version of javax.persistence but still no luck.
I really appreciate if anyone can suggest me what is causing this exception and how can I fix this?

Thanks in Advance.

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Caused by: java.lang.NoSuchMethodError: javax.persistence.OneToOne.orphanRemoval()Z

Post by TrevorH » 2017/06/29 07:29:55

The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

alterseiba
Posts: 3
Joined: 2017/05/26 09:37:09

Re: Caused by: java.lang.NoSuchMethodError: javax.persistence.OneToOne.orphanRemoval()Z

Post by alterseiba » 2017/07/03 03:11:27

I fixed the problem by removing the dependencies javax.persistence in pom xml after that another issue encountered in dropping table even my hibernate.hbm2ddl.auto configuration is off.

Post Reply