[英]jboss deployment error
我在 jboss 上部署 spring 项目时遇到问题。
好了,问题来了,我在文件applicationContext.xml这个bean定义
<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/domain/hibernate/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/
如果您使用的是 Spring 2.5.x,您可能会遇到此问题:
https://jira.springsource.org/browse/SPR-5120
基本上,Spring 需要对 class 路径扫描的协议特定支持,并且不应对 JBoss 的 vfsfile-protocol 访问其虚拟文件系统。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.