[jboss-user] [JBoss jBPM] - Exception the close jbpm context.

danieltamiosso do-not-reply at jboss.com
Mon Jan 28 11:17:18 EST 2008


Hello guys,

	
When I use only one signal, the process works normally. It has all the three nodes. If I use two signals followed the following error occurs:


  | 14:07:06,937 ERROR [JDBCTransaction] exception calling user Synchronization
  | org.hibernate.QueryParameterException: could not locate named parameter [processInstance]
  | 	at org.hibernate.engine.query.ParameterMetadata.getNamedParameterDescriptor(ParameterMetadata.java:75)
  | 	at org.hibernate.engine.query.ParameterMetadata.getNamedParameterExpectedType(ParameterMetadata.java:81)
  | 	at org.hibernate.impl.AbstractQueryImpl.determineType(AbstractQueryImpl.java:413)
  | 	at org.hibernate.impl.AbstractQueryImpl.setParameter(AbstractQueryImpl.java:383)
  | 	at org.jbpm.db.JobSession$DeleteJobsSynchronization.beforeCompletion(JobSession.java:191)
  | 	at org.hibernate.transaction.JDBCTransaction.notifyLocalSynchsBeforeTransactionCompletion(JDBCTransaction.java:228)
  | 	at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:109)
  | 	at org.jbpm.persistence.db.DbPersistenceService.commit(DbPersistenceService.java:256)
  | 	at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:214)
  | 	at org.jbpm.svc.Services.close(Services.java:225)
  | 	at org.jbpm.JbpmContext.close(JbpmContext.java:139)
  | 

The code:

  | 
  | ...
  | try{
  | GraphSession graphSession = jbpmContext.getGraphSession();
  | 			ProcessDefinition processDefinition =  graphSession.findLatestProcessDefinition("analise-lancamentos-em-aberto");
  | 
  | 			if (processDefinition == null) {
  | 				processDefinition = ProcessDefinition.parseXmlResource("com/human/crm/jbpm/process/lancamento/processdefinition.xml");
  | 				jbpmContext.deployProcessDefinition(processDefinition);
  | 			}
  | 
  | 			
  | 			final List<Lancamento> lancamentosEmAberto = getLancamentoDAO().listLancamentosEmAberto();
  | 			for (Lancamento lancamentoEmAberto : lancamentosEmAberto) {				
  | 				String key = String.valueOf(lancamentoEmAberto.getId());
  | 				ProcessInstance processInstance = graphSession.getProcessInstance(processDefinition, key);
  | 				if (processInstance == null) {
  | 					processInstance = processDefinition.createProcessInstance();					
  | 					processInstance.setKey(key);
  | 				}
  | 
  | 				Token token = processInstance.getRootToken();
  | 				token.signal();
  | 				token.signal();
  | 
  | jbpmContext.save(processInstance);
  | 				
  | 				
  | 			}
  | 
  | 			jbpmConfiguration.close();		
  | } catch (Exception ex) {
  | 			log.error("", ex);
  | 		} finally {
  | 				jbpmContext.close();
  | 		}		
  | 

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

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



More information about the jboss-user mailing list