Uploaded image for project: 'Alfresco'
  1. Alfresco
  2. ALF-20856

Rhino 1.7R4 - ClassCastException: org.mozilla.javascript.ConsString cannot be cast to java.lang.String

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Not a bug
    • Affects Version/s: 5.0
    • Fix Version/s: None
    • Component/s: JavaScript API, Repository
    • Security Level: external (External user)
    • Labels:
      None
    • Environment:
      mac os Maverick, Postgresql
    • Regression:
      Regression
    • Resolution Time Custom Field:
      30 weeks, 40 minutes, 33 seconds

      Description

      I tested 4.3 on HEAD. In my code I used pdftoolkit.
      With the new rhino-js-1.7R4.har i get the error in my webscript using javascript:

      Caused by: java.lang.ClassCastException: org.mozilla.javascript.ConsString cannot be cast to java.lang.String
      	at org.alfresco.extension.pdftoolkit.repo.action.executer.PDFWatermarkActionExecuter.textAction(PDFWatermarkActionExecuter.java:434)
      	at org.alfresco.extension.pdftoolkit.repo.action.executer.PDFWatermarkActionExecuter.doWatermark(PDFWatermarkActionExecuter.java:237)
      	at org.alfresco.extension.pdftoolkit.repo.action.executer.PDFWatermarkActionExecuter.executeImpl(PDFWatermarkActionExecuter.java:181)
      

      If I change back to rhino-js-1.6R7.jar the code works again.

      The code is in javascript that cause the error
      pdftoolkit.watermarkPDF(this.param);
      where param is a javascript object

         this.param =  {
            "target" : "thenoderefgoeshere",
            "destination-folder" : null,
            "watermark-image" : null,
            "position" : "topright",
            "location-x" : "",
            "location-y" : "",
            "watermark-type" : "text",
            "watermark-pages" : "all",
            "watermark-depth" : "over",
            "watermark-text" : "Example",
            "watermark-font" : "Courier",
            "watermark-size" : "12"
         };
      

        Attachments

          Structure

            Activity

              People

              • Assignee:
                closedissues Closed Issues
                Reporter:
                loftux Peter Löfgren
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Date of First Response:

                  Structure Helper Panel