问答详情
源自:4-8 DAO层单元测试编码和问题排查(上)

求解这个问题

java.lang.annotation.AnnotationFormatError: java.lang.IllegalArgumentException: Constant pool index out of bounds
    at sun.reflect.annotation.AnnotationParser.parseAnnotations(Unknown Source)
    at java.lang.Class.createAnnotationData(Unknown Source)
    at java.lang.Class.annotationData(Unknown Source)
    at java.lang.Class.getAnnotations(Unknown Source)
    at org.junit.runner.Description.createSuiteDescription(Description.java:123)
    at org.junit.internal.runners.ErrorReportingRunner.getDescription(ErrorReportingRunner.java:25)
    at org.eclipse.jdt.internal.junit4.runner.SubForestFilter.apply(SubForestFilter.java:41)
    at org.junit.internal.requests.FilterRequest.getRunner(FilterRequest.java:32)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createFilteredTest(JUnit4TestLoader.java:77)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:68)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:43)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:444)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: java.lang.IllegalArgumentException: Constant pool index out of bounds
    at sun.reflect.ConstantPool.getUTF8At0(Native Method)
    at sun.reflect.ConstantPool.getUTF8At(Unknown Source)
    at sun.reflect.annotation.AnnotationParser.parseAnnotation2(Unknown Source)
    at sun.reflect.annotation.AnnotationParser.parseAnnotations2(Unknown Source)
    ... 15 more

提问者:叶雪松 2017-03-25 21:43

个回答

  • 略有些霸气
    2017-03-26 16:45:52

    非法参数异常