人在江湖

            BlogJava :: 首頁(yè) :: 聯(lián)系 :: 聚合  :: 管理
            82 Posts :: 10 Stories :: 169 Comments :: 0 Trackbacks
          維基百科的創(chuàng)始人說(shuō)過(guò)一個(gè)理論,如果一個(gè)事物在google上查不到,那基本上就說(shuō)明這世界上沒這個(gè)事物。我今天偏偏需要了一個(gè)google都搜不到的exception. 
          我在寫一個(gè)用spring boot的應(yīng)用,需要了這個(gè)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 人在江湖 閱讀(9195) 評(píng)論(0)  編輯  收藏 所屬分類: java
          主站蜘蛛池模板: 金寨县| 海盐县| 江永县| 曲松县| 邢台县| 滨州市| 宜黄县| 马尔康县| 东安县| 华阴市| 奇台县| 环江| 福海县| 乐都县| 盐源县| 德安县| 高清| 遵义市| 虎林市| 金秀| 广元市| 安陆市| 阿合奇县| 蒙山县| 高邮市| 剑河县| 来安县| 普宁市| 新巴尔虎右旗| 新安县| 龙里县| 建德市| 荔浦县| 定日县| 民乐县| 华蓥市| 息烽县| 江永县| 天门市| 靖宇县| 托克托县|