2013-04-24 146 views
0

任何人都可以解釋如何運行activiti-rest.war的過程,我正在使用postgres數據庫。 我將war文件複製到tomcat webapps中,同時運行它顯示此錯誤,還有一件事我不使用spring框架,我使用postgres配置更改db.properties文件,仍然在什麼位置以及在哪裏配置設置。 Tomcat和JBoss的運行activiti-rest.war時出現異常

org.activiti.engine.ProcessEngines initProcessEnginFromResource 
SEVERE: Exception while initializing process engine :couldn't check if tables are already present using metadata: 
### Error getting a new connection. Cause: java.sql.SQLException: No suitable driver found for jdbc:postgresql://localhost:5432/activiti 
### Cause: java.sql.SQLException: No suitable driver found for jdbc:postgresql://localhost:5432/activiti 
org.activiti.engine.ActivitiException: couldn't check if tables are already present using metadata: 
### Error getting a new connection. Cause: java.sql.SQLException: No suitable driver found for jdbc:postgresql://localhost:5432/activiti 
### Cause: java.sql.SQLException: No suitable driver found for jdbc:postgresql://localhost:5432/activiti 
     at org.activiti.engine.impl.db.DbSqlSession.isTablePresent(DbSqlSession.java:890) 
     at org.activiti.engine.impl.db.DbSqlSession.isEngineTablePresent(DbSqlSession.java:854) 
     at org.activiti.engine.impl.db.DbSqlSession.dbSchemaUpdate(DbSqlSession.java:806) 
     at org.activiti.engine.impl.db.DbSqlSession.performSchemaOperationsProcessEngineBuild(DbSqlSession.java:1100) 
     at org.activiti.engine.impl.SchemaOperationsProcessEngineBuild.execute(SchemaOperationsProcessEngineBuild.java:25) 
     at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24) 
     at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:60) 
     at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:32) 
     at org.activiti.engine.impl.ProcessEngineImpl.<init>(ProcessEngineImpl.java:75) 
     at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:311) 
     at org.activiti.engine.ProcessEngines.buildProcessEngine(ProcessEngines.java:194) 
     at org.activiti.engine.ProcessEngines.initProcessEnginFromResource(ProcessEngines.java:167) 
     at org.activiti.engine.ProcessEngines.init(ProcessEngines.java:98) 
     at org.activiti.engine.ProcessEngines.getProcessEngine(ProcessEngines.java:224) 
     at org.activiti.engine.ProcessEngines.getDefaultProcessEngine(ProcessEngines.java:217) 
     at org.activiti.rest.servlet.ActivitiServletContextListener.contextInitialized(ActivitiServletContextListener.java:39) 
     at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791) 
     at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285) 
     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) 
     at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) 
     at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) 
     at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633) 
     at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:977) 
     at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1655) 
     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) 
     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) 
     at java.util.concurrent.FutureTask.run(FutureTask.java:138) 
     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) 
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) 
     at java.lang.Thread.run(Thread.java:662) 
Caused by: org.apache.ibatis.exceptions.PersistenceException: 
### Error getting a new connection. Cause: java.sql.SQLException: No suitable driver found for jdbc:postgresql://localhost:5432/activiti 
### Cause: java.sql.SQLException: No suitable driver found for jdbc:postgresql://localhost:5432/activiti 
     at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:23) 
     at org.apache.ibatis.session.defaults.DefaultSqlSession.getConnection(DefaultSqlSession.java:222) 
     at org.activiti.engine.impl.db.DbSqlSession.isTablePresent(DbSqlSession.java:867) 
     ... 29 more 
Caused by: java.sql.SQLException: No suitable driver found for jdbc:postgresql://localhost:5432/activiti 
     at java.sql.DriverManager.getConnection(DriverManager.java:602) 
     at java.sql.DriverManager.getConnection(DriverManager.java:154) 
     at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.doGetConnection(UnpooledDataSource.java:181) 
     at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.doGetConnection(UnpooledDataSource.java:176) 
     at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.getConnection(UnpooledDataSource.java:80) 
     at org.apache.ibatis.datasource.pooled.PooledDataSource.popConnection(PooledDataSource.java:371) 
     at org.apache.ibatis.datasource.pooled.PooledDataSource.getConnection(PooledDataSource.java:80) 
     at org.apache.ibatis.transaction.jdbc.JdbcTransaction.openConnection(JdbcTransaction.java:131) 
     at org.apache.ibatis.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:58) 
     at org.apache.ibatis.session.defaults.DefaultSqlSession.getConnection(DefaultSqlSession.java:220) 
     ... 30 more 
+0

看起來你沒有在\ WEB-INF \ lib文件夾中的postgres驅動程序 – ATMTA 2013-05-02 07:59:02

回答

0

Tomcat服務器,在其上部署activiti-rest.war,應包含在lib文件夾中的Postgres JDBC驅動程序jar文件。

您可以獲得postgre JDBC driver here

+0

Thankx joshi我的問題解決了,但我運行休息uri http:// localhost:9090/activiti-rest/service/process-definitions方法:得到我得到這個迴應「狀態代碼:403禁止」。 – sai576 2013-05-07 08:44:27

+0

Activiti提供的所有'rest-apis'需要基本認證。爲apis使用各自的用戶憑證,例如與管理員相關的'apis'使用'kermit'用戶。 – Joshi 2013-05-07 09:07:49

+0

把它放在一個單獨的問題中,因爲它不符合主題。 – Joshi 2013-05-07 09:09:03