cancel
Showing results for 
Search instead for 
Did you mean: 

error when I deploy a bar file

nbklot3
Champ in-the-making
Champ in-the-making
Hi,
I generated bar file from eclipse designer (generate deployment artifacts) and tried to deploy it activiti probe. I get the below error -

Expected one result (or null) to be returned by selectOne(), but found: 2

I have also attached the bar file with this post. Thanks for your Help.

Arun
7 REPLIES 7

frederikherema1
Star Contributor
Star Contributor
Can you post the full stacktrace you see in tomcat log?

nbklot3
Champ in-the-making
Champ in-the-making
Here is the full tomcat log -

FINE: Parsing activity endevent2
Apr 1, 2011 11:01:12 AM org.activiti.engine.impl.bpmn.deployer.BpmnDeployer deploy
INFO: Processing resource request.form
Apr 1, 2011 11:01:12 AM org.activiti.engine.impl.interceptor.CommandContext close
SEVERE: Error while closing command context
org.apache.ibatis.exceptions.TooManyResultsException: Expected one result (or null) to be returned by selectOne(), but found: 2
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:42)
at org.activiti.engine.impl.db.DbSqlSession.selectOne(DbSqlSession.java:179)
at org.activiti.engine.impl.db.DbRepositorySession.findLatestProcessDefinitionByKey(DbRepositorySession.java:164)
at org.activiti.engine.impl.bpmn.deployer.BpmnDeployer.deploy(BpmnDeployer.java:105)
at org.activiti.engine.impl.db.DbRepositorySession.deploy(DbRepositorySession.java:65)
at org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:53)
at org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:30)
at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:42)
at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
at org.activiti.engine.impl.RepositoryServiceImpl.deploy(RepositoryServiceImpl.java:43)
at org.activiti.engine.impl.repository.DeploymentBuilderImpl.deploy(DeploymentBuilderImpl.java:103)
at org.activiti.rest.api.repository.DeploymentPost.executeWebScript(DeploymentPost.java:44)
at org.activiti.rest.util.ActivitiWebScript.executeImpl(ActivitiWebScript.java:68)
at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:64)
at org.springframework.extensions.webscripts.PresentationContainer.executeScript(PresentationContainer.java:69)
at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:333)
at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:189)
at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:118)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
at java.lang.Thread.run(Thread.java:619)
Apr 1, 2011 11:01:12 AM org.activiti.engine.impl.cfg.standalone.StandaloneMybatisTransactionContext rollback
FINE: firing event rolling back…
Apr 1, 2011 11:01:12 AM org.activiti.engine.impl.cfg.standalone.StandaloneMybatisTransactionContext rollback
FINE: rolling back ibatis sql session…
Apr 1, 2011 11:01:12 AM org.activiti.engine.impl.cfg.standalone.StandaloneMybatisTransactionContext rollback
FINE: firing event rolled back…
Apr 1, 2011 11:01:12 AM org.activiti.engine.impl.interceptor.LogInterceptor execute
FINE: — DeployCmd finished ——————————————————–
Apr 1, 2011 11:01:12 AM org.activiti.engine.impl.interceptor.LogInterceptor execute
FINE:

frederikherema1
Star Contributor
Star Contributor
Looks like it is related to http://forums.activiti.org/en/viewtopic.php?f=10&t=1407. Joram is looking into it.

jbarrez
Star Contributor
Star Contributor
The error is thrown when there are multiple process definitions with the same version in the database.

I took your process, and tried to deploy it 5 times through Probe, and each time it succeeds.
So I'm unable to reproduce it. Can you describe how to do it (using Activiti 5.4)?

nbklot3
Champ in-the-making
Champ in-the-making
Hi,

Please start few instances of the process and accept one of them with user Kermit. and then try deploying or try deleting the previously deployed process. I get error in either case.

jbarrez
Star Contributor
Star Contributor
I started a few process instances, and completed the form (something about database and submit query)… when I delete the deployment by cascade in the Probe UI, all processes are deleted without seeing any exception ….

giga_zhang
Champ in-the-making
Champ in-the-making
Here is the full tomcat log -

FINE: Parsing activity endevent2
Apr 1, 2011 11:01:12 AM org.activiti.engine.impl.bpmn.deployer.BpmnDeployer deploy
INFO: Processing resource request.form
Apr 1, 2011 11:01:12 AM org.activiti.engine.impl.interceptor.CommandContext close
SEVERE: Error while closing command context
org.apache.ibatis.exceptions.TooManyResultsException: Expected one result (or null) to be returned by selectOne(), but found: 2
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:42)
at org.activiti.engine.impl.db.DbSqlSession.selectOne(DbSqlSession.java:179)
at org.activiti.engine.impl.db.DbRepositorySession.findLatestProcessDefinitionByKey(DbRepositorySession.java:164)
at org.activiti.engine.impl.bpmn.deployer.BpmnDeployer.deploy(BpmnDeployer.java:105)
at org.activiti.engine.impl.db.DbRepositorySession.deploy(DbRepositorySession.java:65)
at org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:53)
at org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:30)
at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:42)
at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
at org.activiti.engine.impl.RepositoryServiceImpl.deploy(RepositoryServiceImpl.java:43)
at org.activiti.engine.impl.repository.DeploymentBuilderImpl.deploy(DeploymentBuilderImpl.java:103)
at org.activiti.rest.api.repository.DeploymentPost.executeWebScript(DeploymentPost.java:44)
at org.activiti.rest.util.ActivitiWebScript.executeImpl(ActivitiWebScript.java:68)
at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:64)
at org.springframework.extensions.webscripts.PresentationContainer.executeScript(PresentationContainer.java:69)
at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:333)
at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:189)
at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:118)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
at java.lang.Thread.run(Thread.java:619)
Apr 1, 2011 11:01:12 AM org.activiti.engine.impl.cfg.standalone.StandaloneMybatisTransactionContext rollback
FINE: firing event rolling back…
Apr 1, 2011 11:01:12 AM org.activiti.engine.impl.cfg.standalone.StandaloneMybatisTransactionContext rollback
FINE: rolling back ibatis sql session…
Apr 1, 2011 11:01:12 AM org.activiti.engine.impl.cfg.standalone.StandaloneMybatisTransactionContext rollback
FINE: firing event rolled back…
Apr 1, 2011 11:01:12 AM org.activiti.engine.impl.interceptor.LogInterceptor execute
FINE: — DeployCmd finished ——————————————————–
Apr 1, 2011 11:01:12 AM org.activiti.engine.impl.interceptor.LogInterceptor execute
FINE:

The error is thrown when there are multiple process definitions with the same id in the database.
check the id property in you bpmn file.there must be have two file with the same id.