我们刚刚从 Weblogic 10 升级到 Weblogic 12,并开始收到此错误
<Error> <com.sun.jersey.spi.container.ContainerResponse> <hostname> <nodename> <[ACTIVE] ExecuteThread: '21' for queue: 'weblogic.kernel.Default (self-tuning)'> <ws_user> <> <> <140123234234> <BEA-000000> <The exception contained within MappableContainerException could not be mapped to a response, re-throwing to the HTTP container
java.lang.NoSuchMethodError: com.sun.jersey.client.apache.ApacheHttpClientHandler.getRequestEntityWriter(Lcom/sun/jersey/api/client/ClientRequest;)Lcom/sun/jersey/api/client/TerminatingClientHandler$RequestEntityWriter
经过一番挖掘,我意识到 Jersey 库 (com.sun.jersey.contribs
) 需要从 1.2 升级到
。我做了这个更改,然后开始出现以下错误1.18.1
版本
weblogic.application.ModuleException: java.lang.IncompatibleClassChangeError: com.sun.jersey.json.impl.provider.entity.JSONRootElementProvider and com.sun.jersey.json.impl.provider.entity.JSONRootElementProvider$Wadl disagree on InnerClasses attribute
经过一番挖掘,我了解到我的 JSR311-api (javax.ws.rs
) 必须是 1.1.1
,而且它已经是这样了。现在我迷失了我还应该改变什么来修复这些错误
最佳答案
我在更新 Jersey 库时遇到了类似的问题。最后发现旧的jar还在/lib文件夹中。确保您已完全删除以前的版本。
希望有帮助。
关于maven - Jersey 库错误(NoSuchMethod 然后 IncompleteClassChangeError),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24246709/