Hibernate problem solved