ProblemIn Hibernate development, contains a model class with JPA @OneToMany annotation : @OneToMany( cascade=CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "user") public Set<Debit> getDebits() { return this.debits; } When web application is deployed on WebSphere 7, it hit following error message : Caused by: java.lang.NoSuchMethodError: javax/persistence/OneToMany.orphanRemoval()Z at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:1912) at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:707) ... 118 more P.S SolutionThe To fix it, put your JPA 2.0 ( Now access WebSphere web console –> Troubleshooting –> Class loader viewer, make sure your library is loaded. ![]() Now, WebSphere 7 will always load your Hibernate JPA 2.0 library. |
|