I have an application that is using hibernate. In my bean def file I am using the org.springframework.orm.hibernate.LocalSessionFact oryBean class and am specifying a hbm.xml file like
<property name="mappingResources">
<list>
<value>com/mycomp/table1.hbm.xml</value>
<value>com/mycomp/table2.hbm.xml</value>
</list>
</property>
The problem is when I create my context I get the following error
Could not open class path resource [com/mycomp/table1.hbm.xml]
This happens because the jar that holds my hbm.xml files is a different jar than the jar that holds the class that is trying to create the context. If I place the hbm.xml files in the same jar it all works. Unfortunatly this is not an option for me. The hiberante files must be in their own jar.
How do I go about configuring a class loader to find them? Do I have to write my own class loader?
Any help is appreciated.
Thanks


Reply With Quote
This was not a Spring problem. Thanks for the replies though.
