Programming Issues

Issues

JsonbException: Can’t deserialize JSON array into: class

The javax.json.bind.JsonbException: Can’t deserialize JSON array into: class exception occurs when you try to convert json string data to a java object. If the json string contains an array of objects and attempts to deserialize the json string to a json object, the array of objects could not be assigned

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

The javax.json.bind.JsonbException: Cannot create instance of a class: class, No default constructor found. exception occurs when no default constructor is found in the java bean class. The spring boot default implementation for json binding api is org.eclipse.yasson. If no default constructor is found, the yasson code will throw this exception

can not access a member of class with modifiers “private”

The ReflectionUtils can not access a member of class with modifiers “private” exception occurs when the default constructor or method is configured as private in the java bean class. If the class method or properties are configured as private, the java reflection can not access the member of class with

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

The javax.json.bind.JsonbException: JSON Binding provider org.eclipse.yasson.JsonBindingProvider not found exception occurs when the java.json.bind maven dependency is added and JSON bind implementation dependency is not added in the spring boot maven. As the implemented class is not available in the class path, the exception java.lang.ClassNotFoundException: org.eclipse.yasson.JsonBindingProvider will be thrown. The exception

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

At least one mapping is required (i.e. authorizeRequests().anyRequest().authenticated())

Spring Boot security is one of the most requested features in the application. Security controls the user access page on the basis of the configured roles. In this post, we analyze this simple exception “At least one mapping is required (i.e. authorizeRequests().anyRequest().authenticated())” and how this exception can be resolved. This

There was an unexpected error (type=Internal Server Error, status=500).

When a restful web service call is made to a Spring Boot MVC application, It shows error “Whitelabel Error Page – There was an unexpected error (type=Internal Server Error, status=500).” in the browser. The Internal Server Error is a popular error in spring boot application if a server side error

There is no PasswordEncoder mapped for the id “null”

The exception “java.lang.IllegalArgumentException: There is no PasswordEncoder mapped for the id “null”” occurs if the spring boot application is enabled with security feature and password encoder is not configured for encryption. Spring boot application does not allow the password to be used as plain text. The password encoder is necessary