2 years ago

#15257

test-img

engg

org.springframework.boot.loader.LaunchedURLClassLoader attempted duplicate class definition for {class} is in unnamed module of loader

I am using a jar as a dependency in my Gradle Java sprint boot project. Get this error

Unexpected handler method invocation error; nested exception is java.lang.LinkageError: loader org.springframework.boot.loader.LaunchedURLClassLoader @7fb9f71f attempted duplicate class definition for xxx.class. (xxx.class is in unnamed module of loader org.springframework.boot.loader.LaunchedURLClassLoader @7fb9f71f, parent loader 'app')

this looks like the class is being loaded twice. first on the sprint boot app start up and then again when the a method is invoked which then uses that xxx.class.

The LaunchedURLClassLoader works as a url class loader which loades classes/jar at startup i assume. why it tries to load a class again?

java

spring

spring-boot

linkageerror

0 Answers

Your Answer

Accepted video resources