java.lang.ExceptionInInitializerError

Spring JIRA | Mark Paluch | 2 months ago
  1. 0

    Class: https://github.com/spring-projects/spring-integration/blob/master/spring-integration-mongodb/src/main/java/org/springframework/integration/mongodb/store/MongoDbMessageStore.java#L841 {code:java} private static final class MessageWrapper { @SuppressWarnings("unused") private int sequence; public void setSequence(int sequence) { this.sequence = sequence; } } {code} {code} java.lang.ExceptionInInitializerError: java.lang.ExceptionInInitializerError java.lang.ExceptionInInitializerError at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.springframework.data.mapping.model.ClassGeneratingPropertyAccessorFactory.getPropertyAccessor(ClassGeneratingPropertyAccessorFactory.java:84) at org.springframework.data.mapping.model.BasicPersistentEntity.getPropertyAccessor(BasicPersistentEntity.java:417) at org.springframework.data.mongodb.core.MongoTemplate.assertUpdateableIdIfNotSet(MongoTemplate.java:1294) at org.springframework.data.mongodb.core.MongoTemplate.doInsert(MongoTemplate.java:843) at org.springframework.data.mongodb.core.MongoTemplate.insert(MongoTemplate.java:791) at org.springframework.integration.mongodb.store.MongoDbMessageStore.addMessageDocument(MongoDbMessageStore.java:216) at org.springframework.integration.mongodb.store.MongoDbMessageStore.addMessagesToGroup(MongoDbMessageStore.java:291) at org.springframework.integration.store.AbstractMessageGroupStore.addMessageToGroup(AbstractMessageGroupStore.java:209) at org.springframework.integration.handler.DelayHandler.releaseMessageAfterDelay(DelayHandler.java:315) at org.springframework.integration.handler.DelayHandler.handleRequestMessage(DelayHandler.java:243) at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:109) at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:127) at org.springframework.integration.dispatcher.AbstractDispatcher.tryOptimizedDispatch(AbstractDispatcher.java:116) at org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:148) at org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:121) at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:77) at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:423) at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:373) at org.springframework.integration.mongodb.store.DelayerHandlerRescheduleIntegrationTests.testDelayerHandlerRescheduleWithMongoDbMessageStore(DelayerHandlerRescheduleIntegrationTests.java:82) at org.springframework.integration.mongodb.store.DelayerHandlerRescheduleIntegrationTests.testWithMongoDbMessageStore(DelayerHandlerRescheduleIntegrationTests.java:62) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.springframework.integration.mongodb.rules.MongoDbAvailableRule$1.evaluate(MongoDbAvailableRule.java:59) at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55) at org.junit.rules.RunRules.evaluate(RunRules.java:20) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.runTestClass(JUnitTestClassExecuter.java:114) at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.execute(JUnitTestClassExecuter.java:57) at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassProcessor.processTestClass(JUnitTestClassProcessor.java:66) at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:51) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35) at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32) at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93) at com.sun.proxy.$Proxy2.processTestClass(Unknown Source) at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:109) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35) at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:377) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54) at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.NoSuchMethodException: org.springframework.integration.mongodb.store.MongoDbMessageStore$MessageWrapper.setSequence(java.lang.Integer) at java.lang.Class.getDeclaredMethod(Class.java:2130) at org.springframework.integration.mongodb.store.MongoDbMessageStore$MessageWrapper_Accessor_lxoqe3.<clinit>(Unknown Source) ... 70 more {code} *Update:* Generated property accessors initialize field and property accessors as far as possible upon class initialization. Although setter initialization is not required for this case, it revealed a bug in setter lookup. The call to {{getDeclaredMethod}} used {{java.lang.Integer}} as argument type instead of {{java.lang.Integer#TYPE}}. The root cause is that a setter lookup uses wrapped types instead of the primitive type for {{getDeclaredMethod}} lookup.

    Spring JIRA | 2 months ago | Mark Paluch
    java.lang.ExceptionInInitializerError
  2. 0

    search-guard on ES 1.7

    GitHub | 1 year ago | maoo
    java.lang.NoSuchMethodException: org.elasticsearch.search.SearchService.setCallback(com.floragunn.searchguard.filter.level.SearchContextCallback)
  3. 0

    Cannot Enable searchguard on ES 1.6.2

    GitHub | 1 year ago | sdemircan
    java.lang.NoSuchMethodException: org.elasticsearch.search.SearchService.setCallback(com.floragunn.searchguard.filter.level.SearchContextCallback)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Rest EJB Project not deploying on Wildfly 8.0

    Stack Overflow | 1 year ago | Ashish451
    com.google.common.util.concurrent.ExecutionError: java.lang.ExceptionInInitializerError
  6. 0

    GitHub comment 169#141847488

    GitHub | 1 year ago | brcolow
    java.lang.NoSuchMethodException: org.slf4j.impl.SimpleLogger.setLevel(ch.qos.logback.classic.Level)
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.NoSuchMethodException

    org.springframework.integration.mongodb.store.MongoDbMessageStore$MessageWrapper.setSequence(java.lang.Integer)

    at java.lang.Class.getDeclaredMethod()
  2. Java RT
    Class.getDeclaredMethod
    1. java.lang.Class.getDeclaredMethod(Class.java:2130)
    1 frame
  3. org.springframework.integration
    MongoDbMessageStore$MessageWrapper_Accessor_lxoqe3.<clinit>
    1. org.springframework.integration.mongodb.store.MongoDbMessageStore$MessageWrapper_Accessor_lxoqe3.<clinit>(Unknown Source)
    1 frame
  4. Java RT
    Constructor.newInstance
    1. sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    2. sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    3. sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    4. java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    4 frames
  5. Spring Data Core
    BasicPersistentEntity.getPropertyAccessor
    1. org.springframework.data.mapping.model.ClassGeneratingPropertyAccessorFactory.getPropertyAccessor(ClassGeneratingPropertyAccessorFactory.java:84)
    2. org.springframework.data.mapping.model.BasicPersistentEntity.getPropertyAccessor(BasicPersistentEntity.java:417)
    2 frames
  6. Spring Data MongoDB - Core
    MongoTemplate.insert
    1. org.springframework.data.mongodb.core.MongoTemplate.assertUpdateableIdIfNotSet(MongoTemplate.java:1294)
    2. org.springframework.data.mongodb.core.MongoTemplate.doInsert(MongoTemplate.java:843)
    3. org.springframework.data.mongodb.core.MongoTemplate.insert(MongoTemplate.java:791)
    3 frames
  7. org.springframework.integration
    MongoDbMessageStore.addMessagesToGroup
    1. org.springframework.integration.mongodb.store.MongoDbMessageStore.addMessageDocument(MongoDbMessageStore.java:216)
    2. org.springframework.integration.mongodb.store.MongoDbMessageStore.addMessagesToGroup(MongoDbMessageStore.java:291)
    2 frames
  8. Spring Integration Core
    AbstractMessageChannel.send
    1. org.springframework.integration.store.AbstractMessageGroupStore.addMessageToGroup(AbstractMessageGroupStore.java:209)
    2. org.springframework.integration.handler.DelayHandler.releaseMessageAfterDelay(DelayHandler.java:315)
    3. org.springframework.integration.handler.DelayHandler.handleRequestMessage(DelayHandler.java:243)
    4. org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:109)
    5. org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:127)
    6. org.springframework.integration.dispatcher.AbstractDispatcher.tryOptimizedDispatch(AbstractDispatcher.java:116)
    7. org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:148)
    8. org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:121)
    9. org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:77)
    10. org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:423)
    11. org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:373)
    11 frames
  9. org.springframework.integration
    DelayerHandlerRescheduleIntegrationTests.testWithMongoDbMessageStore
    1. org.springframework.integration.mongodb.store.DelayerHandlerRescheduleIntegrationTests.testDelayerHandlerRescheduleWithMongoDbMessageStore(DelayerHandlerRescheduleIntegrationTests.java:82)
    2. org.springframework.integration.mongodb.store.DelayerHandlerRescheduleIntegrationTests.testWithMongoDbMessageStore(DelayerHandlerRescheduleIntegrationTests.java:62)
    2 frames
  10. 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
  11. JUnit
    InvokeMethod.evaluate
    1. org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
    2. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    3. org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
    4. org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    4 frames
  12. org.springframework.integration
    MongoDbAvailableRule$1.evaluate
    1. org.springframework.integration.mongodb.rules.MongoDbAvailableRule$1.evaluate(MongoDbAvailableRule.java:59)
    1 frame
  13. JUnit
    ParentRunner.run
    1. org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
    2. org.junit.rules.RunRules.evaluate(RunRules.java:20)
    3. org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
    4. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
    5. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
    6. org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    7. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    8. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    9. org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    10. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    11. org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    11 frames
  14. org.gradle.api
    SuiteTestClassProcessor.processTestClass
    1. org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.runTestClass(JUnitTestClassExecuter.java:114)
    2. org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.execute(JUnitTestClassExecuter.java:57)
    3. org.gradle.api.internal.tasks.testing.junit.JUnitTestClassProcessor.processTestClass(JUnitTestClassProcessor.java:66)
    4. org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:51)
    4 frames
  15. 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
  16. org.gradle.internal
    ProxyDispatchAdapter$DispatchingInvocationHandler.invoke
    1. org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
    2. org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
    3. org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32)
    4. org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
    4 frames
  17. com.sun.proxy
    $Proxy2.processTestClass
    1. com.sun.proxy.$Proxy2.processTestClass(Unknown Source)
    1 frame
  18. org.gradle.api
    TestWorker.processTestClass
    1. org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:109)
    1 frame
  19. 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
  20. org.gradle.internal
    MessageHub$Handler.run
    1. org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
    2. org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
    3. org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:377)
    3 frames
  21. Gradle Core
    StoppableExecutorImpl$1.run
    1. org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
    2. org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
    2 frames
  22. Java RT
    Thread.run
    1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    3. java.lang.Thread.run(Thread.java:745)
    3 frames