Uploaded image for project: 'Pentaho Reporting and Pentaho Report Designer'
  1. Pentaho Reporting and Pentaho Report Designer
  2. PRD-5416

Wrong exception shown to user when unauthorized or when using wrong credentials to publish report to BA Server

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Severity: High
    • Resolution: Fixed
    • Affects Version/s: 5.2.0 GA, 5.3.0 GA
    • Fix Version/s: Backlog
    • Component/s: Publish
    • Labels:
      None
    • Notice:
      When an issue is open, the "Fix Version/s" field conveys a target, not necessarily a commitment. When an issue is closed, the "Fix Version/s" field conveys the version that the issue was fixed in.

      Description

      Currently when you are unauthorized or have the wrong credentials to publish a PRD Report to the Server you are shown the following exception:

      <snip>
      java.lang.RuntimeException: org.pentaho.reporting.designer.extensions.pentaho.repository.util.PublishException: The File exists and override has not been specified.
      at org.pentaho.reporting.designer.extensions.pentaho.repository.actions.UpdateReservedCharsTask.run(UpdateReservedCharsTask.java:90)
      </snip>

      Please see attached screenshots.

      In order to dig further you have to check the PRD log located in the following place:
      C:\Users\USERNAME\.pentaho\logs\prd.log

      And locate the following error:

      Caused by: com.sun.jersey.api.client.UniformInterfaceException: GET http://localhost:8520/pentaho/api/repo/files/tree?depth=-1&filter=*&showHidden=true returned a response status of 401 Unauthorized
      	at com.sun.jersey.api.client.WebResource.handle(WebResource.java:686)
      	at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
      	at com.sun.jersey.api.client.WebResource$Builder.get(WebResource.java:507)
      	at org.pentaho.reporting.libraries.pensol.JCRSolutionFileModel.refresh(JCRSolutionFileModel.java:115)
      	at org.pentaho.reporting.libraries.pensol.JCRSolutionFileModel.lookupNode(JCRSolutionFileModel.java:308)
      	at org.pentaho.reporting.libraries.pensol.JCRSolutionFileModel.exists(JCRSolutionFileModel.java:193)
      	at org.pentaho.reporting.libraries.pensol.WebSolutionFileObject.doGetType(WebSolutionFileObject.java:81)
      	... 19 more
      

      A typical scenario for this situation is publishing with the wrong password.

      In order to replicate please follow these steps:
      1 - On a vanilla installation of the BA Server
      2 - Log as admin
      3 - Go to Administration Perspective
      4 - Select User and Roles Perspective
      5 - Select admin user and click on Edit next to password
      6 - Change the default password to pentaho
      7 - Log out and log back in using admin/pentaho
      8 - Open Pentaho Report Designer
      9 - Select a sample Report from Help > Sample Reports
      10 - Publish the report
      11 - In the publish dialog type username= admin password= password
      12 - Notice the error as shown in the screenshots
      13 - click ok and select the red exclamation mark from the bottom right corner and notice the exception is not the appropriate exception

      Expected Result:
      To show the publisher the not authorized error

      Actual Result:
      Confusing error shown to the publisher

      Screenshot/Video attached:
      https://pentaho.box.com/s/hqpuqbljf6ajarkvfwsvp4pi4djea9ms
      Full Logs attached: please see prd.log

        PractiTest Integration




          Attachments

            Issue Links

              Activity

                People

                Assignee:
                Unassigned Unassigned
                Reporter:
                clopez Carlos Lopez
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: