Sonar upgrade from 9.X to 10.1 - sonar and postgres errors

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension) - 10.1
  • how is SonarQube deployed: zip, Docker, Helm - Docker
  • what are you trying to achieve - publish the analysis
  • what have you tried so far to achieve this

Hi,

Your title says you’re on 10.2(?) but the body says 9.2. If it’s the latter, you’ll need to upgrade to an active version before we can help you. And once you have, please be explicit about what the question is. It’s not clear to me from the screenshot of warnings you’ve provided.

 
Ann

Oh My bad. please find the updated details.

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension) - 10.1
  • how is SonarQube deployed: zip, Docker, Helm - Docker
  • what are you trying to achieve - publish the analysis
  • what have you tried so far to achieve this

upgrade path

9.9.1 to 9.9.4 - successful
9.9.4 to 10.0 - successful
10.0 to 10.1 - error - I just noticed that I got an error here itself.

ocker-compose-sonarqube-1  | 2024.03.27 17:50:52 INFO  web[AY6BCMp/YwoO9G/4AABk][o.s.u.c.UpdateCenter] The plugin 'xml' version : 2.8.1.4006 has not been found on the update center.
docker-compose-db-1         | 2024-03-27 17:50:54.665 UTC [31] ERROR:  syntax error at or near "$3" at character 1424
docker-compose-db-1         | 2024-03-27 17:50:54.665 UTC [31] STATEMENT:  select
docker-compose-db-1         |
docker-compose-db-1         |
docker-compose-db-1         |       ca.uuid,
docker-compose-db-1         |       ca.node_name as nodeName,
docker-compose-db-1         |       ca.task_type as taskType,
docker-compose-db-1         |       ca.component_uuid as componentUuid,
docker-compose-db-1         |       ca.main_component_uuid as mainComponentUuid,
docker-compose-db-1         |       ca.analysis_uuid as analysisUuid,
docker-compose-db-1         |       ca.status as status,
docker-compose-db-1         |       ca.submitter_uuid as submitterUuid,
docker-compose-db-1         |       ca.submitted_at as submittedAt,
docker-compose-db-1         |       ca.worker_uuid as workerUuid,
docker-compose-db-1         |       ca.started_at as startedAt,
docker-compose-db-1         |       ca.executed_at as executedAt,
docker-compose-db-1         |       ca.created_at as createdAt,
docker-compose-db-1         |       ca.updated_at as updatedAt,
docker-compose-db-1         |       ca.is_last as isLast,
docker-compose-db-1         |       ca.is_last_key as isLastKey,
docker-compose-db-1         |       ca.main_is_last as mainIsLast,
docker-compose-db-1         |       ca.main_is_last_key as mainIsLastKey,
docker-compose-db-1         |       ca.execution_time_ms as executionTimeMs,
docker-compose-db-1         |       ca.error_message as errorMessage,
docker-compose-db-1         |       ca.error_type as errorType,
docker-compose-db-1         |       ctm.uuid as ctm_uuid,
docker-compose-db-1         |       ctm.task_uuid as ctm_taskUuid,
docker-compose-db-1         |       ctm.message as ctm_message,
docker-compose-db-1         |       ctm.message_type as ctm_type,
docker-compose-db-1         |       ctm.created_at as ctm_createdAt
docker-compose-db-1         |      ,
docker-compose-db-1         |
docker-compose-db-1         |       csc.task_uuid is not null as hasScannerContext
docker-compose-db-1         |
docker-compose-db-1         |
docker-compose-db-1         |
docker-compose-db-1         |       from ce_activity ca
docker-compose-db-1         |       left outer join ce_task_message ctm on ca.uuid = ctm.task_uuid
docker-compose-db-1         |       left outer join ce_scanner_context csc on csc.task_uuid = ca.uuid
docker-compose-db-1         |
docker-compose-db-1         |       where ca.uuid in (
docker-compose-db-1         |
docker-compose-db-1         |
docker-compose-db-1         |       select ca.uuid
docker-compose-db-1         |       from ce_activity ca
docker-compose-db-1         |        WHERE  ca.main_is_last=true
docker-compose-db-1         |
docker-compose-db-1         |
docker-compose-db-1         |           and ca.main_component_uuid in
docker-compose-db-1         |           (
docker-compose-db-1         |             $1
docker-compose-db-1         |           )
docker-compose-db-1         |
docker-compose-db-1         |       order by ca.created_at desc, uuid desc
docker-compose-db-1         |       offset ($2-1) rows fetch next $3 rows only
docker-compose-db-1         |
docker-compose-db-1         |       )
docker-compose-db-1         |       order by ca.created_at desc, ca.uuid desc
docker-compose-sonarqube-1  | 2024.03.27 17:50:54 ERROR web[AY6BCMp/YwoO9G/4AAB4][o.s.s.w.WebServiceEngine] Fail to process request http://cq.dev.ps.wbdapps.com/api/ce/component?component=ps-commondocs-docs-web
docker-compose-sonarqube-1  | org.apache.ibatis.exceptions.PersistenceException:
docker-compose-sonarqube-1  | ### Error querying database.  Cause: org.postgresql.util.PSQLException: ERROR: syntax error at or near "$3"
docker-compose-sonarqube-1  |   Position: 1424
docker-compose-sonarqube-1  | ### The error may exist in org.sonar.db.ce.CeActivityMapper
docker-compose-sonarqube-1  | ### The error may involve org.sonar.db.ce.CeActivityMapper.selectByQuery-Inline
docker-compose-sonarqube-1  | ### The error occurred while setting parameters
docker-compose-sonarqube-1  | ### SQL: select                   ca.uuid,     ca.node_name as nodeName,     ca.task_type as taskType,     ca.component_uuid as componentUuid,     ca.main_component_uuid as mainComponentUuid,     ca.analysis_uuid as analysisUuid,     ca.status as status,     ca.submitter_uuid as submitterUuid,     ca.submitted_at as submittedAt,     ca.worker_uuid as workerUuid,     ca.started_at as startedAt,     ca.executed_at as executedAt,     ca.created_at as createdAt,     ca.updated_at as updatedAt,     ca.is_last as isLast,     ca.is_last_key as isLastKey,     ca.main_is_last as mainIsLast,     ca.main_is_last_key as mainIsLastKey,     ca.execution_time_ms as executionTimeMs,     ca.error_message as errorMessage,     ca.error_type as errorType,     ctm.uuid as ctm_uuid,     ctm.task_uuid as ctm_taskUuid,     ctm.message as ctm_message,     ctm.message_type as ctm_type,     ctm.created_at as ctm_createdAt    ,      csc.task_uuid is not null as hasScannerContext                     from ce_activity ca     left outer join ce_task_message ctm on ca.uuid = ctm.task_uuid     left outer join ce_scanner_context csc on csc.task_uuid = ca.uuid where ca.uuid in (                   select ca.uuid     from ce_activity ca      WHERE  ca.main_is_last=true                       and ca.main_component_uuid in         (           ?         )          order by ca.created_at desc, uuiddesc     offset (?-1) rows fetch next ? rows only         )     order by ca.created_at desc, ca.uuid desc
docker-compose-sonarqube-1  | ### Cause: org.postgresql.util.PSQLException: ERROR: syntax error at or near "$3"
docker-compose-sonarqube-1  |   Position: 1424
docker-compose-sonarqube-1  |   at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
docker-compose-sonarqube-1  |   at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:156)
docker-compose-sonarqube-1  |   at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:147)
docker-compose-sonarqube-1  |   at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:142)
docker-compose-sonarqube-1  |   at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:147)
docker-compose-sonarqube-1  |   at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:80)
docker-compose-sonarqube-1  |   at org.apache.ibatis.binding.MapperProxy$PlainMethodInvoker.invoke(MapperProxy.java:142)
docker-compose-sonarqube-1  |   at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:86)
docker-compose-sonarqube-1  |   at jdk.proxy2/jdk.proxy2.$Proxy118.selectByQuery(Unknown Source)
docker-compose-sonarqube-1  |   at org.sonar.db.ce.CeActivityDao.selectByQuery(CeActivityDao.java:84)
docker-compose-sonarqube-1  |   at org.sonar.server.ce.ws.ComponentAction.handle(ComponentAction.java:89)
docker-compose-sonarqube-1  |   at org.sonar.server.ws.WebServiceEngine.execute(WebServiceEngine.java:111)
docker-compose-sonarqube-1  |   at org.sonar.server.platform.web.WebServiceFilter.doFilter(WebServiceFilter.java:84)
docker-compose-sonarqube-1  |   at org.sonar.server.platform.web.MasterServletFilter$JavaxFilterAdapter.doFilter(MasterServletFilter.java:227)
docker-compose-sonarqube-1  |   at org.sonar.server.platform.web.MasterServletFilter$GodFilterChain.doFilter(MasterServletFilter.java:198)
docker-compose-sonarqube-1  |   at org.sonar.server.platform.web.MasterServletFilter$HttpFilterChainAdapter.doFilter(MasterServletFilter.java:241)
docker-compose-sonarqube-1  |   at org.sonar.server.platform.web.SonarLintConnectionFilter.doFilter(SonarLintConnectionFilter.java:66)
docker-compose-sonarqube-1  |   at org.sonar.server.platform.web.MasterServletFilter$JavaxFilterAdapter.doFilter(MasterServletFilter.java:227)
docker-compose-sonarqube-1  |   at org.sonar.server.platform.web.MasterServletFilter$GodFilterChain.doFilter(MasterServletFilter.java:198)
docker-compose-sonarqube-1  |   at org.sonar.server.platform.web.MasterServletFilter.doFilter(MasterServletFilter.java:146)
docker-compose-sonarqube-1  |   at jdk.internal.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
docker-compose-sonarqube-1  |   at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
docker-compose-sonarqube-1  |   at java.base/java.lang.reflect.Method.invoke(Unknown Source)
docker-compose-sonarqube-1  |   at org.apache.catalina.security.SecurityUtil.lambda$execute$0(SecurityUtil.java:280)
docker-compose-sonarqube-1  |   at java.base/java.security.AccessController.doPrivileged(Unknown Source)
docker-compose-sonarqube-1  |   at java.base/javax.security.auth.Subject.doAsPrivileged(Unknown Source)
docker-compose-sonarqube-1  |   at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
docker-compose-sonarqube-1  |   at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:253)
docker-compose-sonarqube-1  |   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:176)
docker-compose-sonarqube-1  |   at org.apache.catalina.core.ApplicationFilterChain.lambda$doFilter$0(ApplicationFilterChain.java:137)
docker-compose-sonarqube-1  |   at java.base/java.security.AccessController.doPrivileged(Unknown Source)
docker-compose-sonarqube-1  |   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:136)
docker-compose-sonarqube-1  |   at org.sonar.server.platform.web.UserSessionFilter.doFilter(UserSessionFilter.java:83)
docker-compose-sonarqube-1  |   at org.sonar.server.platform.web.UserSessionFilter.doFilter(UserSessionFilter.java:70)
docker-compose-sonarqube-1  |   at jdk.internal.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
docker-compose-sonarqube-1  |   at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
docker-compose-sonarqube-1  |   at java.base/java.lang.reflect.Method.invoke(Unknown Source)
docker-compose-sonarqube-1  |   at org.apache.catalina.security.SecurityUtil.lambda$execute$0(SecurityUtil.java:280)
docker-compose-sonarqube-1  |   at java.base/java.security.AccessController.doPrivileged(Unknown Source)
docker-compose-sonarqube-1  |   at java.base/javax.security.auth.Subject.doAsPrivileged(Unknown Source)
docker-compose-sonarqube-1  |   at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
docker-compose-sonarqube-1  |   at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:253)
docker-compose-sonarqube-1  |   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:176)
docker-compose-sonarqube-1  |   at org.apache.catalina.core.ApplicationFilterChain.lambda$doFilter$0(ApplicationFilterChain.java:137)
docker-compose-sonarqube-1  |   at java.base/java.security.AccessController.doPrivileged(Unknown Source)
docker-compose-sonarqube-1  |   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:136)
docker-compose-sonarqube-1  |   at org.sonar.server.platform.web.CspFilter.doFilter(CspFilter.java:63)
docker-compose-sonarqube-1  |   at jdk.internal.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
docker-compose-sonarqube-1  |   at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
docker-compose-sonarqube-1  |   at java.base/java.lang.reflect.Method.invoke(Unknown Source)
docker-compose-sonarqube-1  |   at org.apache.catalina.security.SecurityUtil.lambda$execute$0(SecurityUtil.java:280)
docker-compose-sonarqube-1  |   at java.base/java.security.AccessController.doPrivileged(Unknown Source)
docker-compose-sonarqube-1  |   at java.base/javax.security.auth.Subject.doAsPrivileged(Unknown Source)
docker-compose-sonarqube-1  |   at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
docker-compose-sonarqube-1  |   at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:253)
docker-compose-sonarqube-1  |   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:176)
docker-compose-sonarqube-1  |   at org.apache.catalina.core.ApplicationFilterChain.lambda$doFilter$0(ApplicationFilterChain.java:137)
docker-compose-sonarqube-1  |   at java.base/java.security.AccessController.doPrivileged(Unknown Source)
docker-compose-sonarqube-1  |   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:136)
docker-compose-sonarqube-1  |   at org.sonar.server.platform.web.CacheControlFilter.doFilter(CacheControlFilter.java:76)
docker-compose-sonarqube-1  |   at jdk.internal.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
docker-compose-sonarqube-1  |   at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
docker-compose-sonarqube-1  |   at java.base/java.lang.reflect.Method.invoke(Unknown Source)
docker-compose-sonarqube-1  |   at org.apache.catalina.security.SecurityUtil.lambda$execute$0(SecurityUtil.java:280)
docker-compose-sonarqube-1  |   at java.base/java.security.AccessController.doPrivileged(Unknown Source)
docker-compose-sonarqube-1  |   at java.base/javax.security.auth.Subject.doAsPrivileged(Unknown Source)
docker-compose-sonarqube-1  |   at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
docker-compose-sonarqube-1  |   at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:253)
docker-compose-sonarqube-1  |   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:176)
docker-compose-sonarqube-1  |   at org.apache.catalina.core.ApplicationFilterChain.lambda$doFilter$0(ApplicationFilterChain.java:137)
docker-compose-sonarqube-1  |   at java.base/java.security.AccessController.doPrivileged(Unknown Source)
docker-compose-sonarqube-1  |   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:136)
docker-compose-sonarqube-1  |   at org.sonar.server.platform.web.SecurityServletFilter.doHttpFilter(SecurityServletFilter.java:60)
docker-compose-sonarqube-1  |   at org.sonar.server.platform.web.SecurityServletFilter.doFilter(SecurityServletFilter.java:47)
docker-compose-sonarqube-1  |   at jdk.internal.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
docker-compose-sonarqube-1  |   at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
docker-compose-sonarqube-1  |   at java.base/java.lang.reflect.Method.invoke(Unknown Source)
docker-compose-sonarqube-1  |   at org.apache.catalina.security.SecurityUtil.lambda$execute$0(SecurityUtil.java:280)
docker-compose-sonarqube-1  |   at java.base/java.security.AccessController.doPrivileged(Unknown Source)
docker-compose-sonarqube-1  |   at java.base/javax.security.auth.Subject.doAsPrivileged(Unknown Source)
docker-compose-sonarqube-1  |   at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
docker-compose-sonarqube-1  |   at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:253)
docker-compose-sonarqube-1  |   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:176)
docker-compose-sonarqube-1  |   at org.apache.catalina.core.ApplicationFilterChain.lambda$doFilter$0(ApplicationFilterChain.java:137)
docker-compose-sonarqube-1  |   at java.base/java.security.AccessController.doPrivileged(Unknown Source)
docker-compose-sonarqube-1  |   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:136)
docker-compose-sonarqube-1  |   at org.sonar.server.platform.web.RedirectFilter.doFilter(RedirectFilter.java:57)
docker-compose-sonarqube-1  |   at jdk.internal.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
docker-compose-sonarqube-1  |   at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
docker-compose-sonarqube-1  |   at java.base/java.lang.reflect.Method.invoke(Unknown Source)
docker-compose-sonarqube-1  |   at org.apache.catalina.security.SecurityUtil.lambda$execute$0(SecurityUtil.java:280)
docker-compose-sonarqube-1  |   at java.base/java.security.AccessController.doPrivileged(Unknown Source)
docker-compose-sonarqube-1  |   at java.base/javax.security.auth.Subject.doAsPrivileged(Unknown Source)
docker-compose-sonarqube-1  |   at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
docker-compose-sonarqube-1  |   at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:253)
docker-compose-sonarqube-1  |   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:176)
docker-compose-sonarqube-1  |   at org.apache.catalina.core.ApplicationFilterChain.lambda$doFilter$0(ApplicationFilterChain.java:137)
docker-compose-sonarqube-1  |   at java.base/java.security.AccessController.doPrivileged(Unknown Source)
docker-compose-sonarqube-1  |   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:136)
docker-compose-sonarqube-1  |   at org.sonar.server.platform.web.RequestIdFilter.doFilter(RequestIdFilter.java:66)
docker-compose-sonarqube-1  |   at jdk.internal.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
docker-compose-sonarqube-1  |   at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
docker-compose-sonarqube-1  |   at java.base/java.lang.reflect.Method.invoke(Unknown Source)
docker-compose-sonarqube-1  |   at org.apache.catalina.security.SecurityUtil.lambda$execute$0(SecurityUtil.java:280)
docker-compose-sonarqube-1  |   at java.base/java.security.AccessController.doPrivileged(Unknown Source)
docker-compose-sonarqube-1  |   at java.base/javax.security.auth.Subject.doAsPrivileged(Unknown Source)
docker-compose-sonarqube-1  |   at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
docker-compose-sonarqube-1  |   at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:253)
docker-compose-sonarqube-1  |   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:176)
docker-compose-sonarqube-1  |   at org.apache.catalina.core.ApplicationFilterChain.lambda$doFilter$0(ApplicationFilterChain.java:137)
docker-compose-sonarqube-1  |   at java.base/java.security.AccessController.doPrivileged(Unknown Source)
docker-compose-sonarqube-1  |   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:136)
docker-compose-sonarqube-1  |   at org.sonar.server.platform.web.RootFilter.doFilter(RootFilter.java:65)
docker-compose-sonarqube-1  |   at jdk.internal.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
docker-compose-sonarqube-1  |   at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
docker-compose-sonarqube-1  |   at java.base/java.lang.reflect.Method.invoke(Unknown Source)
docker-compose-sonarqube-1  |   at org.apache.catalina.security.SecurityUtil.lambda$execute$0(SecurityUtil.java:280)
docker-compose-sonarqube-1  |   at java.base/java.security.AccessController.doPrivileged(Unknown Source)
docker-compose-sonarqube-1  |   at java.base/javax.security.auth.Subject.doAsPrivileged(Unknown Source)
docker-compose-sonarqube-1  |   at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
docker-compose-sonarqube-1  |   at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:253)
docker-compose-sonarqube-1  |   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:176)
docker-compose-sonarqube-1  |   at org.apache.catalina.core.ApplicationFilterChain.lambda$doFilter$0(ApplicationFilterChain.java:137)
docker-compose-sonarqube-1  |   at java.base/java.security.AccessController.doPrivileged(Unknown Source)
docker-compose-sonarqube-1  |   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:136)
docker-compose-sonarqube-1  |   at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:115)
docker-compose-sonarqube-1  |   at jdk.internal.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
docker-compose-sonarqube-1  |   at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
docker-compose-sonarqube-1  |   at java.base/java.lang.reflect.Method.invoke(Unknown Source)
docker-compose-sonarqube-1  |   at org.apache.catalina.security.SecurityUtil.lambda$execute$0(SecurityUtil.java:280)
docker-compose-sonarqube-1  |   at java.base/java.security.AccessController.doPrivileged(Unknown Source)
docker-compose-sonarqube-1  |   at java.base/javax.security.auth.Subject.doAsPrivileged(Unknown Source)
docker-compose-sonarqube-1  |   at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
docker-compose-sonarqube-1  |   at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:253)
docker-compose-sonarqube-1  |   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:176)
docker-compose-sonarqube-1  |   at org.apache.catalina.core.ApplicationFilterChain.lambda$doFilter$0(ApplicationFilterChain.java:137)
docker-compose-sonarqube-1  |   at java.base/java.security.AccessController.doPrivileged(Unknown Source)
docker-compose-sonarqube-1  |   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:136)
docker-compose-sonarqube-1  |   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167)
docker-compose-sonarqube-1  |   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
docker-compose-sonarqube-1  |   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:481)
docker-compose-sonarqube-1  |   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:130)
docker-compose-sonarqube-1  |   at ch.qos.logback.access.tomcat.LogbackValve.invoke(LogbackValve.java:262)
docker-compose-sonarqube-1  |   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
docker-compose-sonarqube-1  |   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
docker-compose-sonarqube-1  |   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
docker-compose-sonarqube-1  |   at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:389)
docker-compose-sonarqube-1  |   at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
docker-compose-sonarqube-1  |   at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:926)
docker-compose-sonarqube-1  |   at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1791)
docker-compose-sonarqube-1  |   at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
docker-compose-sonarqube-1  |   at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
docker-compose-sonarqube-1  |   at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
docker-compose-sonarqube-1  |   at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
docker-compose-sonarqube-1  |   at java.base/java.lang.Thread.run(Unknown Source)
docker-compose-sonarqube-1  | Caused by: org.postgresql.util.PSQLException: ERROR: syntax error at or near "$3"
docker-compose-sonarqube-1  |   Position: 1424
docker-compose-sonarqube-1  |   at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2713)
docker-compose-sonarqube-1  |   at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2401)
docker-compose-sonarqube-1  |   at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:368)
docker-compose-sonarqube-1  |   at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:498)
docker-compose-sonarqube-1  |   at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:415)
docker-compose-sonarqube-1  |   at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:190)
docker-compose-sonarqube-1  |   at org.postgresql.jdbc.PgPreparedStatement.execute(PgPreparedStatement.java:177)
docker-compose-sonarqube-1  |   at com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44)
docker-compose-sonarqube-1  |   at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java)
docker-compose-sonarqube-1  |   at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:65)
docker-compose-sonarqube-1  |   at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:80)
docker-compose-sonarqube-1  |   at org.apache.ibatis.executor.ReuseExecutor.doQuery(ReuseExecutor.java:62)
docker-compose-sonarqube-1  |   at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:333)
docker-compose-sonarqube-1  |   at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:158)
docker-compose-sonarqube-1  |   at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:110)
docker-compose-sonarqube-1  |   at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:90)
docker-compose-sonarqube-1  |   at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:154)
docker-compose-sonarqube-1  |   ... 153 common frames omitted

Hi,

The current version is 10.4. Could you upgrade and see if this still happens?

 
Ann

Hi Ann,
yes it is the same with 10.4 also. The error starts from the sonarqube:10.1-community version upgrade from 10.0-community
Also, I noticed the web UI is a little different when compared with previous versions. In UI when I click the project, I get “An error has occurred” as per the screenshot, and at the same time in Docker logs I see the DB syntax errors whenever I access any projects.

docker ps
CONTAINER ID   IMAGE                                                                                   COMMAND                  CREATED          STATUS          PORTS           NAMES
ca9ed3d76c6a   sonarqube:10.1-community  "/opt/sonarqube/dock…"   11 minutes ago   Up 11 minutes   0.0.0.0:9000->9000/tcp, :::9000->9000/tcp, 0.0.0.0:9092->9092/tcp, :::9092->9092/tcp   docker-compose-sonarqube-1
406420908e84   postgres:10.1                                                                           "docker-entrypoint.s…"   11 minutes ago   Up 11 minutes   5432/tcp

please let me know if this information is sufficient.

Hi,

Thanks for trying the upgrade!

Could you provide the browser console error that corresponds to this red error message, as well as the errors you’re seeing in your server logs?

 
Thx,
Ann

sonar container logs when I click the project in the UI

2024.03.29 16:27:09 ERROR web[AY6K5m7W5QLOECmSAAuJ][o.s.s.w.WebServiceEngine] Fail to process request http://XXXX.com/api/ce/component?component=XXXX
org.apache.ibatis.exceptions.PersistenceException:
### Error querying database.  Cause: org.postgresql.util.PSQLException: ERROR: syntax error at or near "$3"
  Position: 1424
### The error may exist in org.sonar.db.ce.CeActivityMapper
### The error may involve org.sonar.db.ce.CeActivityMapper.selectByQuery-Inline
### The error occurred while setting parameters
### SQL: select                   ca.uuid,     ca.node_name as nodeName,     ca.task_type as taskType,     ca.component_uuid as componentUuid,     ca.main_component_uuid as mainComponentUuid,     ca.analysis_uuid as analysisUuid,     ca.status as status,     ca.submitter_uuid as submitterUuid,     ca.submitted_at as submittedAt,     ca.worker_uuid as workerUuid,     ca.started_at as startedAt,     ca.executed_at as executedAt,     ca.created_at as createdAt,     ca.updated_at as updatedAt,     ca.is_last as isLast,     ca.is_last_key as isLastKey,     ca.main_is_last as mainIsLast,     ca.main_is_last_key as mainIsLastKey,     ca.execution_time_ms as executionTimeMs,     ca.error_message as errorMessage,     ca.error_type as errorType,     ctm.uuid as ctm_uuid,     ctm.task_uuid as ctm_taskUuid,     ctm.message as ctm_message,     ctm.message_type as ctm_type,     ctm.created_at as ctm_createdAt    ,           csc.task_uuid is not null as hasScannerContext                     from ce_activity ca     left outer join ce_task_message ctm on ca.uuid = ctm.task_uuid     left outer join ce_scanner_context csc on csc.task_uuid = ca.uuid         where ca.uuid in (        select ca.uuid     from ce_activity ca      WHERE  ca.main_is_last=true                       and ca.main_component_uuid in         (           ?         )          order by ca.created_at desc, uuid desc     offset (?-1) rows fetch next ? rows only         )     order by ca.created_at desc, ca.uuid desc
### Cause: org.postgresql.util.PSQLException: ERROR: syntax error at or near "$3"
  Position: 1424
        at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
        at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:156)
        at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:147)
        at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:142)
        at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:147)
        at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:80)
        at org.apache.ibatis.binding.MapperProxy$PlainMethodInvoker.invoke(MapperProxy.java:142)
        at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:86)
        at jdk.proxy2/jdk.proxy2.$Proxy124.selectByQuery(Unknown Source)
        at org.sonar.db.ce.CeActivityDao.selectByQuery(CeActivityDao.java:84)
        at org.sonar.server.ce.ws.ComponentAction.handle(ComponentAction.java:89)
        at org.sonar.server.ws.WebServiceEngine.execute(WebServiceEngine.java:111)
        at org.sonar.server.platform.web.WebServiceFilter.doFilter(WebServiceFilter.java:84)
        at org.sonar.server.platform.web.MasterServletFilter$JavaxFilterAdapter.doFilter(MasterServletFilter.java:227)
        at org.sonar.server.platform.web.MasterServletFilter$GodFilterChain.doFilter(MasterServletFilter.java:198)
        at org.sonar.server.platform.web.MasterServletFilter$HttpFilterChainAdapter.doFilter(MasterServletFilter.java:241)
        at org.sonar.server.platform.web.SonarLintConnectionFilter.doFilter(SonarLintConnectionFilter.java:66)
        at org.sonar.server.platform.web.MasterServletFilter$JavaxFilterAdapter.doFilter(MasterServletFilter.java:227)
        at org.sonar.server.platform.web.MasterServletFilter$GodFilterChain.doFilter(MasterServletFilter.java:198)
        at org.sonar.server.platform.web.MasterServletFilter.doFilter(MasterServletFilter.java:146)
        at jdk.internal.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.base/java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.catalina.security.SecurityUtil.lambda$execute$0(SecurityUtil.java:280)
        at java.base/java.security.AccessController.doPrivileged(Unknown Source)
        at java.base/javax.security.auth.Subject.doAsPrivileged(Unknown Source)
        at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
        at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:253)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:176)
        at org.apache.catalina.core.ApplicationFilterChain.lambda$doFilter$0(ApplicationFilterChain.java:137)
        at java.base/java.security.AccessController.doPrivileged(Unknown Source)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:136)
        at org.sonar.server.platform.web.UserSessionFilter.doFilter(UserSessionFilter.java:83)
        at org.sonar.server.platform.web.UserSessionFilter.doFilter(UserSessionFilter.java:70)
        at jdk.internal.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.base/java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.catalina.security.SecurityUtil.lambda$execute$0(SecurityUtil.java:280)
        at java.base/java.security.AccessController.doPrivileged(Unknown Source)
        at java.base/javax.security.auth.Subject.doAsPrivileged(Unknown Source)
        at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
        at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:253)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:176)
        at org.apache.catalina.core.ApplicationFilterChain.lambda$doFilter$0(ApplicationFilterChain.java:137)
        at java.base/java.security.AccessController.doPrivileged(Unknown Source)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:136)
        at org.sonar.server.platform.web.CspFilter.doFilter(CspFilter.java:63)
        at jdk.internal.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.base/java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.catalina.security.SecurityUtil.lambda$execute$0(SecurityUtil.java:280)
        at java.base/java.security.AccessController.doPrivileged(Unknown Source)
        at java.base/javax.security.auth.Subject.doAsPrivileged(Unknown Source)
        at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
        at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:253)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:176)
        at org.apache.catalina.core.ApplicationFilterChain.lambda$doFilter$0(ApplicationFilterChain.java:137)
        at java.base/java.security.AccessController.doPrivileged(Unknown Source)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:136)
        at org.sonar.server.platform.web.CacheControlFilter.doFilter(CacheControlFilter.java:76)
        at jdk.internal.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.base/java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.catalina.security.SecurityUtil.lambda$execute$0(SecurityUtil.java:280)
        at java.base/java.security.AccessController.doPrivileged(Unknown Source)
        at java.base/javax.security.auth.Subject.doAsPrivileged(Unknown Source)
        at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
        at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:253)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:176)
        at org.apache.catalina.core.ApplicationFilterChain.lambda$doFilter$0(ApplicationFilterChain.java:137)
        at java.base/java.security.AccessController.doPrivileged(Unknown Source)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:136)
        at org.sonar.server.platform.web.SecurityServletFilter.doHttpFilter(SecurityServletFilter.java:60)
        at org.sonar.server.platform.web.SecurityServletFilter.doFilter(SecurityServletFilter.java:47)
        at jdk.internal.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.base/java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.catalina.security.SecurityUtil.lambda$execute$0(SecurityUtil.java:280)
        at java.base/java.security.AccessController.doPrivileged(Unknown Source)
        at java.base/javax.security.auth.Subject.doAsPrivileged(Unknown Source)
        at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
        at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:253)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:176)
        at org.apache.catalina.core.ApplicationFilterChain.lambda$doFilter$0(ApplicationFilterChain.java:137)
        at java.base/java.security.AccessController.doPrivileged(Unknown Source)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:136)
        at org.sonar.server.platform.web.RedirectFilter.doFilter(RedirectFilter.java:57)
        at jdk.internal.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.base/java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.catalina.security.SecurityUtil.lambda$execute$0(SecurityUtil.java:280)
        at java.base/java.security.AccessController.doPrivileged(Unknown Source)
        at java.base/javax.security.auth.Subject.doAsPrivileged(Unknown Source)
        at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
        at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:253)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:176)
        at org.apache.catalina.core.ApplicationFilterChain.lambda$doFilter$0(ApplicationFilterChain.java:137)
        at java.base/java.security.AccessController.doPrivileged(Unknown Source)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:136)
        at org.sonar.server.platform.web.RequestIdFilter.doFilter(RequestIdFilter.java:66)
        at jdk.internal.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.base/java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.catalina.security.SecurityUtil.lambda$execute$0(SecurityUtil.java:280)
        at java.base/java.security.AccessController.doPrivileged(Unknown Source)
        at java.base/javax.security.auth.Subject.doAsPrivileged(Unknown Source)
        at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
        at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:253)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:176)
        at org.apache.catalina.core.ApplicationFilterChain.lambda$doFilter$0(ApplicationFilterChain.java:137)
        at java.base/java.security.AccessController.doPrivileged(Unknown Source)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:136)
        at org.sonar.server.platform.web.RootFilter.doFilter(RootFilter.java:65)
        at jdk.internal.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.base/java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.catalina.security.SecurityUtil.lambda$execute$0(SecurityUtil.java:280)
        at java.base/java.security.AccessController.doPrivileged(Unknown Source)
        at java.base/javax.security.auth.Subject.doAsPrivileged(Unknown Source)
        at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
        at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:253)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:176)
        at org.apache.catalina.core.ApplicationFilterChain.lambda$doFilter$0(ApplicationFilterChain.java:137)
        at java.base/java.security.AccessController.doPrivileged(Unknown Source)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:136)
        at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:115)
        at jdk.internal.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.base/java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.catalina.security.SecurityUtil.lambda$execute$0(SecurityUtil.java:280)
        at java.base/java.security.AccessController.doPrivileged(Unknown Source)
        at java.base/javax.security.auth.Subject.doAsPrivileged(Unknown Source)
        at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
        at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:253)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:176)
        at org.apache.catalina.core.ApplicationFilterChain.lambda$doFilter$0(ApplicationFilterChain.java:137)
        at java.base/java.security.AccessController.doPrivileged(Unknown Source)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:136)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:481)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:130)
        at ch.qos.logback.access.tomcat.LogbackValve.invoke(LogbackValve.java:262)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:389)
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:926)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1791)
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
        at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
        at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.base/java.lang.Thread.run(Unknown Source)
Caused by: org.postgresql.util.PSQLException: ERROR: syntax error at or near "$3"
  Position: 1424
        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2713)
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2401)
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:368)
        at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:498)
        at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:415)
        at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:190)
        at org.postgresql.jdbc.PgPreparedStatement.execute(PgPreparedStatement.java:177)
        at com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44)
        at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java)
        at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:65)
        at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:80)
        at org.apache.ibatis.executor.ReuseExecutor.doQuery(ReuseExecutor.java:62)
        at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:333)
        at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:158)
        at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:110)
        at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:90)
        at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:154)
        ... 153 common frames omitted

Postgres container logs when I click the project in the UI

2024-03-29 16:29:46.817 UTC [83] ERROR:  syntax error at or near "$3" at character 1424
2024-03-29 16:29:46.817 UTC [83] STATEMENT:  select


            ca.uuid,
            ca.node_name as nodeName,
            ca.task_type as taskType,
            ca.component_uuid as componentUuid,
            ca.main_component_uuid as mainComponentUuid,
            ca.analysis_uuid as analysisUuid,
            ca.status as status,
            ca.submitter_uuid as submitterUuid,
            ca.submitted_at as submittedAt,
            ca.worker_uuid as workerUuid,
            ca.started_at as startedAt,
            ca.executed_at as executedAt,
            ca.created_at as createdAt,
            ca.updated_at as updatedAt,
            ca.is_last as isLast,
            ca.is_last_key as isLastKey,
            ca.main_is_last as mainIsLast,
            ca.main_is_last_key as mainIsLastKey,
            ca.execution_time_ms as executionTimeMs,
            ca.error_message as errorMessage,
            ca.error_type as errorType,
            ctm.uuid as ctm_uuid,
            ctm.task_uuid as ctm_taskUuid,
            ctm.message as ctm_message,
            ctm.message_type as ctm_type,
            ctm.created_at as ctm_createdAt
           ,

            csc.task_uuid is not null as hasScannerContext



            from ce_activity ca
            left outer join ce_task_message ctm on ca.uuid = ctm.task_uuid
            left outer join ce_scanner_context csc on csc.task_uuid = ca.uuid

            where ca.uuid in (


            select ca.uuid
            from ce_activity ca
             WHERE  ca.main_is_last=true


                and ca.main_component_uuid in
                (
                  $1
                )

            order by ca.created_at desc, uuid desc
            offset ($2-1) rows fetch next $3 rows only

            )
            order by ca.created_at desc, ca.uuid desc

1 Like

Hi Ann,

Any updates on this? Did anybody face a similar issue?

Thanks
Arun

Hi,

I’ve flagged this for more expert eyes. We’re just waiting for them to focus here.

 
Ann

1 Like