精华帖 (6) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
|
||||||
---|---|---|---|---|---|---|
作者 | 正文 | |||||
发表时间:2008-03-26
相关资料:
系统平台:
系统环境: Windows 2003 | SUN JDK1.6U4 | Tomcat6.0.14 | jbpm-starters-kit-3.1.4 | MySQL 6.0 主机完整名称: zsy-aten 浏览器 Internet Explorer 6.0
安装包及相关软件:
1、 安装JDK与MySQL JDK的安装这里就不多说了,学过Java的人都知道,本实验安装的是jdk-6u4版本。安装完后记得添加JAVA_HOME的环境变量。 MySQL的安装不属于本文的介绍范围,请参阅相关文档。本实验安装的是MySQL 6.0版本,安装完后建立的数据库名为jbpm,创建的用户名为jbpmuser,密码为shine。 2、 安装Tomcat下载安装Tomcat-6.0.16是目前最新版本:http://apache.mirror.phpchina.com/tomcat/tomcat-6/v6.0.16/bin/apache-tomcat-6.0.16.exe ;要在JDK安装之后安装Tomcat,安装过程中会自动搜索JRE的目录,当然也可以选择其它的JRE,其它默认设置即可。 3、 安装AntAnt 是一个编译工具,使用 jBPM 时必须用它来编译文件, jBPM 中的很多操作都要用到 Ant ,安装方法如下: (1) 先下载:http://apache.mirror.phpchina.com/ant/binaries/apache-ant-1.7.0-bin.zip; (2) 解压到 E:\Java\tools\apache-ant-1.7.0 (当然其他目录也可以); (3) 设置环境变量:ANT_HOME= E:\Java\tools\apache-ant-1.7.0; (4)把 %ANT_HOME%\bin 加入到环境变量 PATH 中。 4、 安装jBPM下载jBPM-JPDL本为3.2.2:http://labs.jboss.com/jbossjbpm/jbpm_downloads/下载jPDL Suite版,这个版本是包含所有的一整套工具,下载后是个压缩包解压到 E:\Java\tools :、\jbpm-jpdl-3.2.2 ,目录下主要包含以下几个子目录: l src —— jBPM 的源代码 l config —— jBPM及Hibernate与log4j的配置文件 l db —— 各种数据库的建表SQL语句 l lib —— 依赖的第三方依赖类库 l doc —— API文档及用户使用向导 l designer —— 辅助开发 jBPM 的 Eclipse 插件,具体在 eclipse子目录中 l server —— 一个已经配置好了的基于 JBoss 的 jBPM 控制台及示例 5、 安装Eclipse及jBPM开发插件Eclipse不是开发 jBPM 必须的工具,但它是对 jBPM 开发很有帮助的工具,特别是 jBPM 提供了一个 Eclipse 插件用来辅助开发 jBPM 。关于 Eclipse 的安装请参阅相关文档。本实验安装的是MyEclipse6.0集成Eclipse3.3。 安装完Eclipse安装jBPM的开发插件,步骤如下: (1) 打开Eclipse选择菜单“Help->Software Updates->Find and Install”; (2) 弹出窗口中选择“Search for new features to install”,然后点击“Next >”;如图
(3) 点击按扭“New Local Site…”选择插件目录,位于designer\ eclipse目录下,如:E:\Java\tools\jbpm-jpdl-3.2.2\designer\eclipse。选定后点“OK”,如图
(4) 选中“designer/eclipse”,然后点击“Finish”,如图
(5) 然后选择同意条款,接提示步骤安装就可以了。 到此为止需要的所有工具都安装好了。接下来先体验一下jBPM工作流。在 JBoss jBPM Starters Kit 的 jbpm-server 目录是一个已经在JBoss中配置好的了 jBPM 示例,双击 jbpm-server 目录下的 start.bat 文件,启动 JBoss 服务。打开网页: http://localhost:8080/ jbpm-console 得到如下页面: 这是一个流程控制管理平台,用右边的账号与密码就可以登录,这个控制台包括流程管理,可以部署流程、删除流程、查看流程图、管理流程实例等;还有任务管理,工作管理及用户与用户组管理。
基于Tomcat和MySQL的部署:
现在要把上面演示的例子部署到Tomcat中,并将数据数配置为MySQL。 STEP 1,初始化数据库jBPM 需要数据库支持, jBPM 会把自己的一个初始化数据存储到数据库,同时工作流的数据也是存储到数据库中的。 jBPM 使用 Hibernate 作为的存储层。在E:\Java\tools\jbpm-jpdl-3.2.2\db\目录下有个jbpm.jpdl.mysql.sql数据库脚本文件。我们不能直接导入该文件, 会提示有错误, 应为该文件格式有问题, 首先打开该文件(推荐UltraEdit), 把前面的 alter table JBPM_XX 语句都删除(因为我们使用的是新的数据库,所以需要这些语句, 这个脚本文件是升级3.2的数据库表结构用的) 然后在每一行前面添加一个分号 不然脚本执行会出错。这样就可以用source命令导入了。 导入后, 表结构创建成功。 STEP 2,准备发布包在E:\Java\tools\jbpm-jpdl-3.2.2\deploy 文件夹下 运行ant customize.console.for.tomcat。执行命令后会在 E:\Java\tools\jbpm-jpdl-3.2.2\deploy\customized文件夹下生成一个jbpm-console.war 文件,用WinRaR解压开,并复制到已安装Tomcat的webapps目录下,jbpm还需三个依赖类库,分别是commons-collections.jar、ehcache-1.2.3.jar、jta.jar,当然还有个MySQL驱动mysql-connector-java-5.0.7-bin.jar,添加这些jar文件 到 \$CATALINA_HOME\webapps\jbpm-console\WEB-INF\lib目录下。 STEP 3,修改Hibernate数据库配置文件修改\$CATALINA_HOME\webapps\jbpm-console\WEB-INF\classes下hibernate.cfg.xml文件。这是Hibernate的数据库配置文件,要做一些修改,原来内容如下:
修改后如下:
有两种方法都可以实现,但摧荐第一种方法。 方法一:配置一个JDBC Realm,在\$CATALINA_HOME\webapps\jbpm-console\META-INF目录下新建context.xml文件,内容如下:
方法二:直接修改 /$CATALINA_HOME/conf/tomcat-users.xml文件来设置安全域。为了不和tomcat已有的用户冲突,这里把 tomcat以前的登陆帐号username="admin" 修改为username="tadmin",修改后的文件如下:
STEP 5,初始化基础的用户数据 在MySQL数据库中执行以下SQL语句,进行初始化用户信息,如下:
启动时查看Tomcat的日志,检查是否正常启动,未添加所有支持库或数据库配置出错,都会引起启动失败。 注意:到此为止启动Tomcat,JBPM服务就能正常运行了,已经可以在上面发布流程,接着第五步中部署一个jbpm自带的流程例子。
STEP 7,发布例子流程 打开网页:http://localhost:8080/jbpm 得到如下页面就说明已经部署成功:
用右边的manage账号登录,如下图: 点击“Deploy”转到部署流程页面,点击“浏览”按扭选择E:\Java\tools\jbpm-jpdl-3.2.2\examples\websale\target\websale.jpdl文件,名后点击“Deploy”按扭部署。
声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
||||||
返回顶楼 | ||||||
发表时间:2008-03-27
按照上面的步骤操作,最后启动tomcat的时候最后除了一句:Not binding factory to JNDI, no JNDI name configured。不知道什么原因。从网上查了半天,也没查到结果。望指点。
|
||||||
返回顶楼 | ||||||
发表时间:2008-03-27
有个包用的版本和你说的不一样:ehcache-1.4.1.jar
配置文件是: <property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property> <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property> <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/jbpm</property> <property name="hibernate.connection.username">jbpmuser</property><!-- jbpmuser --> <property name="hibernate.connection.password">123456</property><!-- shine --> <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property> 其中jbpmuser 是我建的用户 |
||||||
返回顶楼 | ||||||
发表时间:2008-03-27
tomcat信息:
信息: Reading mappings from resource : org/jbpm/graph/log/TransitionLog.hbm.xml 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindSubclass 信息: Mapping subclass: org.jbpm.graph.log.TransitionLog -> JBPM_LOG 2008-3-27 20:24:46 org.hibernate.cfg.Configuration addResource 信息: Reading mappings from resource : org/jbpm/context/log/VariableLog.hbm.xml 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindSubclass 信息: Mapping subclass: org.jbpm.context.log.VariableLog -> JBPM_LOG 2008-3-27 20:24:46 org.hibernate.cfg.Configuration addResource 信息: Reading mappings from resource : org/jbpm/context/log/VariableCreateLog.hb m.xml 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindSubclass 信息: Mapping subclass: org.jbpm.context.log.VariableCreateLog -> JBPM_LOG 2008-3-27 20:24:46 org.hibernate.cfg.Configuration addResource 信息: Reading mappings from resource : org/jbpm/context/log/VariableDeleteLog.hb m.xml 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindSubclass 信息: Mapping subclass: org.jbpm.context.log.VariableDeleteLog -> JBPM_LOG 2008-3-27 20:24:46 org.hibernate.cfg.Configuration addResource 信息: Reading mappings from resource : org/jbpm/context/log/VariableUpdateLog.hb m.xml 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindSubclass 信息: Mapping subclass: org.jbpm.context.log.VariableUpdateLog -> JBPM_LOG 2008-3-27 20:24:46 org.hibernate.cfg.Configuration addResource 信息: Reading mappings from resource : org/jbpm/context/log/variableinstance/Byt eArrayUpdateLog.hbm.xml 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindSubclass 信息: Mapping subclass: org.jbpm.context.log.variableinstance.ByteArrayUpdateLog -> JBPM_LOG 2008-3-27 20:24:46 org.hibernate.cfg.Configuration addResource 信息: Reading mappings from resource : org/jbpm/context/log/variableinstance/Dat eUpdateLog.hbm.xml 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindSubclass 信息: Mapping subclass: org.jbpm.context.log.variableinstance.DateUpdateLog -> J BPM_LOG 2008-3-27 20:24:46 org.hibernate.cfg.Configuration addResource 信息: Reading mappings from resource : org/jbpm/context/log/variableinstance/Dou bleUpdateLog.hbm.xml 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindSubclass 信息: Mapping subclass: org.jbpm.context.log.variableinstance.DoubleUpdateLog -> JBPM_LOG 2008-3-27 20:24:46 org.hibernate.cfg.Configuration addResource 信息: Reading mappings from resource : org/jbpm/context/log/variableinstance/Hib ernateLongUpdateLog.hbm.xml 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindSubclass 信息: Mapping subclass: org.jbpm.context.log.variableinstance.HibernateLongUpdat eLog -> JBPM_LOG 2008-3-27 20:24:46 org.hibernate.cfg.Configuration addResource 信息: Reading mappings from resource : org/jbpm/context/log/variableinstance/Hib ernateStringUpdateLog.hbm.xml 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindSubclass 信息: Mapping subclass: org.jbpm.context.log.variableinstance.HibernateStringUpd ateLog -> JBPM_LOG 2008-3-27 20:24:46 org.hibernate.cfg.Configuration addResource 信息: Reading mappings from resource : org/jbpm/context/log/variableinstance/Lon gUpdateLog.hbm.xml 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindSubclass 信息: Mapping subclass: org.jbpm.context.log.variableinstance.LongUpdateLog -> J BPM_LOG 2008-3-27 20:24:46 org.hibernate.cfg.Configuration addResource 信息: Reading mappings from resource : org/jbpm/context/log/variableinstance/Str ingUpdateLog.hbm.xml 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindSubclass 信息: Mapping subclass: org.jbpm.context.log.variableinstance.StringUpdateLog -> JBPM_LOG 2008-3-27 20:24:46 org.hibernate.cfg.Configuration addResource 信息: Reading mappings from resource : org/jbpm/taskmgmt/log/TaskLog.hbm.xml 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindSubclass 信息: Mapping subclass: org.jbpm.taskmgmt.log.TaskLog -> JBPM_LOG 2008-3-27 20:24:46 org.hibernate.cfg.Configuration addResource 信息: Reading mappings from resource : org/jbpm/taskmgmt/log/TaskCreateLog.hbm.x ml 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindSubclass 信息: Mapping subclass: org.jbpm.taskmgmt.log.TaskCreateLog -> JBPM_LOG 2008-3-27 20:24:46 org.hibernate.cfg.Configuration addResource 信息: Reading mappings from resource : org/jbpm/taskmgmt/log/TaskAssignLog.hbm.x ml 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindSubclass 信息: Mapping subclass: org.jbpm.taskmgmt.log.TaskAssignLog -> JBPM_LOG 2008-3-27 20:24:46 org.hibernate.cfg.Configuration addResource 信息: Reading mappings from resource : org/jbpm/taskmgmt/log/TaskEndLog.hbm.xml 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindSubclass 信息: Mapping subclass: org.jbpm.taskmgmt.log.TaskEndLog -> JBPM_LOG 2008-3-27 20:24:46 org.hibernate.cfg.Configuration addResource 信息: Reading mappings from resource : org/jbpm/taskmgmt/log/SwimlaneLog.hbm.xml 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindSubclass 信息: Mapping subclass: org.jbpm.taskmgmt.log.SwimlaneLog -> JBPM_LOG 2008-3-27 20:24:46 org.hibernate.cfg.Configuration addResource 信息: Reading mappings from resource : org/jbpm/taskmgmt/log/SwimlaneCreateLog.h bm.xml 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindSubclass 信息: Mapping subclass: org.jbpm.taskmgmt.log.SwimlaneCreateLog -> JBPM_LOG 2008-3-27 20:24:46 org.hibernate.cfg.Configuration addResource 信息: Reading mappings from resource : org/jbpm/taskmgmt/log/SwimlaneAssignLog.h bm.xml 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindSubclass 信息: Mapping subclass: org.jbpm.taskmgmt.log.SwimlaneAssignLog -> JBPM_LOG 2008-3-27 20:24:46 org.hibernate.cfg.Configuration doConfigure 信息: Configured SessionFactory: null 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindSubclass 信息: Mapping subclass: org.jbpm.graph.action.MailAction -> JBPM_ACTION 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindSubclass 信息: Mapping subclass: org.jbpm.graph.action.Script -> JBPM_ACTION 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindSubclass 信息: Mapping subclass: org.jbpm.context.def.ContextDefinition -> JBPM_MODULEDEF INITION 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindSubclass 信息: Mapping subclass: org.jbpm.taskmgmt.def.TaskMgmtDefinition -> JBPM_MODULED EFINITION 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindCollectionSecondPass 信息: Mapping collection: org.jbpm.identity.User.memberships -> JBPM_ID_MEMBERSH IP 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindCollectionSecondPass 信息: Mapping collection: org.jbpm.identity.Group.children -> JBPM_ID_GROUP 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindCollectionSecondPass 信息: Mapping collection: org.jbpm.identity.Group.memberships -> JBPM_ID_MEMBERS HIP 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindCollectionSecondPass 信息: Mapping collection: org.jbpm.graph.def.ProcessDefinition.events -> JBPM_EV ENT 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindCollectionSecondPass 信息: Mapping collection: org.jbpm.graph.def.ProcessDefinition.exceptionHandlers -> JBPM_EXCEPTIONHANDLER 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindCollectionSecondPass 信息: Mapping collection: org.jbpm.graph.def.ProcessDefinition.nodes -> JBPM_NOD E 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindCollectionSecondPass 信息: Mapping collection: org.jbpm.graph.def.ProcessDefinition.actions -> JBPM_A CTION 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindCollectionSecondPass 信息: Mapping collection: org.jbpm.graph.def.ProcessDefinition.definitions -> JB PM_MODULEDEFINITION 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindCollectionSecondPass 信息: Mapping collection: org.jbpm.graph.def.Node.events -> JBPM_EVENT 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindCollectionSecondPass 信息: Mapping collection: org.jbpm.graph.def.Node.exceptionHandlers -> JBPM_EXCE PTIONHANDLER 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindCollectionSecondPass 信息: Mapping collection: org.jbpm.graph.def.Node.leavingTransitions -> JBPM_TRA NSITION 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindCollectionSecondPass 信息: Mapping collection: org.jbpm.graph.def.Node.arrivingTransitions -> JBPM_TR ANSITION 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindCollectionSecondPass 信息: Mapping collection: org.jbpm.graph.def.Transition.events -> JBPM_EVENT 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindCollectionSecondPass 信息: Mapping collection: org.jbpm.graph.def.Transition.exceptionHandlers -> JBP M_EXCEPTIONHANDLER 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindCollectionSecondPass 信息: Mapping collection: org.jbpm.graph.def.Event.actions -> JBPM_ACTION 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindCollectionSecondPass 信息: Mapping collection: org.jbpm.graph.def.SuperState.nodes -> JBPM_NODE 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindCollectionSecondPass 信息: Mapping collection: org.jbpm.graph.def.ExceptionHandler.actions -> JBPM_AC TION 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindCollectionSecondPass 信息: Mapping collection: org.jbpm.graph.node.ProcessState.variableAccesses -> J BPM_VARIABLEACCESS 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindCollectionSecondPass 信息: Mapping collection: org.jbpm.graph.node.TaskNode.tasks -> JBPM_TASK 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindCollectionSecondPass 信息: Mapping collection: org.jbpm.taskmgmt.def.Swimlane.tasks -> JBPM_TASK 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindCollectionSecondPass 信息: Mapping collection: org.jbpm.taskmgmt.def.Task.events -> JBPM_EVENT 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindCollectionSecondPass 信息: Mapping collection: org.jbpm.taskmgmt.def.Task.exceptionHandlers -> JBPM_E XCEPTIONHANDLER 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindCollectionSecondPass 信息: Mapping collection: org.jbpm.taskmgmt.def.TaskController.variableAccesses -> JBPM_VARIABLEACCESS 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindCollectionSecondPass 信息: Mapping collection: org.jbpm.file.def.FileDefinition.processFiles -> JBPM_ BYTEARRAY 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindCollectionSecondPass 信息: Mapping collection: org.jbpm.graph.exe.ProcessInstance.runtimeActions -> J BPM_RUNTIMEACTION 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindCollectionSecondPass 信息: Mapping collection: org.jbpm.graph.exe.ProcessInstance.instances -> JBPM_M ODULEINSTANCE 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindCollectionSecondPass 信息: Mapping collection: org.jbpm.graph.exe.Token.children -> JBPM_TOKEN 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindCollectionSecondPass 信息: Mapping collection: org.jbpm.graph.exe.Token.comments -> JBPM_COMMENT 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindCollectionSecondPass 信息: Mapping collection: org.jbpm.context.exe.ContextInstance.tokenVariableMaps -> JBPM_TOKENVARIABLEMAP 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindCollectionSecondPass 信息: Mapping collection: org.jbpm.context.exe.TokenVariableMap.variableInstance s -> JBPM_VARIABLEINSTANCE 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindCollectionSecondPass 信息: Mapping collection: org.jbpm.taskmgmt.exe.TaskMgmtInstance.swimlaneInstanc es -> JBPM_SWIMLANEINSTANCE 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindCollectionSecondPass 信息: Mapping collection: org.jbpm.taskmgmt.exe.TaskMgmtInstance.taskInstances - > JBPM_TASKINSTANCE 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindCollectionSecondPass 信息: Mapping collection: org.jbpm.taskmgmt.exe.TaskInstance.variableInstances - > JBPM_VARIABLEINSTANCE 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindCollectionSecondPass 信息: Mapping collection: org.jbpm.taskmgmt.exe.TaskInstance.comments -> JBPM_CO MMENT 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindCollectionSecondPass 信息: Mapping collection: org.jbpm.taskmgmt.exe.SwimlaneInstance.pooledActors -> JBPM_POOLEDACTOR 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindCollectionSecondPass 信息: Mapping collection: org.jbpm.logging.log.CompositeLog.children -> JBPM_LOG 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindCollectionSecondPass 信息: Mapping collection: org.jbpm.graph.action.Script.variableAccesses -> JBPM_ VARIABLEACCESS 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindCollectionSecondPass 信息: Mapping collection: org.jbpm.taskmgmt.def.TaskMgmtDefinition.swimlanes -> JBPM_SWIMLANE 2008-3-27 20:24:46 org.hibernate.cfg.HbmBinder bindCollectionSecondPass 信息: Mapping collection: org.jbpm.taskmgmt.def.TaskMgmtDefinition.tasks -> JBPM _TASK 2008-3-27 20:24:46 org.hibernate.connection.DriverManagerConnectionProvider conf igure 信息: Using Hibernate built-in connection pool (not for production use!) 2008-3-27 20:24:46 org.hibernate.connection.DriverManagerConnectionProvider conf igure 信息: Hibernate connection pool size: 20 2008-3-27 20:24:46 org.hibernate.connection.DriverManagerConnectionProvider conf igure 信息: autocommit mode: false 2008-3-27 20:24:46 org.hibernate.connection.DriverManagerConnectionProvider conf igure 信息: using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://localhost:3306/jb pm 2008-3-27 20:24:46 org.hibernate.connection.DriverManagerConnectionProvider conf igure 信息: connection properties: {user=jbpmuser, password=****} 2008-3-27 20:24:47 org.hibernate.cfg.SettingsFactory buildSettings 信息: RDBMS: MySQL, version: 5.0.22-community-nt 2008-3-27 20:24:47 org.hibernate.cfg.SettingsFactory buildSettings 信息: JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-5.0.8 ( R evision: ${svn.Revision} ) 2008-3-27 20:24:47 org.hibernate.dialect.Dialect <init> 信息: Using dialect: org.hibernate.dialect.MySQLInnoDBDialect 2008-3-27 20:24:47 org.hibernate.transaction.TransactionFactoryFactory buildTran sactionFactory 信息: Using default transaction strategy (direct JDBC transactions) 2008-3-27 20:24:47 org.hibernate.transaction.TransactionManagerLookupFactory get TransactionManagerLookup 信息: No TransactionManagerLookup configured (in JTA environment, use of read-wr ite or transactional second-level cache is not recommended) 2008-3-27 20:24:47 org.hibernate.cfg.SettingsFactory buildSettings 信息: Automatic flush during beforeCompletion(): disabled 2008-3-27 20:24:47 org.hibernate.cfg.SettingsFactory buildSettings 信息: Automatic session close at end of transaction: disabled 2008-3-27 20:24:47 org.hibernate.cfg.SettingsFactory buildSettings 信息: JDBC batch size: 15 2008-3-27 20:24:47 org.hibernate.cfg.SettingsFactory buildSettings 信息: JDBC batch updates for versioned data: disabled 2008-3-27 20:24:47 org.hibernate.cfg.SettingsFactory buildSettings 信息: Scrollable result sets: enabled 2008-3-27 20:24:47 org.hibernate.cfg.SettingsFactory buildSettings 信息: JDBC3 getGeneratedKeys(): enabled 2008-3-27 20:24:47 org.hibernate.cfg.SettingsFactory buildSettings 信息: Connection release mode: auto 2008-3-27 20:24:47 org.hibernate.cfg.SettingsFactory buildSettings 信息: Maximum outer join fetch depth: 2 2008-3-27 20:24:47 org.hibernate.cfg.SettingsFactory buildSettings 信息: Default batch fetch size: 1 2008-3-27 20:24:47 org.hibernate.cfg.SettingsFactory buildSettings 信息: Generate SQL with comments: disabled 2008-3-27 20:24:47 org.hibernate.cfg.SettingsFactory buildSettings 信息: Order SQL updates by primary key: disabled 2008-3-27 20:24:47 org.hibernate.cfg.SettingsFactory createQueryTranslatorFactor y 信息: Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory 2008-3-27 20:24:47 org.hibernate.hql.ast.ASTQueryTranslatorFactory <init> 信息: Using ASTQueryTranslatorFactory 2008-3-27 20:24:47 org.hibernate.cfg.SettingsFactory buildSettings 信息: Query language substitutions: {} 2008-3-27 20:24:47 org.hibernate.cfg.SettingsFactory buildSettings 信息: JPA-QL strict compliance: disabled 2008-3-27 20:24:47 org.hibernate.cfg.SettingsFactory buildSettings 信息: Second-level cache: enabled 2008-3-27 20:24:47 org.hibernate.cfg.SettingsFactory buildSettings 信息: Query cache: disabled 2008-3-27 20:24:47 org.hibernate.cfg.SettingsFactory createCacheProvider 信息: Cache provider: org.hibernate.cache.HashtableCacheProvider 2008-3-27 20:24:47 org.hibernate.cfg.SettingsFactory buildSettings 信息: Optimize cache for minimal puts: disabled 2008-3-27 20:24:47 org.hibernate.cfg.SettingsFactory buildSettings 信息: Structured second-level cache entries: disabled 2008-3-27 20:24:47 org.hibernate.cfg.SettingsFactory buildSettings 信息: Statistics: disabled 2008-3-27 20:24:47 org.hibernate.cfg.SettingsFactory buildSettings 信息: Deleted entity synthetic identifier rollback: disabled 2008-3-27 20:24:47 org.hibernate.cfg.SettingsFactory buildSettings 信息: Default entity-mode: pojo 2008-3-27 20:24:47 org.hibernate.cfg.SettingsFactory buildSettings 信息: Named query checking : enabled 2008-3-27 20:24:47 org.hibernate.impl.SessionFactoryImpl <init> 信息: building session factory 2008-3-27 20:24:49 org.hibernate.impl.SessionFactoryObjectFactory addInstance 信息: Not binding factory to JNDI, no JNDI name configured |
||||||
返回顶楼 | ||||||
发表时间:2008-03-27
mysql驱动和你说得不一致:mysql-connector-java-5.0.8-bin.jar
|
||||||
返回顶楼 | ||||||
发表时间:2008-03-27
刚好在学习入门,网上找到的都是3.1的,这下终于有了3.2,谢谢
|
||||||
返回顶楼 | ||||||
发表时间:2008-03-28
楼上哒,有什么问题吗?
看到你说的几个包的版本了,小版本差异一般不会对服务造成影响的。 你的启动日志貌似都正常啊。 |
||||||
返回顶楼 | ||||||
发表时间:2008-03-28
启动tomcat 最后一句信息是:信息: Not binding factory to JNDI, no JNDI name configured。
我开始认为这是个报错信息。地址栏中输入:http://localhost:8080/jbpm报出来404错误。 今天又看看了看 启动后输入http://localhost:8080/jbpm-console/ 正常出现了界面。 不过,在输入用户名密码的时候 页面提示“Login failed. Invalid user name or password. ” 我查了数据库,里面是有用户信息的。 查了tomcat日志,localhost.2008-03-28.log 发现在启动时报错 2008-3-28 13:40:09 org.apache.catalina.core.ApplicationContext log 信息: ContextListener: contextInitialized() 2008-3-28 13:40:09 org.apache.catalina.core.ApplicationContext log 信息: SessionListener: contextInitialized() 2008-3-28 13:40:09 org.apache.catalina.realm.JDBCRealm start 严重: Exception opening database connection java.sql.SQLException: com.mysql.jdbc.Driver at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:691) at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:769) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4230) 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:924) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:887) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1147) 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:578) 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) 在界面输入用户名密码login时报错 2008-3-28 13:41:30 org.apache.catalina.realm.JDBCRealm authenticate 严重: Exception performing authentication java.sql.SQLException: com.mysql.jdbc.Driver at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:691) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:346) at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:258) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:417) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Unknown Source) 2008-3-28 13:41:30 org.apache.catalina.realm.JDBCRealm authenticate 严重: Exception performing authentication java.sql.SQLException: com.mysql.jdbc.Driver at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:691) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:346) at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:258) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:417) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Unknown Source) Tomcat 6.0\webapps\jbpm-console\WEB-INF\classes\hibernate.cfg.xml 中的内容已经修改为 <property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property> <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property> <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/jbpm</property> <property name="hibernate.connection.username">jbpmuser</property><!-- jbpmuser --> <property name="hibernate.connection.password">123456</property><!-- shine --> <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property> 在mysql中执行了 grant select,insert,update,delete on jbpm.* to jbpmuser@localhost identified by "123456"; Tomcat 6.0\conf\server.xml 中应该不需要改动吧 <Resource name="UserDatabase" auth="Container" type="org.apache.catalina.UserDatabase" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" pathname="conf/tomcat-users.xml" /> ----------------------- 总之,我觉得就是从启动使连数据库就有问题了,不知道有什么地方配置的不对,我不知道再怎么弄了,请帮忙,谢谢。 |
||||||
返回顶楼 | ||||||
发表时间:2008-03-28
[/b]尝试第二种方法tomcat安全域设置方法,还是有错。等我再恢复成第一种方法,tomcat启动信息
和以前也不一样了,jbpm没有启动成功。我觉得很奇怪,清了tomcat的work文件夹,重装了tomcat 重启了机器。还是不行。搞来搞去,还不如最开始接近成功了。 tomcat启动信息: 2008-3-28 16:24:40 org.apache.catalina.core.AprLifecycleListener init 信息: The APR based Apache Tomcat Native library which allows optimal performanc e in production environments was not found on the java.library.path: D:\develop\ Tomcat 6.0\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Green AMP Standard\MySQL\bin;D:\develop\ant162\apache-ant-1.6.2\bin;C:\sybase\OCS-12_5 \lib3p;C:\sybase\OCS-12_5\dll;C:\sybase\OCS-12_5\bin;C:\sybase\SQLRemote\dll;C:\ sybase\RPL-12_5\bin;C:\sybase\JS-12_5\bin;C:\sybase\ASE-12_5\dll;C:\sybase\ASE-1 2_5\bin;C:\Program Files\REALTEK Semiconductor Corporation\REALTEK Gigabit and F ast Ethernet NIC Driver;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem; d:\develop\pb6.5\shared;C:\Program Files\Rational\common;C:\Program Files\Java\j dk1.6.0\bin;C:\Program Files\MySQL\MySQL Server 5.0\bin 2008-3-28 16:24:40 org.apache.coyote.http11.Http11Protocol init 信息: Initializing Coyote HTTP/1.1 on http-8080 2008-3-28 16:24:40 org.apache.catalina.startup.Catalina load 信息: Initialization processed in 773 ms 2008-3-28 16:24:40 org.apache.catalina.core.StandardService start 信息: Starting service Catalina 2008-3-28 16:24:40 org.apache.catalina.core.StandardEngine start 信息: Starting Servlet Engine: Apache Tomcat/6.0.16 2008-3-28 16:24:41 org.apache.catalina.core.StandardContext addApplicationListen er 信息: The listener "listeners.ContextListener" is already configured for this co ntext. The duplicate definition has been ignored. 2008-3-28 16:24:41 org.apache.catalina.core.StandardContext addApplicationListen er 信息: The listener "listeners.SessionListener" is already configured for this co ntext. The duplicate definition has been ignored. 2008-3-28 16:24:41 org.apache.catalina.loader.WebappClassLoader validateJarFile 信息: validateJarFile(D:\develop\Tomcat 6.0\webapps\jbpm-console\WEB-INF\lib\ser vlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending c lass: javax/servlet/Servlet.class 2008-3-28 16:24:41 org.apache.catalina.startup.ContextConfig validateSecurityRol es 信息: WARNING: Security role name user used in an <auth-constraint> without bein g defined in a <security-role> 2008-3-28 16:24:41 com.sun.faces.config.ConfigureListener contextInitialized 信息: Initializing Sun's JavaServer Faces implementation (1.2_03-b09-FCS) for co ntext '/jbpm-console' 2008-3-28 16:24:42 com.sun.faces.spi.InjectionProviderFactory createInstance 警告: JSF1033: Resource injection is DISABLED. 2008-3-28 16:24:42 org.apache.catalina.core.StandardContext start [b]严重: Error listenerStart 2008-3-28 16:24:42 org.apache.catalina.core.StandardContext start 严重: Context [/jbpm-console] startup failed due to previous errors 2008-3-28 16:24:42 org.jbpm.JbpmConfiguration getInstance 信息: using jbpm configuration resource 'jbpm.cfg.xml' 2008-3-28 16:24:42 org.jbpm.persistence.db.StaleObjectLogConfigurer hideStaleObj ectExceptions 信息: stale object exceptions will be hidden from logging 2008-3-28 16:24:42 org.apache.coyote.http11.Http11Protocol start 信息: Starting Coyote HTTP/1.1 on http-8080 2008-3-28 16:24:42 org.apache.jk.common.ChannelSocket init 信息: JK: ajp13 listening on /0.0.0.0:8009 2008-3-28 16:24:42 org.apache.jk.server.JkMain start 信息: Jk running ID=0 time=0/31 config=null 2008-3-28 16:24:42 org.apache.catalina.startup.Catalina start 信息: Server startup in 2142 ms tomcat日志中的错误信息: 2008-3-28 16:24:38 org.apache.catalina.core.ApplicationContext log 信息: SessionListener: contextDestroyed() 2008-3-28 16:24:38 org.apache.catalina.core.ApplicationContext log 信息: ContextListener: contextDestroyed() 2008-3-28 16:24:41 org.apache.catalina.core.ApplicationContext log 信息: ContextListener: contextInitialized() 2008-3-28 16:24:41 org.apache.catalina.core.ApplicationContext log 信息: SessionListener: contextInitialized() 2008-3-28 16:24:41 org.apache.catalina.realm.JDBCRealm start 严重: Exception opening database connection java.sql.SQLException: com.mysql.jdbc.Driver at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:691) at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:769) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4230) 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:924) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:887) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1147) 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:578) 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) 2008-3-28 16:24:42 org.apache.catalina.core.StandardContext listenerStart 严重: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener java.lang.LinkageError: loader constraint violation: when resolving interface method "javax.servlet.jsp.JspApplicationContext.getExpressionFactory()Ljavax/el/ExpressionFactory;" the class loader (instance of org/apache/catalina/loader/WebappClassLoader) of the current class, com/sun/faces/config/ConfigureListener, and the class loader (instance of org/apache/catalina/loader/StandardClassLoader) for resolved class, javax/servlet/jsp/JspApplicationContext, have different Class objects for the type javax/el/ExpressionFactory used in the signature at com.sun.faces.config.ConfigureListener.registerELResolverAndListenerWithJsp(ConfigureListener.java:1638) at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:455) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4350) 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:924) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:887) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1147) 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:578) 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) |
||||||
返回顶楼 | ||||||
发表时间:2008-03-30
Not binding factory to JNDI, no JNDI name configured。
这句话不见得是错误,只是说JNDI中没有绑定信息而已。 从日志上能看出,一个貌似JSF的jar包没有成功加载;另一个是你数据库的用户名密码好像配置不对,造成connection无法正常连接 |
||||||
返回顶楼 | ||||||