cancel
Showing results for 
Search instead for 
Did you mean: 

Exception while initializing repository service

simonetogno
Champ in-the-making
Champ in-the-making
Hi all.

I'm trying to develop e simple application with activiti engine api.
I have intsllaed the demo application, started up, and lunch my application.

My code is


public void init(ServletConfig config) throws ServletException {
super.init(config);
processEngine = ProcessEngines.getDefaultProcessEngine();
}


protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

    PrintWriter out = response.getWriter();

    RepositoryService repositoryService = processEngine.getRepositoryService();
    RuntimeService runtimeService = processEngine.getRuntimeService();

    Deployment deployment = repositoryService.createDeployment().addClasspathResource("C:/Users/Simone/workspace/ProvaNewDesigner/target/classes/diagrams/bpmn2_diagram.bpmn20.xml").deploy();

    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("helloworld");

    out.println("Started Process instance id " +processInstance.getProcessInstanceId());

}


at the point

RepositoryService repositoryService = processEngine.getRepositoryService();

an excpetion is trow.


### Error querying database.  Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for selectProperty
### The error may exist in org/activiti/db/ibatis/variable.mapping.xml
### Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for selectProperty
org.apache.ibatis.exceptions.PersistenceException:
### Error querying database.  Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for selectProperty
### The error may exist in org/activiti/db/ibatis/variable.mapping.xml
### Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for selectProperty
   at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:8)
   at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:77)
   at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:69)
   at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:40)

I hope someone have some suggestion.
Best regards
Simone
5 REPLIES 5

jbarrez
Star Contributor
Star Contributor
I saw that exception when I was using the wrong version of ibatis. Are you using ibatis 3.0.4 ?

simonetogno
Champ in-the-making
Champ in-the-making
yes, i use ibatis 3.0.4.

anyway….I'have change the db setup(now i'm usig mySql database) and it works but…. I have another problem….

when the program try to deploy the process

Deployment deployment = repositoryService.createDeployment().addClasspathResource("C:/Users/Simone/workspace/ProvaNewDesigner/target/classes/diagrams/bpmn2_diagram.bpmn20.xml").deploy();

I' get the follow exception


GRAVE: Servlet.service() for servlet [ThisService] in context with path [/SimpleTry] threw exception
org.activiti.engine.ActivitiException: resource "C:/Users/Simone/workspace/ProvaNewDesigner/target/classes/diagrams/bpmn2_diagram.bpmn20.xml" not found
at org.activiti.engine.impl.repository.DeploymentBuilderImpl.addClasspathResource(DeploymentBuilderImpl.java:58)
at ThisService.doGet(ThisService.java:45)

excluding the path is uncorrect, what can be the reason of this exceptio?

Best regards

simonetogno
Champ in-the-making
Champ in-the-making

26-mag-2011 15.15.38 org.activiti.engine.impl.ProcessEngineImpl <init>
INFO: ProcessEngine default created
26-mag-2011 15.15.38 org.activiti.engine.ProcessEngines initProcessEnginFromResource
INFO: initialised process engine default
26-mag-2011 15.15.38 org.activiti.engine.impl.jobexecutor.JobAcquisitionThread run
INFO: JobAcquisitionThread starting to acquire jobs

This is the operation that it can perform
(i don't now if it can be helpful)

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
please use a new topic for new issues…

simonetogno
Champ in-the-making
Champ in-the-making
done  Smiley Wink

regards