epapath's blog

Simple Spring Data Rest Example

Spring Data Rest is a project is to provide a solid foundation on which to expose CRUD operations to your JPA Repository-managed entities using plain HTTP REST semantics. The first implementation of this exporter uses Spring MVC and the standard Servlet architecture to make it easy to deploy a WAR file that becomes a full-blown CRUD application simply by including your domain classes and their corresponding Repository definitions.

How to avoid the LazyInitializationException

As I started to work to a small project based on Spring MVC + JPA2/Hibernate + Rest, I faced this interesting exception which is known as LazyInitializationException.

Before we discuss about the exact error and the solution, let me show you what I did and I came up to face that issue.

As I said before I had a project which is using JPA2/Hibernate, so I provided some entities and daos in order to communicate and get data from my database.

For example I had the Table User(Getters/Setters are omitted):

SonarQube Local Installation Guide



  1. First of all download the latest SonarQube Distribution found http://www.sonarsource.org/downloads/.

  2. Unzip the contents of the file to a path of your choice, e.g. (C:\ C:\sonarqube-4.0).

  3. Check that SonarQube server starts correctly by performing the following C:\ C:\sonarqube-4.0 \bin\ windows-x86-xx \StartSonar.bat. If you are using either a Linux or a Mac machine please select the appropriate sub folder within bin directory and execute sonar.sh.

Subscribe to RSS - epapath's blog