You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Adam Lipscombe <ad...@expensys.com> on 2004/06/10 13:51:19 UTC

UserTransaction class not found in TC 5.0.25

Folks,


I have deployed a J2EE app to TC 5.0.25.
The app has the j2ee.jar library in the webapps/<application>/WEB-INF/lib
directory


When I access the app it displays a page with this info:

javax.servlet.ServletException: Servlet execution threw an exception 
root cause 
java.lang.NoClassDefFoundError: javax/transaction/UserTransaction


I don't understand this error because the UserTransaction class is in the
j2ee.jar file, and this is in the WEB-INF/lib dir.
What's going on here? 
Does the j2ee.jar need to go somewhere else as well?


TIA -Adam


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: UserTransaction class not found in TC 5.0.25

Posted by QM <qm...@brandxdev.net>.
On Thu, Jun 10, 2004 at 12:51:19PM +0100, Adam Lipscombe wrote:
: I have deployed a J2EE app to TC 5.0.25.
: The app has the j2ee.jar library in the webapps/<application>/WEB-INF/lib
: directory

Sketchy.

: I don't understand this error because the UserTransaction class is in the
: j2ee.jar file, and this is in the WEB-INF/lib dir.
: What's going on here? 
: Does the j2ee.jar need to go somewhere else as well?

Yes -- as in, remove it from WEB-INF/lib.

If classes in j2ee.jar exist elsewhere in Tomcat's classpath (and most
likely, they do) then you'll have problems.

One common cause of the NoClassDefFound error is that the classloader
found the class, but it's the wrong version.

You should also rebuild your app against Tomcat's jars instead of that
j2ee.jar, just to be certain.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org