Tapestry5HowToSetupEclipseRunJettyRun

This is a small tip on how to get Tapestry 5.0.x, Eclipse 3.3 to run on Jetty 6.1.5 using RunJettyRun.

There have been some reports of problems with slf4j causing ClassNotFoundExceptions on pages that @Inject in a Logger and run using RunJettyRun 1.0.1, this is due to Jetty using slf4j as well and Jetty's version is getting loaded first.

exception
org.apache.tapestry.internal.services.TransformationException: Error obtaining injected value for field com.example.pages.Start.log: java.lang.ClassNotFoundException: org.slf4j.Logger

To fix this, create your Tapestry project as normal
*Create a launch configuration
*Select the 'arguments' tab
*In the VM arguments box enter:

-Dorg.mortbay.jetty.webapp.parentLoaderPriority=true
  • No labels