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

RhinoInterpreter does not always call setSecurityController()

    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

        1. 20050603-batik-RhinoInterpreter
          0.8 kB
          Jean-Baptiste Quenot
        2. 20050606-batik-RhinoInterpreter
          1.0 kB
          Jean-Baptiste Quenot

        Activity

          People

            batik-dev@xmlgraphics.apache.org Batik Developer's Mailing list
            jbq@anyware-tech.com Jean-Baptiste Quenot
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: