java.lang.IllegalAccessError: tried to access field class com.foobar.commons.impl.MyClass.serialVersionUID from class com.foobar.commons.impl.MyClass$Access4JacksonDeserializerfb8b0dbb

GitHub | shankyty | 6 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Problem with afterburner module with new field added serialVersionUID

    GitHub | 6 months ago | shankyty
    java.lang.IllegalAccessError: tried to access field class com.foobar.commons.impl.MyClass.serialVersionUID from class com.foobar.commons.impl.MyClass$Access4JacksonDeserializerfb8b0dbb

    Root Cause Analysis

    1. java.lang.IllegalAccessError

      tried to access field class com.foobar.commons.impl.MyClass.serialVersionUID from class com.foobar.commons.impl.MyClass$Access4JacksonDeserializerfb8b0dbb

      at com.foobar.commons.impl.MyClass$Access4JacksonDeserializerfb8b0dbb.longField()
    2. com.foobar.commons
      MyClass$Access4JacksonDeserializerfb8b0dbb.longField
      1. com.foobar.commons.impl.MyClass$Access4JacksonDeserializerfb8b0dbb.longField(com/xxx/commons/impl/Myclass$Access4JacksonDeserializer.java)
      1 frame
    3. Jackson-module-Afterburner
      LongFieldPropertyWriter.serializeAsField
      1. com.fasterxml.jackson.module.afterburner.ser.LongFieldPropertyWriter.serializeAsField(LongFieldPropertyWriter.java:55)
      1 frame
    4. Jackson
      ObjectMapper.valueToTree
      1. com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:678)
      2. com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:157)
      3. com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:130)
      4. com.fasterxml.jackson.databind.ObjectMapper.writeValue(ObjectMapper.java:2436)
      5. com.fasterxml.jackson.databind.ObjectMapper.valueToTree(ObjectMapper.java:2568)
      5 frames
    5. com.foobar.module
      DynamicSerTest.ser_test
      1. com.foobar.module.DynamicSerTest.ser_test(DynamicSerTest.java:67)
      1 frame
    6. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:498)
      4 frames
    7. JUnit
      JUnit4ClassRunner.run
      1. org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
      2. org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
      3. org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
      4. org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
      5. org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
      6. org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
      7. org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.java:88)
      8. org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
      9. org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
      10. org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
      11. org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
      12. org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
      12 frames
    8. JUnit4 Provider
      JUnit4Provider.invoke
      1. org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
      2. org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
      3. org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
      3 frames
    9. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:498)
      4 frames
    10. SureFire
      ForkedBooter.main
      1. org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
      2. org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
      3. org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175)
      4. org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:107)
      5. org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68)
      5 frames