人在江湖

            BlogJava :: 首頁 :: 聯系 :: 聚合  :: 管理
            82 Posts :: 10 Stories :: 169 Comments :: 0 Trackbacks
          維基百科的創始人說過一個理論,如果一個事物在google上查不到,那基本上就說明這世界上沒這個事物。我今天偏偏需要了一個google都搜不到的exception. 
          我在寫一個用spring boot的應用,需要了這個exception:
          NoSuchMethodError: findMergedAnnotationAttributes(Ljava/lang/reflect/AnnotatedElement;Ljava/lang/String;ZZ)Lorg/springframework/core/annotation/AnnotationAttributes;
          at org.springframework.test.util.MetaAnnotationUtils$AnnotationDescriptor.<init>(MetaAnnotationUtils.java:290)
          at org.springframework.test.util.MetaAnnotationUtils$UntypedAnnotationDescriptor.<init>(MetaAnnotationUtils.java:365)
          at org.springframework.test.util.MetaAnnotationUtils$UntypedAnnotationDescriptor.<init>(MetaAnnotationUtils.java:360)
          at org.springframework.test.util.MetaAnnotationUtils.findAnnotationDescriptorForTypes(MetaAnnotationUtils.java:191)
          at org.springframework.test.util.MetaAnnotationUtils.findAnnotationDescriptorForTypes(MetaAnnotationUtils.java:208)
          at org.springframework.test.util.MetaAnnotationUtils.findAnnotationDescriptorForTypes(MetaAnnotationUtils.java:166)
          at org.springframework.test.context.support.AbstractTestContextBootstrapper.buildMergedContextConfiguration(AbstractTestContextBootstrapper.java:274)
          at org.springframework.test.context.support.AbstractTestContextBootstrapper.buildTestContext(AbstractTestContextBootstrapper.java:110)
          at org.springframework.test.context.TestContextManager.<init>(TestContextManager.java:120)
          at org.springframework.test.context.TestContextManager.<init>(TestContextManager.java:105)
          at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTestContextManager(SpringJUnit4ClassRunner.java:143)
          at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.<init>(SpringJUnit4ClassRunner.java:134)
          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
          at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
          at java.lang.reflect.Constructor.newInstance(Unknown Source)
          at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104)
          at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86)
          at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
          at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
          at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
          at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:33)
          at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.<init>(JUnit4TestReference.java:33)
          at org.eclipse.jdt.internal.junit4.runner.JUnit4TestClassReference.<init>(JUnit4TestClassReference.java:25)
          at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:48)
          at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:38)
          at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:444)
          at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
          at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
          at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)

          The solution is: in the pom.xml, instead of using 
          <parent>
                  <groupId>org.springframework.boot</groupId>
                  <artifactId>spring-boot-starter-parent</artifactId>
                  <version>1.3.0.BUILD-SNAPSHOT</version>
          </parent>

          Use a specific version:
              <parent>
                  <groupId>org.springframework.boot</groupId>
                  <artifactId>spring-boot-starter-parent</artifactId>
                  <version>1.2.4.RELEASE</version>
              </parent>
          posted on 2015-06-21 09:08 人在江湖 閱讀(9187) 評論(0)  編輯  收藏 所屬分類: java
          主站蜘蛛池模板: 珠海市| 余庆县| 长丰县| 湟源县| 揭阳市| 潮安县| 固始县| 龙井市| 荔浦县| 镇平县| 延寿县| 内丘县| 金沙县| 呼伦贝尔市| 宾阳县| 大兴区| 安化县| 阜平县| 商城县| 洛隆县| 阿拉善左旗| 普宁市| 广河县| 邯郸市| 济阳县| 广东省| 炎陵县| 康马县| 拉孜县| 纳雍县| 同心县| 大方县| 綦江县| 陆河县| 苍山县| 肥城市| 兴化市| 荃湾区| 衡南县| 漳州市| 屏东市|