SonarQube Plugins
  1. SonarQube Plugins
  2. SONARPLUGINS-260

PDF report generation fails - when reading a "correct" sonar.host.url

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: PDFREPORT-0.3
    • Fix Version/s: PDFREPORT-1.0
    • Component/s: None
    • Labels:
      None
    • Environment:
      Windows Vista, Maven 2.1.0, JVM 1.6
    • Number of attachments :
      0

      Description

      I tried using the PDF generator using the latest 0.3 JAR.

      Followed the steps as mentioned in the

      http://docs.codehaus.org/display/SONAR/Sonar+PDF+Plugin

      On executing, I got an Exception

      mvn sonar:sonar -Dsonar.host.url=http://localhost:8007/ -Dmaven.test.skip=true -Dsonar.projectDate=2009-10-17

      [INFO] [pdf-report:generate]
      [INFO] No report type provided. Default report selected (Team workbook)
      [INFO] Retrieving project info for be.telenet:comm.lang
      [ERROR] Can┤t access to Sonar or project doesn't exist on Sonar instance. HTTP KO to http://localhost:8007//api/resources?resource=be.telenet:comm.lang&depth=0&format=xml
      java.io.IOException: Can┤t access to Sonar or project doesn't exist on Sonar instance.
      at org.sonar.report.pdf.util.SonarAccess.getUrlAsDocument(SonarAccess.java:51)
      at org.sonar.report.pdf.entity.Project.initializeProject(Project.java:107)
      at org.sonar.report.pdf.PDFReporter.getProject(PDFReporter.java:109)

      I realised that the trailing slash in the URL argument was causing this. This trailing slash must be ignored...by the PDF generator as it is pretty common to add trailing slashes on a URL.
      -Dsonar.host.url=http://localhost:8007/

      I changed to -Dsonar.host.url=http://localhost:8007 and it worked fine.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Antonio Manuel Muñiz Martín
            Reporter:
            Saket L Chiluveru
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: