Currently we're having an issue related to SpringBoot. When we compile and run the application we're getting the following error. Somehow this error seems to be related to the axon framework:
"error":"\n\njava.lang.NoClassDefFoundError:
org.springframework.boot.configurationprocessor.json.JSONException\n\tat
java.base/java.lang.Class.getDeclaredMethods(Unknown Source)\n\tat
org.axonframework.common.ReflectionUtils.addMethodsOnDeclaredInterfaces(ReflectionUtils.java:311)\n\tat
org.axonframework.common.ReflectionUtils.methodsOf(ReflectionUtils.java:245)\n\tat
org.axonframework.spring.config.SpringAxonAutoConfigurer.lambda$registerEventHandlerRegistrar$14(SpringAxonAutoConfigurer.java:265)\n\tat
org.axonframework.spring.config.SpringAxonAutoConfigurer$$Lambda$559/0x00000000a8edee00.accept(Unknown Source)\n\tat
java.base/java.util.Iterator.forEachRemaining(Unknown Source)\n\tat
org.axonframework.spring.config.SpringAxonAutoConfigurer.registerEventHandlerRegistrar(SpringAxonAutoConfigurer.java:259)\n\tat
org.axonframework.spring.config.SpringAxonAutoConfigurer.registerBeanDefinitions(SpringAxonAutoConfigurer.java:225)\n\tat
org.springframework.context.annotation.ImportBeanDefinitionRegistrar.registerBeanDefinitions(ImportBeanDefinitionRegistrar.java:86)\n\tat
org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.lambda$loadBeanDefinitionsFromRegistrars$1(ConfigurationClassBeanDefinitionReader.java:396)\n\tat
org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader$$Lambda$353/0x00000000a8bf3980.accept(Unknown Source)\n\tat
java.base/java.util.LinkedHashMap.forEach(Unknown Source)\n\tat
org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsFromRegistrars(ConfigurationClassBeanDefinitionReader.java:395)\n\tat
org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:157)\n\tat
org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:129)\n\tat
org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:343)\n\tat
org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:247)\n\tat
org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:311)\n\tat
org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:112)\n\tat
org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:746)\n\tat
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:564)\n\tat
org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:147)\n\tat
org.springframework.boot.SpringApplication.refresh(SpringApplication.java:734)\n\tat
org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408)\n\tat
org.springframework.boot.SpringApplication.run(SpringApplication.java:308)\n\tat
org.springframework.boot.SpringApplication.run(SpringApplication.java:1306)\n\tat
org.springframework.boot.SpringApplication.run(SpringApplication.java:1295)\n\tat
sa.jawwy.microservices.inboxcommunication.application.InboxCommunicationApplication.main(InboxCommunicationApplication.java:17)\n\tat
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)\n\tat
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)\n\tat
java.base/java.lang.reflect.Method.invoke(Unknown Source)\n\tat
org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)\n\tat
org.springframework.boot.loader.Launcher.launch(Launcher.java:108)\n\tat
org.springframework.boot.loader.Launcher.launch(Launcher.java:58)\n\tat
org.springframework.boot.loader.PropertiesLauncher.main(PropertiesLauncher.java:467)\n
Caused by: java.lang.ClassNotFoundException: org.springframework.boot.configurationprocessor.json.JSONException\n\tat
java.base/java.net.URLClassLoader.findClass(Unknown Source)\n\tat
java.base/java.lang.ClassLoader.loadClassHelper(Unknown Source)\n\tat
java.base/java.lang.ClassLoader.loadClass(Unknown Source)\n\tat
org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:151)\n\tat
java.base/java.lang.ClassLoader.loadClass(Unknown Source)\n\tat
java.base/java.lang.Class.getDeclaredMethodsImpl(Native Method)\n\t... 36 common frames omitted\n\n"}
The Spring boot version we are currently using is 2.7.0 whereas axon is on version 4.4.
Anyone got any ideas?
JSONExceptioncannot be found under your maven libraries or dependencies ! Can you check if axon 4.4 has that class ? Or check if you have more than one version of the same dependency where in one picked up doesn't have that class