Java Springboot 2.1 java.lang.LinkageError

1.4k views Asked by At

So I'm attempting to upgrade a Spring boot application to 2.1. I've got it running locally, but when deploying to Websphere 8.5.5.13, I'm getting a java linkage error. What I get from this is that this ConfigFileApplicationListener class has been loaded twice(one from gradle jars, one on server) and is conflicting? So my solution should be to exclude it from from gradle build? Only problem is I can't figure out what Spring dependency is pulling it in. Any suggestions?

R Caused by: java.lang.LinkageError: loading constraint violation 
when overriding method "org/springframework/boot/context/config/
ConfigFileApplicationListener$DocumentFilterFactory.getDocumentFilter
(Lorg/springframework/boot/context/config/ConfigFileApplicationListener$Profile;)
Lorg/springframework/boot/context/config/ConfigFileApplicationListener$DocumentFilter;" 
during creation of class "org/springframework/boot/context/config/ConfigFileApplicationListener
$Loader$$Lambda$762/000000002F6368A0": loader "java/lang/InternalAnonymousClassLoader@4b4313e6"     
of class "org/springframework/boot/context/config/ConfigFileApplicationListener$Loader$$Lambda$762/000000002F6368A0" 
and loader "com/ibm/ws/classloader/CompoundClassLoader@da9f4ecb" of class 
"org/springframework/boot/context/config/ConfigFileApplicationListener$DocumentFilterFactory" 
have different types for the method signature
1

There are 1 answers

0
RobOhRob On BEST ANSWER

The error was caused by a Websphere bug (https://issues.jboss.org/browse/RHDM-297). Upgrading to IBM JDK 8.0.5.10 fixes this issue.