Issue applying patches when upgrading to 3.3.1

Dear Tecnoteca,
I’m trying to update one test environment from openMAINT-2.0_3.2.1 to the latest openMAINT-2.1_3.3.1.

When I click on the GUI button to apply the list of identified patches, an error occurs related to the ‘core-3.3.0-37_cascade’ and is reported in the log with a PSQLException: ERROR: relation “Gis_Room_Perimeter” does not exist:

==> …/logs/openmaint-2.1-3.3.1_req.log <==
2021-01-27T14:04:33.401Z [req:71838e] 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.3.1.jar:na]
at org.cmdbuild.utils.ws3.servlet.Ws3AbstractHandlerServlet.service(Ws3AbstractHandlerServlet.java:97) ~[cmdbuild-utils-ws3-3.3.1.jar:na]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) ~[servlet-api.jar:na]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[catalina.jar:9.0.30]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[catalina.jar:9.0.30]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-websocket.jar:9.0.30]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[catalina.jar:9.0.30]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[catalina.jar:9.0.30]
at org.cmdbuild.webapp.filters.AsyncJobFilter.doFilterInternal(AsyncJobFilter.java:49) ~[classes/:3.3.1]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.1.10.RELEASE.jar:5.1.10.RELEASE]
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:358) ~[spring-web-5.1.10.RELEASE.jar:5.1.10.RELEASE]
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:271) ~[spring-web-5.1.10.RELEASE.jar:5.1.10.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[catalina.jar:9.0.30]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[catalina.jar:9.0.30]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:320) ~[spring-security-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127) ~[spring-security-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91) ~[spring-security-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119) ~[spring-security-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137) ~[spring-security-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111) ~[spring-security-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170) ~[spring-security-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63) ~[spring-security-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:97) ~[spring-web-5.1.10.RELEASE.jar:5.1.10.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.1.10.RELEASE.jar:5.1.10.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:74) ~[spring-security-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.1.10.RELEASE.jar:5.1.10.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105) ~[spring-security-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56) ~[spring-security-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.1.10.RELEASE.jar:5.1.10.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215) ~[spring-security-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178) ~[spring-security-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:358) ~[spring-web-5.1.10.RELEASE.jar:5.1.10.RELEASE]
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:271) ~[spring-web-5.1.10.RELEASE.jar:5.1.10.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[catalina.jar:9.0.30]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[catalina.jar:9.0.30]
at org.cmdbuild.webapp.filters.LanguageFilter.doFilterInternal(LanguageFilter.java:54) ~[classes/:3.3.1]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.1.10.RELEASE.jar:5.1.10.RELEASE]
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:358) ~[spring-web-5.1.10.RELEASE.jar:5.1.10.RELEASE]
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:271) ~[spring-web-5.1.10.RELEASE.jar:5.1.10.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[catalina.jar:9.0.30]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[catalina.jar:9.0.30]
at org.cmdbuild.webapp.filters.RequestTrackingFilter.doFilterInternal(RequestTrackingFilter.java:168) ~[classes/:3.3.1]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.1.10.RELEASE.jar:5.1.10.RELEASE]
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:358) ~[spring-web-5.1.10.RELEASE.jar:5.1.10.RELEASE]
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:271) ~[spring-web-5.1.10.RELEASE.jar:5.1.10.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[catalina.jar:9.0.30]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[catalina.jar:9.0.30]
at org.cmdbuild.webapp.filters.BootCheckFilter.handleBootServices(BootCheckFilter.java:81) ~[classes/:3.3.1]
at org.cmdbuild.webapp.filters.BootCheckFilter.doFilterInternal(BootCheckFilter.java:72) ~[classes/:3.3.1]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.1.10.RELEASE.jar:5.1.10.RELEASE]
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:358) ~[spring-web-5.1.10.RELEASE.jar:5.1.10.RELEASE]
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:271) ~[spring-web-5.1.10.RELEASE.jar:5.1.10.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[catalina.jar:9.0.30]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[catalina.jar:9.0.30]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) ~[catalina.jar:9.0.30]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) ~[catalina.jar:9.0.30]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541) ~[catalina.jar:9.0.30]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) ~[catalina.jar:9.0.30]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) ~[catalina.jar:9.0.30]
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678) ~[catalina.jar:9.0.30]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) ~[catalina.jar:9.0.30]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) ~[catalina.jar:9.0.30]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:367) ~[tomcat-coyote.jar:9.0.30]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) ~[tomcat-coyote.jar:9.0.30]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:860) ~[tomcat-coyote.jar:9.0.30]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1598) ~[tomcat-coyote.jar:9.0.30]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-coyote.jar:9.0.30]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-util.jar:9.0.30]
at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]
Caused by: org.cmdbuild.utils.ws3.utils.Ws3Exception: error processing request with handler = Ws3RequestMethodHanlder{service=org.cmdbuild.service.rest.v3.endpoint.BootWs, method=applyPendingPatches}
at org.cmdbuild.utils.ws3.inner.Ws3RequestHandlerImpl.handleRequest(Ws3RequestHandlerImpl.java:79) ~[cmdbuild-utils-ws3-3.3.1.jar:na]
at org.cmdbuild.utils.ws3.servlet.Ws3RestRequestHandlerServlet.handleRequest(Ws3RestRequestHandlerServlet.java:29) ~[cmdbuild-utils-ws3-3.3.1.jar:na]
… 80 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:83) ~[cmdbuild-utils-ws3-3.3.1.jar:na]
at org.cmdbuild.utils.ws3.inner.Ws3RequestHandlerImpl.handleRequest(Ws3RequestHandlerImpl.java:77) ~[cmdbuild-utils-ws3-3.3.1.jar:na]
… 81 common frames omitted
Caused by: org.cmdbuild.dao.DaoException: error processing patch = Patch{version=3.3.0-37_cascade, category=core, applied=false}
at org.cmdbuild.dao.config.inner.PatchManagerImpl.applyPatchAndStore(PatchManagerImpl.java:176) ~[cmdbuild-dao-config-3.3.1.jar:na]
at org.cmdbuild.dao.config.inner.PatchServiceImpl.doApplyPendingPatchesAndFunctions(PatchServiceImpl.java:111) ~[cmdbuild-dao-config-3.3.1.jar:na]
at org.cmdbuild.dao.config.inner.PatchServiceImpl.applyPendingPatchesAndFunctions(PatchServiceImpl.java:88) ~[cmdbuild-dao-config-3.3.1.jar:na]
at org.cmdbuild.service.rest.v3.endpoint.BootWs.applyPendingPatches(BootWs.java:130) ~[cmdbuild-services-rest-v3-3.3.1.jar:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
at org.cmdbuild.utils.ws3.inner.Ws3RequestMethodHandler.handleRequest(Ws3RequestMethodHandler.java:79) ~[cmdbuild-utils-ws3-3.3.1.jar:na]
… 82 common frames omitted
Caused by: org.cmdbuild.dao.DaoException: error processing patch =< core-3.3.0-37_cascade (cascade config) >
at org.cmdbuild.dao.config.inner.PatchManagerImpl.applyPatch(PatchManagerImpl.java:265) ~[cmdbuild-dao-config-3.3.1.jar:na]
at org.cmdbuild.dao.config.inner.PatchManagerImpl.applyPatchAndStore(PatchManagerImpl.java:163) ~[cmdbuild-dao-config-3.3.1.jar:na]
… 90 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-3.3.0-37_cascade’; END $$ LANGUAGE PLPGSQL;

– cascade config

DO $$ DECLARE
_domain regclass;
_attribute record;
_trigger record;
_cascade_direct varchar;
_cascade_inverse varchar;
BEGIN
FOR _domain IN SELECT * FROM _cm3_domain_list() LOOP
_cascade_direct = ‘setnull’;
_cascade_inverse = ‘setnull’;
FOR _trigger IN SELECT * FROM (SELECT tgrelid::regclass _class, tgname, (_cm3_trigger_utils_tgargs_to_string_array(tgargs))[1]::regclass _owner, (_cm3_trigger_utils_tgargs_to_string_array(tgargs))[2] _attr from pg_trigger join pg_proc on pg_proc.oid = pg_trigger.tgfoid where proname = ‘_cm3_trigger_card_enforce_foreign_key_for_target’) x LOOP
IF NOT _cm3_attribute_is_foreignkey(_trigger._owner, _trigger._attr) THEN
RAISE NOTICE ‘clear reference trigger = % on class = %’, _trigger.tgname, _cm3_utils_regclass_to_name(_trigger._class);
EXECUTE format(‘DROP TRIGGER %I ON %s’, _trigger.tgname, _trigger._class);
END IF;
END LOOP;
IF EXISTS(SELECT * FROM _cm3_attribute_list_detailed() WHERE comment->>‘REFERENCEDOM’ = _cm3_utils_regclass_to_domain_name(_domain) AND comment->>‘REFERENCEDIR’ = ‘direct’ AND _cm3_utils_first_not_blank(comment->>‘CASCADE’, ‘restrict’) = ‘restrict’ ) THEN
_cascade_inverse = ‘restrict’;
END IF;
IF EXISTS(SELECT * FROM _cm3_attribute_list_detailed() WHERE comment->>‘REFERENCEDOM’ = _cm3_utils_regclass_to_domain_name(_domain) AND comment->>‘REFERENCEDIR’ = ‘inverse’ AND _cm3_utils_first_not_blank(comment->>‘CASCADE’, ‘restrict’) = ‘restrict’ ) THEN
_cascade_direct = ‘restrict’;
END IF;
RAISE NOTICE ‘set domain cascade % = %, %’, _cm3_utils_regclass_to_domain_name(_domain), _cascade_direct, _cascade_inverse;
PERFORM _cm3_class_features_set(_domain, ‘CASCADEDIRECT’, _cascade_direct);
PERFORM _cm3_class_features_set(_domain, ‘CASCADEINVERSE’, _cascade_inverse);
END LOOP;
FOR _attribute IN SELECT * FROM _cm3_attribute_list_detailed() WHERE _cm3_attribute_is_reference(owner, name) LOOP
PERFORM _cm3_attribute_features_delete(_attribute.owner, _attribute.name, ‘CASCADE’);
END LOOP;
END $$ LANGUAGE PLPGSQL;

DO $$ BEGIN RAISE NOTICE ‘applied cmdbuild patch %’, ‘core-3.3.0-37_cascade’; END $$ LANGUAGE PLPGSQL;

]; nested exception is org.postgresql.util.PSQLException: ERROR: relation “Gis_Room_Perimeter” does not exist
Where: PL/pgSQL function inline_code_block line 11 at FOR over SELECT rows
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:235) ~[spring-jdbc-5.1.10.RELEASE.jar:5.1.10.RELEASE]
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72) ~[spring-jdbc-5.1.10.RELEASE.jar:5.1.10.RELEASE]
at org.springframework.jdbc.core.JdbcTemplate.translateException(JdbcTemplate.java:1443) ~[spring-jdbc-5.1.10.RELEASE.jar:5.1.10.RELEASE]
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:388) ~[spring-jdbc-5.1.10.RELEASE.jar:5.1.10.RELEASE]
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:418) ~[spring-jdbc-5.1.10.RELEASE.jar:5.1.10.RELEASE]
at org.cmdbuild.dao.config.inner.PatchManagerImpl$3.doInTransactionWithoutResult(PatchManagerImpl.java:251) ~[cmdbuild-dao-config-3.3.1.jar:na]
at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:36) ~[spring-tx-5.1.10.RELEASE.jar:5.1.10.RELEASE]
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140) ~[spring-tx-5.1.10.RELEASE.jar:5.1.10.RELEASE]
at org.cmdbuild.dao.config.inner.PatchManagerImpl.applyPatch(PatchManagerImpl.java:247) ~[cmdbuild-dao-config-3.3.1.jar:na]
… 91 common frames omitted
Caused by: org.postgresql.util.PSQLException: ERROR: relation “Gis_Room_Perimeter” does not exist
Where: PL/pgSQL function inline_code_block line 11 at FOR over SELECT rows
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440) ~[postgresql-42.2.5.jar:42.2.5]
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183) ~[postgresql-42.2.5.jar:42.2.5]
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308) ~[postgresql-42.2.5.jar:42.2.5]
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441) ~[postgresql-42.2.5.jar:42.2.5]
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365) ~[postgresql-42.2.5.jar:42.2.5]
at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:307) ~[postgresql-42.2.5.jar:42.2.5]
at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:293) ~[postgresql-42.2.5.jar:42.2.5]
at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:270) ~[postgresql-42.2.5.jar:42.2.5]
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:266) ~[postgresql-42.2.5.jar:42.2.5]
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:409) ~[spring-jdbc-5.1.10.RELEASE.jar:5.1.10.RELEASE]
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:376) ~[spring-jdbc-5.1.10.RELEASE.jar:5.1.10.RELEASE]
… 96 common frames omitted
2021-01-27T14:04:33.407Z [req:71838e] WARN o.c.w.f.RequestTrackingFilter$$EnhancerBySpringCGLIB$$b766e86e - processed request, returned error for requestId = 71838eac216848afa2t64bcu

Any hint?

Regards,
Gerardo

Hi,
could you please check the search_path variable of your Postgres installation?
Otherwise if it’s correclt set verify the presence of the table “Gis_Room_Perimeter” in the GIS schema.

Dear Tecnoteca,
the table is correctly present under the ‘gis’ schema, but the search_path variable was not including that schema.

In fact, the SQL command “SHOW search_path” returned only “$user” and public.
So, to solve the issue I had to:

  • set the search_path in Postgres to “$user”, public, gis;
  • restart the Tomcat.

Then, I opened again the GUI and applied all the proposed patches, and now the upgrade was complete without additional errors.

Thank you and regards