Spring 出现Java.Lang.ClassNotFoundException: Org.Springframework.Transaction.TransactionException

Developing Quartz with Spring 3, and hits following error message. 


Caused by: 
       java.lang.NoClassDefFoundError: org/springframework/transaction/TransactionException
	at java.lang.Class.getDeclaredConstructors0(Native Method)
	at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
	at java.lang.Class.getConstructor0(Class.java:2699)
	at java.lang.Class.getDeclaredConstructor(Class.java:1985)
        .....
Caused by: java.lang.ClassNotFoundException: org.springframework.transaction.TransactionException
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1711)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556)
	... 29 more

Solution

Doesn’t matter with Quartz, above error message show that you need Spring transaction dependency. To fix it, just includespring-tx.jar.

For example, pom.xml


 
	org.springframework
	spring-tx
	3.1.2.RELEASE
   

你可能感兴趣的:(Spring 出现Java.Lang.ClassNotFoundException: Org.Springframework.Transaction.TransactionException)