hazelcast – java. lang.NoSuchMethodError:com. google. common. util. concurrent. MoreExecutors. sameThreadExecutor
•
Java
Try: mancenter-3.1 3. When war is deployed to my Weblogic 12, I receive the following exception
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 would be appreciated
thank you.
Solution
Check your classpath to see what version of guava is used in your war This error indicates that the version of the guava jar found at runtime does not match the version used at compile time
Sounds very similar:
Are Guava-11.0. 2.jar conflicting with com. google. common_ 1.0. 0.0_ 0-6. jar?
Weblogic Guava issue when deploying application
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码