問一個有關JBPM連MySQL資料庫的問題,高手請進
環境:JDK:j2sdk1.4.2
Tomcat:5.0
JBPM:3.1.1
MySQL:5.0
我想讓方法getInstance()查詢jbpm.hibernate.cfg.xml的值,用該值作為配置檔案建立一個JbpmSessionFactory,所以我的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:comp/env/jdbc/jbpm
# 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檔案中的內容全部註釋掉,之後用ant生成jbpm.war,部署到tomcat中,啟動時出現以下異常:
2006-5-10 15:28:09 org.jbpm.msg.command.CommandExecutorThread run
嚴重: java.lang.NoClassDefFoundError: org/hibernate/Session
2006-5-10 15:28:09 org.apache.catalina.core.StandardHostDeployer install
資訊: Installing web application at context path /tomcat-docs from URL file:D:\T
omcat 5.0\webapps\tomcat-docs
2006-5-10 15:28:09 org.apache.catalina.core.StandardHostDeployer install
資訊: Installing web application at context path /jsp-examples from URL file:D:\
Tomcat 5.0\webapps\jsp-examples
2006-5-10 15:28:10 org.apache.catalina.core.StandardHostDeployer install
資訊: Installing web application at context path /servlets-examples from URL fil
e:D:\Tomcat 5.0\webapps\servlets-examples
java.lang.NoClassDefFoundError: org/hibernate/Session
at org.jbpm.persistence.db.DbPersistenceServiceFactory.openService(DbPer
sistenceServiceFactory.java:55)
at org.jbpm.svc.Services.getService(Services.java:136)
at org.jbpm.svc.Services.getPersistenceService(Services.java:175)
at org.jbpm.JbpmContext.getPersistenceService(JbpmContext.java:515)
at org.jbpm.JbpmContext.getSchedulerSession(JbpmContext.java:423)
at org.jbpm.scheduler.impl.SchedulerThread.executeTimers(SchedulerThread
.java:103)
at org.jbpm.scheduler.impl.SchedulerThread.run(SchedulerThread.java:70)
2006-5-10 15:28:14 org.jbpm.msg.command.CommandExecutorThread run
嚴重: java.lang.NoClassDefFoundError: org/hibernate/Session
2006-5-10 15:28:47 org.apache.catalina.core.StandardHostDeployer install
資訊: Installing web application at context path /webdav from URL file:D:\Tomcat
5.0\webapps\webdav
2006-5-10 15:28:48 org.apache.catalina.core.StandardHostDeployer install
資訊: Installing web application at context path /bgzdh from URL file:D:\Tomcat
5.0\webapps\bgzdh
2006-5-10 15:28:50 org.apache.coyote.http11.Http11Protocol start
資訊: Starting Coyote HTTP/1.1 on port 80
2006-5-10 15:28:51 org.apache.jk.common.ChannelSocket init
資訊: JK2: ajp13 listening on /0.0.0.0:8009
2006-5-10 15:28:51 org.apache.jk.server.JkMain start
資訊: Jk running ID=0 time=20/110 config=D:\Tomcat 5.0\conf\jk2.properties
2006-5-10 15:28:51 org.apache.catalina.startup.Catalina start
資訊: Server startup in 80886 ms
2006-5-10 15:28:52 org.jbpm.msg.command.CommandExecutorThread run
嚴重: java.lang.NoClassDefFoundError: org/hibernate/Session
2006-5-10 15:28:57 org.jbpm.msg.command.CommandExecutorThread run
嚴重: java.lang.NoClassDefFoundError: org/hibernate/Session
2006-5-10 15:29:02 org.jbpm.msg.command.CommandExecutorThread run
嚴重: java.lang.NoClassDefFoundError: org/hibernate/Session
2006-5-10 15:29:07 org.jbpm.msg.command.CommandExecutorThread run
嚴重: java.lang.NoClassDefFoundError: org/hibernate/Session
執行http://localhost/jbpm後出現以下異常:
javax.servlet.ServletException: org.apache.jasper.JasperException
javax.faces.webapp.FacesServlet.service(FacesServlet.java:109)
org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:712)
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:682)
org.apache.jsp.index_jsp._jspService(index_jsp.java:46)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.jbpm.webapp.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:55)
org.jbpm.web.JbpmContextFilter.doFilter(JbpmContextFilter.java:83)
org.jbpm.webapp.filter.LogFilter.doFilter(LogFilter.java:59)
root cause
javax.faces.FacesException: org.apache.jasper.JasperException
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:425)
org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:300)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:95)
org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:712)
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:682)
org.apache.jsp.index_jsp._jspService(index_jsp.java:46)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.jbpm.webapp.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:55)
org.jbpm.web.JbpmContextFilter.doFilter(JbpmContextFilter.java:83)
org.jbpm.webapp.filter.LogFilter.doFilter(LogFilter.java:59)
note The full stack trace of the root cause is available in the Tomcat logs.
請問這是怎麼回事啊?我覺得是jbpm沒有連線上資料庫,可能是沒有找到hibernate.cfg.xml檔案,這個檔案究竟應放在哪裡呢?
Tomcat:5.0
JBPM:3.1.1
MySQL:5.0
我想讓方法getInstance()查詢jbpm.hibernate.cfg.xml的值,用該值作為配置檔案建立一個JbpmSessionFactory,所以我的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:comp/env/jdbc/jbpm
# 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檔案中的內容全部註釋掉,之後用ant生成jbpm.war,部署到tomcat中,啟動時出現以下異常:
2006-5-10 15:28:09 org.jbpm.msg.command.CommandExecutorThread run
嚴重: java.lang.NoClassDefFoundError: org/hibernate/Session
2006-5-10 15:28:09 org.apache.catalina.core.StandardHostDeployer install
資訊: Installing web application at context path /tomcat-docs from URL file:D:\T
omcat 5.0\webapps\tomcat-docs
2006-5-10 15:28:09 org.apache.catalina.core.StandardHostDeployer install
資訊: Installing web application at context path /jsp-examples from URL file:D:\
Tomcat 5.0\webapps\jsp-examples
2006-5-10 15:28:10 org.apache.catalina.core.StandardHostDeployer install
資訊: Installing web application at context path /servlets-examples from URL fil
e:D:\Tomcat 5.0\webapps\servlets-examples
java.lang.NoClassDefFoundError: org/hibernate/Session
at org.jbpm.persistence.db.DbPersistenceServiceFactory.openService(DbPer
sistenceServiceFactory.java:55)
at org.jbpm.svc.Services.getService(Services.java:136)
at org.jbpm.svc.Services.getPersistenceService(Services.java:175)
at org.jbpm.JbpmContext.getPersistenceService(JbpmContext.java:515)
at org.jbpm.JbpmContext.getSchedulerSession(JbpmContext.java:423)
at org.jbpm.scheduler.impl.SchedulerThread.executeTimers(SchedulerThread
.java:103)
at org.jbpm.scheduler.impl.SchedulerThread.run(SchedulerThread.java:70)
2006-5-10 15:28:14 org.jbpm.msg.command.CommandExecutorThread run
嚴重: java.lang.NoClassDefFoundError: org/hibernate/Session
2006-5-10 15:28:47 org.apache.catalina.core.StandardHostDeployer install
資訊: Installing web application at context path /webdav from URL file:D:\Tomcat
5.0\webapps\webdav
2006-5-10 15:28:48 org.apache.catalina.core.StandardHostDeployer install
資訊: Installing web application at context path /bgzdh from URL file:D:\Tomcat
5.0\webapps\bgzdh
2006-5-10 15:28:50 org.apache.coyote.http11.Http11Protocol start
資訊: Starting Coyote HTTP/1.1 on port 80
2006-5-10 15:28:51 org.apache.jk.common.ChannelSocket init
資訊: JK2: ajp13 listening on /0.0.0.0:8009
2006-5-10 15:28:51 org.apache.jk.server.JkMain start
資訊: Jk running ID=0 time=20/110 config=D:\Tomcat 5.0\conf\jk2.properties
2006-5-10 15:28:51 org.apache.catalina.startup.Catalina start
資訊: Server startup in 80886 ms
2006-5-10 15:28:52 org.jbpm.msg.command.CommandExecutorThread run
嚴重: java.lang.NoClassDefFoundError: org/hibernate/Session
2006-5-10 15:28:57 org.jbpm.msg.command.CommandExecutorThread run
嚴重: java.lang.NoClassDefFoundError: org/hibernate/Session
2006-5-10 15:29:02 org.jbpm.msg.command.CommandExecutorThread run
嚴重: java.lang.NoClassDefFoundError: org/hibernate/Session
2006-5-10 15:29:07 org.jbpm.msg.command.CommandExecutorThread run
嚴重: java.lang.NoClassDefFoundError: org/hibernate/Session
執行http://localhost/jbpm後出現以下異常:
javax.servlet.ServletException: org.apache.jasper.JasperException
javax.faces.webapp.FacesServlet.service(FacesServlet.java:109)
org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:712)
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:682)
org.apache.jsp.index_jsp._jspService(index_jsp.java:46)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.jbpm.webapp.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:55)
org.jbpm.web.JbpmContextFilter.doFilter(JbpmContextFilter.java:83)
org.jbpm.webapp.filter.LogFilter.doFilter(LogFilter.java:59)
root cause
javax.faces.FacesException: org.apache.jasper.JasperException
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:425)
org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:300)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:95)
org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:712)
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:682)
org.apache.jsp.index_jsp._jspService(index_jsp.java:46)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.jbpm.webapp.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:55)
org.jbpm.web.JbpmContextFilter.doFilter(JbpmContextFilter.java:83)
org.jbpm.webapp.filter.LogFilter.doFilter(LogFilter.java:59)
note The full stack trace of the root cause is available in the Tomcat logs.
請問這是怎麼回事啊?我覺得是jbpm沒有連線上資料庫,可能是沒有找到hibernate.cfg.xml檔案,這個檔案究竟應放在哪裡呢?
相關文章
- 一個資料庫連線問題!請教高手資料庫
- 請問,關於資料庫連線的問題。資料庫
- 請教關於資料庫連線的問題資料庫
- 請問一個有關jdbc效能的問題JDBC
- 請教高手一個問題!
- 請教各位高手一個問題
- 關於資料庫中儲存中文的問題,請高手指點資料庫
- 有關jbpm流程例項版本的問題
- 一個資料庫連線池的問題資料庫
- struts怪問題 高手請進
- 高手都進來歇歇~解決一個問題關於SE的問題
- 請教一個資料表關係的問題
- 請高手幫忙,關於多個連線的hibernate配置問題
- 問一個小的運算問題,請高手指教!
- 一個資料庫要關注的問題資料庫
- 請教關於資料庫連線池的設定問題?資料庫
- 有個問題不太瞭解,向高手請教
- 請教資料庫連線問題??急!資料庫
- 一個關於Struts傳引數的問題,請高手來看看............
- 請問一個jndi連線的小問題
- 關於資料庫連線的一些小問題資料庫
- 關於jdbc的一個問題,高手解惑JDBC
- 請教一個有關bibernate的session的問題Session
- 資料庫連線未關閉的問題資料庫
- 請教高手一個系統設計的問題
- 一個郵件的JAVABEAN問題,請高手幫忙JavaBean
- MySql 漢字問題? 請高手指點!MySql
- 請教高手 關於STRUTS DATASOURCE的問題
- 新手請教一下mysql資料連線出現的問題MySql
- 關於JPetstore連線資料庫問題資料庫
- 請教問題:jive1.2.4資料庫連線問題,謝謝資料庫
- jive最後一關遇到的問題,請高手幫助
- 請問一個mysql使用者管理的 問題。MySql
- 關於一個資料庫列設計的問題資料庫
- 有關JBPM3配置時一個無法找到ORACLE JDBC DRIVER的異常,請高手進來幫忙一下!OracleJDBC
- 監控資料庫連線遇到的一個小問題資料庫
- 請問問什麼連不上資料庫?資料庫
- 埋在 MYSQL 資料庫應用中的17個關鍵問題!MySql資料庫