Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Custom Mediator ClassNotFoundException TransactionSynchronization

I make a custom mediator class that used spring jdbc to access data from database.
I make a jar from that class and deploy it in WSO2_HOME/repository/components/lib.
After that I add the following jar to the same folder :
spring-jdbc.jar,
spring-tx.jar.

But when I tried the custom mediator there is an error "ClassNotFoundException org\springframework\transaction\support\TransactionSynchronization".

The problem is I'm pretty sure that "TransactionSynchronization" class is available in the spring-tx.jar. Can anyone help me to solve this problem? :)

like image 681
Mari_Yaguchi Avatar asked Aug 13 '26 16:08

Mari_Yaguchi


1 Answers

One reason may be there are two packages in your class path which has the same 'TransactionSynchronization' class. Can you try the below.

  1. What do you have in your WSO2_HOME/repository/components/dropins directory? Delete all jars inside dropins and restart the server and recheck for the issue.

  2. If the error is still there try deleting spring-tx.jar from WSO2_HOME/repository/components/lib & WSO2_HOME/repository/components/dropins. Then restat the server. Then check whether you are getting the same error or different error?

like image 74
Lakmali Erandi Baminiwatta Avatar answered Aug 16 '26 21:08

Lakmali Erandi Baminiwatta