Refactore code. Moved to the last Hibernate version, that works stable. Versions >= 4.3.0 are not supported by JPA EntityManager.