我在jboss上部署spring項目時遇到問題。
嗯,這裏的問題,我已經在文件的applicationContext.xml這個bean定義jboss部署錯誤
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref local="dataSource"/>
</property>
<property name="mappingDirectoryLocations">
<list>
<value>
classpath:tn/com/zuro/ris/domain/hibernate/hbm/
</value>
</list>
</property>
...
和我在目錄類路徑文件Patient.hbm.xml:TN/COM/zuro/RIS /域/休眠/ HBM 當我部署在JBoss中的戰爭,我得到這個錯誤
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.io.FileNotFoundException: class path resource [tn/com/zuro/ris/domain/hibernate/hbm/] cannot be resolved to absolute file path because it does not reside in the file system: vfsfile:/C:/jboss/server/default/deploy/war-1.0-SNAPSHOT.war/WEB-INF/classes/tn/com/zuro/ris/domain/hibernate/hbm/
我在C:/jboss/server/default/deploy/war-1.0-SNAPSHOT.war/WEB-INF/classes/tn/com/zuro/ris/domain/hibernate/hbm中有hbm映射,而我嘗試刪除最後的斜槓,問題仍然存在 – Mansuro 2011-04-28 11:16:35
@Mansuro檢查權限。 – Bozho 2011-04-28 11:19:31