In this tutorial I am going to discuss about what is Whitelabel Error Page and how to deal with Whitelabel Error Page in Spring Boot applications. Spring boot allows you to setup a Spring based application with minimal configurations. Spring MVC applications provide no default (fall-back) error page out of the box but Spring Boot…

Posted in Spring Boot Spring REST

How to deal with Whitelabel Error Page in Spring Boot Applications

Introduction This post will show you an example on exception handling in Spring web application. In other words, we can also say exception handling in Spring MVC. We will use handle exception on Spring REST APIs but not limited to Spring REST APIs. You can create Spring MVC application and handle the exception same way….

Posted in Spring MVC Spring REST

Exception Handling in Spring Web Application

Introduction Here I am going to show you how to resolve issue org.hibernate.mapping.exception: No Dialect mapping for JDBC type that occurs in your Hibernate based application due to some types mismatch between database table column and Java field. You might have seen similar kind of exception occurred during performing native queries without entity class and…

Posted in Hibernate Spring JPA

org.hibernate.MappingException: No Dialect mapping for JDBC type

Introduction In this post I will show you how to work with Junit code coverage with JaCoCo code coverage library, which is quite a new maven plug-in that provides the JaCoCo runtime agent to your tests and allows basic report creation. Currently it supports instruction, branch, line, method and class coverage which is pretty enough…

Posted in Code Quality Junit

Junit Code Coverage with Jacoco

A catch exception strategy can be defined to customize the way Mule handles messages with errors. A catch exception strategy catches all exceptions thrown within its flow and processes them, thereby overriding Mule’s implicit default exception strategy. Mule’s catch exception strategy behavior is similar to a Java catch block, except that a new exception cannot…

Posted in Mule ESB

Handling Default Exceptions in Mule

A catch exception strategy can be defined to customize the way Mule handles messages with errors. A catch exception strategy catches all exceptions thrown within its flow and processes them, thereby overriding Mule’s implicit default exception strategy. Mule’s catch exception strategy behavior is similar to a Java catch block, except that a new exception cannot…

Posted in Mule ESB

Handling Global Exceptions in Mule

A catch exception strategy can be defined to customize the way Mule handles messages with errors. A catch exception strategy catches all exceptions thrown within its flow and processes them, thereby overriding Mule’s implicit default exception strategy. Mule’s catch exception strategy behavior is similar to a Java catch block, except that a new exception cannot…

Posted in Mule ESB

Handling Local Exceptions in Mule

Junit provides an option of tracing exception thrown by a Java method. There are different ways of handling exceptions in JUnit tests. Standard Junit’s org.junit.Test annotation offers expected attribute that allows you specifying the a Throwable to cause a test method to succeed if an exception of the specified class is thrown by the method….

Posted in Java Junit

Junit’s annotation based expected exception testing

I am going to tell you what are the best practices for handling exceptions in Java applications. An exception is an event that occurs during the execution of a program that disrupts the normal flow of the program and the program terminates abnormally. Types of Exception – the exception can be either a checked exception…

Posted in Java

Exception Handling Best Practices in Java

This tutorial will show you how we can generate SOAP fault error code and message using Exception handling in SOAP based JAX-WS webservice. For this tutorial we will create a standalone project in Eclipse. If you already have an idea on how to create a maven project in Eclipse will be great otherwise I will…

Posted in SOAP

SOAP Fault handling using Exception in JAX-WS webservice

Introduction JSF 2 javax.faces.application.ViewExpiredException that arises due to the click on a link or button when session gets expired. This tutorial will show you how we can deal with ViewExpiredException or view expired exception and we will show a meaningful message to the user with a link which will take him/her to the appropriate page…

Posted in Java JSF

JSF 2 javax.faces.application.ViewExpiredException

Introduction This issue occurs while establishing a trusted connection over SSL (Secure Socket Layer) in Artifactory. The error message indicates that Artifactory could not establish a trusted connection over SSL. You may find this issue if you are using Self-Signed certificate or a certificate that is issued by an internal Certificate Authority or if your…

Posted in SOAP

SunCertPathBuilderException: unable to find valid certification path to requested target