Uploaded image for project: 'Batik'
  1. Batik
  2. BATIK-556

RhinoInterpreter does not always call setSecurityController()

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: In Progress
    • Resolution: Unresolved
    • 1.8
    • None
    • Scripting
    • None
    • Operating System: other
      Platform: Other

    Description

      Using Batik in Cocoon, activating the key_execute_onload transcoding hint of
      batik rasterizer and using ecmascript on the onload attribute of the SVG root
      element produces the following error:

      java.lang.IllegalArgumentException: securityDomain should be null if
      setSecurityController() was never called
      at org.mozilla.javascript.Context.compileImpl(Context.java:2324)
      at org.mozilla.javascript.Context.compileReader(Context.java:1334)
      at org.mozilla.javascript.Context.compileReader(Context.java:1306)
      at org.mozilla.javascript.Context.evaluateReader(Context.java:1248)
      at org.apache.batik.script.rhino.RhinoInterpreter.evaluate(Unknown Source)

      This happens because Cocoon loads Rhino for its own FlowScript before Batik is
      requested to read an SVG image with scripting. In this case, the context is
      already initialized, but without security controller. The patch attached sets
      the security controller in all cases, whether or not the context has been
      initialized by Batik.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            batik-dev@xmlgraphics.apache.org Batik Developer's Mailing list
            jbq@anyware-tech.com Jean-Baptiste Quenot

            Dates

              Created:
              Updated:

              Slack

                Issue deployment