I'm using Gilead to persist my entities in my GWT project, im using hibernate annotations aswell. my problem is on my onetomany association.this is my User class that holds a reference to a list of FileLocations

When i persist this data in a normal desktop application, it works fine , creates the tables and i can add and store data to it. but when i try to persist the data in my gwt application i get errors i will show them lower. this is my ServiceImpl class that extends PersistentRemoteService.

this is the error that im am getting. the error goes away when i remove my onetoManyRelationship and builds my session factory when i put it in , it on the line of buildsessionfactory in hibernate Util that it throws this exception. my hibernate util class is ok also. this is the error java.lang.NoSuchMethodError: javax.persistence.OneToMany.orphanRemoval()Z

so i switched to the tomcat deployer , but now i am getting the problem that my application needs to be recompiled, all i did was take the war file for my gwt projwctand placed it in in web apps dir, any reason why?
–
mollemanMar 25 '10 at 12:01

Yes, read carefully the docs I've linked above - see step #4. You need put the contents of the war folder in the webapps dir, not the war file (note: you'll only have to do this once).
–
Igor KlimerMar 25 '10 at 12:52

yup i did this and i found the only way to get it working was to place this at the end of my url ?gwt.codesvr=:9997, this works fine, but my application still throughs the same error, the error is giving me information on an method not found exeception on an . orphanRemoval() method that is javax.peristence. would you have any idea from the above error why it is not working. if i remove my oneToMany association, the error goes away but it is limiting me to functionality that i can provide. is there a work around?
–
mollemanMar 25 '10 at 13:08

Are you sure it's using the Tomcat instance? Is the stack trace still the same?
–
Igor KlimerMar 26 '10 at 10:31

Just adding a comment to possibly help others facing this. It could also be that your application server provides a version of JPA that "overshadows" the hibernate version. For me I had to do something like this:

Also if you're compiling with a "complete" Java EE API library (e.g. one that contains both JPA and other APIs such as Servlet etc) then make sure the complete library is further down the classpath than the specific JPA 2.0 library