No Logs generated for hibernate when using log4j, slf4j and jcl jars

Recently we faced an issue while upgrading to the latest version 5.0.1 for poi. And we ended up having following jars for logging all logs to log4j log4j-slf4j-impl-2.14.0.jar jcl-over-slf4j-1.7.30.jar slf4j-api-1.7.30.jar log4j-api-2.14.0.jar log4j-core-2.14.0.jar log4j-web-2.14.0.jar We use hibernate in our web application. And hibernate needs slf4j for logging.  With our update the hibernate logs are no more … Read more

java.lang.UnsatisfiedLinkError: /openjdk/lib/libawt_xawt.so: libXtst.so.6: cannot open shared object file:

Recently we were working with apache poi. And we switched to openjdk16 from oracle java 1.8.  On our test server we started seeing the following error: java.lang.UnsatisfiedLinkError: /openjdk/lib/libawt_xawt.so: libXtst.so.6: cannot open shared object file:  So looking at the error we saw that  ls -l /openjdk/lib/libawt_xawt.so was listing the file. So the file was there. And … Read more

Sonar java.lang.IllegalStateException: Unrecoverable indexation failures: 1 errors among 1 requests

Problem : java.lang.IllegalStateException: Unrecoverable indexation failures: 1 errors among 1 requests SonarQube sometimes fails to upload the sonar analysis results with the exception java.lang.IllegalStateException: Unrecoverable indexation failures: 1 errors among 1 requests Cause : Most probably the disk is full on the sonar hosting server. Solution: Solution is simply to clean up the disk space … Read more

java.lang.ClassNotFoundException: com.sun.xml.ws.transport.http.servlet.WSServletContextListener

Problem: 03-May-2021 19:15:28.056 SEVERE [ajp-nio-9209-exec-4] org.apache.catalina.core.StandardContext.listenerStart Error configuring application listener of class [com.sun.xml.ws.transport.http.servlet.WSServletContextListener]java.lang.ClassNotFoundException: com.sun.xml.ws.transport.http.servlet.WSServletContextListener Cause : jaxws-rt.jar is either missing or has multiple versions. Solution 1:   If you don’t have this jar add it to tomcat/lib folder.  Solution 2:    For maven, you can add the dependency in your pom.xml. Make sure to pick … Read more

InvocationTargetException after web app is deployed

Recently after updating to tomcat 9 and openjdk 16, we started to have an issue with redeployments not going well. We got a lot of InvocationTargetException’s in our logs once redeployment was started. Problem turned out to be the name of our war file grim#dandel.war. So we fixed it be renaming the war file and … Read more

How to schedule tasks with Spring boot

Overview Task scheduling refers to executing a task on a particular time frame or repeating the task by running a process in a fixed interval. Spring boot provides @Scheduled and @EnableScheduling annotations for configuring and scheduling tasks, periodically. Spring allows us to configure the parameters of the @Scheduled annotation by scheduling a task on a … Read more

Spring Security Interview Questions

Below is a list of questions asked frequently during technical interviews on the topic of Spring security. For details and usage of spring security concepts in real-world examples, please check-out these posts: Secure a REST Service Basic HTTP Authentication What is Spring Security? Spring security is a customizable framework to provide authentication (establishing that user/device … Read more

MICROSERVICES INTERVIEW QUESTIONS

1.    What is Spring Boot? To start a new Spring project one has to add the maven dependencies or the build path, add configurations, configure the application server, etc. Therefore, it requires some efforts from the developer before actually starting the project from scratch. Here, Spring Boot comes into action and provides automation for these … Read more