Blog Archives

5 Ways to debug thread-safety issues in Java

Interviewers often judge your experience with debugging skills. For example, debugging jar hell issues, debugging SSL issues, debugging hibernate issues, debugging transaction management issues, etc. All these are covered in detail under the key areas “Key Area – Debug xxxx

How will you debug thread-safety issues in Java?

A very popular Java job interview question for intermediate to senior developers.…



7 Java debugging interview questions & answers

Q1. How would you go about debugging thread-safety or concurrency issues? A1. #1: Manually reviewing the code for any obvious thread-safety issues. Good knowledge of multi-threading is required. #2: List…



Debugging “NoSuchMethodError” in Java

The JAR hell issues also lead to exceptions like NoSuchMethodError or IllegalArgumentException. I have already discussed debugging JAR Hell issues. #1 Check the war file for any duplicate versions of…



Debugging JAR hell issues in Java

The following 3 questions are frequently asked by Java developers as an industrial strength Java project will have 100+ jar files. How often have you come across a Java application that requires different versions of the same library? How often do you see exceptions like NoSuchMethodError or IllegalArgumentException. Here are some tips to solve the JAR hell problem.…



Debugging Java version issues

1. Error: Unsupported major.minor version 51.0 error?



Debugging like a pro with eclipse IDE tutorial for Java developers

Often you get to work on a fully functional Java application that is already in production to fix production issues or to enhance its existing functionality. As a new Java developer in the team, it is not easy to get started and contributing. The approach would be slightly different from working on a brand new project.…



Debugging LinkageErrors in Java

What is a LinkageError in Java?

A jar that is being loaded by two different classloaders can throw a java.lang.LinkageError. For example, your application server (e.g JBoss) on startup loads that jar or has a directory with that jar. Also, your EAR or WAR you are deploying has that jar in its say WEB-INF/lib.…



javap for debugging and better understanding some Java concepts with 3 practical examples

The javap is a class file dissembler. Here are 3 scenarios you can put javap to use with code examples.

#1 Finding the Java version of the class file within a jar

Extract a class file say “MyJobRunner.class” from a jar file and use javap to find out the version used



JConsole for debugging deadlocks in Java

This is another debugging concurrency issues tutorial following on Debugging Java thread-safety, multi-threading, or concurrency issues tutorial. Step 1: Java code that creates a dead lock situation by a) thread-0…



jvisualvm to debug deadlocks in Java

This extends JConsole for debugging deadlocks in Java applications, using jvisualvm that gets shipped with your JDK. Step 1: Java code that creates a dead lock situation by a) thread-0…



800+ Java & Big Data Interview Q&As

200+ Java & Big Data Tutorials

Top