Fop
  1. Fop
  2. FOP-1873

access denied (java.util.PropertyPermission org.apache.fop.fo.properties.use-cache read)

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 1.0
    • Fix Version/s: None
    • Component/s: general
    • Labels:
      None
    • Environment:
      Operating System: Linux
      Platform: PC
    • External issue ID:
      50435

      Description

      when using fop 1.0 in java webstart (here java 1.6.0_22, under windows and linux) it is not possible to render anything. We are getting always a SecurityException (even if <all-permissions/> is activated in the jnlp.

      outside of webstart everything works fine

      21:35:53,218 DEBUG [org.apache.fop.fo.FOTreeBuilder] Building formatting object tree
      java.lang.ExceptionInInitializerError
      at org.apache.fop.fo.expr.PropertyParser.parsePrimaryExpr(PropertyParser.java:324)
      at org.apache.fop.fo.expr.PropertyParser.parseUnaryExpr(PropertyParser.java:214)
      at org.apache.fop.fo.expr.PropertyParser.parseMultiplicativeExpr(PropertyParser.java:179)
      at org.apache.fop.fo.expr.PropertyParser.parseAdditiveExpr(PropertyParser.java:153)
      at org.apache.fop.fo.expr.PropertyParser.parseProperty(PropertyParser.java:127)
      at org.apache.fop.fo.expr.PropertyParser.parse(PropertyParser.java:93)
      at org.apache.fop.fo.properties.PropertyMaker.make(PropertyMaker.java:436)
      at org.apache.fop.fo.properties.FontSizePropertyMaker.make(FontSizePropertyMaker.java:54)
      at org.apache.fop.fo.PropertyList.convertAttributeToProperty(PropertyList.java:412)
      at org.apache.fop.fo.PropertyList.addAttributesToList(PropertyList.java:305)
      at org.apache.fop.fo.FObj.processNode(FObj.java:119)
      at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:282)
      at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:171)
      at com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.closeStartTag(ToXMLSAXHandler.java:204)
      at com.sun.org.apache.xml.internal.serializer.ToSAXHandler.flushPending(ToSAXHandler.java:277)
      at com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.startElement(ToXMLSAXHandler.java:646)
      at com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.startElement(ToXMLSAXHandler.java:508)
      at GregorSamsa.template$dot$0()
      at GregorSamsa.applyTemplates()
      at GregorSamsa.applyTemplates()
      at GregorSamsa.transform()
      at com.sun.org.apache.xalan.internal.xsltc.runtime.AbstractTranslet.transform(AbstractTranslet.java:602)
      at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:709)
      at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:313)
      at

      Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission org.apache.fop.fo.properties.use-cache read)
      at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
      at java.security.AccessController.checkPermission(AccessController.java:546)
      at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
      at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1285)
      at java.lang.System.getProperty(System.java:686)
      at org.apache.fop.fo.properties.PropertyCache.<init>(PropertyCache.java:284)
      at org.apache.fop.fo.properties.FixedLength.<clinit>(FixedLength.java:48)

        Activity

        Hide
        armin.haaf added a comment -

        this problem did not exists in version 0.95

        Show
        armin.haaf added a comment - this problem did not exists in version 0.95
        Hide
        Glenn Adams added a comment -

        move to normal priority, pending further action

        Show
        Glenn Adams added a comment - move to normal priority, pending further action
        Hide
        Glenn Adams added a comment -

        resetting P2 open bugs to P3 pending further review

        Show
        Glenn Adams added a comment - resetting P2 open bugs to P3 pending further review
        Hide
        Glenn Adams added a comment -

        http://svn.apache.org/viewvc?view=revision&revision=1310924

        this should prevent a security exception; if property is not accessible, then cache will not be used

        Show
        Glenn Adams added a comment - http://svn.apache.org/viewvc?view=revision&revision=1310924 this should prevent a security exception; if property is not accessible, then cache will not be used
        Hide
        Alexios Giotis added a comment -

        I think that the commit above introduces an inconsistency related to the default values, when FOP is executed in a normal (cache is used, unless a system property is set) and in a security constrained environment (cache is never used). Assuming that the cache is significantly reducing the memory requirements, then it would be difficult to identify why this does not happen when executed for example with webstart. When a SecurityException is caught, I would set the useCache to true and log an info message.

        Show
        Alexios Giotis added a comment - I think that the commit above introduces an inconsistency related to the default values, when FOP is executed in a normal (cache is used, unless a system property is set) and in a security constrained environment (cache is never used). Assuming that the cache is significantly reducing the memory requirements, then it would be difficult to identify why this does not happen when executed for example with webstart. When a SecurityException is caught, I would set the useCache to true and log an info message.
        Hide
        Glenn Adams added a comment -

        (In reply to comment #5)
        > I think that the commit above introduces an inconsistency related to the
        > default values, when FOP is executed in a normal (cache is used, unless a
        > system property is set) and in a security constrained environment (cache is
        > never used). Assuming that the cache is significantly reducing the memory
        > requirements, then it would be difficult to identify why this does not happen
        > when executed for example with webstart. When a SecurityException is caught, I
        > would set the useCache to true and log an info message.

        changed to 'true' and log (info) in case of access exception: see r1311070

        thanks alex!

        Show
        Glenn Adams added a comment - (In reply to comment #5) > I think that the commit above introduces an inconsistency related to the > default values, when FOP is executed in a normal (cache is used, unless a > system property is set) and in a security constrained environment (cache is > never used). Assuming that the cache is significantly reducing the memory > requirements, then it would be difficult to identify why this does not happen > when executed for example with webstart. When a SecurityException is caught, I > would set the useCache to true and log an info message. changed to 'true' and log (info) in case of access exception: see r1311070 thanks alex!

          People

          • Assignee:
            fop-dev
            Reporter:
            armin.haaf
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development