0 0

Spring Mvc 整合jbpm 启动报错..10

引用
2012-10-30 11:34:23 org.apache.catalina.core.AprLifecycleListener init
��Ϣ: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre6\bin;D:\Program Files\Apache Software Foundation\Tomcat 6.0\bin
2012-10-30 11:34:23 org.apache.coyote.http11.Http11Protocol init
��Ϣ: Initializing Coyote HTTP/1.1 on http-8080
2012-10-30 11:34:23 org.apache.catalina.startup.Catalina load
��Ϣ: Initialization processed in 1620 ms
2012-10-30 11:34:23 org.apache.catalina.core.StandardService start
��Ϣ: Starting service Catalina
2012-10-30 11:34:23 org.apache.catalina.core.StandardEngine start
��Ϣ: Starting Servlet Engine: Apache Tomcat/6.0.14
2012-10-30 11:34:25 org.apache.catalina.loader.WebappClassLoader validateJarFile
��Ϣ: validateJarFile(D:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\Spring\WEB-INF\lib\servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
2012-10-30 11:34:26 org.apache.catalina.core.ApplicationContext log
��Ϣ: Initializing Spring root WebApplicationContext
log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
log4j:WARN Please initialize the log4j system properly.
2012-10-30 11:34:30 org.apache.catalina.core.StandardContext listenerStart
����: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'processEngine' defined in class path resource [applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public org.jbpm.api.ProcessEngine org.jbpm.pvm.internal.processengine.SpringHelper.createProcessEngine()] threw exception; nested exception is java.lang.NoClassDefFoundError: org/springframework/orm/hibernate3/LocalSessionFactoryBean
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:581)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:983)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:879)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
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.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3830)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public org.jbpm.api.ProcessEngine org.jbpm.pvm.internal.processengine.SpringHelper.createProcessEngine()] threw exception; nested exception is java.lang.NoClassDefFoundError: org/springframework/orm/hibernate3/LocalSessionFactoryBean
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:157)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:570)
... 38 more
Caused by: java.lang.NoClassDefFoundError: org/springframework/orm/hibernate3/LocalSessionFactoryBean
at org.jbpm.pvm.internal.cfg.ConfigurationImpl.buildProcessEngine(ConfigurationImpl.java:90)
at org.jbpm.pvm.internal.processengine.SpringHelper.createProcessEngine(SpringHelper.java:50)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:145)
... 39 more
Caused by: java.lang.ClassNotFoundException: org.springframework.orm.hibernate3.LocalSessionFactoryBean
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
... 46 more
2012-10-30 11:34:30 org.apache.catalina.core.StandardContext start
����: Error listenerStart
2012-10-30 11:34:30 org.apache.catalina.core.StandardContext start
����: Context [/Spring] startup failed due to previous errors
2012-10-30 11:34:30 org.apache.catalina.core.ApplicationContext log
��Ϣ: Closing Spring root WebApplicationContext
2012-10-30 11:34:30 org.jbpm.internal.log.Jdk14Log info
��Ϣ: loading schema resource: jpdl-4.0.xsd
2012-10-30 11:34:30 org.jbpm.internal.log.Jdk14Log info
��Ϣ: loading schema resource: jpdl-4.2.xsd
2012-10-30 11:34:30 org.jbpm.internal.log.Jdk14Log info
��Ϣ: loading schema resource: jpdl-4.3.xsd
2012-10-30 11:34:30 org.jbpm.internal.log.Jdk14Log info
��Ϣ: loading schema resource: jpdl-4.4.xsd
2012-10-30 11:34:31 org.apache.coyote.http11.Http11Protocol start
��Ϣ: Starting Coyote HTTP/1.1 on http-8080
2012-10-30 11:34:31 org.apache.jk.common.ChannelSocket init
��Ϣ: JK: ajp13 listening on /0.0.0.0:8009
2012-10-30 11:34:31 org.apache.jk.server.JkMain start
��Ϣ: Jk running ID=0 time=0/30  config=null
2012-10-30 11:34:31 org.apache.catalina.startup.Catalina start
��Ϣ: Server startup in 7646 ms



applicationContext.xml配置文件

引用
<?xml version="1.0" encoding="UTF-8" ?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
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-3.0.xsd
       http://www.springframework.org/schema/context
       http://www.springframework.org/schema/context/spring-context-3.0.xsd
       http://www.springframework.org/schema/tx
       http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
       http://www.springframework.org/schema/aop
       http://www.springframework.org/schema/aop/spring-aop-3.0.xsd">
      
   <bean id="springHelper" class="org.jbpm.pvm.internal.processengine.SpringHelper" />

  <bean id="processEngine" factory-bean="springHelper" factory-method="createProcessEngine" />

  <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
    <property name="configLocation" value="classpath:jbpm.hibernate.cfg.xml" />
    <property name="dataSource" ref="dataSource" />
  </bean>


   
    <!-- 扫描类包,将标注Spring注解的类自动转化Bean,同时完成Bean的注入 -->
    <context:component-scan base-package="com.dao"/>
    <context:component-scan base-package="com.service"/>
   
    <!-- 配置数据源-->
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close"
p:driverClassName="com.mysql.jdbc.Driver"
p:url="jdbc:mysql://localhost:3306/sampledb"
p:username="root"
p:password="root" />


<!-- 配置Jdbc模板  -->
<bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate"
p:dataSource-ref="dataSource" />

<!-- 配置事务管理器 -->
<bean id="transactionManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager"
p:dataSource-ref="dataSource" />

<!-- 通过AOP配置提供事务增强,让service包下所有Bean的所有方法拥有事务 -->
<aop:config proxy-target-class="true">
<aop:pointcut id="serviceMethod"
expression=" execution(* com.service..*(..))" />
<aop:advisor pointcut-ref="serviceMethod" advice-ref="txAdvice" />
</aop:config>
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="*" />
</tx:attributes>
</tx:advice>



   
   
</beans>


我也在网上找了一下资料,有的说jar包冲突, 我试了删除jar包, 还是报错,
求解决啊, 谢谢了!
2012年10月30日 11:49

2个答案 按时间排序 按投票排序

0 0

采纳的答案

缺少org.springframework.orm.jar

2012年10月30日 13:04
0 0

: Error creating bean with name 'processEngine' defined in class path resource [applicationContext.xml]: Instantiation of bean failed; nested exception is  spring不能创建processEngine 的实例

2012年10月30日 12:38

相关推荐

    JBPM采购申请系统——08_JBPM流程节点.7z

    JBPM采购申请系统——08_JBPM流程节点.7z JBPM采购申请系统——08_JBPM流程节点.7z JBPM采购申请系统——08_JBPM流程节点.7z JBPM采购申请系统——08_JBPM流程节点.7z JBPM采购申请系统——08_JBPM流程节点.7z JBPM...

    jbpm-4.4.zip part03

    4. **集成能力**:jbpm可与Java EE、Spring等框架无缝集成,也可以与各种企业服务,如EJB、Web服务等进行交互,提供灵活的扩展性。 5. **任务管理**:jbpm提供任务服务,允许用户分配、接收、完成和转移任务,支持...

    jbpm jbpm4.3.jar

    jbpm jbpm4.3.jar DDDDDDDD

    spring-modules-jbpm30.jar

    spring-modules-jbpm30.jar spring-modules-jbpm30.jar

    spring-modules-jbpm31.jar

    spring-modules-jbpm31.jar

    jbpm.mysql.create.sql

    jbpm.mysql.create.sql jbpm mysql建表语句

    jbpm-jpdl.jar

    jbpm-jpdl.jar jbpm-jpdl.jar

    jbpm-identity.jar

    jbpm-identity.jar jbpm-identity.jar

    JBPM整合项目.doc

    在jbpm.cfg.xml中,引入jbpm.tx.spring.cfg.xml文件,这是与Spring整合的配置。同时,在Spring的配置文件beans.xml中,定义了一个名为“processEngine”的bean,通过工厂方法的方式创建ProcessEngine实例。这里,...

    JBPM数据库表创建\jbpm.jpdl.oracle.sql

    JBPM数据库表创建\jbpm.jpdl.oracle.sqlJBPM数据库表创建\jbpm.jpdl.oracle.sqlJBPM数据库表创建\jbpm.jpdl.oracle.sqlJBPM数据库表创建\jbpm.jpdl.oracle.sqlJBPM数据库表创建\jbpm.jpdl.oracle.sql

    jbpm4leave.zip_jbpm4leave_jbpm4leave.zip

    4. **配置文件**(如jbpm.cfg.xml):配置jBPM引擎的设置,如数据源、事务管理等。 5. **部署单元**(.ear或.war文件):将所有组件打包成可部署在应用服务器上的应用。 要运行这个实例,你需要: 1. 安装并配置一...

    jbpm扩展包(jbpm_adapter.jar)

    由于jbpm.Adapter.jar旨在提升用户体验,可以假设它在设计时考虑了性能优化,减少了不必要的数据库查询和提高了数据检索速度。 8. **兼容性和版本**: 需要确保jbpm_adapter.jar与当前使用的jbpm版本兼容,否则...

    jbpm4.3与spring整合

    - `jbpm-4.3/install/src/cfg/jbpm/spring.jbpm.cfg.xml`:JBPM与Spring集成的关键配置文件。 #### 三、配置文件调整 接下来,我们将对这些配置文件进行必要的修改。 1. **调整`hibernate.cfg.xml`**:在`...

    bsh.jar,jcr-1.0.jar,jbpm-identity.jar,jbpm-jpdl.jar

    整合后,我们可以将JBPM的工作流服务作为一个Spring Bean注入到应用中,这样就可以轻松地在Spring环境中启动、管理和控制工作流实例。此外,Spring的事务管理可以帮助确保工作流操作的原子性和一致性。 具体整合...

    jbpm-3.1.2.zip_jbpm_jbpm 3.1.2_jbpm-3.1.2.rar_jbpm3.1.2_工作流

    jbpm-3.1.2.zip 文件包含了 jBpm 的一个重要版本——jBpm 3.1.2,这是一个开源的工作流管理系统,专为构建灵活且可扩展的业务流程解决方案而设计。jBpm 提供了一种方式,使得开发者能够用简单而强大的语言来表达业务...

    bsh.jar/ jcr-1.0.jar/ jbpm-identity.jar/ jbpm-jpdl.jar

    Spring提供依赖注入和面向切面编程,Struts负责MVC(Model-View-Controller)架构,而Hibernate则是对象关系映射工具。将jbpm与SSH整合意味着开发者可以利用这些框架的强大功能来构建更高效、模块化的业务流程应用,...

    jbpm4.4 schema.xsd

    jbpm4.4 schema.xsd jbpm4.4 schema.xsd jbpm4.4 schema.xsd jbpm4.4 schema.xsd jbpm4.4 schema.xsd

    jbpm-6.1.0.Final-installer

    4. **kie-server**:Kie Server是jBPM服务的运行时环境,它提供了RESTful API,使得其他应用程序和服务能远程调用jBPM的功能,如启动流程实例、查询流程状态、执行规则和决策服务等。 5. **数据存储**:jBPM使用...

    jbpm.4.4.jar

    5. **集成能力**:jbpm可以轻松与Java EE、Spring、EJB等环境集成,同时也支持与各种数据存储系统的连接,如JPA、Hibernate等。 6. **持久化支持**:jbpm提供了对流程实例、任务和其他元数据的持久化存储,确保了...

    JBPM开发指南.pdf

    - **Spring集成**:JBPM可以与Spring框架无缝集成,实现服务注入和事务管理。 - **JPA持久化**:JBPM支持JPA(Java Persistence API),可以方便地将流程实例和相关数据存储在关系数据库中。 - **RESTful API**:...

Global site tag (gtag.js) - Google Analytics