Search code examples
hibernatemavenxamppjettytapestry

How do I deploy my Eclipse Tapestry web app project previously running in an embedded Jetty to a standalone Jetty?


I have a Tapestry web application developed with Eclipse and previously running using the embedded Eclipse jetty using the Maven jetty plugin, more precisely using jetty:run.

The application is built using Tapestry 5.3.8 and uses Hibernate as a persistence provider. The back end is an XAMPP install.

When I export the application to a WAR, and put it inside the standalone jetty webapps folder and start jetty, I get the following error:

Render queue error in BeginRender[Index:layout.pagelink]: 
Error obtaining injected value for field somePkg.pages.TestData.em:
Unable to add method javax.persistence.EntityGraph createEntityGraph(java.lang.String) to
class $EntityManager_14cbc42cc34: java.io.IOException: invalid constant type: 15

em is the EntityManager which is injected when the page is loaded.


Solution

  • I think this is related to javassist / java 8. Later versions of tapestry (including 5.3.8) have ditched javassist in favour of ASM/Plastic.

    Can you run the following from command line:

    mvn dependency:tree

    Look for javassist dependencies, from memory hibernate might use it. Probably best to see if the javassist version is compatible with java 8. If not you'll either need to use a jre8 compatible hibernate/javassist version or run with JRE7.