Blog Archives

♥ Chrome Postman to test and debug RESTful Web Services

Step 1 You need to get the Postman extension for the Google chrome browser.

Step 2 Search and add POSTMAN.

Step 3 Once installed, open it from the Apps link.

chrome-apps

Step 4 Set the TEST URL,

Read more ›



♥ 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.

Read more ›



♥ Debugging Java version issues

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

What does this error mean?

The above error means what version of the JRE that the class file is compatible with. “org/apache/cxf/management/annotation/ManagedResource” was compiled with based on the following

So, “51” means it is compatible with “

Read more ›



♥ 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

“major version: 51”

Read more ›

Tags:

♦ 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 all possible causes and add extensive log statements and write test cases to prove or disprove your theories. … Read...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

45-Day-Java-JEE-Career-Companion, 90-Day-Java-JEE-Career-Companion, 180-Day-Java-JEE-Career-Companion, 365-Day-Java-JEE-Career-Companion and 2-Year-Java-JEE-Career-Companion Log In | Register | Try free FAQs | Home


02: HTTP basics on headers, MIME types, & cookies for Java developers

Q1. What happens when you open up a browser and type a URL to request a Web page or RESTFul web service data? A1. HTTP is a stateless protocol on top of TCP (Transmission Control Protocol). 1) When the IP address is obtained, … Read more ›...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

45-Day-Java-JEE-Career-Companion, 90-Day-Java-JEE-Career-Companion, 180-Day-Java-JEE-Career-Companion, 365-Day-Java-JEE-Career-Companion and 2-Year-Java-JEE-Career-Companion Log In | Register | Try free FAQs | Home


03: Identifying and fixing NonUniqueObjectException in Hibernate

NonUniqueObjectException is thrown when there is an object already associated with the session with the same id (primary key) (i.e. a duplicate). It is important to understand the concept of a “detached” object in Hibernate. This is one of the most common errors, understanding why and when this error is thrown will save you time in identifying and fixing this issue.

Read more ›

Tags:

03: jvisualvm to debug deadlocks in Java applications

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 holding on to lock1 and waiting for the lock2, … Read more ›...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

45-Day-Java-JEE-Career-Companion, 90-Day-Java-JEE-Career-Companion, 180-Day-Java-JEE-Career-Companion, 365-Day-Java-JEE-Career-Companion and 2-Year-Java-JEE-Career-Companion Log In | Register | Try free FAQs | Home


04: Identifying and fixing LazyInitializationException in Hibernate

LazyInitializationException is thrown when an object becomes detached, and if you try to access associated (i.e. proxied) object(s) of a detached object.

Q. What is a detached object in Hibernate?

When you close an individual Hibernate Session, the persistent objects you are working with are detached.

Read more ›

Tags:

05: Debugging Hibernate & getting a better handle on the 4 most common issues

#1. Enable Logging in your log4j.xml, log4j.properties, or myapp-logback.xml In the log4j.properties file, you can enable Hibernate SQL logging as shown below or in your log4j.xml or myapp-logback.xml as You can then check your logs for the SQLs executed and the parameters passed. … Read more ›...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

45-Day-Java-JEE-Career-Companion, 90-Day-Java-JEE-Career-Companion, 180-Day-Java-JEE-Career-Companion, 365-Day-Java-JEE-Career-Companion and 2-Year-Java-JEE-Career-Companion Log In | Register | Try free FAQs | Home


06: ♥ Debugging NoSuchBeanDefinitionException in Spring

#1. Adding the @Named annotation to the interface instead of the implementation

Adding the @Named, @Component, @Repository, etc annotation on the interface as opposed to the implementation class. The code below can throw “NoSuchBeanDefinitionException”

FIX: The @Named annotation is now in the implementation class.

Read more ›



07: Debugging Spring Transaction Management

Never just trust that adding @Transactional annotation is going to create a transactional boundary for your service layer. EventRestController –> EventMergeProcesorImpl –> EventControlDAOImpl The @Transactional annotations added to “public” methods of the EventMergeProcesorImpl. Spring creates a proxy around the “EventMergeProcesorImpl”. … Read more ›...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

45-Day-Java-JEE-Career-Companion, 90-Day-Java-JEE-Career-Companion, 180-Day-Java-JEE-Career-Companion, 365-Day-Java-JEE-Career-Companion and 2-Year-Java-JEE-Career-Companion Log In | Register | Try free FAQs | Home


13: ♥♦ 5 Ways to debug Java thread-safety issues

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 at Debugging Skills

How will you debug thread-safety issues in Java?

Read more ›



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 the same jar The Maven’s transivie dependency might bring multiple versions of joda libraries like “ … Read more ›...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

45-Day-Java-JEE-Career-Companion, 90-Day-Java-JEE-Career-Companion, 180-Day-Java-JEE-Career-Companion, 365-Day-Java-JEE-Career-Companion and 2-Year-Java-JEE-Career-Companion Log In | Register | Try free FAQs | Home


Debugging connection refused issues in Java with 9 tips

Possible reasons for “refused connections” 1) Client & Server are not connected by the LAN. For example, they can be in the different zones. 2) The Server might not be running. 3) The server might be listening on a different port or the server might have not started properly as...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

45-Day-Java-JEE-Career-Companion, 90-Day-Java-JEE-Career-Companion, 180-Day-Java-JEE-Career-Companion, 365-Day-Java-JEE-Career-Companion and 2-Year-Java-JEE-Career-Companion Log In | Register | Try free FAQs | Home


Debugging java.security.cert.CertificateException: Certificates do not conform to algorithm constraints

Why? You may have a certificate with SHA1RSA key size less than 1024 bits or you have a certificate in your chain that uses MD2RSA.

Explanation? MD2 was widely recognized as insecure and thus disabled in Java in version JDK 7 onwards.

Read more ›



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.

Read more ›



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.

Read more ›



Debugging SSL issues in Java & tools to debug

Q1. What are some of the issues you encounter with SSL handshake? A1. Some of the issues you try to debug are Presence of a valid certificate in trust store Incorrect certificate chains in the client or server truststore Invalid key algorithm used for private keys Expired certificate Incorrect passwords...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

45-Day-Java-JEE-Career-Companion, 90-Day-Java-JEE-Career-Companion, 180-Day-Java-JEE-Career-Companion, 365-Day-Java-JEE-Career-Companion and 2-Year-Java-JEE-Career-Companion Log In | Register | Try free FAQs | Home


JConsole for debugging deadlocks in Java applications

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 holding on to lock1 and waiting for the lock2, … Read more ›...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

45-Day-Java-JEE-Career-Companion, 90-Day-Java-JEE-Career-Companion, 180-Day-Java-JEE-Career-Companion, 365-Day-Java-JEE-Career-Companion and 2-Year-Java-JEE-Career-Companion Log In | Register | Try free FAQs | Home


Remote debugging in Java with Java Debug Wire Protocol (JDWP)

What is remote debugging? It is increasingly essential with the globalization to be able to debug a Java application that is deployed remotely, in another country or city. You will come across scenarios where an application might be running fine in your sandbox (i.e. local desktop), but might be buggy...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

45-Day-Java-JEE-Career-Companion, 90-Day-Java-JEE-Career-Companion, 180-Day-Java-JEE-Career-Companion, 365-Day-Java-JEE-Career-Companion and 2-Year-Java-JEE-Career-Companion Log In | Register | Try free FAQs | Home


By topics – 800+ Q&As ♥ Free ♦ FAQ

open all | close all

Java 200+ FAQs – Quick Brushup

open all | close all

100+ Java Tutorials step by step

open all | close all

13+ Tech Key Areas to standout

open all | close all

Java coding exercises

open all | close all
Top