returning problem in turtorial

1
0
-1

Hi,

i make "getting started tutorial" by the book, step by stem. When I "Run process with temporary forms" an error showup

"USERNAME=walter.bates | org.bonitasoft.engine.persistence.SRetryableException: javax.persistence.PersistenceException: org.hibernate.exception.DataException: could not execute statement"

Bonita 7.5 linux version.

Comments

Submitted by antoine.mottier on Thu, 01/04/2018 - 16:55

Can you share the full Bonita Engine log content? And maybe also export your project as a .bos file and share that file as well. To share the file please use a solution such as Google Drive, Dropbox...

Submitted by adam.tomaszewsk... on Tue, 01/09/2018 - 14:09

OK. i paste full log error benith but i thing the mail problem is in this part.

` `Caused by: org.h2.jdbc.JdbcSQLException: Blad konwersji danych "'2018-02-02' (TRAVELREQUEST: DEPARTUREDATE INTEGER NOT NULL)"
Data conversion error converting "'2018-02-02' (TRAVELREQUEST: DEPARTUREDATE INTEGER NOT NULL)"; SQL statement:
insert into TRAVELREQUEST (persistenceId, DEPARTUREDATE, DESTINATION, HOTELNEEDED, NUMBEROFNIGHTS, persistenceVersion, REASON, REFUSALREASON, STATUS, USERID) values (null, ?, ?, ?, ?, ?, ?, ?, ?, ?) -- (NULL, ?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8, ?9) [22018-175]``

FULL ERROR
`
2018-01-09 13:57:53.849 +0100 SEVERE: org.bonitasoft.web.rest.server.api.resource.CommonResource USERNAME=jan.fisher | org.bonitasoft.engine.persistence.SRetryableException: javax.persistence.PersistenceException: org.hibernate.exception.DataException: could not execute statement
org.bonitasoft.engine.exception.BonitaRuntimeException: USERNAME=jan.fisher | org.bonitasoft.engine.persistence.SRetryableException: javax.persistence.PersistenceException: org.hibernate.exception.DataException: could not execute statement
at org.bonitasoft.engine.api.impl.ServerAPIImpl.wrapThrowable(ServerAPIImpl.java:148)
at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeMethod(ServerAPIImpl.java:136)
at org.bonitasoft.engine.api.impl.ClientInterceptor.invoke(ClientInterceptor.java:86)
at com.sun.proxy.$Proxy121.startProcessWithInputs(Unknown Source)
at org.bonitasoft.web.rest.server.api.bpm.process.ProcessInstantiationResource.instantiateProcess(ProcessInstantiationResource.java:73)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.restlet.resource.ServerResource.doHandle(ServerResource.java:508)
at org.restlet.resource.ServerResource.post(ServerResource.java:1341)
at org.restlet.resource.ServerResource.doHandle(ServerResource.java:606)
at org.bonitasoft.web.rest.server.api.resource.CommonResource.doHandle(CommonResource.java:211)
at org.restlet.resource.ServerResource.doNegotiatedHandle(ServerResource.java:662)
at org.restlet.resource.ServerResource.doConditionalHandle(ServerResource.java:348)
at org.restlet.resource.ServerResource.handle(ServerResource.java:1020)
at org.restlet.resource.Finder.handle(Finder.java:236)
at org.restlet.routing.Filter.doHandle(Filter.java:150)
at org.restlet.routing.Filter.handle(Filter.java:197)
at org.restlet.routing.Router.doHandle(Router.java:422)
at org.restlet.routing.Router.handle(Router.java:641)
at org.restlet.routing.Filter.doHandle(Filter.java:150)
at org.restlet.routing.Filter.handle(Filter.java:197)
at org.restlet.routing.Filter.doHandle(Filter.java:150)
at org.restlet.routing.Filter.handle(Filter.java:197)
at org.restlet.routing.Filter.doHandle(Filter.java:150)
at org.restlet.engine.application.StatusFilter.doHandle(StatusFilter.java:140)
at org.restlet.routing.Filter.handle(Filter.java:197)
at org.restlet.routing.Filter.doHandle(Filter.java:150)
at org.restlet.routing.Filter.handle(Filter.java:197)
at org.restlet.engine.CompositeHelper.handle(CompositeHelper.java:202)
at org.restlet.engine.application.ApplicationHelper.handle(ApplicationHelper.java:77)
at org.restlet.Application.handle(Application.java:385)
at org.bonitasoft.web.rest.server.BonitaRestletApplication.handle(BonitaRestletApplication.java:179)
at org.restlet.routing.Filter.doHandle(Filter.java:150)
at org.restlet.routing.Filter.handle(Filter.java:197)
at org.restlet.routing.Router.doHandle(Router.java:422)
at org.restlet.routing.Router.handle(Router.java:641)
at org.restlet.routing.Filter.doHandle(Filter.java:150)
at org.restlet.routing.Filter.handle(Filter.java:197)
at org.restlet.routing.Router.doHandle(Router.java:422)
at org.restlet.routing.Router.handle(Router.java:641)
at org.restlet.routing.Filter.doHandle(Filter.java:150)
at org.restlet.routing.Filter.handle(Filter.java:197)
at org.restlet.engine.CompositeHelper.handle(CompositeHelper.java:202)
at org.restlet.Component.handle(Component.java:408)
at org.restlet.Server.handle(Server.java:507)
at org.restlet.engine.connector.ServerHelper.handle(ServerHelper.java:63)
at org.restlet.engine.adapter.HttpServerHelper.handle(HttpServerHelper.java:143)
at org.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:1117)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:394)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.bonitasoft.console.common.server.login.filter.AbstractAuthorizationFilter.doFilter(AbstractAuthorizationFilter.java:61)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.bonitasoft.console.common.server.filter.NoCacheFilter.doFilter(NoCacheFilter.java:51)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:728)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:467)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:392)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:311)
at org.bonitasoft.console.common.server.page.PageServlet.service(PageServlet.java:89)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:394)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.bonitasoft.console.common.server.filter.CacheFilter.proceedWithFiltering(CacheFilter.java:74)
at org.bonitasoft.console.common.server.filter.ExcludingPatternFilter.doFilter(ExcludingPatternFilter.java:48)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.bonitasoft.console.common.server.filter.ExcludingPatternFilter.excludePatternFiltering(ExcludingPatternFilter.java:53)
at org.bonitasoft.console.common.server.filter.ExcludingPatternFilter.doFilter(ExcludingPatternFilter.java:46)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.bonitasoft.console.common.server.login.filter.AbstractAuthorizationFilter.doFilter(AbstractAuthorizationFilter.java:61)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.bonitasoft.engine.persistence.SRetryableException: javax.persistence.PersistenceException: org.hibernate.exception.DataException: could not execute statement
at org.bonitasoft.engine.business.data.impl.JPABusinessDataRepositoryImpl.merge(JPABusinessDataRepositoryImpl.java:351)
at org.bonitasoft.engine.execution.ProcessExecutorImpl.saveBusinessData(ProcessExecutorImpl.java:467)
at org.bonitasoft.engine.execution.ProcessExecutorImpl.initializeSingleBusinessData(ProcessExecutorImpl.java:449)
at org.bonitasoft.engine.execution.ProcessExecutorImpl.initializeBusinessData(ProcessExecutorImpl.java:435)
at org.bonitasoft.engine.execution.ProcessExecutorImpl.initialize(ProcessExecutorImpl.java:387)
at org.bonitasoft.engine.execution.ProcessExecutorImpl.start(ProcessExecutorImpl.java:824)
at org.bonitasoft.engine.execution.ProcessExecutorImpl.start(ProcessExecutorImpl.java:782)
at org.bonitasoft.engine.api.impl.ProcessStarter.start(ProcessStarter.java:132)
at org.bonitasoft.engine.api.impl.ProcessStarter.start(ProcessStarter.java:103)
at org.bonitasoft.engine.api.impl.ProcessAPIImpl.startProcessWithInputs(ProcessAPIImpl.java:3044)
at org.bonitasoft.engine.api.impl.ProcessAPIImpl.startProcessWithInputs(ProcessAPIImpl.java:3038)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeAPI(ServerAPIImpl.java:462)
at org.bonitasoft.engine.api.impl.ServerAPIImpl$2.call(ServerAPIImpl.java:431)
at org.bonitasoft.engine.transaction.JTATransactionServiceImpl.executeInTransaction(JTATransactionServiceImpl.java:274)
at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeAPIInTransaction(ServerAPIImpl.java:438)
at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeAPI(ServerAPIImpl.java:272)
at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeMethod(ServerAPIImpl.java:124)
... 110 more
Caused by: javax.persistence.PersistenceException: org.hibernate.exception.DataException: could not execute statement
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1763)
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1677)
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1683)
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.merge(AbstractEntityManagerImpl.java:1206)
at org.bonitasoft.engine.business.data.impl.JPABusinessDataRepositoryImpl.merge(JPABusinessDataRepositoryImpl.java:349)
... 130 more
Caused by: org.hibernate.exception.DataException: could not execute statement
at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:135)
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:126)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:112)
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:211)
at org.hibernate.id.IdentityGenerator$GetGeneratedKeysDelegate.executeAndExtract(IdentityGenerator.java:96)
at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:58)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3032)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3558)
at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:98)
at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:492)
at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:197)
at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:181)
at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:216)
at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:334)
at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:289)
at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:195)
at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:126)
at org.hibernate.jpa.event.internal.core.JpaMergeEventListener.saveWithGeneratedId(JpaMergeEventListener.java:73)
at org.hibernate.event.internal.DefaultMergeEventListener.saveTransientEntity(DefaultMergeEventListener.java:271)
at org.hibernate.event.internal.DefaultMergeEventListener.entityIsTransient(DefaultMergeEventListener.java:251)
at org.hibernate.event.internal.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:189)
at org.hibernate.event.internal.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:85)
at org.hibernate.internal.SessionImpl.fireMerge(SessionImpl.java:876)
at org.hibernate.internal.SessionImpl.merge(SessionImpl.java:858)
at org.hibernate.internal.SessionImpl.merge(SessionImpl.java:863)
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.merge(AbstractEntityManagerImpl.java:1196)
... 131 more
Caused by: org.h2.jdbc.JdbcSQLException: Blad konwersji danych "'2018-02-02' (TRAVELREQUEST: DEPARTUREDATE INTEGER NOT NULL)"
Data conversion error converting "'2018-02-02' (TRAVELREQUEST: DEPARTUREDATE INTEGER NOT NULL)"; SQL statement:
insert into TRAVELREQUEST (persistenceId, DEPARTUREDATE, DESTINATION, HOTELNEEDED, NUMBEROFNIGHTS, persistenceVersion, REASON, REFUSALREASON, STATUS, USERID) values (null, ?, ?, ?, ?, ?, ?, ?, ?, ?) -- (NULL, ?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8, ?9) [22018-175]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:332)
at org.h2.message.DbException.get(DbException.java:172)
at org.h2.message.DbException.get(DbException.java:149)
at org.h2.table.Column.convert(Column.java:149)
at org.h2.command.dml.Insert.insertRows(Insert.java:144)
at org.h2.command.dml.Insert.update(Insert.java:115)
at org.h2.command.CommandContainer.update(CommandContainer.java:79)
at org.h2.command.Command.executeUpdate(Command.java:253)
at org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:154)
at org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:140)
at sun.reflect.GeneratedMethodAccessor63.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at bitronix.tm.resource.jdbc.BaseProxyHandlerClass.invoke(BaseProxyHandlerClass.java:64)
at com.sun.proxy.$Proxy134.executeUpdate(Unknown Source)
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:208)
... 153 more`

Submitted by antoine.mottier on Tue, 01/09/2018 - 14:19

I guess there is some kind of data type inconsistency between the type declared in the BDM for the Travelrequest attribute departureDate and the data type of the contract input.

Can you export your workspace content as a .bos file and share it using Google Drive, Dropbox...?

Submitted by adam.tomaszewsk... on Tue, 01/09/2018 - 14:43
Submitted by antoine.mottier on Tue, 01/09/2018 - 17:40

I add an answer below.

Please note that if you need to provide further information, use the "Add new comment" link below the last comment or below an answer instead of posting a new answer. Only post an answer when you actually answer to a question. Thanks.

Submitted by adam.tomaszewsk... on Wed, 01/10/2018 - 17:04

OK. Sorry for that.

1 answer

1
0
-1

From the error it seems that the Bonita Engine try to convert the date 2018-02-02 into an integer.

From what I can see in your BDM definition the TravelRequest attribute departureDate is correctly defined as a DATE ONLY type. DATE ONLY type in BDM should translate into VARCHAR and not to INTEGER.

My guess is that maybe you change the data type in the BDM definition but didn't republish it on the Studio embedded test platform.

In order to republish the BDM definition, open the BDM, click on the "Finish" button and check the option to reset the BDM.

You can check that data type is correct by going to the "Development" -> "Business Data Model" -> "Browse data (h2 console)..." and then in the web console click to expand TRAVELEREQUEST node and click to expand DEPARTUREDATE node and check the data type (it should be VARCHAR_IGNORECASE(10) NOT NULL)

Notifications