0

How to fix this error using OpenXava 4.6 with Glassfish 2.2:

javax.servlet.ServletException: java.lang.NoSuchMethodError: javax.persistence.EntityManager.getMetamodel()Ljavax/persistence/metamodel/Metamodel

I got this error when trying to access my test module from the browser.

http://localhost:8080/testmod/xava/module.jsp?application=testmod&module=test
javierpaniza
  • 677
  • 4
  • 10

2 Answers2

1

In my case, using openxava 4.6 with glassfishESBv22 gave me the error java.lang.NoSuchMethodError: javax.persistence.EntityManager.getMetamodel... so when i changed the server to default tomcat bundle with OX4.6, it worked fine. that means it was the glassfish server problem...finally i used the latest glassfish server v3.1.2 and it also worked fine. so problem solved...only changing the server to the latest one was the solution.

0

OpenXava 4.6 uses JPA2, while the application server you're using uses JPA1. If you need to work with an old application server you can configure the classloaders in order that use JPA engine included your OpenXava application.

javierpaniza
  • 677
  • 4
  • 10