日期:2014-05-16  浏览次数:20435 次

jbpm 查询流程时,数据库中明明有这个流程,但就是找不到,请高手帮忙解决

我已经把流程部署到数据库中,数据库中有helloworld这个流程,
但是,当我用这个语句去查找这个流程时候,发现找不到,语句如下:
private ProcessDefinition processDefinition = ctx.getGraphSession().findLatestProcessDefinition("helloworld");
出现错误如下:
junit.framework.AssertionFailedError: Exception in constructor: testNewRequest (org.jbpm.JbpmException: couldn't find process definition 'helloworld'
at org.jbpm.db.GraphSession.findLatestProcessDefinition(GraphSession.java:157)
at com.sample.SimpleProcessTest.<init>(SimpleProcessTest.java:18)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at junit.framework.TestSuite.createTest(TestSuite.java:131)
at junit.framework.TestSuite.addTestMethod(TestSuite.java:114)
at junit.framework.TestSuite.<init>(TestSuite.java:75)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestLoader.getTest(JUnit3TestLoader.java:102)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestLoader.loadTests(JUnit3TestLoader.java:59)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:445)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: org.hibernate.exception.GenericJDBCException: could not execute query
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:91)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:79)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.loader.Loader.doList(Loader.java:2153)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
at org.hibernate.loader.Loader.list(Loader.java:2024)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:369)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:300)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:146)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1093)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:745)
at org.jbpm.db.GraphSession.findLatestProcessDefinition(GraphSession.java:153)
... 14 more
Caused by: java.sql.SQLException: Unknown type '16 in column 3 of 5 in binary-encoded result set.
at com.mysql.jdbc.MysqlIO.unpackNativeEncodedColumn(MysqlIO.java:4149)
at com.mysql.jdbc.MysqlIO.unpackBinaryResultSetRow(MysqlIO.java:3672)
at com.mysql.jdbc.MysqlIO.nextRow(MysqlIO.java:1335)
at com.mysql.jdbc.MysqlIO.readSingleRowSet(MysqlIO.java:2253)
at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:434)
at com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.java:1952)
at com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:1400)
at com.mysql.jdbc.Connection.serverExecute(Connection.java:4793)
at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1251)
at com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:993)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1657)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:139)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1669)
at org.hibernate.loader.Loader.doQuery(Loader.java:662)
at org