Spring Exceptions Tutorial The Spring Exceptions Tutorial discusses some of the most common exceptions in Spring with examples – why they occur and how to solve them quickly. Spring Beans Exceptions + Spring BeanDefinitionStoreException + Spring BeanCreationException + Spring NoSuchBeanDefinitionException (popular) + Unsatisfied Dependency in Spring Spring Data Exceptions +… Continue Reading spring-exceptions

Exceptions in Java 8 Lambda Expressions 1. Overview In Java 8, Lambda Expressions started to facilitate functional programming by providing a concise way to express behavior. However, the Functional Interfaces provided by the JDK don’t deal with exceptions very well – and the code becomes verbose and cumbersome when it… Continue Reading java-lambda-exceptions

Spring NoSuchBeanDefinitionException 1. Overview In this article, we are discussing the Spring org.springframework.beans.factory.NoSuchBeanDefinitionException – this is a common exception thrown by the BeanFactory when trying to resolve a bean that simply isn’t defined in the Spring Context. We’ll illustrate the possible causes for this problem and the available solutions. And… Continue Reading spring-nosuchbeandefinitionexception

MaxUploadSizeExceededException in Spring 1. Overview In the Spring framework, a MaxUploadSizeExceededException is thrown when an application attempts to upload a file whose size exceeds a certain threshold as specified in the configuration. In this tutorial, we will take a look at how to specify a maximum upload size. Then we… Continue Reading spring-maxuploadsizeexceeded

Spring BeanDefinitionStoreException 1. Overview In this article, we will discuss the Spring org.springframework.beans.factory.BeanDefinitionStoreException – this is typically the responsibility of a BeanFactory when a bean definition is invalid, the loading of that bean is problematic. The article will discuss the most common causes of this exception along with the solution… Continue Reading spring-beandefinitionstoreexception

Java Exceptions Interview Questions (+ Answers) 1. Overview Exceptions are an essential topic that every Java developer should be familiar with. This article provides answers to some of the questions that might pop up during an interview. 2. Questions ==== Q1. What Is an Exception? An exception is an abnormal… Continue Reading java-exceptions-interview-questions

“Stream has already been operated upon or closed” Exception in Java 1. Overview In this brief article, we’re going to discuss a common Exception that we may encounter when working with the Stream class in Java 8: IllegalStateException: stream has already been operated upon or closed. We’ll discover the scenarios… Continue Reading java-stream-operated-upon-or-closed-exception

How to Avoid the Java FileNotFoundException When Loading Resources 1. Overview In this tutorial, we’ll explore an issue that can come up when reading resource files in a Java application: At runtime, the resource folder is seldom in the same location on disk as it is in our source code.… Continue Reading java-classpath-resource-cannot-be-opened

Guide to Spring NonTransientDataAccessException 1. Overview In this quick tutorial, we will go through the most important types of the common NonTransientDataAccessException and illustrate them with examples. 2. The Base Exception Class Subclasses of this main exception class represent data access related exceptions which are considered non-transient or permanent. Simply… Continue Reading nontransientdataaccessexception

HibernateException: No Hibernate Session Bound to Thread in Hibernate 3 1. Introduction In this short tutorial, we’ll clarify when “No Hibernate Session Bound to Thread” exception gets thrown and how to resolve it. We’ll be focusing here on two different scenarios: using the LocalSessionFactoryBean using the AnnotationSessionFactoryBean 2. The Cause… Continue Reading no-hibernate-session-bound-to-thread-exception