[Java - Spring Boot] Spring Boot FAQs
Spring Boot FAQs
Cannot instantiate interface org.springframework.context.ApplicationListener : org.springframework.nativex.NativeListener
This is a symptom of a version mismatch in your Spring dependencies. Check and make the same version.
module jdk.compiler does not “opens com.sun.tools.javac.processing” to unnamed module
1 | Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field private com.sun.tools.javac.processing.JavacProcessingEnvironment$DiscoveredProcessors com.sun.tools.javac.processing.JavacProcessingEnvironment.discoveredProcs accessible: module jdk.compiler does not "opens com.sun.tools.javac.processing" to unnamed module @5da6b062 |
Make lombok
version to match Spring Boot version.
1 | // build.gradle |
error: package org.junit.jupiter.api does not exist import org.junit.jupiter.api.Test;
Add org.junit.jupiter:junit-jupiter-api
to fix that issue.
1 | dependencies { |
javax.management.InstanceNotFoundException: org.springframework.boot:type=Admin,name=SpringApplication
Unchecking Enable JMX Agent
on Edit Configuration
window helped me getting rid of the error on IntelliJ
.
This is normal and nothing to be worried about.
You can see this exception when the log level is in TRACE
Or DEGUG
. There is always some time lag between RMI TCP server start and spring boot tomcat start up . RMI TCP will start first and it will try to find SpringApplication Insatance which is started latter. till that time RMI TCP server will poll to find this SpringApplication instance .Once it finds SpringApplication instance this error is gone and Auto Configuration of spring boot starts .
Disable CONDITIONS EVALUATION REPORT
1 | 2022-01-15 05:59:28.088 DEBUG 1 --- [ main] ConditionEvaluationReportLoggingListener : |
Set logging.level.org.springframework.boot.autoconfigure
to error
to disable the ConditionEvaluationReportLogging.
1 | # application.properties |
References
[1] Spring Boot - https://spring.io/projects/spring-boot
[2] Spring | Spring Quickstart Guide - https://spring.io/quickstart