Blog Archives

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:

30-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
Posted in Java Debugging, member-paid

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”. So, here are a few tips to debug #1. Run…...

Members Only Content

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

30-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
Posted in Java Debugging, member-paid, Spring, Transaction Management

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. If you check the “java.security” file under “$JAVA_HOME/jre/lib/security”,

Read more ›

Posted in Java Debugging, Security

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

Read more ›

Posted in Java Debugging

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. #2. Not configuring the component-scan in

Read more ›

Posted in Java Debugging, Spring

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. The example below shows 3 parameters passed…...

Members Only Content

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

30-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
Posted in Hibernate, Java Debugging, member-paid

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. This means the object

Read more ›

Posted in Hibernate, Java Debugging
Tags:

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

Read more ›

Posted in Hibernate, Java Debugging
Tags:
Page 1 of 3123

800+ Java Interview Q&As – ♥Free | ♦FAQs

open all | close all

Pressed for time? 200+ Java Interview FAQs

open all | close all

16 Technical Key Areas to be a top-notch

open all | close all

100+ Java Tutorials – Step by step

open all | close all

100+ Java Coding Exercises

open all | close all

How good are your

open all | close all