Hi
I want o call websale process that deploying on he server of jpm database.
I found some code about it on this forums.But when execute this code the error has been
occured.
here is code for starting process:
| public static void startProcessDefinition() {
| String processDefinitionName = new String("websale");
| JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();
| JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
| try {
| GraphSession graphSession = jbpmContext.getGraphSession();
| ProcessDefinition definition =
graphSession.findLatestProcessDefinition(processDefinitionName);
| ProcessInstance instance = definition.createProcessInstance();
| instance.signal();
| jbpmContext.save(instance);
| } finally {
| jbpmContext.close();
| }
| }
|
error has beeb occured
| org.hibernate.exception.SQLGrammarException: could not execute query
| at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
| at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
| at org.hibernate.loader.Loader.doList(Loader.java:2223)
| at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
| at org.hibernate.loader.Loader.list(Loader.java:2099)
| at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
| at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
| at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
| at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
| at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
| at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:811)
| at org.jbpm.db.GraphSession.findLatestProcessDefinition(GraphSession.java:153)
| at uzak.startProcessDefinition(uzak.java:24)
| at uzak.main(uzak.java:34)
| Caused by: java.sql.SQLException: Table not found in statement [select top ?
processdef0_.ID_ as ID1_0_, processdef0_.NAME_ as NAME3_0_, processdef0_.DESCRIPTION_ as
DESCRIPT4_0_, processdef0_.VERSION_ as VERSION5_0_, processdef0_.ISTERMINATIONIMPLICIT_ as
ISTERMIN6_0_, processdef0_.STARTSTATE_ as STARTSTATE7_0_ from JBPM_PROCESSDEFINITION
processdef0_ where processdef0_.NAME_=? order by processdef0_.VERSION_ desc]
| at org.hsqldb.jdbc.Util.throwError(Unknown Source)
| at org.hsqldb.jdbc.jdbcPreparedStatement.<init>(Unknown Source)
| at org.hsqldb.jdbc.jdbcConnection.prepareStatement(Unknown Source)
| at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:505)
| at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:423)
| at
org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139)
| at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547)
| at org.hibernate.loader.Loader.doQuery(Loader.java:673)
| at
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
| at org.hibernate.loader.Loader.doList(Loader.java:2220)
| ... 11 more
| 09:58:31,439 [main] ERROR GraphSession : org.hibernate.exception.SQLGrammarException:
could not execute query
| 09:58:31,439 [main] DEBUG JbpmContext : closing JbpmContext
| 09:58:31,439 [main] DEBUG Services : closing service 'persistence':
org.jbpm.persistence.db.DbPersistenceService@98bbf6
| 09:58:31,439 [main] DEBUG DbPersistenceService : committing hibernate transaction
org.hibernate.transaction.JDBCTransaction@1c6a99d
| 09:58:31,439 [main] DEBUG DbPersistenceService : closing hibernate session
| 09:58:31,439 [main] DEBUG Services : closing service 'tx':
org.jbpm.tx.TxService@1aa0e3b
| Exception in thread "main" org.jbpm.JbpmException: couldn't find process
definition 'websale'
| at org.jbpm.db.GraphSession.findLatestProcessDefinition(GraphSession.java:170)
| at uzak.startProcessDefinition(uzak.java:24)
| at uzak.main(uzak.java:34)
| Caused by: org.hibernate.exception.SQLGrammarException: could not execute query
| at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
| at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
| at org.hibernate.loader.Loader.doList(Loader.java:2223)
| at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
| at org.hibernate.loader.Loader.list(Loader.java:2099)
| at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
| at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
| at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
| at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
| at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
| at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:811)
| at org.jbpm.db.GraphSession.findLatestProcessDefinition(GraphSession.java:153)
| ... 2 more
| Caused by: java.sql.SQLException: Table not found in statement [select top ?
processdef0_.ID_ as ID1_0_, processdef0_.NAME_ as NAME3_0_, processdef0_.DESCRIPTION_ as
DESCRIPT4_0_, processdef0_.VERSION_ as VERSION5_0_, processdef0_.ISTERMINATIONIMPLICIT_ as
ISTERMIN6_0_, processdef0_.STARTSTATE_ as STARTSTATE7_0_ from JBPM_PROCESSDEFINITION
processdef0_ where processdef0_.NAME_=? order by processdef0_.VERSION_ desc]
| at org.hsqldb.jdbc.Util.throwError(Unknown Source)
| at org.hsqldb.jdbc.jdbcPreparedStatement.<init>(Unknown Source)
| at org.hsqldb.jdbc.jdbcConnection.prepareStatement(Unknown Source)
| at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:505)
| at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:423)
| at
org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139)
| at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547)
| at org.hibernate.loader.Loader.doQuery(Loader.java:673)
| at
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
| at org.hibernate.loader.Loader.doList(Loader.java:2220)
| ... 11 more
|
the websale process is in the jbpm database server.What is the problem can anyboyd help
me?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4161061#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...