Programming Issues

Issues

Circular view path

The spring boot error Circular view path occurs when the request mapping url and the model view url are the same in a rest controller method and no ViewResolver is configured. Otherwise, circular view path []: would dispatch back to the current handler url occurs because the view path url

java.lang.IllegalStateException: Ambiguous mapping. Cannot map method

The spring boot exception IllegalStateException: Ambiguous mapping. Cannot map method occurs when two methods in the rest controller class are configured with the same request mapping url. Two methods in the rest controller class should not be configured using the same url. The exception will be shown as BeanCreationException: Error

AnnotationConfigApplicationContext has not been refreshed yet

In the spring boot web application development, you may need to use Application Context to handle loaded beans.The Application context contains all the references to the loaded beans. Spring boot provides a handle for the context of the application. If you use the application context, you may encounter an error

javax.json.bind.JsonbException: Can’t deserialize JSON array into: class com.yawintutor.Student

The error message “javax.json.bind.JsonbException: Can’t deserialize JSON array into: class com.yawintutor.Student” will be shown in the spring boot application if you attempt to convert json string to object java. We’ll see in this post about this exception and how this exception can be resolved. The program attempts to deserialize the

javax.json.bind.JsonbException: Cannot create instance of a class: class, No default constructor found.

For json binding api the default implementation is org.eclipse.yasson. The yasson code throws this exception javax.json.bind.JsonbException: Cannot create instance of a class: class com.yawintutor.Student, No default constructor found. if it can not construct a java bean class instance because no default constructor is available. The error is due to being

javax.json.bind.JsonbException: Can’t create instance

In the spring boot method, if a java object is created using a json string, the exception “javax.json.bind.JsonbException: Can’t create instance” will be thrown. Json binding is a standard that has been implemented for java as part of the JSR 367 standard. If the json binding api is unable to

JSON Binding provider org.eclipse.yasson.JsonBindingProvider not found

The exception “JSON Binding Provider org.eclipse.yasson.JsonBindingProvider not found” will be thrown at the startup of the application. Recently, JSON processing is supported in Java. JSON Binding API helps to process JSON and Java Objects. Here, we will see what this exception is. The JSON bind object is added to the

JndiDataSourceAutoConfiguration not loaded because did not find property

Auto configurations are one of the best features at spring boot. Spring boot supports auto-configured datasource. The credentials for the database are included in application.properties. Spring boot builds a datasource object dynamically from the configurations. If an error occurs in the initialization phase of the datasource, the error will be

BCryptPasswordEncoder Bad strength Spring Boot Security

In the spring boot security application, The error message “Exception in thread “main” java.lang.IllegalArgumentException: Bad strength” is seen when the application starts. The BCryptPasswordEncoder is throwing this exception as it cannot create and initialize the object. Here, we will see about this exception in this post. The spring boot security

BCryptPasswordEncoder – Empty encoded password Spring Boot Security

In spring boot security application, this error message “o.s.s.c.bcrypt.BCryptPasswordEncoder : Empty encoded password” is seen often. The user is not allowed to login to the application by security authentication failure. In this post, we will see about this warning message If users of the application attempt to login with a

Encoded password does not look like BCrypt Spring Boot Security

We’ll see a warning message “o.s.s.c.bcrypt.BCryptPasswordEncoder : Encoded password does not look like BCrypt” in the spring boot console logs. We’ll see a pattern that the user has not been able to access whatever the password entered. We’re going to see this warning message in the post. If users of

Can’t login to my custom login page in Spring Boot Security

In the spring boot security application, when we try to login to the page. It redirects back to the login page. It doesn’t matter how many times we log in, it won’t allow us to go to the next page. In this post, we’re going to see this strange behavior,

Logout is not working in Spring Boot Security CSRF enabled

IIn the spring boot application, if the security module is configured with CSRF – Cross-Site Request Forgery, all requests are verified for a CSRF attack. In this case, the logout link does not work. If the CSRF is disabled in the security configuration, the logout link will work without any

IllegalStateException: permitAll only works with HttpSecurity.authorizeRequests()

In spring boot application, The exception “IllegalStateException: permitAll only works with HttpSecurity.authorizeRequests()” is thrown if the spring security is configured. In this post, we will see how this exception is thrown and how to fix this exception. When you try to configure web security by extending the WebSecurityConfigurerAdapter class, the

Whitelabel Error Page There was an unexpected error (type=Forbidden, status=403). Access Denied

The Access denied exception There was an unexpected error (type=Forbidden, status=403). Access Denied is a common exception seen in the browser when you access the url of the spring boot application. As stated, due to the restriction of access to the url, it refuses to serve you because you do