Vincent Thinking

          All about Vincent's work and life

            BlogJava :: 首頁(yè) :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
            34 隨筆 :: 0 文章 :: 183 評(píng)論 :: 0 Trackbacks
          jbpm作為jboss的一個(gè)子項(xiàng)目,和jboss綁定的比較多,官方文檔也沒(méi)有說(shuō)如何移植,下面就移植作個(gè)簡(jiǎn)要的說(shuō)明。

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

          2. 解壓,導(dǎo)入eclispe的項(xiàng)目中 配置MYSQL 1. 在eclipse的jpbm項(xiàng)目中加入mysql的lib 2. mysql創(chuàng)建一個(gè)數(shù)據(jù)庫(kù)"jbpm"

          3. 在eclipse的jbpm項(xiàng)目中找到'jbpm-3.0\src\resources'目錄,創(chuàng)建一個(gè)自目錄'mysql'

          4. 把同目錄hsqldb文件夾中的2個(gè)文件(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項(xiàng)目中找到ant腳本'build.deploy.xml',進(jìn)行編輯 找到 target name="create.db", 刪除 db.start, db.stop 在這個(gè)目標(biāo)塊中將所有的'hsqldb' 替換為 'mysql'

          7. 運(yùn)行ant create.db -buildfile build.deploy.xml創(chuàng)建jbpm表結(jié)構(gòu)

          8. 找到target name="build.webapp"按下面進(jìn)行編輯
            <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. 運(yùn)行ANT腳本ant build.webapp -buildfile build.deploy.xml 生成jbpm.war,拷貝到tomcat web目錄中,啟動(dòng)tomcat,輸入'http://localhost:8080/jbpm' 就可以看到他的example
          posted on 2005-12-19 17:26 Vincent Thinking 閱讀(5829) 評(píng)論(14)  編輯  收藏 所屬分類: WorkFlow

          評(píng)論

          # re: JBPM- 整合Jbpm,tomcat,mysql 2006-04-07 21:56 waitray
          請(qǐng)問(wèn)樓主如果是JBPM3.1應(yīng)該怎么整合到tomcat中?

          “9. 找到目錄src/resources,編輯jbpm.properties文件”這個(gè)步驟無(wú)法實(shí)現(xiàn)。

          我是在JBOSS的論壇上鏈接過(guò)來(lái)的,希望樓主能給予幫助  回復(fù)  更多評(píng)論
            

          # re: JBPM- 整合Jbpm,tomcat,mysql 2006-04-10 14:16 Vincent Thinking
          怎么無(wú)法實(shí)現(xiàn)?

          最近太忙,回復(fù)的慢了。。  回復(fù)  更多評(píng)論
            

          # re: JBPM- 整合Jbpm,tomcat,mysql 2006-05-25 14:20 rui
          樓主有沒(méi)有試過(guò)把jbpm3.1.1移到tomcat+ oracle上?jbpm3.0跟jbpm3.1.1有比較多的變動(dòng)  回復(fù)  更多評(píng)論
            

          # re: JBPM- 整合Jbpm,tomcat,mysql 2006-05-25 14:22 rui
          樓主有聯(lián)系方式嗎?  回復(fù)  更多評(píng)論
            

          # re: JBPM- 整合Jbpm,tomcat,mysql 2006-05-26 09:31 Vincent Thinking
          最近沒(méi)有在做jbpm相關(guān)的工作.

          jbpm的數(shù)據(jù)層用的是hibernate,移植數(shù)據(jù)庫(kù)我想問(wèn)題應(yīng)該不大.  回復(fù)  更多評(píng)論
            

          # re: JBPM- 整合Jbpm,tomcat,mysql 2006-08-18 14:22 zhang
          怎么沒(méi)有大牛留下點(diǎn) 聯(lián)系方式阿,
          希望最近在看JBPM的兄弟姐妹加我,QQ:57875031,一起學(xué)習(xí)  回復(fù)  更多評(píng)論
            

          # re: JBPM- 整合Jbpm,tomcat,mysql 2006-08-30 00:14 樓主沒(méi)抄全吧,那個(gè)文件根本就沒(méi)有啊
          樓主沒(méi)抄全吧,那個(gè)文件根本就沒(méi)有啊  回復(fù)  更多評(píng)論
            

          # re: JBPM- 整合Jbpm,tomcat,mysql 2006-09-08 10:24 maya
          我按你的步驟,很順利.不過(guò)在http://localhost:8080/jbpm/時(shí)報(bào):

          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.

            回復(fù)  更多評(píng)論
            

          # re: JBPM- 整合Jbpm,tomcat,mysql 2006-09-22 14:52 powermore
          不知樓上的錯(cuò)誤解決了沒(méi)有,我也犯了同樣的錯(cuò)誤。  回復(fù)  更多評(píng)論
            

          # re: JBPM- 整合Jbpm,tomcat,mysql[未登錄](méi) 2007-06-19 15:57 soa
          根本就沒(méi)有jbpm.properties這個(gè)文件啊,怎么修改呢?  回復(fù)  更多評(píng)論
            

          # re: JBPM- 整合Jbpm,tomcat,mysql[未登錄](méi) 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>

          樓主的任務(wù)少copy的兩個(gè)jar  回復(fù)  更多評(píng)論
            

          # re: JBPM- 整合Jbpm,tomcat,mysql 2007-09-30 14:23 hao0374
          我這里有個(gè)成功的誰(shuí)要?  回復(fù)  更多評(píng)論
            

          # re: JBPM- 整合Jbpm,tomcat,mysql 2009-05-12 15:10 jjtking
          成功的給我發(fā)一份,jjtking@163.com  回復(fù)  更多評(píng)論
            

          # re: JBPM- 整合Jbpm,tomcat,mysql[未登錄](méi) 2013-08-23 17:40 aa
          @hao0374
          650868686@qq.com 謝謝  回復(fù)  更多評(píng)論
            


          只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 肃北| 简阳市| 崇文区| 嘉兴市| 崇州市| 平阳县| 郓城县| 鸡西市| 山东省| 台江县| 镇雄县| 滕州市| 霍州市| 安宁市| 蒙阴县| 汉源县| 大宁县| 商丘市| 门头沟区| 理塘县| 柘城县| 定日县| 柳河县| 增城市| 元江| 浦北县| 金塔县| 张家川| 寿阳县| 溧水县| 贵溪市| 封丘县| 双流县| 蕲春县| 波密县| 姚安县| 禹城市| 汉沽区| 怀安县| 甘肃省| 永州市|