cancel
Showing results for 
Search instead for 
Did you mean: 

Error creating task

tonydilger
Champ in-the-making
Champ in-the-making
Hello.

We've recently started implementing activiti into a spin application and everything has seemed to go quite smoothly up until the point of start a process.

We are using sqlserver as the back end database and upon the application launching the process are deployed correctly to the database.

In the java code we are running the below lines of code to kick off a simple process.


Map<String, Object> variables = new HashMap<String, Object>();
variables.put("record_id", 100);
variables.put("table_name", "Asset");
RuntimeService runtimeService = ProcessEngines.getDefaultProcessEngine().getRuntimeService();
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("testProcess", variables);


Upon the last line running the below error is shown in the logs and the process is not started.


### Error updating database.  Cause: java.sql.SQLException: Only dates between January 1, 1753 and December 31, 9999 are accepted.
### The error may involve org.activiti.engine.impl.persistence.entity.TaskEntity.insertTask-Inline
### The error occurred while setting parameters
### SQL: insert into ACT_RU_TASK (ID_, REV_, NAME_, PARENT_TASK_ID_, DESCRIPTION_, PRIORITY_, CREATE_TIME_, OWNER_,                       ASSIGNEE_, DELEGATION_, EXECUTION_ID_, PROC_INST_ID_, PROC_DEF_ID_, TASK_DEF_KEY_, DUE_DATE_, CATEGORY_, SUSPENSION_STATE_, TENANT_ID_, FORM_KEY_)     values (?,             1,             ?,             ?,             ?,             ?,             ?,             ?,             ?,             ?,             ?,             ?,             ?,             ?,             ?,             ?,             ?,             ?,             ?            )
### Cause: java.sql.SQLException: Only dates between January 1, 1753 and December 31, 9999 are accepted.




Can anyone be of assistance working out why the process cannot be started?

Cheers

Tony
1 REPLY 1

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Tony,


### Cause: java.sql.SQLException: Only dates between January 1, 1753 and December 31, 9999 are accepted.

One of the dates is wrong (CREATE_TIME,DUE_DATE). Did you try to debug it to find which of the dates it is? After that it should be easier to find the reason why is it so.

Regards
Martin