java.lang.NoSuchMethodError: com.google.common.hash.HashFunction.hashInt(I)Lcom/google/common/hash/HashCode; 解决办法

今天在java 上运行spark查询的时候出现一个问题:

java.lang.NoSuchMethodError: com.google.common.hash.HashFunction.hashInt(I)Lcom/google/common/hash/HashCode;

后google 了一下找到了一篇相类似的问题

http://mail-archives.us.apache.org/mod_mbox/spark-user/201412.mbox/%3CD0A4C915.6E0D%[email protected]%3E

里面的一句话就可以解决这个问题:

dump your classpath, looks like you have multiple versions of guava jars in the classpath.后到自己的jar 文件下确实是发现了多个版本的guava ,删掉其中较低的一个版本即可解决
时间: 2024-08-07 04:30:57

java.lang.NoSuchMethodError: com.google.common.hash.HashFunction.hashInt(I)Lcom/google/common/hash/HashCode; 解决办法的相关文章

记一次部署时报java.lang.NoSuchMethodError:javax.persistence.spi.PersistenceUnitInfo.getValidationMode()Ljavax / persistence / ValidationMode;的解决办法

楼主在部署war包的时候,本地启动不报错,服务器商报如下问题: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Invocation of init method failed; nested excepti

Caused by: java.lang.ClassCastException: org.springframework.web.SpringServletContainerInitializer cannot be cast to javax.servlet.ServletContainerInitializer错误解决办法

严重: Failed to initialize end point associated with ProtocolHandler ["http-bio-8080"] java.net.BindException: Address already in use <null>:8080 at org.apache.tomcat.util.net.JIoEndpoint.bind(JIoEndpoint.java:407) at org.apache.tomcat.util.

记一次使用修改字节码的方法解决java.lang.NoSuchMethodError

接兔兔国际sdk ane 充值界面选择兔币充值就会闪退, 观察logcat ,NoSuchMethodError: com.tutu.common.a.b.getContext 原来是因为没有方法找不到 04-19 10:10:54.224: E/AndroidRuntime(20315): FATAL EXCEPTION: main 04-19 10:10:54.224: E/AndroidRuntime(20315): Process: com.tutusdk.global.demo, PI

spring boot配置spring-data-jpa的时候报错CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is java.lang.NoSuchMethodError

F:\java\jdk8\jdk1.8.0_211\bin\java.exe -ea -Didea.test.cyclic.buffer.size=1048576 "-javaagent:D:\软件\IntelliJ IDEA 2019.2.2\lib\idea_rt.jar=7513:D:\软件\IntelliJ IDEA 2019.2.2\bin" -Dfile.encoding=UTF-8 -classpath "D:\软件\IntelliJ IDEA 2019.2.2

Spring Boot常见问题(二)Unable to start embedded container; nested exception is java.lang.NoSuchMethodError: org.apache.tomcat.util.scan.StandardJarScanner.setJarScanFilter(Lorg/apache/tomcat/JarScanFilter;

问题描述:通过Spring Boot官方提供的方式,写出如下HelloWorld代码. @Controller @EnableAutoConfiguration public class HelloWorld { @RequestMapping("/wu") @ResponseBody String home() { return "Hello World!"; } public static void main(String[] args) throws Exce

dubbox部署到jdk1.7环境,启动:java.lang.NoSuchMethodError: java.util.concurrent.ConcurrentHashMap.keySet()

本地用jdk1.8编译的服务提供端war包,部署到环境报错了: INFO: Initializing Spring root WebApplicationContext [16/08/17 05:14:54:054 CST] localhost-startStop-1 INFO context.ContextLoader: Root WebApplicationContext: initialization started [16/08/17 05:14:54:054 CST] localhos

使用selenium遇到java.lang.NoSuchMethodError: org.apache.xpath.XPathContext,排查

处试selenium webdriver,运行小程序,抛如下错误: java.lang.NoSuchMethodError: org.apache.xpath.XPathContext.<init>(Z)V at org.apache.xpath.jaxp.XPathExpressionImpl.eval(XPathExpressionImpl.java:115) at org.apache.xpath.jaxp.XPathExpressionImpl.eval(XPathExpression

Maven 多模块引用版本的问题 java.lang.NoSuchMethodError

环境:Junit测试用例 java.lang.NoSuchMethodError 很明显的错误,肯定是jar版本的问题 前提 Maven 打包并没有这个的问题,估计是做了优化处理 原测试代码 @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = {"classpath*:/META-INF/spring/root_test.xml"}) @ActiveProfiles("produc

spring Boot启动报错Initialization of bean failed; nested exception is java.lang.NoSuchMethodError: org.springframework.core.annotation.AnnotatedElementUtils.getAnnotationAttributes

spring boot 启动报错如下 org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.autoconfigure