Hi, i am working on a spring mvc app using hibernate and i am having some trouble compiling and running my code.
This is because it cannot find my FileObject.hmb.xml whenever i try to create a session factory bean.
my bean looks like this
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource1"></property>
<property name="mappingResources">
<list>
<value>FileObject.hmb.xml</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.hbm2ddl.auto">create</prop>
</props>
</property>
</bean>
And the FileObject.hmb.xml resides in the root of my WAR folder. i have tried to move this file to different folders including the actual src folder and providing the correct path in the session factory but it still gives me a FileNotFoundException.
is this because java doesnt recognise a hello.hmb.xml type of file? Most if not all file formats are like this: name.extension
hibernate mapping files seems to be different though
Follow-up: As I have noted before, I have tried to put my .hbm.xml in numerous places including the src directory and still wont work.
My project structure is similar to this:
I have tried to put the file inside the root dir of war, WEB-INF, classes and as said before, in my actual src directory.
I never knew it was this much hassle just to get hibernate and spring running successfully.