Un pedazo del trazado es el siguiente:
Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in file [C:\..\timex2-servlet.xml]: Invocation of init method failed; nested exception is java.io.FileNotFoundException: class path resource [Department.hbm.xml] cannot be opened because it does not exist
Lo arregle indicándole el directorio donde se encontraban los archivos .hbm en el servlet.xml.
Antes:
<property name="mappingResources">
<list>
<value>Department.hbm.xml</value>
<value>Employee.hbm.xml</value>
<value>Timesheet.hbm.xml</value>
</list>
</property>
Después:
<property name="mappingResources">
<list>
<value>com/vt/model/Department.hbm.xml</value>
<value>com/vt/model/Employee.hbm.xml</value>
<value>com/vt/model/Timesheet.hbm.xml</value>
</list>
</property>
No hay comentarios.:
Publicar un comentario