mvn gwt:run java.lang.IllegalStateException: No Constructor <New id="tx" class="org.mortbay.jetty.plus.naming.Transaction"/>

104 views
Skip to first unread message

Y2i

unread,
Sep 15, 2011, 2:00:44 AM9/15/11
to google-we...@googlegroups.com
Hi,

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!

Y2i

unread,
Sep 15, 2011, 1:04:47 PM9/15/11
to google-we...@googlegroups.com
The java process started by mvn gwt:run opens the same file twice:  one file in ~/m2/repository, another file in ${webappDirectory}/WEB-INF/lib.  geronimo-spec-jta, that contains UserTransaction, is also on the list of open-twice files.

Could that be a problem?

Thank you in advance!

Reply all
Reply to author
Forward
0 new messages