java.lang.NoSuchMethodError:com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor [英] java.lang.NoSuchMethodError: com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor

查看:416
本文介绍了java.lang.NoSuchMethodError:com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当尝试将:mancenter-3.1.3.war部署到我的Weblogic 12中时,出现以下异常.

I am getting the following exception when trying to deploy the :mancenter-3.1.3.war in to my Weblogic 12.

fullstacktrace是:

The fullstacktrace is :

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'managementCenterContext' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'centralManager' while setting bean property 'centralManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'centralManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.hazelcast.webmonitor.service.CentralManager]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor()Lcom/google/common/util/concurrent/ListeningExecutorService;
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:329)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1387)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1128)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
    Truncated. see log file for complete stacktrace
Caused By: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'centralManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.hazelcast.webmonitor.service.CentralManager]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor()Lcom/google/common/util/concurrent/ListeningExecutorService;
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1007)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:953)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
    Truncated. see log file for complete stacktrace
Caused By: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.hazelcast.webmonitor.service.CentralManager]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor()Lcom/google/common/util/concurrent/ListeningExecutorService;
    at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:163)
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1000)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:953)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487)
    Truncated. see log file for complete stacktrace
Caused By: java.lang.NoSuchMethodError: com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor()Lcom/google/common/util/concurrent/ListeningExecutorService;
    at com.google.common.cache.LocalCache.<clinit>(LocalCache.java:155)
    at com.google.common.cache.LocalCache$LocalManualCache.<init>(LocalCache.java:4750)
    at com.google.common.cache.LocalCache$LocalManualCache.<init>(LocalCache.java:4745)
    at com.google.common.cache.CacheBuilder.build(CacheBuilder.java:757)
    at com.hazelcast.webmonitor.service.CentralManager.<init>(CentralManager.java:63)
    Truncated. see log file for complete stacktrace

我们非常感谢您的帮助.

Any help is highly appreciated.

谢谢.

推荐答案

检查您的类路径,并查看您的WAR正在使用哪个版本的番石榴.该错误表明在运行时找到的guava jar版本与编译时使用的版本不匹配.

Check your classpath and see what version of guava is being used by your WAR. The error suggests that the version of guava jar being found at runtime does not match the version that was used at compile time.

声音非常类似于:

部署应用程序时出现Weblogic Guava问题

这篇关于java.lang.NoSuchMethodError:com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆