cancel
Showing results for 
Search instead for 
Did you mean: 

database error during parallel REST-API calls

partizano
Champ in-the-making
Champ in-the-making
Hi, Activiti Team!

Maybe my question is not related to Activiti entirely, but the error occurs…

In my process instance I have 14 parallel user tasks, each has form properties variables. When I try to get form properties by REST-API, sometimes the error occurs:


### Error querying database.  Cause: org.h2.jdbc.JdbcSQLException: File corrupted while reading record: "C:\Activiti-58\apps\apache-tomcat-6.0.32\bin\.lobs.db\1.temp.db". Possible solution: use the recovery tool [90030-132]

Maybe, if I would get form property gradually (at first one property, then second, then third) then the error would not appear… But it is very long…

Can your help me? Or it is just a database error and I can't do anything?

Thanks!
4 REPLIES 4

trademak
Star Contributor
Star Contributor
Hi,

Hmm, is this the only exception message you get or are there more details?

Best regards,

partizano
Champ in-the-making
Champ in-the-making
Hi,

Thanks for the reply. More detailed exception is:
SEVERE: Error while closing command context
org.apache.ibatis.exceptions.PersistenceException:
### Error querying database.  Cause: org.h2.jdbc.JdbcSQLException: Файл поврежден РїСЂРё чтении строки: "C:\Activiti-58\apps\apache-tomcat-6.0.32\bin\.lobs.db\2.temp.db". Возможные решения: используйте утилиту восстановления (recovery tool)
File corrupted while reading record: "C:\Activiti-58\apps\apache-tomcat-6.0.32\bin\.lobs.db\2.temp.db". Possible solution: use the recovery tool [90030-132]
### The error may involve org.activiti.engine.impl.persistence.entity.VariableInstanceEntity.selectVariablesByExecutionId-Inline
### The error occurred while setting parameters
### Cause: org.h2.jdbc.JdbcSQLException: Файл поврежден при чтении строки: "C:\Activiti-58\apps\apache-tomcat-6.0.32\bin\.lobs.db\2.temp.db". Возможные решения: используйте утилиту восстановления (recovery tool)
File corrupted while reading record: "C:\Activiti-58\apps\apache-tomcat-6.0.32\bin\.lobs.db\2.temp.db". Possible solution: use the recovery tool [90030-132]
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.activiti.engine.impl.db.DbSqlSession.selectList(DbSqlSession.java:182)
at org.activiti.engine.impl.persistence.entity.VariableInstanceManager.findVariableInstancesByExecutionId(VariableInstanceManager.java:47)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.loadVariableInstances(ExecutionEntity.java:909)
at org.activiti.engine.impl.persistence.entity.VariableScopeImpl.ensureVariableInstancesInitialized(VariableScopeImpl.java:57)
at org.activiti.engine.impl.persistence.entity.VariableScopeImpl.getVariable(VariableScopeImpl.java:90)
at org.activiti.engine.impl.persistence.entity.VariableScopeImpl.getVariable(VariableScopeImpl.java:97)
at org.activiti.engine.impl.form.FormPropertyHandler.createFormProperty(FormPropertyHandler.java:48)
at org.activiti.engine.impl.form.DefaultFormHandler.initializeFormProperties(DefaultFormHandler.java:114)
at org.activiti.engine.impl.form.DefaultTaskFormHandler.createTaskForm(DefaultTaskFormHandler.java:31)
at org.activiti.engine.impl.cmd.GetTaskFormCmd.execute(GetTaskFormCmd.java:54)
at org.activiti.engine.impl.cmd.GetTaskFormCmd.execute(GetTaskFormCmd.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.FormServiceImpl.getTaskFormData(FormServiceImpl.java:56)
at org.activiti.rest.api.task.TaskPropertiesResource.getTaskProperties(TaskPropertiesResource.java:35)
at sun.reflect.GeneratedMethodAccessor265.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.restlet.resource.ServerResource.doHandle(ServerResource.java:449)
at org.restlet.resource.ServerResource.get(ServerResource.java:645)
at org.restlet.resource.ServerResource.doHandle(ServerResource.java:527)
at org.restlet.resource.ServerResource.doNegotiatedHandle(ServerResource.java:587)
at org.restlet.resource.ServerResource.doConditionalHandle(ServerResource.java:299)
at org.restlet.resource.ServerResource.handle(ServerResource.java:846)
at org.restlet.resource.Finder.handle(Finder.java:510)
at org.restlet.routing.Filter.doHandle(Filter.java:156)
at org.restlet.routing.Filter.handle(Filter.java:203)
at org.restlet.routing.Router.doHandle(Router.java:497)
at org.restlet.routing.Router.handle(Router.java:737)
at org.restlet.routing.Filter.doHandle(Filter.java:156)
at org.restlet.routing.Filter.handle(Filter.java:203)
at org.restlet.routing.Filter.doHandle(Filter.java:156)
at org.restlet.routing.Filter.handle(Filter.java:203)
at org.restlet.routing.Filter.doHandle(Filter.java:156)
at org.restlet.routing.Filter.handle(Filter.java:203)
at org.restlet.routing.Filter.doHandle(Filter.java:156)
at org.restlet.engine.application.StatusFilter.doHandle(StatusFilter.java:151)
at org.restlet.routing.Filter.handle(Filter.java:203)
at org.restlet.routing.Filter.doHandle(Filter.java:156)
at org.restlet.routing.Filter.handle(Filter.java:203)
at org.restlet.engine.ChainHelper.handle(ChainHelper.java:111)
at org.restlet.engine.application.ApplicationHelper.handle(ApplicationHelper.java:72)
at org.restlet.Application.handle(Application.java:388)
at org.restlet.routing.Filter.doHandle(Filter.java:156)
at org.restlet.routing.Filter.handle(Filter.java:203)
at org.restlet.routing.Router.doHandle(Router.java:497)
at org.restlet.routing.Router.handle(Router.java:737)
at org.restlet.routing.Filter.doHandle(Filter.java:156)
at org.restlet.routing.Filter.handle(Filter.java:203)
at org.restlet.routing.Router.doHandle(Router.java:497)
at org.restlet.routing.Router.handle(Router.java:737)
at org.restlet.routing.Filter.doHandle(Filter.java:156)
at org.restlet.routing.Filter.handle(Filter.java:203)
at org.restlet.engine.ChainHelper.handle(ChainHelper.java:111)
at org.restlet.Component.handle(Component.java:387)
at org.restlet.Server.handle(Server.java:488)
at org.restlet.engine.ServerHelper.handle(ServerHelper.java:71)
at org.restlet.engine.http.HttpServerHelper.handle(HttpServerHelper.java:150)
at org.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:1037)
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:127)
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:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.h2.jdbc.JdbcSQLException: Файл поврежден при чтении строки: "C:\Activiti-58\apps\apache-tomcat-6.0.32\bin\.lobs.db\2.temp.db". Возможные решения: используйте утилиту восстановления (recovery tool)
File corrupted while reading record: "C:\Activiti-58\apps\apache-tomcat-6.0.32\bin\.lobs.db\2.temp.db". Possible solution: use the recovery tool [90030-132]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:316)
at org.h2.message.DbException.get(DbException.java:167)
at org.h2.message.DbException.get(DbException.java:144)
at org.h2.engine.SessionRemote.openFile(SessionRemote.java:568)
at org.h2.value.ValueLob.getInputStream(ValueLob.java:613)
at org.h2.value.ValueLob.getReader(ValueLob.java:606)
at org.h2.value.ValueLob.getString(ValueLob.java:536)
at org.h2.jdbc.JdbcResultSet.getString(JdbcResultSet.java:283)
at org.apache.ibatis.type.StringTypeHandler.getNullableResult(StringTypeHandler.java:17)
at org.apache.ibatis.type.BaseTypeHandler.getResult(BaseTypeHandler.java:29)
at org.apache.ibatis.executor.resultset.FastResultSetHandler.getPropertyMappingValue(FastResultSetHandler.java:238)
at org.apache.ibatis.executor.resultset.FastResultSetHandler.applyPropertyMappings(FastResultSetHandler.java:221)
at org.apache.ibatis.executor.resultset.FastResultSetHandler.getRowValue(FastResultSetHandler.java:196)
at org.apache.ibatis.executor.resultset.FastResultSetHandler.handleRowValues(FastResultSetHandler.java:145)
at org.apache.ibatis.executor.resultset.FastResultSetHandler.handleResultSet(FastResultSetHandler.java:121)
at org.apache.ibatis.executor.resultset.FastResultSetHandler.handleResultSets(FastResultSetHandler.java:98)
at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:40)
at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:55)
at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:41)
at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:216)
at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:95)
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:72)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:75)

trademak
Star Contributor
Star Contributor
Hi,

Is there some kind of unit test that you could build for this?
Or is it fully random?

Best regards,

partizano
Champ in-the-making
Champ in-the-making
Hi,

It is random. In my application I use workaround for this error - I repeat the request, if the request returned error. Of course, it is not very good solution, but I didn't find another way.