Vincent Thinking

All about Vincent's work and life

  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  34 随笔 :: 0 文章 :: 183 评论 :: 0 Trackbacks
jbpm作为jboss的一个子项目,和jboss绑定的比较多,官方文档也没有说如何移植,下面就移植作个简要的说明。

1. 下载jbpm http://www.jboss.com/products/jbpm/downloads

2. 解压,导入eclispe的项目中 配置MYSQL 1. 在eclipse的jpbm项目中加入mysql的lib 2. mysql创建一个数据库"jbpm"

3. 在eclipse的jbpm项目中找到'jbpm-3.0\src\resources'目录,创建一个自目录'mysql'

4. 把同目录hsqldb文件夹中的2个文件(create.db.hibernate.properties, identity.db.xml)拷贝到mysql目录中

5. 按下面所示编辑 'create.db.hibernate.properties'

hibernate.dialect=org.hibernate.dialect.MySQLDialect
hibernate.connection.driver_class
=com.mysql.jdbc.Driver
hibernate.connection.url
=jdbc:mysql://localhost:3306/jbpm
hibernate.connection.username
=root
hibernate.connection.password
=root
hibernate.c3p0.min_size
=1
hibernate.c3p0.max_size
=3
hibernate.show_sql
=true


6. 在eclipse的jbpm项目中找到ant脚本'build.deploy.xml',进行编辑 找到 target name="create.db", 删除 db.start, db.stop 在这个目标块中将所有的'hsqldb' 替换为 'mysql'

7. 运行ant create.db -buildfile build.deploy.xml创建jbpm表结构

8. 找到target name="build.webapp"按下面进行编辑
  <target name="build.webapp" description="builds jbpm.war">
    
<ant antfile="build.xml" target="build.webapp" /> 
    
<mkdir dir="build/jbpm.war.dir" /> 
    
<copy todir="build/jbpm.war.dir">
      
<fileset dir="src/resources/jbpm.war" /> 
    
</copy> 
    
<copy todir="build/jbpm.war.dir/WEB-INF/lib">
      
<fileset dir="build" includes="jbpm-webapp-${jbpm.version}.jar" /> 
      
<fileset dir="lib/jsf" includes="*.jar" /> 
      
<fileset dir="lib/commons" includes="commons-digester-*.jar, commons-beanutils-*.jar" /> 
    
</copy> 
    
<jar destfile="build/jbpm.war">
      
<fileset dir="build/jbpm.war.dir" />
    
</jar> 
  
</target>


9. 找到目录src/resources,编辑jbpm.properties文件
jbpm.scheduler.service.factory=org.jbpm.scheduler.impl.SchedulerServiceImpl
jbpm.task.instance.class
=org.jbpm.taskmgmt.exe.TaskInstance

# uncomment the next line if JbpmSessionFactory.getInstance()
# should lookup the singleton instance from JNDI instead of creating 
# a default one.
#
#jbpm.session.factory.jndi.name
=java:/jbpm/JbpmSessionFactory

# uncomment the next line to use the file system instead of the database for 
# storing files related to a process definition
#
# jbpm.files.dir
=c:/jbpm.data

# resource path to a properties file that will overwrite all the hibernate 
# properties. For database specific builds in db project there is a different
# hibernate.properties file on the classpath for each database. You could change
# the default database for any testing runs by uncommenting the next line and
# adding a hibernate.properties file in the basedir.
#
jbpm.hibernate.cfg.xml
=jbpm.hibernate.cfg.xml
#jbpm.hibernate.properties
=jbpm.hibernate.properties

编辑jbpm.hibernate.properties文件
#hibernate.dialect=org.hibernate.dialect.HSQLDialect
#hibernate.connection.datasource
=java:/DefaultDS

10. 找到src/config.files目录,编辑hibernate.cfg.xml文件
    <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
    
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
    
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/jbpm3</property>
    
<property name="hibernate.connection.username">root</property>
    
<property name="hibernate.connection.password">root</property>
        
    
<!-- c3p0 connection pooling properties-->
    
<property name="hibernate.c3p0.min_size">1</property>
    
<property name="hibernate.c3p0.max_size">3</property>

    
<property name="hibernate.query.substitutions">true 1, false 0</property>
    
<property name="hibernate.connection.pool_size">15</property>

11. 运行ANT脚本ant build.webapp -buildfile build.deploy.xml 生成jbpm.war,拷贝到tomcat web目录中,启动tomcat,输入'http://localhost:8080/jbpm' 就可以看到他的example
posted on 2005-12-19 17:26 Vincent Thinking 阅读(5791) 评论(14)  编辑  收藏 所属分类: WorkFlow

评论

# re: JBPM- 整合Jbpm,tomcat,mysql 2006-04-07 21:56 waitray
请问楼主如果是JBPM3.1应该怎么整合到tomcat中?

“9. 找到目录src/resources,编辑jbpm.properties文件”这个步骤无法实现。

我是在JBOSS的论坛上链接过来的,希望楼主能给予帮助  回复  更多评论
  

# re: JBPM- 整合Jbpm,tomcat,mysql 2006-04-10 14:16 Vincent Thinking
怎么无法实现?

最近太忙,回复的慢了。。  回复  更多评论
  

# re: JBPM- 整合Jbpm,tomcat,mysql 2006-05-25 14:20 rui
楼主有没有试过把jbpm3.1.1移到tomcat+ oracle上?jbpm3.0跟jbpm3.1.1有比较多的变动  回复  更多评论
  

# re: JBPM- 整合Jbpm,tomcat,mysql 2006-05-25 14:22 rui
楼主有联系方式吗?  回复  更多评论
  

# re: JBPM- 整合Jbpm,tomcat,mysql 2006-05-26 09:31 Vincent Thinking
最近没有在做jbpm相关的工作.

jbpm的数据层用的是hibernate,移植数据库我想问题应该不大.  回复  更多评论
  

# re: JBPM- 整合Jbpm,tomcat,mysql 2006-08-18 14:22 zhang
怎么没有大牛留下点 联系方式阿,
希望最近在看JBPM的兄弟姐妹加我,QQ:57875031,一起学习  回复  更多评论
  

# re: JBPM- 整合Jbpm,tomcat,mysql 2006-08-30 00:14 楼主没抄全吧,那个文件根本就没有啊
楼主没抄全吧,那个文件根本就没有啊  回复  更多评论
  

# re: JBPM- 整合Jbpm,tomcat,mysql 2006-09-08 10:24 maya
我按你的步骤,很顺利.不过在http://localhost:8080/jbpm/时报:

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Filter execution threw an exception
org.jbpm.webapp.filter.ContextFilter.doFilter(ContextFilter.java:19)
org.jbpm.webapp.filter.LogFilter.doFilter(LogFilter.java:38)


root cause

java.lang.NoClassDefFoundError
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Class.java:141)
org.jbpm.webapp.context.Context.class$(Context.java:33)
org.jbpm.webapp.context.Context.getPersistenceContext(Context.java:33)
org.jbpm.webapp.filter.PersistenceFilter.doFilter(PersistenceFilter.java:22)
org.jbpm.webapp.filter.ContextFilter.doFilter(ContextFilter.java:19)
org.jbpm.webapp.filter.LogFilter.doFilter(LogFilter.java:38)


note The full stack trace of the root cause is available in the Tomcat logs.

  回复  更多评论
  

# re: JBPM- 整合Jbpm,tomcat,mysql 2006-09-22 14:52 powermore
不知楼上的错误解决了没有,我也犯了同样的错误。  回复  更多评论
  

# re: JBPM- 整合Jbpm,tomcat,mysql[未登录] 2007-06-19 15:57 soa
根本就没有jbpm.properties这个文件啊,怎么修改呢?  回复  更多评论
  

# re: JBPM- 整合Jbpm,tomcat,mysql[未登录] 2007-07-17 14:15 adu
<copy todir="build/jbpm.war.dir/WEB-INF/lib">
<fileset dir="build" includes="jbpm-${jbpm.version}.jar" />
<fileset dir="build" includes="jbpm-identity-${jbpm.version}.jar" />
<fileset dir="build" includes="jbpm-webapp-${jbpm.version}.jar" />
<fileset dir="lib/jsf" includes="*.jar" />
<fileset dir="lib/dom4j" includes="*.jar" />
<fileset dir="lib/hibernate" includes="jaxen-*.jar" />
<fileset dir="lib/commons" includes="commons-digester-*.jar, commons-beanutils-*.jar, commons-fileupload-*.jar" />
</copy>

楼主的任务少copy的两个jar  回复  更多评论
  

# re: JBPM- 整合Jbpm,tomcat,mysql 2007-09-30 14:23 hao0374
我这里有个成功的谁要?  回复  更多评论
  

# re: JBPM- 整合Jbpm,tomcat,mysql 2009-05-12 15:10 jjtking
成功的给我发一份,jjtking@163.com  回复  更多评论
  

# re: JBPM- 整合Jbpm,tomcat,mysql[未登录] 2013-08-23 17:40 aa
@hao0374
650868686@qq.com 谢谢  回复  更多评论
  


只有注册用户登录后才能发表评论。


网站导航: