`
mingming
  • 浏览: 13508 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
最近访客 更多访客>>
文章分类
社区版块
存档分类
最新评论

jbpm 程序部署流程文件到数据库中出错,知道的请帮助下

    博客分类:
  • java
阅读更多

InputStream in = new FileInputStream("src/config.files/jbpm.cfg.xml");
ProcessDefinition processDefinition = ...;
JbpmConfiguration jbpmConfiguration = JbpmConfiguration.parseInputStream(in);
JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
GraphSession graphSession = jbpmContext.getGraphSession();
graphSession.deployProcessDefinition(processDefinition);


每次执行:
GraphSession graphSession = jbpmContext.getGraphSession();
的时候都会报错,看不出来哪错了,很郁闷!知道怎么回事的朋友,请帮忙解答下,谢谢!

执行结果如下:
15:23:22,593 INFO  Environment : Hibernate 3.1
15:23:22,625 INFO  Environment : hibernate.properties not found
15:23:22,625 INFO  Environment : using CGLIB reflection optimizer
15:23:22,640 INFO  Environment : using JDK 1.4 java.sql.Timestamp handling
15:23:22,812 INFO  Configuration : configuring from resource: hibernate.cfg.xml
15:23:22,812 INFO  Configuration : Configuration resource: hibernate.cfg.xml
15:23:23,218 INFO  Configuration : Reading mappings from resource: org/jbpm/identity/User.hbm.xml
15:23:23,546 INFO  HbmBinder : Mapping class: org.jbpm.identity.User -> JBPM_ID_USER
15:23:23,656 INFO  HbmBinder : Mapping collection: org.jbpm.identity.User.permissions -> JBPM_ID_PERMISSIONS
15:23:23,656 INFO  Configuration : Reading mappings from resource: org/jbpm/identity/Group.hbm.xml
15:23:23,781 INFO  HbmBinder : Mapping class: org.jbpm.identity.Group -> JBPM_ID_GROUP
15:23:24,000 INFO  HbmBinder : Mapping collection: org.jbpm.identity.Group.permissions -> JBPM_ID_PERMISSIONS
15:23:24,000 INFO  Configuration : Reading mappings from resource: org/jbpm/identity/Membership.hbm.xml
15:23:24,109 INFO  HbmBinder : Mapping class: org.jbpm.identity.Membership -> JBPM_ID_MEMBERSHIP
15:23:24,109 INFO  HbmBinder : Mapping collection: org.jbpm.identity.Membership.permissions -> JBPM_ID_PERMISSIONS
15:23:24,109 INFO  Configuration : Reading mappings from resource: org/jbpm/graph/def/ProcessDefinition.hbm.xml
15:23:24,218 INFO  HbmBinder : Mapping class: org.jbpm.graph.def.ProcessDefinition -> JBPM_PROCESSDEFINITION
15:23:24,296 INFO  Configuration : Reading mappings from resource: org/jbpm/graph/def/Node.hbm.xml
15:23:24,359 INFO  HbmBinder : Mapping class: org.jbpm.graph.def.Node -> JBPM_NODE
15:23:24,390 INFO  Configuration : Reading mappings from resource: org/jbpm/graph/def/Transition.hbm.xml
15:23:24,546 INFO  HbmBinder : Mapping class: org.jbpm.graph.def.Transition -> JBPM_TRANSITION
15:23:24,546 INFO  Configuration : Reading mappings from resource: org/jbpm/graph/def/Event.hbm.xml
15:23:24,609 INFO  HbmBinder : Mapping class: org.jbpm.graph.def.Event -> JBPM_EVENT
15:23:24,609 INFO  Configuration : Reading mappings from resource: org/jbpm/graph/def/Action.hbm.xml
15:23:24,656 INFO  HbmBinder : Mapping class: org.jbpm.graph.def.Action -> JBPM_ACTION
15:23:24,703 INFO  Configuration : Reading mappings from resource: org/jbpm/graph/def/SuperState.hbm.xml
15:23:24,843 INFO  HbmBinder : Mapping subclass: org.jbpm.graph.def.SuperState -> JBPM_NODE
15:23:24,859 INFO  Configuration : Reading mappings from resource: org/jbpm/graph/def/ExceptionHandler.hbm.xml
15:23:24,906 INFO  HbmBinder : Mapping class: org.jbpm.graph.def.ExceptionHandler -> JBPM_EXCEPTIONHANDLER
15:23:24,906 INFO  Configuration : Reading mappings from resource: org/jbpm/instantiation/Delegation.hbm.xml
15:23:24,968 INFO  HbmBinder : Mapping class: org.jbpm.instantiation.Delegation -> JBPM_DELEGATION
15:23:25,000 INFO  Configuration : Reading mappings from resource: org/jbpm/graph/node/StartState.hbm.xml
15:23:25,015 INFO  HbmBinder : Mapping subclass: org.jbpm.graph.node.StartState -> JBPM_NODE
15:23:25,031 INFO  Configuration : Reading mappings from resource: org/jbpm/graph/node/EndState.hbm.xml
15:23:25,203 INFO  HbmBinder : Mapping subclass: org.jbpm.graph.node.EndState -> JBPM_NODE
15:23:25,203 INFO  Configuration : Reading mappings from resource: org/jbpm/graph/node/ProcessState.hbm.xml
15:23:25,250 INFO  HbmBinder : Mapping subclass: org.jbpm.graph.node.ProcessState -> JBPM_NODE
15:23:25,265 INFO  Configuration : Reading mappings from resource: org/jbpm/graph/node/Decision.hbm.xml
15:23:25,312 INFO  HbmBinder : Mapping subclass: org.jbpm.graph.node.Decision -> JBPM_NODE
15:23:25,312 INFO  HbmBinder : Mapping collection: org.jbpm.graph.node.Decision.decisionConditions -> JBPM_DECISIONCONDITIONS
15:23:25,312 INFO  Configuration : Reading mappings from resource: org/jbpm/graph/node/Fork.hbm.xml
15:23:25,359 INFO  HbmBinder : Mapping subclass: org.jbpm.graph.node.Fork -> JBPM_NODE
15:23:25,359 INFO  Configuration : Reading mappings from resource: org/jbpm/graph/node/Join.hbm.xml
15:23:25,406 INFO  HbmBinder : Mapping subclass: org.jbpm.graph.node.Join -> JBPM_NODE
15:23:25,406 INFO  Configuration : Reading mappings from resource: org/jbpm/graph/node/State.hbm.xml
15:23:25,500 INFO  HbmBinder : Mapping subclass: org.jbpm.graph.node.State -> JBPM_NODE
15:23:25,515 INFO  Configuration : Reading mappings from resource: org/jbpm/graph/node/TaskNode.hbm.xml
15:23:25,546 INFO  HbmBinder : Mapping subclass: org.jbpm.graph.node.TaskNode -> JBPM_NODE
15:23:25,578 INFO  Configuration : Reading mappings from resource: org/jbpm/graph/action/Script.hbm.xml
15:23:25,609 INFO  HbmBinder : Mapping subclass: org.jbpm.graph.action.Script -> JBPM_ACTION
java.lang.NoClassDefFoundError: bsh/EvalError
 at java.lang.Class.getDeclaredMethods0(Native Method)
 at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
 at java.lang.Class.getDeclaredMethods(Unknown Source)
 at org.hibernate.property.BasicPropertyAccessor.getterMethod(BasicPropertyAccessor.java:317)
 at org.hibernate.property.BasicPropertyAccessor.getGetterOrNull(BasicPropertyAccessor.java:297)
 at org.hibernate.property.BasicPropertyAccessor.createGetter(BasicPropertyAccessor.java:280)
 at org.hibernate.property.BasicPropertyAccessor.getGetter(BasicPropertyAccessor.java:275)
 at org.hibernate.util.ReflectHelper.getter(ReflectHelper.java:86)
 at org.hibernate.util.ReflectHelper.reflectedPropertyClass(ReflectHelper.java:77)
 at org.hibernate.mapping.SimpleValue.setTypeUsingReflection(SimpleValue.java:276)
 at org.hibernate.cfg.HbmBinder.createProperty(HbmBinder.java:2065)
 at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2050)
 at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:1940)
 at org.hibernate.cfg.HbmBinder.bindSubclass(HbmBinder.java:786)
 at org.hibernate.cfg.HbmBinder.handleSubclass(HbmBinder.java:2111)
 at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:117)
 at org.hibernate.cfg.Configuration.add(Configuration.java:385)
 at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:426)
 at org.hibernate.cfg.Configuration.addResource(Configuration.java:481)
 at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1443)
 at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1411)
 at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1392)
 at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1368)
 at org.hibernate.cfg.Configuration.configure(Configuration.java:1288)
 at org.jbpm.db.hibernate.HibernateHelper.createConfiguration(HibernateHelper.java:90)
 at org.jbpm.persistence.db.DbPersistenceServiceFactory.getConfiguration(DbPersistenceServiceFactory.java:68)
 at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:90)
 at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:74)
 at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:78)
 at org.jbpm.persistence.db.DbPersistenceService.getGraphSession(DbPersistenceService.java:217)
 at org.jbpm.JbpmContext.getGraphSession(JbpmContext.java:537)
 at com.sample.Deploy.main(Deploy.java:24)
Exception in thread "main"

分享到:
评论
4 楼 mingming 2007-01-22  
3 楼 mingming 2007-01-22  
问题解决了
在hibernate.cfg.xml中添加
<mapping resource="org/jbpm/db/hibernate.queries.hbm.xml"/>
既可以解决,不过有新的问题出现...

org.hibernate.HibernateException: Could not instantiate cache implementation
at org.hibernate.cache.CacheFactory.createCache(CacheFactory.java:64)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:214)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1291)
at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:90)
at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:74)
at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:78)
at org.jbpm.persistence.db.DbPersistenceService.getGraphSession(DbPersistenceService.java:217)
at org.jbpm.JbpmContext.getGraphSession(JbpmContext.java:537)
at com.sample.Start.main(Start.java:24)
Caused by: org.hibernate.cache.NoCachingEnabledException: Second-level cache is not enabled for usage [hibernate.cache.use_second_level_cache | hibernate.cache.use_query_cache]
at org.hibernate.cache.NoCacheProvider.buildCache(NoCacheProvider.java:21)
at org.hibernate.cache.CacheFactory.createCache(CacheFactory.java:61)
... 8 more
2 楼 mingming 2007-01-22  
不过解决上面问题的同时带来了下面的问题:
正在解决中....

15:52:32,406 INFO  Configuration : processing association property references
15:52:32,406 INFO  Configuration : processing foreign key constraints
org.hibernate.MappingException: Could not determine type for: string_max, for columns: [org.hibernate.mapping.Column(EXCEPTION_)]
at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:266)
at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:253)
at org.hibernate.mapping.Property.isValid(Property.java:184)
at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:370)
at org.hibernate.mapping.RootClass.validate(RootClass.java:192)
at org.hibernate.cfg.Configuration.validate(Configuration.java:983)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1147)
at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:90)
at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:74)
at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:78)
at org.jbpm.persistence.db.DbPersistenceService.getGraphSession(DbPersistenceService.java:217)
at org.jbpm.JbpmContext.getGraphSession(JbpmContext.java:537)
at com.sample.Start.main(Start.java:24)
1 楼 mingming 2007-01-22  
已经解决了
把bsh-1.2b7.jar 和 bsh-bsf-1.2b7.jar 引入工程就ok了

相关推荐

    jbpm流程部署文件

    在jbpm中,流程部署是将流程定义文件转换为可执行的流程实例的关键步骤。以下是对jbpm流程部署过程的详细说明,以"分包价款工程支付流程"为例: 1. **新建流程模板**: - 首先,系统管理员需登录系统,并在`系统...

    jbpm项目 报销流程( 含数据库可附加)

    jbpm项目是一个基于Java的企业工作流管理系统...通过这个jbpm报销流程实例,开发者不仅可以学习到如何设计和实现业务流程,还可以了解如何将流程与数据库、测试和监控等实际开发环节相结合,提升流程管理系统的实用性。

    jbpm数据库表介绍

    jbpm 数据库表介绍 jbpm 是一个基于 Java 的 workflow 引擎,用于管理和执行业务流程。jbpm 需要持久化流程部署、...了解 jbpm 的数据库表结构能够帮助开发者更好地理解和使用 jbpm,实现更加复杂的业务流程管理系统。

    JBPM修改数据库教程以及实例

    在压缩包中,"jbpm修改数据库.pdf"应该详细解释了上述步骤,而"postgresql.rar"可能包含了PostgreSQL驱动程序或其他相关资源。通过阅读文档和利用提供的资源,您应该能够顺利地将JBPM6从H2迁移到MySQL或PostgreSQL。...

    jbpm 数据库jbpm 数据库

    总的来说,jbpm数据库是jbpm框架中不可或缺的部分,它存储了所有运行时的流程信息。理解和掌握jbpm数据库的相关知识对于有效地使用和维护jbpm系统至关重要。通过对数据库表的深入理解,我们可以更好地监控和管理业务...

    jbpm4.4 请假流程实例数据库( mysql .sql文件)

    jbpm4.4 请假流程实例数据库( mysql .sql文件)

    jbpm创建数据库jbpm创建数据库

    在深入探讨如何使用JBPM创建数据库的过程中,我们首先需要了解JBPM是什么以及它与数据库创建之间的联系。JBPM是JBoss流程管理器(JBoss Business Process Management)的简称,这是一个开源的工作流引擎,用于自动化...

    jbpm部署到mysql

    本篇将深入探讨如何将Jbpm部署到MySQL数据库,以及在这个过程中可能涉及的数据库变更。 首先,我们需要了解Jbpm对数据库的基本要求。Jbpm支持多种数据库,包括MySQL,它需要一个符合JPA(Java Persistence API)...

    JBPM工作流实战_流程定义文件的上传处理视频 03

    4. **数据库存储**:JBPM将流程定义文件持久化到数据库中,通常会存储在`jbpm_persistence`表中,以便于后续的查询和加载。 5. **流程部署**:上传后的流程定义文件需进行部署,使得JBPM引擎能够识别并执行流程。...

    JBPM流程引擎资料

    综上所述,《JBPM流程引擎资料》为开发者提供了一套全面且深入的jBPM流程引擎使用指南,涉及了从安装部署到流程设计再到流程运行和监控的整个生命周期。通过学习和掌握这些知识,开发者可以高效地构建出符合业务需求...

    jbpm工作流程的说明文档

    5. 使用ant部署pde包到数据库,实现流程数据的初始化。 6. 最后,通过jbpm API开发具体的工作流程应用。 对于“中国国情”的流程应用,jbpm在一定程度上可能需要适应国内的特殊需求。目前,国内工作流管理系统主要...

    jbpm数据库数据,导入即可使用

    jbpm数据库数据是jbpm系统运行过程中产生的各种数据,包括流程定义、任务实例、变量、事件等,这些数据对于系统的正常运行至关重要。 在jbpm中,流程定义(Process Definition)是描述业务流程的蓝图,它定义了流程...

    一个Jbpm员工请假流程的实例(源代码)

    在Jbpm项目中,它可能包括编译流程定义文件(.bpmn或.xml)、部署流程实例以及运行测试的命令。 `test`目录通常包含单元测试和集成测试代码,这些测试确保流程的各个部分按照预期工作。在Jbpm中,可能会使用JUnit或...

    jbpm业务流程

    - **部署文件**:`.bar`文件,包含了流程模型和其他相关资源,用于部署到jbpm服务器。 - **源代码**:可能包含Java代码,用于与jbpm引擎交互,如启动流程实例、查询任务等。 - **配置文件**:可能有jbpm的配置文件,...

    JBPM数据库表说明.doc

    在JBPM系统中,数据库扮演着至关重要的角色,存储了流程的配置信息以及运行时的状态数据。以下是对JBPM数据库表的详细说明: ### 1. 流程配置类数据库表 #### 1.1 JBPM_PROCESSDEFINITION 这个表存储了流程模板的...

    JBPM数据库表说明.

    其强大的功能背后是基于数据库的存储机制,涉及到多个核心表来管理和跟踪工作流程实例。接下来,我们将深入探讨JBPM数据库中的关键表及其作用。 1. **TaskInstance表**:这个表存储了所有任务实例的信息,包括任务...

    JBPM数据库表说明 jbpm 工作流 详细到每一个字段,不要下载分

    1.6 JBPM_DELEGATION:流程代理类表(用于实例化jbpm中的action类) 6 1.7 JBPM_TASK:流程任务表 6 1.8 JBPM_TASKCONTROLLER:流程任务控制器 7 1.9 JBPM_VARIABLEACCESS:流程变量表 7 1.10 JBPM_MODULE...

    JBPM-web开发部署tomcat-实现流程部署

    - "jbpmweb"工程的源码可以帮助我们了解如何集成JBPM到Web应用中,包括如何配置数据源、初始化服务、创建和处理流程实例等。 - 可以借助JBPM提供的工具,如Guvnor(流程模型管理)、Workbench(开发和测试平台)和...

Global site tag (gtag.js) - Google Analytics