Results 1 to 8 of 8

Thread: Permission denied for creating Java object

  1. #1

    Default Permission denied for creating Java object

    When the error is received:

    Error Occurred While Processing Request
    Permission denied for creating Java object
    This occurs when the application is attempting to make use of coldfusion Java obects (I.E. any object whose "dot path" starts with 'coldfusion' - such as 'coldfusion.server.ServiceFactory'). This applies to the ColdFusion cfscript function "CreateObject()" that is very commonly used to create java objects or CFDUMP which is not a Adobe supported coldfusion tag.
    Last edited by JonC; January 12th, 2010 at 11:44 AM.
    Jon Cavanaugh
    ColdFusion Systems Analysts
    Director of Business Development
    Linux Hosting | Christian Hosting | Railo Hosting

  2. #2
    samunplugged Guest


    Hello Jon,

    I plan to take CF Silver hosting plan for a project. My project is quite simple, but it uses WordArt.cfc which uses createObject method to invoke java standard libraries. Can you tell me if this will work? Wordart.cfc is my open source project and free download at:

    The following is a list of createObject method calls:

    createObject("java", "java.awt.Color");

    local.classes.AffineTransform = createObject("java", "java.awt.geom.AffineTransform");
    local.classes.Font = createObject("java", "java.awt.Font");
    local.classes.BasicStroke = createObject("java", "java.awt.BasicStroke");
    local.classes.Point = createObject("java", "java.awt.Point");
    local.classes.Rectangle = createObject("java", "java.awt.Rectangle");
    local.classes.Polygon = createObject("java", "java.awt.Polygon");
    local.classes.RenderingHints = createObject("java", "java.awt.RenderingHints");
    local.classes.GradientPaint = createObject("java", "java.awt.GradientPaint");
    local.classes.AlphaComposite = createObject("java", "java.awt.AlphaComposite");
    local.classes.Math = createObject("java", "java.lang.Math");

    And some others like:

    var layouts = createObject("java", "java.util.ArrayList").init();
    var pen = createObject("java", "java.awt.Point").init(0,0);
    var frc = g2d.getFontRenderContext();
    var fontMetrics = g2d.getFontMetrics();
    var attrStr = createObject("java", "java.text.AttributedString").init(text);
    var textAttribute = createObject("java", "java.awt.font.TextAttribute");
    var attrChrIterator = attrStr.getIterator();
    var breakIter = createObject("java", "java.text.BreakIterator").getLineInstance();
    var Character = createObject("java", "java.lang.Character");
    var textLayout = createObject("java", "java.awt.font.TextLayout");

    At one point, createObject("java", ""); and createObject("java", ""); is also used to load fonts a custom font from user's directory (not the system font directory).

    Thank you for helping me out.


    Sameer Gupta

  3. #3
    Join Date
    May 2009
    Tulsa, OK


    I sent you a PM right after you posted this question, but haven't received the needed information. I will test the app out for you if you will send me a zip of an application to test. I tried getting it from the site, but that did not work.

  4. #4
    webcore Guest

    Default can't use create object tags?

    so we can't use the create object tag? in reviewing your hosting plan features, the only tags not allowed are CFExecute, CFRegistry and CFDump. It says nothing about create object tags not being allowed.

    i switched to Hostek because it allowed custom tags. i use create object in my script to create a thumbnail version of a larger photo, which creates an actual smaller file size of the photo.

    let me know if this is possible on your servers so i can avoid wasting time migrating my content only to find it won't work.


  5. #5
    Join Date
    May 2009
    Tulsa, OK


    You can use the Create Object tag. You can't use it to get access to the Java Objects.

    For example you can use the csImageFile component by using the Create Object tag like:
    <cfobject action="create" name="Image" class="csImageFile.Manage">
    Also, regarding CFDUMP, that works too in most cases, just not accessing any Java Objects.

  6. #6
    webcore Guest


    my script uses Java to create the object. here is an snippet, not sure if this will give you a proper overview. i hope i can use my script as i was under the impression i could according to your list of hosting features.

    <cffile destination="#application.obitImages#" action="UPLOAD" filefield="obituaryImage" nameconflict="MAKEUNIQUE">
    <cfset variables.obituaryImage = file.serverfile>
    <cfset variables.originalImage = file.serverfile>

    <!--- Create smaller thumbnail obituary image ---->
    <cfset myImage = createObject("component","com.iedit")>
    <cfset myImage.SelectImage("#application.obitImages##vari ables.obituaryImage#")>
    <!--- <cfset myImage.scaleWidth(30)> --->
    <cfset myImage.scale(35,45)>
    <cfset myImage.output("#application.obitImages##variables .obituaryImage#" & "_small.jpg", "jpg",100)>
    <cfset variables.smallImage = ("#variables.obituaryImage#" & "_small.jpg")>

    <!--- Create larger portrait obituary image ---->
    <cfset myImage = createObject("component","com.iedit")>
    <cfset myImage.SelectImage("#application.obitImages##vari ables.obituaryImage#")>
    <!--- <cfset myImage.scaleWidth(215)> --->
    <cfset myImage.scale(195,251)>
    <cfset myImage.output("#application.obitImages##variables .obituaryImage#" & "_large.jpg", "jpg",100)>
    <cfset variables.largeImage = ("#variables.obituaryImage#" & "_large.jpg")>

  7. #7
    Join Date
    May 2009
    Tulsa, OK


    This would require the iedit component to be installed on the server, which we do not have installed.

    We have several image manipulation components installed including:


  8. #8
    webcore Guest


    hmmm. i use the iedit component.

    might have to stick with my other host. i think i have figured out how to get around their restrictions.


Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts