We have file payment.jar
that developed with Spring Framework 3.1.2 . We need to use it as a dependency on a new project that its version is Spring Framework 5.x .
Problem: When payment.jar
used as a dependency, the payment.jar
transitive dependencies add to project class-path so in cause conflicting Spring Framework 3 and Spring Framework 5.
I tried solutions:
create-an-executable-jar-with-dependencies-using-maven
there is no success, the fat JAR, adds Spring Framework 3 to project. (what I am doing wrong!)
because of using spring-ibatis
implementation in payment.jar
it is not worked. Spring Framework new versions do not support ibatis.
Error:
Caused by: java.lang.ClassNotFoundException: org.springframework.orm.ibatis.support.SqlMapClientDaoSupport
my requirement:
I need to use payment.jar
(with Spring Framework 3.1.2) as a dependency on new project with Spring Framework 5.x without problem mentioned above.
If the Spring versions are as incompatible as it sounds as though they are, you're probably going to have to recompile either the jar or the project so that they're using the same version of Spring.
If that's impossible (e.g. if you don't have source for the jar), you might be able to wrap the payment jar up in a microservice so that it's running in a different process, and talk to it via XML-RPC or SOAP.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With