I am porting a GWT 2.4 project to maven. When I run mvn gwt:run I'm getting the following error in Jetty log:
java.lang.IllegalStateException: No Constructor:
<New id="tx" class="org.mortbay.jetty.plus.naming.Transaction">
<Arg>
<New class="com.atomikos.icatch.jta.UserTransactionImp"/>
</Arg>
</New>
on com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload@2c40072a{...} at org.mortbay.xml.XmlConfiguration.newObj(XmlConfiguration.java:631)
This post says that the reason for the failure is a duplicate javax.transaction.UserTransaction. I indeed had a duplicate UserTransaction:
- hibernate-core was indirectly pulling jta
- jetty-plus was pulling geronimo-spec-jta
and both jta and geronimo-spec-jta include javax.transaction package. I excluded jta from jetty-plus, but I'm still getting the same error when running mvn gwt:run.
The command line that mvn passes to java contains a long list of jars specified using -classpath option. I grepped through all jars, only geronimo-spec-jta defines UserTransaction.
Has anyone experienced this before? Your help would be greatly appreciated!