I am using spring and hibernate for configuration with mysql db.
My we.xml file has following code :
Spring is telling you exactly what the problem is, you just have to read the log and nested error message:
Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sessionFactory': FactoryBean which is currently in creation returned null from getObject
A bit of Google searching suggests that this error message is usually the result of a circular dependency, and also led to a mailing list post that recommends removing default-autowire="detect"
from your <beans>
element.