In a Java program with Hibernate and SpringJPA I get occasionally odd error messages like:

"Exception during loading of ApplicationContextorg.springframework.beans.factor y.BeanCreationException:
Error creating bean with name 'entityManagerFactory' defined in class path resource [applicationContext-datasource.xml]:
Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: testADD]
Unable to build EntityManagerFactory"

This message is not really helpful (The real reason was a missing Annotation).

So I am searching for a general way to log/output a much more verbose output of Spring.

How can I achieve this?

Can I use log4j?

What EXACTLY do I have to specify here?

How else can I force Spring to be more helpful for error search?

Peter