CMDBuild Forum

Error on press Botton "Apply patch"

Hello and nice to meet you,
sorry for my wrong english, but i done installation of CMDBuild on CentOS 7.9 and PostGres 10.22. I followed all steps until web console display list of patch to apply, but when i click on this botton system display “error” popup in same position of botton.
I found some errors in cmdbuild.log but i don’t undestand how solve it.
I put here abstract
022-11-03T12:02:39.793+01:00 [req:e0769a] ERROR o.c.s.r.v.p.ExceptionHandlerService - ws processing error
org.cmdbuild.utils.ws3.utils.Ws3Exception: error processing request =< ws3rest:post:boot/patches/apply >
at org.cmdbuild.utils.ws3.servlet.Ws3RestRequestHandlerServlet.handleRequest(Ws3RestRequestHandlerServlet.java:31) ~[cmdbuild-utils-ws3-3.4.1.jar:3.4.1]
at org.cmdbuild.utils.ws3.servlet.Ws3AbstractHandlerServlet.service(Ws3AbstractHandlerServlet.java:99) ~[cmdbuild-utils-ws3-3.4.1.jar:3.4.1]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:779) ~[servlet-api.jar:4.0.FR]

at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]
Caused by: org.cmdbuild.utils.ws3.utils.Ws3Exception: error processing request with handler = Ws3RequestMethodHanlder{service=org.cmdbuild.service.rest.v3.endpoint.BootWs, met
at org.cmdbuild.utils.ws3.inner.Ws3RequestHandlerImpl.handleRequest(Ws3RequestHandlerImpl.java:83) ~[cmdbuild-utils-ws3-3.4.1.jar:3.4.1]
at org.cmdbuild.utils.ws3.servlet.Ws3RestRequestHandlerServlet.handleRequest(Ws3RestRequestHandlerServlet.java:29) ~[cmdbuild-utils-ws3-3.4.1.jar:3.4.1]
… 84 common frames omitted
Caused by: org.cmdbuild.utils.ws3.utils.Ws3Exception: error processing ws3 request = Ws3RestRequest{uri=ws3rest:post:boot/patches/apply}
at org.cmdbuild.utils.ws3.inner.Ws3RequestMethodHandler.handleRequest(Ws3RequestMethodHandler.java:86) ~[cmdbuild-utils-ws3-3.4.1.jar:3.4.1]
at org.cmdbuild.utils.ws3.inner.Ws3RequestHandlerImpl.handleRequest(Ws3RequestHandlerImpl.java:81) ~[cmdbuild-utils-ws3-3.4.1.jar:3.4.1]
… 85 common frames omitted
Caused by: org.cmdbuild.dao.DaoException: error processing patch = Patch{version=1.0.3-01, category=core, applied=false}
at org.cmdbuild.dao.config.inner.PatchManagerImpl.applyPatchAndStore(PatchManagerImpl.java:176) ~[cmdbuild-dao-config-3.4.1.jar:3.4.1]
at org.cmdbuild.dao.config.inner.PatchServiceImpl.doApplyPendingPatchesAndFunctions(PatchServiceImpl.java:122) ~[cmdbuild-dao-config-3.4.1.jar:3.4.1]
at org.cmdbuild.dao.config.inner.PatchServiceImpl.applyPendingPatchesAndFunctions(PatchServiceImpl.java:99) ~[cmdbuild-dao-config-3.4.1.jar:3.4.1]
at org.cmdbuild.service.rest.v3.endpoint.BootWs.applyPendingPatches(BootWs.java:126) ~[cmdbuild-services-rest-v3-3.4.1.jar:3.4.1]
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:577) ~[na:na]
at org.cmdbuild.utils.ws3.inner.Ws3RequestMethodHandler.handleRequest(Ws3RequestMethodHandler.java:82) ~[cmdbuild-utils-ws3-3.4.1.jar:3.4.1]
… 86 common frames omitted
Caused by: org.cmdbuild.dao.DaoException: error processing patch =< core-1.0.3-01 (Change Role class type from reserved to sysread) >
at org.cmdbuild.dao.config.inner.PatchManagerImpl.applyPatch(PatchManagerImpl.java:287) ~[cmdbuild-dao-config-3.4.1.jar:3.4.1]
at org.cmdbuild.dao.config.inner.PatchManagerImpl.applyPatchAndStore(PatchManagerImpl.java:163) ~[cmdbuild-dao-config-3.4.1.jar:3.4.1]
… 92 common frames omitted
Caused by: org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [
SET SESSION cmdbuild.ignore_tenant_policies = ‘true’;
SET SESSION cmdbuild.user_tenants = ‘{}’;

DO $$ BEGIN RAISE NOTICE ‘apply cmdbuild patch %’, ‘core-1.0.3-01’; END $$ LANGUAGE PLPGSQL;

– Change Role class type from reserved to sysread

COMMENT ON TABLE “Role” IS ‘MODE: sysread|TYPE: class|DESCR: Roles|SUPERCLASS: false|MANAGER: class|STATUS: active’;

DO $$ BEGIN RAISE NOTICE ‘applied cmdbuild patch %’, ‘core-1.0.3-01’; END $$ LANGUAGE PLPGSQL;

]; nested exception is org.postgresql.util.PSQLException: ERROR: relation “Role” does not exist
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:239) ~[spring-jdbc-5.3.18.jar:5.3.18]
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:70) ~[spring-jdbc-5.3.18.jar:5.3.18]
at org.springframework.jdbc.core.JdbcTemplate.translateException(JdbcTemplate.java:1541) ~[spring-jdbc-5.3.18.jar:5.3.18]
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:393) ~[spring-jdbc-5.3.18.jar:5.3.18]
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:431) ~[spring-jdbc-5.3.18.jar:5.3.18]
at org.cmdbuild.dao.config.inner.PatchManagerImpl$3.doInTransactionWithoutResult(PatchManagerImpl.java:273) ~[cmdbuild-dao-config-3.4.1.jar:3.4.1]
at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:36) ~[spring-tx-5.3.18.jar:5.3.18]
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140) ~[spring-tx-5.3.18.jar:5.3.18]
at org.cmdbuild.dao.config.inner.PatchManagerImpl.applyPatch(PatchManagerImpl.java:269) ~[cmdbuild-dao-config-3.4.1.jar:3.4.1]
… 93 common frames omitted
Caused by: org.postgresql.util.PSQLException: ERROR: relation “Role” does not exist
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2674) ~[postgresql-42.3.1.jar:42.3.1]
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2364) ~[postgresql-42.3.1.jar:42.3.1]
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:354) ~[postgresql-42.3.1.jar:42.3.1]
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:484) ~[postgresql-42.3.1.jar:42.3.1]
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:404) ~[postgresql-42.3.1.jar:42.3.1]
at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:325) ~[postgresql-42.3.1.jar:42.3.1]
at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:311) ~[postgresql-42.3.1.jar:42.3.1]
at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:287) ~[postgresql-42.3.1.jar:42.3.1]
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:282) ~[postgresql-42.3.1.jar:42.3.1]
at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:290) ~[commons-dbcp2-2.3.0.jar:2.3.0]
at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:290) ~[commons-dbcp2-2.3.0.jar:2.3.0]
at org.springframework.jdbc.core.JdbcTemplate$1ExecuteStatementCallback.doInStatement(JdbcTemplate.java:422) ~[spring-jdbc-5.3.18.jar:5.3.18]
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:381) ~[spring-jdbc-5.3.18.jar:5.3.18]
… 98 common frames omitted
2022-11-03T12:02:39.823+01:00 [req:e0769a] WARN o.c.w.f.RequestTrackingFilter$$EnhancerBySpringCGLIB$$8c8d787f - processed request, returned error for requestId = e0769a08dcb

Pls can you help me to undestand what can i do to solve it?

This project is a P.O.C. to understand if we can choose CMDBuild as first sotware of our company.
Thanks a lot for future answers
Best Regards
Enrico

Hello,
any suggest of my last post?