简体   繁体   English

Java Springboot 2.1 java.lang.LinkageError

[英]Java Springboot 2.1 java.lang.LinkageError

So I'm attempting to upgrade a Spring boot application to 2.1. 因此,我试图将Spring Boot应用程序升级到2.1。 I've got it running locally, but when deploying to Websphere 8.5.5.13, I'm getting a java linkage error. 我已经在本地运行它,但是当部署到Websphere 8.5.5.13时,出现了Java链接错误。 What I get from this is that this ConfigFileApplicationListener class has been loaded twice(one from gradle jars, one on server) and is conflicting? 我从中得到的是此ConfigFileApplicationListener类已加载两次(从gradle jars加载一次,在服务器上加载一次),并且发生冲突? So my solution should be to exclude it from from gradle build? 所以我的解决方案应该是从gradle构建中排除它? Only problem is I can't figure out what Spring dependency is pulling it in. Any suggestions? 唯一的问题是我不知道是什么Spring依赖关系将其引入。有什么建议吗?

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

The error was caused by a Websphere bug ( https://issues.jboss.org/browse/RHDM-297 ). 该错误是由Websphere错误( https://issues.jboss.org/browse/RHDM-297 )引起的。 Upgrading to IBM JDK 8.0.5.10 fixes this issue. 升级到IBM JDK 8.0.5.10可以解决此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM