开发者社区> 问答> 正文

ssh与jbpm集成 找不到映射文件

a123456678 2016-03-17 09:28:28 1135
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/platform-spring/applicationContext.xml]: Invocation of init method failed; nested exception is java.io.FileNotFoundException: class path resource [jbpm.execution.hbm.xml] cannot be resolved to absolute file path because it does not reside in the file system: jar:file:/C:/soft/tomcat/Tomcat6.0/webapps/IMS/WEB-INF/lib/jbpm.jar!/jbpm.execution.hbm.xml
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
 at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
 at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
 at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
 at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)
 ... 59 more
Caused by: java.io.FileNotFoundException: class path resource [jbpm.execution.hbm.xml] cannot be resolved to absolute file path because it does not reside in the file system: jar:file:/C:/soft/tomcat/Tomcat6.0/webapps/IMS/WEB-INF/lib/jbpm.jar!/jbpm.execution.hbm.xml
 at org.springframework.util.ResourceUtils.getFile(ResourceUtils.java:204)
 at org.springframework.core.io.AbstractFileResolvingResource.getFile(AbstractFileResolvingResource.java:52)
 at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:705)
 at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
 ... 66 more
现在出现这个问题,请大家帮忙解决
------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
 xmlns:context="http://www.springframework.org/schema/context"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xmlns:aop="http://www.springframework.org/schema/aop"
 xmlns:tx="http://www.springframework.org/schema/tx"
 xsi:schemaLocation="http://www.springframework.org/schema/beans 
                     http://www.springframework.org/schema/beans/spring-beans.xsd 
                     http://www.springframework.org/schema/tx 
                     http://www.springframework.org/schema/tx/spring-tx.xsd 
                     http://www.springframework.org/schema/aop 
                     http://www.springframework.org/schema/aop/spring-aop.xsd
                     http://www.springframework.org/schema/context
               http://www.springframework.org/schema/context/spring-context-2.5.xsd">
              <!--jbpm4.4工作流  -->
 <bean id="springHelper" class="org.jbpm.pvm.internal.processengine.SpringHelper">
 <property name="jbpmCfg" value="spring-jbpm4.cfg.xml" />
 </bean>
    <bean id="processEngine" factory-bean="springHelper" factory-method="createProcessEngine" />
<!-- 配置自动扫描//start--> 
 <context:component-scan base-package="com.tcxa"/>
 <!-- 配置自动扫描 //end-->
 <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close" >
 <property name="driverClass" value="com.mysql.jdbc.Driver"/>
 <property name="jdbcUrl" value="jdbc:mysql://192.168.0.36:3306/tc_ims"/>
 <property name="user" value="nbh"/>
 <property name="password" value="nbh116"/>

 <!--初始化时获取的连接数,取值应在minPoolSize与maxPoolSize之间。Default: 3 -->
 <property name="initialPoolSize" value="1"/>
 <!--连接池中保留的最小连接数。-->
 <property name="minPoolSize" value="1"/>   
 <!--连接池中保留的最大连接数。Default: 15 -->
 <property name="maxPoolSize" value="300"/>
 <!--最大空闲时间,60秒内未使用则连接被丢弃。若为0则永不丢弃。Default: 0 -->
 <property name="maxIdleTime" value="60"/>   
 <!--当连接池中的连接耗尽的时候c3p0一次同时获取的连接数。Default: 3 -->
 <property name="acquireIncrement" value="5"/>   
 <!--每60秒检查所有连接池中的空闲连接。Default: 0 -->
 <property name="idleConnectionTestPeriod" value="60"/>
 </bean>
 
  <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
     <property name="mappingDirectoryLocations">
       <list>
         <value>classpath:/com/tcxa/domain</value> 
         <value>classpath:jbpm.execution.hbm.xml</value>
 <value>classpath:jbpm.history.hbm.xml</value>
 <value>classpath:jbpm.identity.hbm.xml</value>
 <value>classpath:jbpm.repository.hbm.xml</value>
 <value>classpath:jbpm.task.hbm.xml</value>
       </list>
     </property>
     <property name="lobHandler" ref="lobHandler"/>
     <property name="hibernateProperties">
       <props>
         <prop key="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</prop>
         <prop key="hibernate.show_sql">true</prop>
       </props>
     </property>
     <property name="dataSource"><ref bean="dataSource" /></property>
   </bean>
  <!--  
   <bean id="sessionFactory"
 class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
 <property name="dataSource" ref="dataSource" />
 <property name="hibernateProperties">
 <props>
 <prop key="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</prop>
 <prop key="hibernate.default_batch_fetch_size">10</prop>
 <prop key="hibernate.max_fetch_depth">0</prop>
 <prop key="hibernate.show_sql">true</prop>
 </props>
 </property>
 
 <property name="mappingLocations">
 <list>
 
             <value>classpath:/com/tcxa/domain</value> 
 
     </list>
 </property>
 
 </bean>
   -->
   <bean id="lobHandler" class="org.springframework.jdbc.support.lob.DefaultLobHandler"/>
 
   <bean id="TransactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">  
     <property name="sessionFactory"><ref local="sessionFactory"/></property>
   </bean>
   <tx:advice id="txAdvice" transaction-manager="TransactionManager">
     <tx:attributes> 
       <tx:method name="*"/>
     </tx:attributes>
   </tx:advice>
   <aop:config>
     <aop:advisor pointcut="execution(* com.tcxa.*.*.service.*.*(..))" advice-ref="txAdvice"/> 
   </aop:config>
   
 </beans>
分享到
取消 提交回答
全部回答(1)
  • a123456678
    2019-07-17 19:04:27
    <property name="mappingResources">    <list>        <value>jbpm.repository.hbm.xml</value>        <value>jbpm.execution.hbm.xml</value>        <value>jbpm.history.hbm.xml</value>        <value>jbpm.task.hbm.xml</value>        <value>jbpm.identity.hbm.xml</value>    </list></property>
    0 0
+ 订阅

分享数据库前沿,解构实战干货,推动数据库技术变革

推荐文章
相似问题