I was using a RepositoryConfig file for a spring application with hibernate and JPA and I got a NullPointerException. I used the same config file for a sping-mvc application and didn't get any problem