java.lang.NoSuchMethodError: java.lang.Class.getDeclaredAnnotation(Ljava/lang/Class;)Ljava/lang/annotation/Annotation;

GitHub | v4umak | 7 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    Cannot get schema for POJO (java)

    GitHub | 7 months ago | v4umak
    java.lang.NoSuchMethodError: java.lang.Class.getDeclaredAnnotation(Ljava/lang/Class;)Ljava/lang/annotation/Annotation;

    Root Cause Analysis

    1. java.lang.NoSuchMethodError

      java.lang.Class.getDeclaredAnnotation(Ljava/lang/Class;)Ljava/lang/annotation/Annotation;

      at com.kjetland.jackson.jsonSchema.JsonSchemaGenerator$MyJsonFormatVisitorWrapper.expectObjectFormat()
    2. com.kjetland.jackson
      JsonSchemaGenerator$MyJsonFormatVisitorWrapper.expectObjectFormat
      1. com.kjetland.jackson.jsonSchema.JsonSchemaGenerator$MyJsonFormatVisitorWrapper.expectObjectFormat(JsonSchemaGenerator.scala:288)
      1 frame
    3. Jackson
      ObjectMapper.acceptJsonFormatVisitor
      1. com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.acceptJsonFormatVisitor(BeanSerializerBase.java:809)
      2. com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.acceptJsonFormatVisitor(DefaultSerializerProvider.java:580)
      3. com.fasterxml.jackson.databind.ObjectMapper.acceptJsonFormatVisitor(ObjectMapper.java:3641)
      4. com.fasterxml.jackson.databind.ObjectMapper.acceptJsonFormatVisitor(ObjectMapper.java:3620)
      4 frames
    4. com.kjetland.jackson
      JsonSchemaGenerator.generateJsonSchema
      1. com.kjetland.jackson.jsonSchema.JsonSchemaGenerator.generateJsonSchema(JsonSchemaGenerator.scala:433)
      1 frame
    5. ru.infon.mas
      JsonSchemaValidatorTest.simple
      1. ru.infon.mas.protocol.JsonSchemaValidatorTest.simple(JsonSchemaValidatorTest.java:15)
      1 frame
    6. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:606)
      4 frames
    7. JUnit
      JUnitCore.run
      1. org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
      2. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      3. org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
      4. org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      5. org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
      6. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
      7. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
      8. org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
      9. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
      10. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
      11. org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
      12. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
      13. org.junit.runners.ParentRunner.run(ParentRunner.java:309)
      14. org.junit.runner.JUnitCore.run(JUnitCore.java:160)
      14 frames
    8. IntelliJ junit4 module
      JUnit4IdeaTestRunner.startRunnerWithArgs
      1. com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:119)
      2. com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42)
      2 frames
    9. IDEA
      JUnitStarter.main
      1. com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
      2. com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
      2 frames
    10. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:606)
      4 frames