maven - Jersey 库错误(NoSuchMethod 然后 IncompleteClassChangeError)

标签 maven jersey weblogic java

我们刚刚从 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/

相关文章:

java - RESTful Web 服务 eclipse

java - weblogic 上的 JAXWS Client ServiceConfigurationError

java - CSV 文件下载(在 Excel 中打开)提示进行 Windows 用户身份验证

Maven surefire插件skipAfterFailureCount配置不起作用

dependency-injection - 使用 Jersey 测试框架的 JUnit 测试中的 CDI

java - 在现有的 Jira 问题中添加附件

第二次尝试时出现 javax.net.ssl.SSLHandshakeException

java - ClassCastException : org. apache.xerces.parsers.XIncludeAwareParserConfiguration 无法转换为 org.apache.xerces.xni.parser.XMLParserConfiguration

eclipse - MRUnit Maven 项目导入问题

java - 在 Eclipse 中运行 maven 项目