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

The "batch_bootstrap/db" web service should not throw an exception when the requested project is unexpectedly a library (qualifier=LIB)

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.5
    • Component/s: Web API
    • Labels:
      None

      Description

      The following exception is currently thrown:

      ERROR org.sonar.server.ui.JRubyFacade - Fail to render: http://prdsonarqube:19153/batch_bootstrap/db?project=myProjectKey 
      Unable to find root project for project with [id=133170] 
       org.sonar.core.preview.PreviewCache.getModificationTimestamp(PreviewCache.java:179) 
       org.sonar.core.preview.PreviewCache.isValid(PreviewCache.java:160) 
       org.sonar.core.preview.PreviewCache.isCacheValid(PreviewCache.java:105) 
       org.sonar.core.preview.PreviewCache.getDatabaseForPreview(PreviewCache.java:79) 
       org.sonar.server.ui.JRubyFacade.createDatabaseForPreview(JRubyFacade.java:403) 
       sun.reflect.GeneratedMethodAccessor213.invoke(Unknown Source) 
       sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
       java.lang.reflect.Method.invoke(Method.java:597) 
       org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(JavaMethod.java:455) 
       org.jruby.javasupport.JavaMethod.invokeDirect(JavaMethod.java:316) 
      

      In such case, we expect the web service to return an error message in the result but not to crash.

      Moreover, we should double check that this is not possible from the SonarQube Eclipse plugin to link an Eclipse project to a LIB resource.

        Attachments

          Activity

            People

            Assignee:
            julien.lancelot Julien Lancelot
            Reporter:
            freddy.mallet Freddy Mallet (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Due:
              Created:
              Updated:
              Resolved: