Bonita Server Startup fails because of irregular case usage of column names in SQL script with MSSQL Turkish Collation

Description

The errors are always related to column names that contain the letter 'i'. In Turkish collation, different than other collations the upper case of i is 'İ', while the lower case of 'I' is 'ı'.

[ERROR] Failed to execute SQL script statement #13 of URL [file:/D:/Bonita2/setu
p/platform_conf/sql/sqlserver/createTables.sql]: CREATE TABLE actormember ( tena
ntid NUMERIC(19, 0) NOT NULL, id NUMERIC(19, 0) NOT NULL, actorId NUMERIC(19, 0)
NOT NULL, userId NUMERIC(19, 0) NOT NULL, groupId NUMERIC(19, 0) NOT NULL, role
Id NUMERIC(19, 0) NOT NULL, UNIQUE (tenantid, actorid, userId, groupId, roleId),
PRIMARY KEY (tenantid, id) ) ; nested exception is com.microsoft.sqlserver.jdbc
.SQLServerException: Column name 'actorid' does not exist in the target table or
view.
[ERROR] You might get more detailed information about the error by adding '--deb
ug' to the command line, and run again

Environment

  • Windows 7

  • MSSQL Server 2014 (12.0.5207)

    • Turkish Collation (Turkish_100_CI_AS)

External Link

None

Workaround

Replacing all inconsistent uppercase lowercase names containing 'i'. But that's not sufficient. Then you receive errors saying that Optimistic locking was unsuccessful due to invalid column name. The column name is a name containing an 'i'.

Activity

Show:
Elif T. Kuş
November 22, 2018, 4:20 PM

@Antoine

I received this error which I think is again related to this issue. It says * Invalid column name 'tenantid'.* at the bottom.

Shall I open a new bug?

2018-11-22 19:12:23,131 SEVERE [org.bonitasoft.web.toolkit.server.servlet.ToolkitHttpServlet] (default task-5) org.bonitasoft.engine.exception.DeletionException: USERNAME=admin | org.bonitasoft.engine.core.process.instance.api.exceptions.SProcessInstanceModificationException: org.bonitasoft.engine.core.process.instance.api.exceptions.SFlowNodeDeletionException: org.bonitasoft.engine.data.instance.exception.SDataInstanceReadException: Unable to read SADataInstance: org.bonitasoft.web.toolkit.client.common.exception.api.APIException: org.bonitasoft.engine.exception.DeletionException: USERNAME=admin | org.bonitasoft.engine.core.process.instance.api.exceptions.SProcessInstanceModificationException: org.bonitasoft.engine.core.process.instance.api.exceptions.SFlowNodeDeletionException: org.bonitasoft.engine.data.instance.exception.SDataInstanceReadException: Unable to read SADataInstance
at org.bonitasoft.web.rest.server.datastore.bpm.cases.CaseDatastore.delete(CaseDatastore.java:159)
at org.bonitasoft.web.rest.server.api.bpm.cases.APICase.delete(APICase.java:130)
at org.bonitasoft.web.rest.server.framework.API.runDelete(API.java:279)
at org.bonitasoft.web.rest.server.framework.APIServletCall.doDelete(APIServletCall.java:296)
at org.bonitasoft.web.toolkit.server.servlet.ToolkitHttpServlet.doDelete(ToolkitHttpServlet.java:223)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
at org.bonitasoft.web.toolkit.server.servlet.ToolkitHttpServlet.service(ToolkitHttpServlet.java:76)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.bonitasoft.web.toolkit.server.servlet.ToolkitHttpServlet.service(ToolkitHttpServlet.java:251)
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
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 io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
at org.bonitasoft.console.common.server.login.filter.AbstractAuthorizationFilter.doFilter(AbstractAuthorizationFilter.java:61)
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
at org.bonitasoft.console.common.server.filter.NoCacheFilter.doFilter(NoCacheFilter.java:51)
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:274)
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchToPath(ServletInitialHandler.java:209)
at io.undertow.servlet.spec.RequestDispatcherImpl.forwardImpl(RequestDispatcherImpl.java:221)
at io.undertow.servlet.spec.RequestDispatcherImpl.forwardImplSetup(RequestDispatcherImpl.java:147)
at io.undertow.servlet.spec.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:111)
at org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java:213)
at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:171)
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 io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
at org.bonitasoft.console.common.server.login.filter.AbstractAuthorizationFilter.doFilter(AbstractAuthorizationFilter.java:61)
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
at org.bonitasoft.console.common.server.login.filter.AbstractAuthorizationFilter.doFilter(AbstractAuthorizationFilter.java:61)
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
at org.bonitasoft.console.common.server.filter.NoCacheFilter.doFilter(NoCacheFilter.java:51)
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:202)
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:805)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.bonitasoft.engine.exception.DeletionException: USERNAME=admin | org.bonitasoft.engine.core.process.instance.api.exceptions.SProcessInstanceModificationException: org.bonitasoft.engine.core.process.instance.api.exceptions.SFlowNodeDeletionException: org.bonitasoft.engine.data.instance.exception.SDataInstanceReadException: Unable to read SADataInstance
at org.bonitasoft.engine.api.impl.ProcessAPIImpl.deleteArchivedProcessInstancesInAllStates(ProcessAPIImpl.java:3551)
at org.bonitasoft.engine.api.impl.ProcessAPIImpl.deleteArchivedProcessInstancesInAllStates(ProcessAPIImpl.java:3557)
at sun.reflect.GeneratedMethodAccessor56.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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)
at org.bonitasoft.engine.api.impl.ClientInterceptor.invoke(ClientInterceptor.java:86)
at com.sun.proxy.$Proxy98.deleteArchivedProcessInstancesInAllStates(Unknown Source)
at org.bonitasoft.web.rest.server.datastore.bpm.cases.CaseDatastore.delete(CaseDatastore.java:156)
... 86 more
Caused by: org.bonitasoft.engine.core.process.instance.api.exceptions.SProcessInstanceModificationException: org.bonitasoft.engine.core.process.instance.api.exceptions.SFlowNodeDeletionException: org.bonitasoft.engine.data.instance.exception.SDataInstanceReadException: Unable to read SADataInstance
at org.bonitasoft.engine.core.process.instance.impl.ProcessInstanceServiceImpl.deleteArchivedProcessInstanceElements(ProcessInstanceServiceImpl.java:320)
at org.bonitasoft.engine.core.process.instance.impl.ProcessInstanceServiceImpl.deleteArchivedParentProcessInstanceAndElements(ProcessInstanceServiceImpl.java:275)
at org.bonitasoft.engine.core.process.instance.impl.ProcessInstanceServiceImpl.deleteArchivedParentProcessInstancesAndElements(ProcessInstanceServiceImpl.java:257)
at org.bonitasoft.engine.api.impl.ProcessAPIImpl.deleteArchivedProcessInstancesInAllStates(ProcessAPIImpl.java:3547)
... 99 more
Caused by: org.bonitasoft.engine.core.process.instance.api.exceptions.SFlowNodeDeletionException: org.bonitasoft.engine.data.instance.exception.SDataInstanceReadException: Unable to read SADataInstance
at org.bonitasoft.engine.core.process.instance.impl.ActivityInstanceServiceImpl.deleteArchivedFlowNodeInstances(ActivityInstanceServiceImpl.java:921)
at org.bonitasoft.engine.core.process.instance.impl.ProcessInstanceServiceImpl.deleteArchivedProcessInstanceElements(ProcessInstanceServiceImpl.java:313)
... 102 more
Caused by: org.bonitasoft.engine.data.instance.exception.SDataInstanceReadException: Unable to read SADataInstance
at org.bonitasoft.engine.data.instance.api.impl.DataInstanceServiceImpl.getLocalSADataInstances(DataInstanceServiceImpl.java:411)
at org.bonitasoft.engine.data.instance.api.impl.DataInstanceServiceImpl.deleteLocalArchivedDataInstances(DataInstanceServiceImpl.java:427)
at org.bonitasoft.engine.core.process.instance.impl.ActivityInstanceServiceImpl.deleteArchivedFlowNodeInstanceElements(ActivityInstanceServiceImpl.java:957)
at org.bonitasoft.engine.core.process.instance.impl.ActivityInstanceServiceImpl.deleteArchivedFlowNodeInstanceAndElements(ActivityInstanceServiceImpl.java:949)
at org.bonitasoft.engine.core.process.instance.impl.ActivityInstanceServiceImpl.deleteArchivedFlowNodeInstancesAndElements(ActivityInstanceServiceImpl.java:939)
at org.bonitasoft.engine.core.process.instance.impl.ActivityInstanceServiceImpl.deleteArchivedFlowNodeInstancesAndElements(ActivityInstanceServiceImpl.java:931)
at org.bonitasoft.engine.core.process.instance.impl.ActivityInstanceServiceImpl.deleteArchivedFlowNodeInstances(ActivityInstanceServiceImpl.java:917)
... 103 more
Caused by: org.bonitasoft.engine.persistence.SBonitaReadException: org.hibernate.exception.SQLGrammarException: could not extract ResultSet
at org.bonitasoft.engine.persistence.AbstractHibernatePersistenceService.selectList(AbstractHibernatePersistenceService.java:466)
at org.bonitasoft.engine.data.instance.api.impl.DataInstanceServiceImpl.getLocalSADataInstances(DataInstanceServiceImpl.java:405)
... 109 more
Caused by: org.hibernate.exception.SQLGrammarException: could not extract ResultSet
at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:123)
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.extract(ResultSetReturnImpl.java:91)
at org.hibernate.loader.Loader.getResultSet(Loader.java:2066)
at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1863)
at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1839)
at org.hibernate.loader.Loader.doQuery(Loader.java:910)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:355)
at org.hibernate.loader.Loader.doList(Loader.java:2554)
at org.hibernate.loader.Loader.doList(Loader.java:2540)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2370)
at org.hibernate.loader.Loader.list(Loader.java:2365)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:497)
at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:387)
at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:236)
at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1300)
at org.hibernate.internal.QueryImpl.list(QueryImpl.java:103)
at org.bonitasoft.engine.persistence.AbstractHibernatePersistenceService.selectList(AbstractHibernatePersistenceService.java:457)
... 110 more
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Invalid column name 'tenantid'.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:217)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1655)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:440)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:385)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7505)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:2445)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:191)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:166)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(SQLServerPreparedStatement.java:297)
at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:504)
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:82)
... 125 more

Antoine Mottier
November 22, 2018, 9:43 PM

No need to open a new bug I'll try to figure out why you still face an issue.

From the stacktrace I see that the ongoing operation seems to be the deletion of an archived case and more precisely it seems to failed when try to access to data of the instance (DataInstanceServiceImpl.getLocalSADataInstances).

I'll try to review the columns names for the table related to storage of process data.

To help maybe you can share a process to reproduce the issue?

Thanks.

Antoine Mottier
December 18, 2018, 1:42 PM

I review your logs content. Error on the database comes after execution of DataInstanceServiceImpl. The actual error is: Invalid column name 'tenantid'. So i guess this might be related to the table data_instance and the column data_instance.

Can you check that in your database the table and column names are correct according to what I mentioned above?

Both name are what is currently defined in the SQL scripts I attached on this issue.

Antoine Mottier
February 5, 2019, 3:16 PM

I put back this issue to "validated" state as the original issue is confirmed.
if you get a chance to test this please add a comment. Thanks.

Antoine Mottier
April 2, 2019, 9:23 AM

Note that up to Bonita 7.8 and also in future Bonita 7.9 running Bonita with a Turkish locale is not supported.

For Bonita Studio you can define a different locale for:

Bonita Studio itself: by adding JVM parameter in the .ini file in Studio installation folder. For example by editing on Windows 64 the BonitaStudioCommunity64.ini file and adding at the end of the file:
{{-Duser.country=US
-Duser.language=en}}

Bonita Studio embedded Tomcat: go in Studio preferences, click on "Server settings" and in "Tomcat JVM additional settings" add {{ -Duser.country=US -Duser.language=en}}

For a Tomcat Bonita bundle, JVM system properties can be defined in the setenv file located in setup/tomcat-templates.

Assignee

Delphine Coille

Reporter

Elif T. Kuş

Affects versions

Reference

BS-19044

Fix versions

None
Configure