【报错】项目启动部署时报错:java.lang.NoSuchMethodError

报错:

=====================================================================================================

项目启动部署报错:

java.lang.NoSuchMethodError: org.springframework.util.ReflectionUtils.doWithLocalFields(Ljava/lang/Class;Lorg/springframework/util/ReflectionUtils$FieldCallback;)V
    at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.buildPersistenceMetadata(PersistenceAnnotationBeanPostProcessor.java:418)
    at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findPersistenceMetadata(PersistenceAnnotationBeanPostProcessor.java:397)
    at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(PersistenceAnnotationBeanPostProcessor.java:333)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:872)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:495)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)

只粘贴了部分错误在这里。

错误具体是什么,不重要,关键是这类型问题

java.lang.NoSuchMethodError

怎么解决才是最关键的问题!!!

分析:

==========================================================================================

海量的帖子/文章中都声明了这个问题的根源所在。

不是调用这个类,类中方法不存在;

就是这个方法在多个类中都有;

翻来覆去就是架包不匹配啦,版本不一致啦,冲突啦,啦啦啦乱七八糟的。好吧,怎么解决呢?

解决:

==========================================================================================

①不管你用的什么IDE,无论ecplise还是myecplise又或者idea。在解决这个问题之前,你需要懂得一件事,就是会在项目启动前,配置JVM参数。

参考:http://www.cnblogs.com/sxdcgaq8080/p/8022096.html一看就懂了。

②添加一个VM参数

-XX:+TraceClassLoading

③保存后重启项目

时间: 2024-10-10 01:23:00

【报错】项目启动部署时报错:java.lang.NoSuchMethodError的相关文章

项目启动部署时报错:java.lang.NoSuchMethodError

报错: ===================================================================================================== 项目启动部署报错: java.lang.NoSuchMethodError: org.springframework.util.ReflectionUtils.doWithLocalFields(Ljava/lang/Class;Lorg/springframework/util/Ref

电信项目遇到的问题----->>><2> java.lang.NoSuchMethodError问题处理

这次遇到的问题仍然是jar包冲突遇到的问题,导致jar包里的类冲突以至于方法报错,java.lang.NoSuchMethodError. 解决办法也开始逐个排查jar包,反编译jar包里的内容和其他的jar包比对.这是眼都花了.如果有maven就没这么多事了,但是 又是个线上的项目,迁移到maven不能保证不会出什么幺蛾子,就只能将就这,就只能将就者逐渐的迁移. 后来想java里有输出该类所在所在jar包路径的方法. String className = request.getParamete

求助:scala的json4s把JValue转为对象时报错 java.lang.NoSuchMethodError: scala.Predef$.$conforms()Lscala/Predef$$less$colon$less;

测试代码:import org.json4s._import org.json4s.JsonDSL._import org.json4s.jackson.JsonMethods._case class Winner(id: Long, numbers: List[Int])object Test extends App{ val winner = Winner(23, List(2, 45, 34, 23, 3, 5))  //Winner转json val json = ("id"

tomcat7 启动项目报错 java.lang.NoSuchMethodError: javax.servlet.ServletContext.getSessionCookieConfig()

JDK版本:jdk1.8.0_77 Tomcat 版本:apache-tomcat-7.0.47 异常重现步骤: 1.完成项目部署 2.启动Tomcat 异常头部信息:java.lang.NoSuchMethodError: javax.servlet.ServletContext.getSessionCookieConfig() 解决方案: 把apache-tomcat-7.0.47/lib/servlet-api.jar 拷贝到$JAVA_HOME/jre/lib/ext目录下去 参考博文:

android启动时报错Unable to instantiate application xxxx:java.lang.NullPointerException

如果程序已经运行,再安装到手机的时候总是报以下错误.而且是在打开特定的Activity的情况下才会报错. 06-26 09:45:16.971: E/AndroidRuntime(29733): java.lang.RuntimeException: Unable to instantiate application com.css.promotiontool.ui.CSSAppliction: java.lang.NullPointerException06-26 09:45:16.971:

【原】tomcat 7 启动报错:java.lang.NoSuchMethodError: javax.servlet.ServletContext.getSessionCookieConfig()Ljavax/servlet/SessionCookieConfig的解决

现象: tomcat 7 启动报错:java.lang.NoSuchMethodError: javax.servlet.ServletContext.getSessionCookieConfig()Ljavax/servlet/SessionCookieConfig 解决: 把tomcat目录下的lib/servlet-api.jar文件拷贝到$JAVA_HOME/jre/lib/ext目录下,再启动tomcat问题解决

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

MyEclipse 启动tomcat时报错:Cannot change deployment state from ERROR to REDEPLOYING.ds

myeclipse 启动tomcat时报错:Cannot change deployment state from ERROR to REDEPLOYING.ds - 刘琦的专栏 - 博客频道 - CSDN.NET http://blog.csdn.net/u012922219/article/details/42869361   错误 : 无改将部署状态从"错误"变成"重新部署"状态. 解决办法: 右击"项目名" –> MyEclipse

【原创】大叔经验分享(57)hue启动coordinator时报错

hue启动coordinator时报错,页面返回undefinied错误框: 后台日志报错: runcpserver.log [13/May/2019 04:34:55 -0700] middleware INFO Processing exception: 'NoneType' object has no attribute 'is_superuser': Traceback (most recent call last): File "/opt/cloudera/parcels/CDH-5.