`
mingming
  • 浏览: 13623 次
  • 性别: 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了

相关推荐

    jBPM4_app-first 视频 源码

    5. **部署与运行**:讲解如何将流程部署到 jBPM4 服务器,并启动流程实例。 6. **任务管理**:如何创建、分配和完成任务,以及任务的监控和查询。 7. **规则应用**:展示如何在流程中引入 Drools 规则,实现业务逻辑...

    Activiti6.0教程例子下载

    2. RepositoryService:Activiti中每一个不同版本的业务流程的定义都需要使用一些定义文件,部署文件和支持数据(例如BPMN2.0 XML文件,表单定义文件,流程定义图像文件等),这些文件都存储在Activiti内建的...

    手撕源码C++哈希表实现:从底层原理到性能优化,看完面试官都怕你!(文末附源码)

    哈希表源码

    sun_3ck_03_0119.pdf

    sun_3ck_03_0119

    MATLAB实现基于LSTM-AdaBoost长短期记忆网络结合AdaBoost时间序列预测(含模型描述及示例代码)

    内容概要:本文档详细介绍了基于 MATLAB 实现的 LSTM-AdaBoost 时间序列预测模型,涵盖项目背景、目标、挑战、特点、应用领域以及模型架构和代码示例。随着大数据和AI的发展,时间序列预测变得至关重要。传统方法如 ARIMA 在复杂非线性序列中表现欠佳,因此引入了 LSTM 来捕捉长期依赖性。但 LSTM 存在易陷局部最优、对噪声鲁棒性差的问题,故加入 AdaBoost 提高模型准确性和鲁棒性。两者结合能更好应对非线性和长期依赖的数据,提供更稳定的预测。项目还展示了如何在 MATLAB 中具体实现模型的各个环节。 适用人群:对时间序列预测感兴趣的开发者、研究人员及学生,特别是有一定 MATLAB 编程经验和熟悉深度学习或机器学习基础知识的人群。 使用场景及目标:①适用于金融市场价格预测、气象预报、工业生产故障检测等多种需要时间序列分析的场合;②帮助使用者理解并掌握将LSTM与AdaBoost结合的实现细节及其在提高预测精度和抗噪方面的优势。 其他说明:尽管该模型有诸多优点,但仍存在训练时间长、计算成本高等挑战。文中提及通过优化数据预处理、调整超参数等方式改进性能。同时给出了完整的MATLAB代码实现,便于学习与复现。

    免费1996-2019年各地级市平均工资数据

    1996-2019年各地级市平均工资数据 1、时间:1996-2019年 2、来源:城市nj、各地级市统计j 3、指标:平均工资(在岗职工) 4、范围:295个地级市

    [AB PLC例程源码][MMS_040384]Winder Application.zip

    AB PLC例程代码项目案例 【备注】 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用!有问题请及时沟通交流。 2、适用人群:计算机相关专业(如计科、信息安全、数据科学与大数据技术、人工智能、通信、物联网、自动化、电子信息等)在校学生、专业老师或者企业员工下载使用。 3、用途:项目具有较高的学习借鉴价值,不仅适用于小白学习入门进阶。也可作为毕设项目、课程设计、大作业、初期项目立项演示等。 4、如果基础还行,或热爱钻研,亦可在此项目代码基础上进行修改添加,实现其他不同功能。 欢迎下载!欢迎交流学习!不清楚的可以私信问我!

    C2Former: 解决RGB-红外物体检测中模态校准与融合不精确问题的标定互补变压器

    内容概要:本文介绍了一种新颖的变压器模型C2Former(Calibrated and Complementary Transformer),专门用于解决RGB图像和红外图像之间的物体检测难题。传统方法在进行多模态融合时面临两个主要问题——模态错位(Modality miscalibration)和融合不准确(fusion imprecision)。作者针对这两个问题提出采用互模交叉注意力模块(Inter-modality Cross-Attention, ICA)以及自适应特征采样模块(Adaptive Feature Sampling, AFS)来改善。具体来说,ICA可以获取对齐并且互补的特性,在特征层面进行更好的整合;而AFS则减少了计算成本。通过实验验证了基于C2Former的一阶段和二阶段检测器均能在现有公开数据集上达到最先进的表现。 适合人群:计算机视觉领域的研究人员和技术人员,特别是从事跨模态目标检测的研究人员,对Transformer架构有一定了解的开发者。 使用场景及目标:适用于需要将可见光和热成像传感器相结合的应用场合,例如全天候的视频监控系统、无人驾驶汽车、无人

    上海人工智能实验室:金融大模型应用评测报告-摘要版2024.pdf

    上海人工智能实验室:金融大模型应用评测报告-摘要版2024.pdf

    malpass_02_0907.pdf

    malpass_02_0907

    C++-自制学习辅助工具

    C++-自制学习辅助工具

    微信生态系统开发指南:涵盖机器人、小程序及公众号的技术资源整合

    内容概要:本文提供了有关微信生态系统的综合开发指导,具体涵盖了微信机器人的Java与Python开发、全套及特定应用的小程序源码(PHP后台、DeepSeek集成),以及微信公众号的基础开发与智能集成方法。文中不仅给出了各种应用的具体案例和技术要点如图灵API对接、DeepSeek大模型接入等的简述,还指出了相关资源链接以便深度探究或直接获取源码进行开发。 适合人群:有意开发微信应用程序或提升相应技能的技术爱好者和专业人士。不论是初涉者寻求基本理解和操作流程,还是进阶者期望利用提供的资源进行项目构建或是研究。 使用场景及目标:开发者能够根据自身兴趣选择不同方向深入学习微信平台的应用创建,如社交自动化(机器人)、移动互联网服务交付(小程序),或者公众信息服务(公众号)。特别是想要尝试引入AI能力到应用中的人士,文中介绍的内容非常有价值。 其他说明:文中提及的多个项目都涉及到了最新技术栈(如DeepSeek大模型),并且为不同层次的学习者提供从零开始的详细资料。对于那些想要迅速获得成果同时深入了解背后原理的人来说是个很好的起点。

    pimpinella_3cd_01_0916.pdf

    pimpinella_3cd_01_0916

    mellitz_3cd_01_0516.pdf

    mellitz_3cd_01_0516

    schube_3cd_01_0118.pdf

    schube_3cd_01_0118

    [AB PLC例程源码][MMS_046683]ME Faceplates for 1738 Digital and Analog I-O with Descriptions.zip

    AB PLC例程代码项目案例 【备注】 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用!有问题请及时沟通交流。 2、适用人群:计算机相关专业(如计科、信息安全、数据科学与大数据技术、人工智能、通信、物联网、自动化、电子信息等)在校学生、专业老师或者企业员工下载使用。 3、用途:项目具有较高的学习借鉴价值,不仅适用于小白学习入门进阶。也可作为毕设项目、课程设计、大作业、初期项目立项演示等。 4、如果基础还行,或热爱钻研,亦可在此项目代码基础上进行修改添加,实现其他不同功能。 欢迎下载!欢迎交流学习!不清楚的可以私信问我!

    [AB PLC例程源码][MMS_040371]Communication between CompactLogix Controllers on DeviceNet.zip

    AB PLC例程代码项目案例 【备注】 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用!有问题请及时沟通交流。 2、适用人群:计算机相关专业(如计科、信息安全、数据科学与大数据技术、人工智能、通信、物联网、自动化、电子信息等)在校学生、专业老师或者企业员工下载使用。 3、用途:项目具有较高的学习借鉴价值,不仅适用于小白学习入门进阶。也可作为毕设项目、课程设计、大作业、初期项目立项演示等。 4、如果基础还行,或热爱钻研,亦可在此项目代码基础上进行修改添加,实现其他不同功能。 欢迎下载!欢迎交流学习!不清楚的可以私信问我!

    [AB PLC例程源码][MMS_046507]SE Faceplates for 1797 Digital and Analog I-O.zip

    AB PLC例程代码项目案例 【备注】 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用!有问题请及时沟通交流。 2、适用人群:计算机相关专业(如计科、信息安全、数据科学与大数据技术、人工智能、通信、物联网、自动化、电子信息等)在校学生、专业老师或者企业员工下载使用。 3、用途:项目具有较高的学习借鉴价值,不仅适用于小白学习入门进阶。也可作为毕设项目、课程设计、大作业、初期项目立项演示等。 4、如果基础还行,或热爱钻研,亦可在此项目代码基础上进行修改添加,实现其他不同功能。 欢迎下载!欢迎交流学习!不清楚的可以私信问我!

    智慧用电平台建设解决方案【28页】.pptx

    智慧用电平台建设解决方案【28页】

    lusted_3ck_01_0519.pdf

    lusted_3ck_01_0519

Global site tag (gtag.js) - Google Analytics