har123
har123

Reputation: 59

Encounter classdefnotfound error for reactivetransactionmanager class after upgrading spring-fox swagger to Open-api doc

I am trying to upgrade from swagger spring-fox to open-api in a spring-boot application and I am encountering below error.

caused by java.lang.noclassdeffounderror org/springframework/transaction/reactivetransactionmanager. I tried adding implementation 'org.springframework:spring-tx:5.2.4.RELEASE' in gradle but after adding that I see Caused by: java.lang.ClassNotFoundException: org.springframework.jdbc.support.JdbcTransactionManager which did not solve by adding implementation 'org.springframework:spring-jdbc:5.2.4.RELEASE'. Can someone suggest on how we can resolve this? I am using folowwing versions

implementation "org.springframework.boot:spring-boot:2.1.9.RELEASE" implementation "org.springframework.boot:spring-boot-starter-web:2.1.9.RELEASE" implementation "org.springframework.boot:spring-boot-starter-actuator:2.1.9.RELEASE" implementation 'org.springdoc:springdoc-openapi-ui:1.6.14' implementation "org.springframework.boot:spring-boot-starter-jdbc:2.2.5.RELEASE" implementation 'org.springframework:spring-tx:5.2.4.RELEASE' implementation 'org.springframework:spring-jdbc:5.2.4.RELEASE'

Upvotes: 1

Views: 1593

Answers (2)

Dinushika Rathnayake
Dinushika Rathnayake

Reputation: 419

In my case adding below dependency fix the issue. Please use the version which suitable.

Caused by: java.lang.ClassNotFoundException: org.springframework.transaction.ReactiveTransactionManager

 <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-tx</artifactId>
    <version>5.3.31</version>
 </dependency>

Upvotes: 1

Oscar Oliveira
Oscar Oliveira

Reputation: 31

Goodnight friend,

Upvotes: 0

Related Questions