[jboss-user] [JBoss jBPM] - Re: Error in Process Definition Deployment.

Fornachari do-not-reply at jboss.com
Fri May 23 15:40:37 EDT 2008


Hi gandhamsuresh,

I am having a problem very similar with nassij's problem.
I have a process that I deployed using the eclipse and I can run it from  the jBPM Console.
Now, I would like to run the process from my own java application. I tried the code below:

try
  | 		{
  | 			jbpmConfiguration = JbpmConfiguration.parseResource("default.jbpm.cfg.xml");
  | 			JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
  | 			GraphSession gpSession = jbpmContext.getGraphSession();
  | 		
  | 			ProcessDefinition pdef = gpSession.findLatestProcessDefinition("request");
  | 			ProcessInstance instance = pdef.createProcessInstance();
  | 			
  | 			//set initial value
  | 			instance.getContextInstance().setVariable("infoDoc ", "Test Information");
  | 		
  | 			Token token = instance.getRootToken();
  | 			token.signal();
  | 		
  | 			String infoDoc = (String)instance.getContextInstance().getVariable("infoDoc ");
  | 			System.out.println("#############Documento Information: "+infoDoc );
  | 		
  | 			jbpmContext.close();
  | 		}
  | 		
  | 		catch(Exception ex)
  | 		{
  | 			System.out.println("#########ERROR--> "+ex.getMessage());
  | 		}

But I received this error:



  | 14:45:19,294 [main] ERROR JDBCExceptionReporter : Table not found in statement [select top ? processdef0_.ID_ as ID1_4_, processdef0_.NAME_ as NAME3_4_, processdef0_.DESCRIPTION_ as DESCRIPT4_4_, processdef0_.VERSION_ as VERSION5_4_, processdef0_.ISTERMINATIONIMPLICIT_ as ISTERMIN6_4_, processdef0_.STARTSTATE_ as STARTSTATE7_4_ from JBPM_PROCESSDEFINITION processdef0_ where processdef0_.NAME_=? order by processdef0_.VERSION_ desc]
  | 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 ClientApp.main(ClientApp.java:24)
  | Caused by: java.sql.SQLException: Table not found in statement [select top ? processdef0_.ID_ as ID1_4_, processdef0_.NAME_ as NAME3_4_, processdef0_.DESCRIPTION_ as DESCRIPT4_4_, processdef0_.VERSION_ as VERSION5_4_, processdef0_.ISTERMINATIONIMPLICIT_ as ISTERMIN6_4_, processdef0_.STARTSTATE_ as STARTSTATE7_4_ 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)
  | 	... 10 more
  | 14:45:19,497 [main] ERROR GraphSession : org.hibernate.exception.SQLGrammarException: could not execute query
  | ############--->ERROR--> couldn't find process definition 'request'
  | 

I am using the jBPM 3.2.2 and I did not configure a database, I am using the default configuration. I thing that the default is the Hypersonic SQL, that came pre-configured. So I didn't create any table.

I searched and found that probably the problem is with hibernate, in the file default.jbpm.cfg.xml. But I don't know where specifically is the problem in the file default.jbpm.cfg.xml, and I don't know how fix it. I am new with hibernate.

Any idea? Any help?
Thank you very much in advance!!

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4153075#4153075

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4153075



More information about the jboss-user mailing list