restartedMain Unresolved compilation problem

Spring boot application loads all the beans using bean factory. If any error occurred while invoking the java classes, this exception is thrownExceptionException in thread "restartedMain" java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)…

BeanInstantiationException: Failed to instantiate

The spring boot exception BeanInstantiationException: Failed to instantiate happens when the bean can’t instantiate when auto-wiring in another bean. If the bean is instantiated in another bean, the bean either…

BeanCreationException: Error creating bean with name

The spring boot exception org.springframework.beans.factory.BeanCreationException: Error creating bean with name happens when a problem occurs when the BeanFactory creates a bean. If the BeanFactory encounters an error when creating a…

Missing URI template variable for method parameter of type String

The spring boot exception Missing URI template variable for method parameter of type String occurs when the path variable name in the @RequestMapping annotation is different from the @PathVariable name. The name of the path variable should be the same in @RequestMapping and @PathVariable. If there is some mismatch, the exception Missing URI template variable for method parameter of type String would be thrown.The path variable is added as part of the request url in the @RequestMapping annotation. The path variable is covered by curly brackets. The path variable is added to the method parameter with a @PathVariable annotation. The name of the method parameter and the name of the path variable should be the same to avoid an exception Missing URI template variable ” for method parameter of type String.ExceptionThe exception Missing URI template variable for method parameter of type String will be shown in the browser as below.Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this as…

Table “BATCH_JOB_INSTANCE” not found; SQL statement – Spring Boot Batch

org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [SELECT JOB_INSTANCE_ID, JOB_NAME from BATCH_JOB_INSTANCE where JOB_NAME = ? and JOB_KEY = ?]; nested exception is org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "BATCH_JOB_INSTANCE" not found; SQL statement: SELECT JOB_INSTANCE_ID,…

JSON String to Java Object Array using JSON-B

Converting JSON String to Java Object Array is performed using JSON-B in spring boot application. The conversion JSON String to Object in spring boot is explained in detail in the…