报错:
=====================================================================================================
项目启动部署报错:
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
③保存后重启项目