我在将JBPM的流程信息发布到数据库时遇到如下提示信息
[loadidentities]        at org.jbpm.persistence.db.DbPersistenceService.getSessi
onFactory(DbPersistenceService.java:74)
[loadidentities]        at org.jbpm.persistence.db.DbPersistenceService.getSessi
on(DbPersistenceService.java:79)
[loadidentities]        at org.jbpm.JbpmContext.getSession(JbpmContext.java:464)[loadidentities]        at org.jbpm.identity.ant.LoadIdentitiesTask.execute(Load
IdentitiesTask.java:62)
[loadidentities]        at org.apache.tools.ant.UnknownElement.execute(UnknownEl[loadidentities]        at org.apache.tools.ant.dispatch.DispatchUtils.execute(D
ispatchUtils.java:106)
[loadidentities]        at org.apache.tools.ant.Task.perform(Task.java:348)
[loadidentities]        at org.apache.tools.ant.Target.execute(Target.java:357)
[loadidentities]        at org.apache.tools.ant.Target.performTasks(Target.java:ava:1189)
[loadidentities]        at org.apache.tools.ant.Main.runBuild(Main.java:758)va:305)
[loadidentities]        at java.net.PlainSocketImpl.connectToAddress(PlainSocket
Impl.java:171)
[loadidentities]        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java
:158)
[loadidentities]        at java.net.Socket.connect(Socket.java:452)
[loadidentities]        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native M
ethod)
[loadidentities]        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMetectionJDBC2.java:297)
[loadidentities]        ... 30 more
[loadidentities] 16:02:42,265 [main] INFO  Dialect : Using dialect: org.hibernat
e.dialect.SQLServerDialect
[loadidentities] 16:02:42,281 [main] INFO  TransactionFactoryFactory : Using def
ault transaction strategy (direct JDBC transactions)
[loadidentities] 16:02:42,281 [main] INFO  TransactionManagerLookupFactory : No
TransactionManagerLookup configured (in JTA environment, use of read-write or tr
ansactional second-level cache is not recommended)
[loadidentities] 16:02:42,281 [main] INFO  SettingsFactory : Automatic flush dur
ing beforeCompletion(): disabled
[loadidentities] 16:02:42,281 [main] INFO  SettingsFactory : Automatic session c
lose at end of transaction: disabled
[loadidentities] 16:02:42,281 [main] INFO  SettingsFactory : Scrollable result s
ets: disabled
[loadidentities] 16:02:42,281 [main] INFO  SettingsFactory : JDBC3 getGeneratedK
eys(): disabled
[loadidentities] 16:02:42,296 [main] INFO  SettingsFactory : Connection release
mode: auto
[loadidentities] 16:02:42,296 [main] INFO  SettingsFactory : Default batch fetch
 size: 1
[loadidentities] 16:02:42,296 [main] INFO  SettingsFactory : Generate SQL with c
omments: disabled
[loadidentities] 16:02:42,296 [main] INFO  SettingsFactory : Order SQL updates b
y primary key: disabledtitutions: {}
[loadidentities] 16:02:42,312 [main] INFO  SettingsFactory : Second-level cache:
 enabled[loadidentities] 16:02:42,312 [main] INFO  SettingsFactory : Structured second-l
evel cache entries: disabled
[loadidentities] 16:02:42,328 [main] INFO  SettingsFactory : Echoing all SQL to
stdout
[loadidentities] 16:02:42,328 [main] INFO  SettingsFactory : Statistics: disable
d
[loadidentities] 16:02:42,328 [main] INFO  SettingsFactory : Deleted entity synt
hetic identifier rollback: disabled
[loadidentities] 16:02:42,328 [main] INFO  SettingsFactory : Default entity-mode
: pojo
16:02:42,359 [Finalizer] INFO  DriverManagerConnectionProvider : cleaning up con
nection pool: jdbc:jtds:sqlserver://localhost:1433/jbpmTest
[loadidentities] 16:02:42,390 [main] INFO  SessionFactoryImpl : building session
 factory
[loadidentities] 16:02:42,562 [main] WARN  EhCacheProvider : Could not find conf[loadidentities] 16:02:43,046 [main] WARN  EhCacheProvider : Could not find conf
iguration [org.jbpm.module.def.ModuleDefinition]; using defaults.
[loadidentities] 16:02:43,296 [main] WARN  EhCacheProvider : Could not find conf
iguration [org.jbpm.graph.def.Action]; using defaults.
[loadidentities] 16:02:43,375 [main] WARN  EhCacheProvider : Could not find conf
iguration [org.jbpm.graph.def.Event]; using defaults.
[loadidentities] 16:02:43,468 [main] WARN  EhCacheProvider : Could not find conf
iguration [org.jbpm.context.def.VariableAccess]; using defaults.
[loadidentities] 16:02:43,640 [main] WARN  EhCacheProvider : Could not find conf
iguration [org.jbpm.graph.def.Transition]; using defaults.
[loadidentities] 16:02:43,859 [main] WARN  EhCacheProvider : Could not find conf
iguration [org.jbpm.taskmgmt.def.TaskController]; using defaults.
[loadidentities] 16:02:43,890 [main] WARN  EhCacheProvider : Could not find conf[loadidentities] 16:02:43,906 [main] WARN  EhCacheProvider : Could not find conf[loadidentities] 16:02:43,921 [main] WARN  EhCacheProvider : Could not find conf
iguration [org.jbpm.graph.def.Event.actions]; using defaults.
[loadidentities] 16:02:43,921 [main] WARN  EhCacheProvider : Could not find conf SQLState: 08S01
[loadidentities] 16:02:45,375 [main] ERROR JDBCExceptionReporter : Network error
 IOException: Connection refused: connect
[loadidentities] 16:02:45,375 [main] DEBUG JbpmContext : closing JbpmContext
[loadidentities] 16:02:45,375 [main] DEBUG Services : closing service 'persisten
ce': org.jbpm.persistence.db.DbPersistenceService@d26103
[loadidentities] 16:02:45,375 [main] DEBUG DbPersistenceService : flushing hiber
nate session
[loadidentities] 16:02:45,375 [main] DEBUG DbPersistenceService : closing hibern
ate sessionBUILD FAILED
******************************************下面是异常信息
org.hibernate.exception.JDBCConnectionException: Cannot open connection
                ... 30 moreTotal time: 9 seconds
E:\JAR包及插件\jbpm-starters-kit-3.1.2\jbpm-starters-kit-3.1.2\jbpm>
*****************************************大概问题出在哪?

解决方案 »

  1.   

    cannot open connection,看看是什么原因引起的?下面应该有错误提示的把
      

  2.   

    异常信息org.hibernate.exception.JDBCConnectionException: Cannot open connection
            at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.j
    ava:72)
            at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelp
    er.java:43)
            at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelp
    er.java:29)
            at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager
    .java:318)
            at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.
    java:109)
            at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:137)
            at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:
    57)
            at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1262
    )
            at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistence
    Service.java:98)
            at org.jbpm.JbpmContext.getSession(JbpmContext.java:464)
            at org.jbpm.identity.ant.LoadIdentitiesTask.execute(LoadIdentitiesTask.j
    ava:62)
            at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
    a:106)
            at org.apache.tools.ant.Task.perform(Task.java:348)
            at org.apache.tools.ant.Target.execute(Target.java:357)
            at org.apache.tools.ant.Target.performTasks(Target.java:385)
            at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
            at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
            at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
    cutor.java:41)
            at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
            at org.apache.tools.ant.Main.runBuild(Main.java:758)
            at org.apache.tools.ant.Main.startAnt(Main.java:217)
            at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
            at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
    Caused by: java.sql.SQLException: Network error IOException: Connection refused:
     connect
            at net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java
    :372)
            at net.sourceforge.jtds.jdbc.ConnectionJDBC3.<init>(ConnectionJDBC3.java
    :50)
            at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:178)
            at java.sql.DriverManager.getConnection(DriverManager.java:512)
            at java.sql.DriverManager.getConnection(DriverManager.java:140)
            at org.hibernate.connection.DriverManagerConnectionProvider.getConnectio
    n(DriverManagerConnectionProvider.java:110)
            at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager
    .java:315)
            ... 24 more
    Caused by: java.net.ConnectException: Connection refused: connect
            at java.net.PlainSocketImpl.socketConnect(Native Method)
            at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
            at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
            at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
            at java.net.Socket.connect(Socket.java:452)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at net.sourceforge.jtds.jdbc.SharedSocket.createSocketForJDBC3(SharedSoc
    ket.java:289)
            at net.sourceforge.jtds.jdbc.SharedSocket.<init>(SharedSocket.java:250)
            at net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java
    :297)
      

  3.   

    Caused by: java.net.ConnectException: Connection refused: connect 
      

  4.   

    sqlserver数据库配置文件有问题,我连的是oracle就没问题