[jboss-user] [JBoss jBPM] - Re: [JBPM4 Error]Getting error while 2 tasks are created on

sushantgupta402 do-not-reply at jboss.com
Tue Aug 4 06:50:49 EDT 2009


=== Environment ============================== 
- jBPM Version : jBPM4.0
- Database : Oracle 10g
- JDK : jdk1.5.0_16
- Container : jdk1.5.0_16 
- Configuration : No customization done 
- Libraries : libraries that comes with jBPM

=== Process ================================== 
<?xml version="1.0" encoding="UTF-8"?>


   
      
   
   
   
      
   
   
      
   
   
      
   


=== API =================================== 
String processNameWV = "SimpleTaskCreation";
String processName = processNameWV+"-1";
String key = "MainProcess1.1";
String executionId = processNameWV+"."+key;
ProcessInstance processInstance = executionService.startProcessInstanceByKey(processNameWV,key );
executionService.signalExecutionById(executionId);
executionService.signalExecutionById(executionId);		

=== Stacktrace ============================== 
16:01:24,379 INF | [Environment] Hibernate 3.3.1.GA
16:01:24,379 INF | [Environment] hibernate.properties not found
16:01:24,389 INF | [Environment] Bytecode provider name : javassist
16:01:24,389 INF | [Environment] using JDK 1.4 java.sql.Timestamp handling
16:01:24,459 INF | [Configuration] configuring from resource: jbpm.hibernate.cfg.xml
16:01:24,459 INF | [Configuration] Configuration resource: jbpm.hibernate.cfg.xml
16:01:24,559 INF | [Configuration] Reading mappings from resource : jbpm.repository.hbm.xml
16:01:24,810 INF | [Configuration] Reading mappings from resource : jbpm.execution.hbm.xml
16:01:25,000 INF | [Configuration] Reading mappings from resource : jbpm.history.hbm.xml
16:01:25,130 INF | [Configuration] Reading mappings from resource : jbpm.task.hbm.xml
16:01:25,180 INF | [Configuration] Reading mappings from resource : jbpm.identity.hbm.xml
16:01:25,210 INF | [Configuration] Configured SessionFactory: null
16:01:25,240 INF | [DriverManagerConnectionProvider] Using Hibernate built-in connection pool (not for production use!)
16:01:25,250 INF | [DriverManagerConnectionProvider] Hibernate connection pool size: 20
16:01:25,250 INF | [DriverManagerConnectionProvider] autocommit mode: false
16:01:25,260 INF | [DriverManagerConnectionProvider] using driver: oracle.jdbc.driver.OracleDriver at URL: jdbc:oracle:thin:@172.18.17.40:1521:etv2
16:01:25,260 INF | [DriverManagerConnectionProvider] connection properties: {user=jbpm4, password=****}
16:01:25,621 INF | [Dialect] Using dialect: org.hibernate.dialect.Oracle9iDialect
16:01:25,641 INF | [TransactionFactoryFactory] Using default transaction strategy (direct JDBC transactions)
16:01:25,641 INF | [TransactionManagerLookupFactory] No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
16:01:25,641 INF | [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
16:01:25,711 INF | [SessionFactoryImpl] building session factory
16:01:26,722 INF | [SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured
16:01:27,774 FIN | [ProcessDefinitionImpl] creating new execution for process 'SimpleTaskCreation'
16:01:27,804 FIN | [DefaultIdGenerator] generated execution id SimpleTaskCreation.MainProcess1.1
16:01:27,804 FIN | [ExecuteActivity] executing activity(start1)
16:01:27,814 FIN | [ExecuteActivity] executing activity(task1)
16:01:27,884 FIN | [Signal] signalling activity(task1), signalName=null
16:01:27,894 FIN | [ExecuteActivity] executing activity(task2)
16:01:27,974 FIN | [Signal] signalling activity(task2), signalName=null
### EXCEPTION ###########################################
16:01:27,984 INF | [DefaultCommandService] exception while executing command org.jbpm.pvm.internal.cmd.SignalCmd at a166bd
org.hibernate.NonUniqueResultException: query did not return a unique result: 2
	at org.hibernate.impl.AbstractQueryImpl.uniqueElement(AbstractQueryImpl.java:844)
	at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:835)
	at org.jbpm.pvm.internal.hibernate.DbSessionImpl.findTaskByExecution(DbSessionImpl.java:382)
	at org.jbpm.jpdl.internal.activity.TaskActivity.signal(TaskActivity.java:115)
	at org.jbpm.jpdl.internal.activity.TaskActivity.signal(TaskActivity.java:101)
	at org.jbpm.pvm.internal.model.op.Signal.perform(Signal.java:68)
	at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:637)
	at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperation(ExecutionImpl.java:597)
	at org.jbpm.pvm.internal.model.ExecutionImpl.signal(ExecutionImpl.java:398)
	at org.jbpm.pvm.internal.cmd.SignalCmd.execute(SignalCmd.java:61)
	at org.jbpm.pvm.internal.cmd.SignalCmd.execute(SignalCmd.java:35)
	at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
	at org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:54)
	at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:54)
	at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
	at org.jbpm.pvm.internal.svc.ExecutionServiceImpl.signalExecutionById(ExecutionServiceImpl.java:84)
	at TechPoC.TestJBPM4.main(TestJBPM4.java:171)
### EXCEPTION ###########################################
Exception in thread "main" org.hibernate.NonUniqueResultException: query did not return a unique result: 2
	at org.hibernate.impl.AbstractQueryImpl.uniqueElement(AbstractQueryImpl.java:844)
	at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:835)
	at org.jbpm.pvm.internal.hibernate.DbSessionImpl.findTaskByExecution(DbSessionImpl.java:382)
	at org.jbpm.jpdl.internal.activity.TaskActivity.signal(TaskActivity.java:115)
	at org.jbpm.jpdl.internal.activity.TaskActivity.signal(TaskActivity.java:101)
	at org.jbpm.pvm.internal.model.op.Signal.perform(Signal.java:68)
	at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:637)
	at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperation(ExecutionImpl.java:597)
	at org.jbpm.pvm.internal.model.ExecutionImpl.signal(ExecutionImpl.java:398)
	at org.jbpm.pvm.internal.cmd.SignalCmd.execute(SignalCmd.java:61)
	at org.jbpm.pvm.internal.cmd.SignalCmd.execute(SignalCmd.java:35)
	at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
	at org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:54)
	at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:54)
	at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
	at org.jbpm.pvm.internal.svc.ExecutionServiceImpl.signalExecutionById(ExecutionServiceImpl.java:84)
	at TechPoC.TestJBPM4.main(TestJBPM4.java:171)

=== Debug logs ============================== 
past debug logs here 

=== Problem description ========================= 
I started the process instance and then signalled it from Start to Task-1 a task is generated for User1 (checked in the database). 
Now I signalled the process again and the process got moved ahead to Task-2 and a new task is created for User2. 
Now when I signalled the process instance again got the error org.hibernate.NonUniqueResultException: query did not return a unique result: 2 . Below is the stack trace. Please let me know if this is a bug and when can we expect this to be fixed. 

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

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



More information about the jboss-user mailing list