我是WebLogic的新手,我很难让我的应用程序在Weblogic 12.2.1中运行。它启动正常但在我在浏览器中加载应用程序时抛出以下NoSuchMethodError:
2017-03-10 06:03:56,979 [RMI TCP Connection(4)-127.0.0.1] WARN org.springframework.remoting.support.RemoteInvocationTraceInterceptor - Processing of RmiServiceExporter remote call resulted in fatal exception: com.siemens.plm.lmd.docs.common.model.DataAccessManager.getTocData
java.lang.NoSuchMethodError: com.fasterxml.jackson.databind.ObjectMapper.addMixIn(Ljava/lang/Class;Ljava/lang/Class;)Lcom/fasterxml/jackson/databind/ObjectMapper;
at com.siemens.plm.lmd.docs.plugin.xps47.services.Xps47CollectionMap.getTocData(Xps47CollectionMap.java:285) ~[data_services_xps47-4.1.1.jar:?]
at com.siemens.plm.lmd.docs.plugin.xps47.HelpServerServiceXps47.getTocData(HelpServerServiceXps47.java:147) ~[data_services_xps47-4.1.1.jar:?]
at com.siemens.plm.lmd.docs.server.model.PluginDataManager.getTocData(PluginDataManager.java:87) ~[_wl_cls_gen.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_121]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_121]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_121]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_121]
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302) ~[spring-aop-4.2.0.RELEASE.jar:4.2.0.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) ~[spring-aop-4.2.0.RELEASE.jar:4.2.0.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) ~[spring-aop-4.2.0.RELEASE.jar:4.2.0.RELEASE]
at org.springframework.remoting.support.RemoteInvocationTraceInterceptor.invoke(RemoteInvocationTraceInterceptor.java:78) ~[spring-context-4.2.0.RELEASE.jar:4.2.0.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.2.0.RELEASE.jar:4.2.0.RELEASE]
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) ~[spring-aop-4.2.0.RELEASE.jar:4.2.0.RELEASE]
at com.sun.proxy.$Proxy371.getTocData(Unknown Source) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_121]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_121]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_121]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_121]
at org.springframework.remoting.support.RemoteInvocation.invoke(RemoteInvocation.java:212) ~[spring-context-4.2.0.RELEASE.jar:4.2.0.RELEASE]
at org.springframework.remoting.support.DefaultRemoteInvocationExecutor.invoke(DefaultRemoteInvocationExecutor.java:39) ~[spring-context-4.2.0.RELEASE.jar:4.2.0.RELEASE]
at org.springframework.remoting.support.RemoteInvocationBasedExporter.invoke(RemoteInvocationBasedExporter.java:78) ~[spring-context-4.2.0.RELEASE.jar:4.2.0.RELEASE]
at org.springframework.remoting.rmi.RmiBasedExporter.invoke(RmiBasedExporter.java:73) ~[spring-context-4.2.0.RELEASE.jar:4.2.0.RELEASE]
at org.springframework.remoting.rmi.RmiInvocationWrapper.invoke(RmiInvocationWrapper.java:74) ~[spring-context-4.2.0.RELEASE.jar:4.2.0.RELEASE]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_121]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_121]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_121]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_121]
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:346) ~[?:1.8.0_121]
at sun.rmi.transport.Transport$1.run(Transport.java:200) ~[?:1.8.0_121]
at sun.rmi.transport.Transport$1.run(Transport.java:197) ~[?:1.8.0_121]
at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_121]
at sun.rmi.transport.Transport.serviceCall(Transport.java:196) ~[?:1.8.0_121]
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568) ~[?:1.8.0_121]
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826) ~[?:1.8.0_121]
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683) ~[?:1.8.0_121]
at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_121]
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682) [?:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_121]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121]
此应用程序具有以下maven依赖项,并且我已检查了依赖树,并且没有包含其他版本的jackson-databind:
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.6.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.6.0</version>
</dependency>
这是一个在Jetty和Tomcat中运行的发布应用程序,我最近在Weblogic 12.1.3中使用它,但是在Weblogic 12.2.1中运行时我得到了上面的错误。我注意到Weblogic 12.2.1在C:\ Oracle \ Middleware \ Oracle_Home \ oui \ modules目录中包含了jackson-databind-2.4.3.jar,并且无法帮助但是想知道该版本是否可能被加载而不是我的2.6 .0版?关于什么可能导致这个问题的任何想法?这里的任何帮助将不胜感激。
答案 0 :(得分:2)
要使用您自己的依赖项而不是weblogic中的默认依赖项,您应该在weblogic.xml配置中添加您的依赖项首选项。 在WEB-INT / weblogic.xml中,添加以下内容:
<weblogic-web-app>
<context-root>/</context-root>
<container-descriptor>
<prefer-web-inf-classes>false</prefer-web-inf-classes>
<prefer-application-packages>
<package-name>org.slf4j.*</package-name>
<package-name>org.springframework.*</package-name>
<package-name>com.fasterxml.*</package-name>
</prefer-application-packages>
</container-descriptor>
<package-name>com.fasterxml.*</package-name>
将告诉weblogic更喜欢打包版本而不是预先安装的版本。
希望这可以帮到你。