Reputation: 45
I am developing a web app (on tomcat 7) that needs to create a periodic task and so I chose Quartz Scheduler.But every time I start server it throws
java.lang.NoClassDefFoundError: javax/transaction/UserTransaction and java.lang.ClassNotFoundException: javax.transaction.UserTransaction.
I rechecked many times in classpath and it is surely has this UserTransaction class in javaee.jar by this line of code System.out.println( System.getProperty( "java.class.path" ) ); So could anyone please help me point it out ? . Maybe I am missing something.
Upvotes: 2
Views: 12557
Reputation: 2155
Check if you have javaee-api jar in your classpath. Also, you need to check if you have multiple jars carrying the same class. You can see here what all jars have javax/transaction/UserTransaction
. For any futher debugging you can follow this
Upvotes: 0
Reputation: 3343
Probably (you did not state which javaee.jar you are using) you have the version from Oracle that contains only the API. This jar is suitable for compiling, not for running your application.
Upvotes: 0