Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-11882

Fail to browse Permission Templates page when having more than 1000 templates in Oracle

    Details

    • Edition:
      Community
    • Production Notes:
      None

      Description

      Cause: java.sql.SQLSyntaxErrorException: ORA-01795: maximum number of expressions in a list is 1000 at 
      org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30) at
      org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:150) at 
      org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:141) at 
      org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:137) at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:75) at 
      org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:59) at com.sun.proxy.$Proxy84.selectByTemplateIds(Unknown Source) at 
      org.sonar.db.permission.template.PermissionTemplateCharacteristicDao.selectByTemplateIds(PermissionTemplateCharacteristicDao.java:34) at 
      org.sonar.server.permission.ws.template.SearchTemplatesDataLoader.withProjectCreatorsByTemplateIdAndPermission(SearchTemplatesDataLoader.java:95) at 
      org.sonar.server.permission.ws.template.SearchTemplatesDataLoader.load(SearchTemplatesDataLoader.java:61) at 
      org.sonar.server.permission.ws.template.SearchTemplatesAction.handle(SearchTemplatesAction.java:91) at 
      org.sonar.server.ws.WebServiceEngine.execute(WebServiceEngine.java:103) at org.sonar.server.ws.WebServiceFilter.doFilter(WebServiceFilter.java:86) at 
      org.sonar.server.platform.web.MasterServletFilter$GodFilterChain.doFilter(MasterServletFilter.java:126) at 
      org.sonar.server.platform.web.MasterServletFilter.doFilter(MasterServletFilter.java:95) at 
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at 
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.sonar.server.user.UserSessionFilter.doFilter(UserSessionFilter.java:87) at
       org.sonar.server.user.UserSessionFilter.doFilter(UserSessionFilter.java:71) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at 
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at 
      org.sonar.server.platform.web.SecurityServletFilter.doHttpFilter(SecurityServletFilter.java:72) at 
      org.sonar.server.platform.web.SecurityServletFilter.doFilter(SecurityServletFilter.java:48) at 
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at 
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.sonar.server.platform.web.RedirectFilter.doFilter(RedirectFilter.java:61) at 
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.sonar.server.platform.web.requestid.RequestIdFilter.doFilter(RequestIdFilter.java:63) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.sonar.server.platform.web.RootFilter.doFilter(RootFilter.java:62) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) at ch.qos.logback.access.tomcat.LogbackValve.invoke(LogbackValve.java:256) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) Caused by: java.sql.SQLSyntaxErrorException: ORA-01795: maximum number of expressions in a list is 1000
      

      The problem comes from PermissionTemplateCharacteristicDao#selectByTemplateIds() which does paginate input of template ids.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                simon.brandhof Simon Brandhof
                Reporter:
                alexandre.frigout Alexandre Frigout
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: