Cfimage error

I am writing code to resize a relevant image on my system. But though I have followed the coding rules correctly, I keep getting an error that:
The images/consumer/ image format is not supported on this operating system.
Use GetReadableImageFormats() and GetWriteableImageFormats() to see which image formats are supported.
What is wrong with my code? TIA
Here is my code:
<<cfset imgTypes = GetReadableImageFormats()>
  <cfoutput query="ConsumerSimpleSearch">
  <tr>
    <td width="10%"><!--- creating a resized version of uploaded image of product. --->
<cfimage source="images/consumer/#Cnsmr_ProductIMAGE#" action="resize" width="100" height="60" name="resizedImg" format= "#imgTypes#">
<cfimage source="#resizedImg#" action="writeToBrowser"><!---img src="images/consumer/#Cnsmr_ProductIMAGE#"---></font></td>
    <td width="90%"><font size="+2">#Cnsmr_ProductDESCRIPTION# </font>  <font size="+2"><a href="showProductDetail.cfm?Cnsmr_ProductID=#URLEncodedFormat(TRIM(Cnsmr_ProductID))#">#C nsmr_ProductMODELNo# </font> </a>
                <font size="+2">#Cnsmr_ProductMODELYEAR# </font>   <font size="+2">#Cnsmr_ProductPRICE#</font>  <font size="+2">#User_id#</font>
</td>
  </tr> <br> </br>
</table>
</cfoutput>

Abdlah wrote:
why is the filename that is supposed to be resolved by the #Cnsmr_ProductIMAGE# of my path "/images/consumer/#Cnsmr_ProductIMAGE#" not being shown?
Look at the results of your query.  What is the value of #Cnsmr_ProductIMAGE# and does images/consumer/#Cnsmr_ProductIMAGE# produce a valid image path?
Also thought the function the results returned by GetReadableImageFormats() ( and I get: BMP,GIF,JFIF,JPEG,JPEG 2000,JPEG-LOSSLESS,JPEG-LS,JPEG2000,JPG,PNG,PNM,RAW,TIF,TIFF,WBMP) are all acceptable.
The GetReadableImageFormats() is just a troubleshooting tool.  It tells you _all_ of the image types the server can create.  But that is not what the "format" property is asking for.  An image can only have one format at a time. It can be a PNG, GIF, JPG etcetera.  It cannot be _all_ of those at the same time.  The "format" value is a single value.  That value is the type of image you would like to create:  a png, gif, ... OR ... jpg.

Similar Messages

  • CFIMAGE error "Numbers of source Raster bands and source color space components do not match"

    I keep on getting this error when trying to upload a .JPG file. This error is not present for all jpegs, just for some of them.
    I am running CF 9 on a Windows 64-bit server.
    Any suggestions on how to modify cfimage tag or workaround this?
    Thank you!

    i have found a solution to this problem.
    first, install ImageMagick (http://www.imagemagick.org/script/index.php)
    then, detect whether or not the image is valid
    <cfset image_path = "c:\path\to\image.jpg">
    <cfif not isImageFile(image_path)>
         <cfset fixImage(image_path)>
    </cfif>
    here is the fixImage function, customize for your preferences. it essentially converts the image to a jpg format that will not throw an error with cfimage. once you run this function you can resume whatever operation you would have done with the image - IE resizing it.
    <cffunction name="fixImg" access="public" returntype="void">
            <cfargument name="image_name" type="string" required="true" />
            <cftry>
                <cfset ext = listLast(arguments.image_name,".")>
                <cfif ext eq "gif">
                    <cfset uploadedImage = ImageNew("#arguments.image_name#")>
                    <cfset uploadedImage = imageCopy(uploadedImage, 0, 0, uploadedImage.width, uploadedImage.height)>
                    <cfimage action="write" destination="#arguments.image_name#" source="#uploadedImage#" overwrite="yes">
                <cfelse>
                    <cfexecute name="C:\Program Files\ImageMagick-6.6.2-Q16\convert.exe" arguments="""#arguments.image_name#"" -strip -colorspace rgb -quality 100 ""#arguments.image_name#""" timeout="1000" />
                </cfif>
            <cfcatch type="any">
                <cfset this.err_msg = "#cfcatch.Type#:#cfcatch.detail#:#cfcatch.ExtendedInfo#">
                <cfset this.err = true>
                <cfmail to="[email protected]" from="[email protected]" subject="fix image error" type="html">
                    #arguments.image_name#<br /><br />
                    <cfdump var="#cfcatch#">
                </cfmail>
            </cfcatch>
            </cftry>
        </cffunction>

  • After upgrade to CF9, CFIMAGE "Unable to create temporary file" error

    We recently upgraded from CF8 to CF9 Enterprise.  I'm getting an "Unable to create temporary file" error on
    my CFIMAGE resize calls.  We use sandbox security.  I assume I need to grant write access to whatever folder CF uses for temp files, but which folder is it?   The same code (and sandbox settings) ran fine in CF8....
    Note, if I attempt to add C:\JRun4\servers\cfusion\SERVER-INF\temp to the sandbox for this particular app, CF crashes on all requests across all apps on the server with a:
    Security: The requested template has been denied access to C:\JRun4\servers\cfusion\cfusion-ear\cfusion-war\WEB-INF\cfclasses\cfapp2ecfc1510154633.c lass.
    The following is the internal exception message: access denied (java.io.FilePermission C:\JRun4\servers\cfusion\cfusion-ear\cfusion-war\WEB-INF\cfclasses\cfapp2ecfc1510154633.c lass read)
    ColdFusion cannot determine the line of the template that caused this error. This is often caused by an error in the exception handling subsystem.
    I need to restart CF to get everything working again.

    Another update.   Had a problem with a sandboxed CF9 site doing a simple CFIMAGE READ to a memory variable.  Got an "Unable to create temporary file" error.
    Inserted the following code in the file upload page:
    <cfscript>
    writeoutput("Temp Dir : " & createobject("java","java.lang.System").getProperty("java.io.tmpdir") );
    </cfscript>
    ... and it reveals the temp directory as C:\WINDOWS\TEMP.  Added that to the sandbox, and the CFIMAGE READ is working properly now.
    Note this seems inconsistent with CFIMAGE RESIZE behavior which appears to use the CF GetTempDirectory() value, which in my case is C:\JRun4\servers\cfusion\SERVER-INF\temp\cfusion-war-tmp\
    For reference, see the section "Sandbox Considerations" at this link:
    http://help.adobe.com/en_US/ColdFusion/9.0/Admin/WSc3ff6d0ea77859461172e0811cbf364104-7fc8 .html#WSc3ff6d0ea77859461172e0811cbf364104-7fcc

  • "X resolution" error when using CFIMAGE

    I've built an uploader for my new photo gallery, and it's pretty basic.  I can either upload using the new <cffileupload> box, or I can FTP files to an "upload" directory.  Since the entire site is local still, I've just been copying the files I want to add to the database to the "upload" directory, then running my script.  So far I've created 49 albums and added just over 3,400 pics.
    That is, until this latest round.
    I have some pics I took on a cruise a couple of years ago.  There are just fewer than 400 of them.  When I copy the files to my upload folder, pick my album, then click "Submit", get the following errors from <cfcatch>:
    cfcatch.type = Application
    cfcatch.message = X Resolution
    cfcatch.detail = X Resolution
    That's ALL I get.
    On the upload form, there's a <cfif> statement that copies the original images to a "/fullsize/" directory before processing if they're 1280px wide or less.  Otherwise it resizes them using <cfimage>.  In this case, the files are all 1280 wide, so the next <cfimage> tag is the one that makes the default viewing pic.
    Here's the code I'm using:
    <cfdirectory action="list" directory="#request.basepath#/manage/upload" name="uploads" sort="name ASC" mode="777">
    <cfsetting requesttimeout="#createtimespan(0,1,0,0)#">
    <cftry>
    <cfloop query="uploads">
    <!--- calculate portrait or landscape --->
    <cfimage source="#request.basepath#/manage/upload/#uploads.name#" name="thisimage">
    <cfif thisimage.height gt thisimage.width>
    <cfset imgheight="800">
    <cfset imgwidth="">
    <cfset thumbheight="180">
    <cfset thumbwidth="">
    <cfelse>
    <cfset imgheight="">
    <cfset imgwidth="800">
    <cfset thumbheight="">
    <cfset thumbwidth="180">
    </cfif>
    <!--- add pics to database --->
    <cfif IsNull(ImageGetEXIFTag(thisimage,"Date/Time Original"))>
    <cfset pictimestamp = uploads.dateLastModified>
    <cfelse>
    <cfset pictimestamp = replace(listfirst(ImageGetEXIFTag(thisimage,"Date/Time Original")," "),":","-","ALL") & " " & listlast(ImageGetEXIFTag(thisimage,"Date/Time Original")," ")>
    </cfif>
    <!--- create full size file --->
    <cfif thisimage.width gt 1280>
    <cfimage
        action="resize"
        width="1280"
        height=""
        source="#request.basepath#/manage/upload/#uploads.name#"
        destination="#request.basepath#/gallery/fullsize/#uploads.name#">
    <cfelse>
    <cffile
        action="copy"
        source="#request.basepath#/manage/upload/#uploads.name#"
        destination="#request.basepath#/gallery/fullsize/#uploads.name#"
        mode="777">
    </cfif>
    <!--- create main photo --->
    <cfimage
        action="resize"
        width="#imgwidth#"
        height="#imgheight#"
        source="#request.basepath#/manage/upload/#uploads.name#"
        destination="#request.basepath#/gallery/#uploads.name#">
    <!--- create thumbnail --->
    <cfimage
        action="resize"
        width="#thumbwidth#"
        height="#thumbheight#"
        source="#request.basepath#/manage/upload/#uploads.name#"
        destination="#request.basepath#/gallery/thumbnails/#uploads.name#">
    <cfquery name="addpicstodb" datasource="#request.dsn#" timeout="#createtimespan(0,1,0,0)#">
    INSERT INTO photos
                    ( pic_album
                    , pic_file
                    , pic_date
            VALUES (  <cfqueryparam value="#FORM.upload_album#" cfsqltype="cf_sql_numeric">
                    , <cfqueryparam value="#uploads.name#" cfsqltype="cf_sql_varchar">
                    , <cfqueryparam value="#pictimestamp#" cfsqltype="cf_sql_timestamp">
    </cfquery>   
    <!--- clean upload directory --->
    <cffile 
        action="delete"
        file="#request.basepath#/manage/upload/#uploads.name#">
    </cfloop>
    <cfcatch type="any">
    <cfoutput>#cfcatch.type# - #cfcatch.message# - #cfcatch.detail# - #cfcatch.ExtendedInfo#</cfoutput>
    </cfcatch>
    </cftry>
    Keep in mind this has worked for over 3,400 pics, so something perhaps is different about this set of pics I'm uploading.
    The pics are all around 600KB in size (jpegs), and are 1280x853px in resolution.  I've even batch-renamed them with a unique file prefix to avoid naming conflicts.

    Solved, sort of.
    I had used the Nautilus rotate/resize extension on a bunch of pics in this set where the landscape/portrait properties were somehow not retained.  Apparently that messes things up with <cfimage> because when I deleted the first image in the set (which was portrait), the upload went fine until I got to the next portrait file.  I opened it in image viewer, rotated it, then rotated it back and saved it, and then it was fine.
    Looks like I have to do this with all the ones I rotated. :/
    But at least I'm able to upload again.

  • CFImage EXIF Retrieval Error

    Need to utilize ImageGetExifMetaData to retrieve jpg
    orientation and size information to determine if modifications need
    to be made to photo. The tag is very inconsistent returning exif
    data. 80% of the time throws the following error:
    Exception occured in JPG processing. segment size would
    extend beyond file stream length
    Following is code along with link to sample photo:
    <cfimage action="read" source="
    http://www.thefloorteam.com/rp/wd/56k/1197/1197_5067792_14-Apr-08_10000.jpg"
    name="img">
    <cfset info=ImageGetExifMetaData(img)>
    <cfdump var="#info#"></cfdump>
    Have seen several posts on blogs and other sites that this is
    fairly common error. Has anyone been able to work around it as size
    of file, remote location of file, etc. seems to make little
    difference other than if I run localhost with file on local drive
    have not been able to create error.
    Thanks in advance.

    Hi Kumar,
    SAP keeps retrieval FI data in TXW_S_BKPF (Source table: BKPF) and TXW_S_BSEG (Source table: BSEG).
    The retrieval tables are named using the first four characters from the name of the source table (the table in which the data resided before archiving) with the prefix TXW_S_.
    Please check in above two tables for the retrieved data.
    Please check the below link for with the same information.
    http://help.sap.com/saphelp_45b/helpdata/en/3b/162be5c35511d1801b00c04fada2a1/content.htm
    Hope this helps.
    Regards,
    Sujit.

  • Error 'Timer already cancelled' when using CFIMAGE - captcha

    I've implemented captcha image using cfimage. Works fine on
    our development system however, I'm getting a
    'java.lang.IllegalStateException: Timer already cancelled' in our
    production environment.
    The first time I requested the page containing the captcha
    image it took forever to load but eventially did. Susequent
    requests to this page now produces the above error. Production
    enviroment is running Coldfusion 8.01 in multiserver configuration
    with latest hotfix applied, IIS 6.

    Fixed the problem! Turns out simple restarting of the cf
    service resolved the issue.

  • CFIMAGE gives "attempt to read data outside of exif segment" error when trying to resize jpg

    When trying to resize a jpg using cfimage I receive the following error "attempt to read data outside of exif segment".  Any ideas on what causes this or how to fix it?  This only happens on certain images.  Sample image it happens with attached, this photo is subject to copyright restrictions and should be treated appropriately.  Thanks for any help.
    Resize Code attached.
    <!--- Set some defaults used by each image type, unless you override them --->
    <cfparam name="jpgQuality" default=".8" />
    <cfparam name="defaultInterpolation" default="bicubic" />
    <cfparam name="defaultBackground" default="black" />
    <!--- Set values for each image type --->
    <cfparam name="thumbMaxWidth" default="" />  <!--- leave blank to allow any width (forced to size by height) --->
    <cfparam name="thumbMaxHeight" default="60" /> <!--- leave blank to allow any height (forced to size by width, above) --->
    <cfparam name="thumbQuality" default="1" />  <!--- number from 0 - 1, 1 being the best --->
    <cfparam name="thumbFixedSize" default="false" />  <!--- you MUST set both MaxWidth & MaxHeight to use FixedSize --->
    <cfparam name="thumbBackground" default="#defaultBackground#" />  <!--- color of background if fixed size is used --->
    <cfparam name="thumbInterpolation" default="#defaultInterpolation#" />  <!--- Interpolation method used for resizing (HUGE performance hit depending on what is used) --->
    <cfparam name="normalMaxWidth" default="476" />
    <cfparam name="normalMaxHeight" default="324" />
    <cfparam name="normalQuality" default="#jpgQuality#" />
    <cfparam name="normalFixedSize" default="true" />
    <cfparam name="normalBackground" default="#defaultBackground#" />
    <cfparam name="normalInterpolation" default="#defaultInterpolation#" />
    <cfparam name="zoomMaxWidth" default="670" />
    <cfparam name="zoomMaxHeight" default="380" />
    <cfparam name="zoomQuality" default="#jpgQuality#" />
    <cfparam name="zoomFixedSize" default="true" />
    <cfparam name="zoomBackground" default="#defaultBackground#" />
    <cfparam name="zoomInterpolation" default="#defaultInterpolation#" />
    <!--- Set values for folder paths and the watermark image --->
    <cfparam name="originalFolder" default="path to folder for original images" />
    <cfparam name="thumbFolder" default="path to folder for thumbnail images" />
    <cfparam name="normalFolder" default="path to folder for large images" />
    <cfparam name="zoomFolder" default="path to folder for large resized images" />
    <cfparam name="watermarkImage" default="" />
    <cfparam name="wmXPosition" default="50" />  <!--- value is a number from 0 - 100, 50 = centered --->
    <cfparam name="wmYPosition" default="65" />
    <cffunction name="genWatermarkImage">
        <cfargument name="ImageFile" required="true" />
        <cfargument name="MaxWidth" required="true" />
        <cfargument name="MaxHeight" required="true" />
        <cfargument name="StorePath" required="true" />
        <cfargument name="FixedSize" required="true" type="Boolean" />
        <cfargument name="Background" required="true" />
        <cfargument name="Quality" required="true" />
        <cfargument name="Interpolation" required="true" />
        <cfargument name="AddWatermark" required="true" type="Boolean" />
        <cfif IsImageFile(originalFolder & ImageFile)>
            <cfset original = ImageNew(originalFolder & ImageFile) />
            <cfset originalHeight = ImageGetHeight(original) />
            <cfset originalWidth = ImageGetWidth(original) />
            <cfset outfile = StorePath & ImageFile />
            <cfset watermark = ImageNew(watermarkImage) />
            <cfset ImageScaleToFit(original,MaxWidth,MaxHeight,Interpolation) />
            <cfset new_w = ImageGetWidth(original) />
            <cfset new_h = ImageGetHeight(original) />
            <cfif FixedSize>
                <cfset normal = ImageNew("",MaxWidth,MaxHeight,"rgb",Background) />
                <cfset ImagePaste(normal,original,int((MaxWidth-new_w)/2),int((MaxHeight-new_h)/2)) />
                <cfif AddWatermark>
                    <cfset ImagePaste(normal,watermark,( int(ImageGetWidth(normal)) - int(ImageGetWidth(watermark)) -3),( int(ImageGetHeight(normal)) - int(ImageGetHeight(watermark)) -3) )/>
                </cfif>
                <cfset ImageWrite(normal,outfile,Quality) />
            <cfelse>
                <cfif AddWatermark>
                    <cfset ImagePaste(original,watermark,( int(ImageGetWidth(normal)) - int(ImageGetWidth(watermark)) -3), (int(ImageGetHeight(normal)) - int(ImageGetHeight(watermark)) -3) )/>
                </cfif>
                <cfset ImageWrite(original,outfile,Quality) />
            </cfif>
        <cfelse>
            <cfreturn "Image file not an image!" />
        </cfif>
    </cffunction>
    <cfset zoomError = genWatermarkImage(Filename,zoomMaxWidth,zoomMaxHeight,zoomFolder,zoomFixedSize,zoomBackground,zoomQuality,zoomInterp olation,dowatermark) />

    Hmm, that was my best shot.
    1) Do you have all of the latest updates applied?
    2) Did you try all of the work-arounds listed in the comments. Granted some of them are definite hacks
    3) Just to cover all the bases, do you get the same result with both ImageResize() and ImageScaleToFit()?
    If all else fails, you could always go the java route and try some java code to do the resize.  Obviously not the ideal, but it is worth a shot.  IIRC there is a thread around here somewhere with the cf/java code. But that was from before the switch in forums and I will be darned if I can find it right now!
    Update: I will play around the sample image you posted tomorrow. Just to see if I can come up with anything.

  • Cfimage: 'ISO Speed Ratings' error

    When trying to resize some jpgs with the cfimage tag I'm
    running into an error. With various images I get an "ISO Speed
    Ratings" error.
    So far I've been able to gather that the ISO Speed Rating has
    something to do with the metadata of the image file. Could someone
    more knowledgeable with images fill me what the problem is, and if
    there is a way I could fix this?
    Much thanks.

    Could you please attach that image?
    aslo try this
    ColdFusion Hot Fixes (ColdFusion 8 and later)
    refer - http://kb2.adobe.com/cps/402/kb402604.html
    refer - http://kb2.adobe.com/cps/403/kb403411.html
    refer -  http://groups.google.com/group/macromedia.coldfusion.advanced_techniques/browse_thread/thr ead/efbbc50c3893d816

  • Cfimage captcha java error

    Using cfimage to generate a captcha image. Works locally, but
    on live server I get this error:
    java.lang.IllegalStateException: Timer already cancelled.

    idesdema wrote:
    > Morning. I am trying to run a simple captcha script on a
    shared host and most
    > of the time it works well, however, sometimes it decides
    to crash.
    >
    > Here is the error I'm getting:
    >
    > An exception occured while performing the captcha
    cfimage action.
    > java.lang.IllegalStateException: Timer already
    cancelled.
    >
    > The error occurred in
    C:\Websites\168219qa6\scribble.cfm: line 1
    >
    > 1 : <CFIMAGE action="captcha" fontsize="20"
    text="Hello" difficulty="high"
    > fonts="verdana" width="200" height="50" />
    >
    >
    > I have logged many a ticket with the hosting company and
    they keep saying
    > "sorry, nothing we can do" which seems like a really bad
    answer to me. Is
    > there anyone that can perhaps guide me/them in the right
    direction so they can
    > tell customers the correct answer?
    I remember that I got this error some time ago. A CF restart
    solved it.
    Mack

  • CFImage Captcha error.

    I am getting error when i am trying to display the captcha i
    am getting the below error.
    java.security.AccessControlException: access denied
    (java.io.FilePermission
    C:\Coldfusion8\tmpCache\CFFileServlet\_cf_captcha read)
    In my local system its working fine. but after uploading the
    file to the server, then i am getting that error. This be because
    the CF server is trying to create a temp captacha file in the
    folder which I dont have access to that shared folder.
    But i could able to give the destination to the captcha. If i
    am giving the destination, its not at all displaying anything.
    how to overcome this issue?.
    Srinivas.

    Fixed the problem! Turns out simple restarting of the cf
    service resolved the issue.

  • CFImage - Out of memory

    Seeking help and advice ...
    My project has a high traffic load where image uploading is a
    key feature for our users. We process images that the user has
    either resized already, or that came directly off a camera in the
    camera's image format and size.
    I have been running into a issue where I receive the
    following error message:
    Java heap space null
    and through CF Fussion Reactor have found in logs:
    # An unexpected error has been detected by Java Runtime
    Environment:
    # java.lang.OutOfMemoryError: requested 23970816 bytes for
    jbyte in C:\JAVA\jdk6_04\hotspot\src\share\vm\prims\jni.cpp. Out of
    swap space?
    # Internal Error (allocation.inline.hpp:42), pid=7284,
    tid=5880
    # Error: jbyte in
    C:\JAVA\jdk6_04\hotspot\src\share\vm\prims\jni.cpp.
    This occurs at ramdom intervals, the size of the image does
    not seem matter, and occasionaly the server will restart due to
    this error.
    In trying to narrow down the source of this error I have used
    <CFLOG statements all around the steps I implement when
    uploading an image and further in resizing the image.
    Summary as follows:
    1. User input FORM for image file upload
    2. Process File via <cffile upload -> to a TEMP dir on
    the server
    3. perform validatation of file type (JPE and JPEG are seen
    as OCTETSTREAM **another issue but this step allows us to accept
    OCTETSTREAM mimetypes then check the file extension before
    proceeding)
    4. If FILE passes then COPY the file to desired location
    <CFFILE *this step also updates the file name to remove spaces
    and special characters, as well as creates a unique name (as the
    copy or move action does not seem to allow for 'MAKEUNIQUE')*
    5. Update the database with the final filename / location
    6. Create object for resize CFC to Check the Image size
    (call imageresize.cfc)
    7. the image CFC performs a <CFIMAGE to load the image
    into the cfimage object
    8. Check the height and width to determine if resize as
    needed
    9. IF resize is true call ImageScaleToFit
    10. Re-Write the image file <cfimage action="write" to
    overwrite the original file.
    11. DONE - show user a confirm page with resized image.
    Each step above has a custom <CFLOG for START step ????
    -> <CFLOG for END step ???? (also meaning SUCCESS of that
    Step)
    From the log messages I am seeing that the process starts
    into step 7. and fails with the above messages. the END STEP log is
    not reached. Loading the image into the CFIMAGE object fails.
    The size of the image does NOT appear to matter, the server
    simply gets bogged down, probably from a high number of other
    requests running and other memory loads. Some images will be
    processed, others fail, and every 12 hours or so, the server will
    crash with no explaination other than the log messages above.
    Can anyone adivse me on how to better handle this process?
    Manage memory? dump memory? manage threads? Create a Loop to retry
    the resize process?
    The server I am using is a new WIN2008 server, CF8 (latest
    hotfix applied), 4 Gig of RAM. The java Heap is set to 512MB MIN -
    1300MB MAX. MaxPermsize=192m
    Thank You

    looks like a memory leak
    http://www.performanceengineer.com/blog/java-memory-leaks/
    http://docs.sun.com/app/docs/doc/819-4673/gezax?l=fr&a=view
    Error Log for Web Server or Application Server
    Exception in thread "service-j2ee"
    java.lang.OutOfMemoryError:
    requested 53515 bytes for jbyte in
    /BUILD_AREA/jdk1.5.0_10/hotspot/src/share/vm/prims/jni.cpp.
    Out of swap space?
    Description:
    The native heap allocation failed and the native heap may be
    close to exhaustion.
    Cause:
    A native code leak, for example the C or C++ code,
    continuously requires memory without releasing it to the operating
    system. There could be indirect causes like an insufficient amount
    of swap space or another process that is consuming all memory or
    leaking it.
    Solution:
    For further diagnosis of a native code memory leak, see the
    Java 5.0 Troubleshooting and Disgnostic Guide at
    http://java.sun.com/j2se/1.5/pdf/jdk50_ts_guide.pdf.
    In the section “Diagnosing Leaks in Native Code.” See
    the information about tools for different operating systems. The
    tools include mdb and dbx (runtime trace) for Solaris 9 U3 or
    later, mtrace , libnjamd for Linux, and windb or userdump for
    Windows."
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=1&catid=143&threadid= 1305386&enterthread=y

  • Oracle error ORA-01461when trying to insert into an ORACLE BLOB field

    I am getting Oracle error ‘ORA-01461: can bind a LONG value only  for insert into a LONG column' when trying to insert into an ORACLE BLOB field. The error occurs when trying to insert a large BLOB (JPG), but does not occur when inserting a small (<1K) picture BLOB.(JPG). Any ideas?
    BTW, when using a SQL Server datasource using the same code.... everything works with no problems.
    ORACLE version is 11.2.0.1
    The ORACLE datasource is JDBC using Oracle's JDBC driver ojdbc6.jar v11.2.0.1 (I also have tried ojdbc5.jar v11.2.0.1; ojdbc5.jar v11.2.0.4; and ojdbc6.jar v11.2.0.4 with the same error result.)
    Here is my code:
    <cfset file_mime = Lcase(Right(postedXMLRoot.objname.XmlText, 3))>
    <cfif file_mime EQ 'jpg'><cfset file_mime = 'jpeg'></cfif>
    <cfset file_mime = 'data:image/' & file_mime & ';base64,'>
    <cfset image64 = ImageReadBase64("#file_mime##postedXMLRoot.objbase64.XmlText#")>
    <cfset ramfile = "ram://" & postedXMLRoot.objname.XmlText>
    <cfimage action="write" source="#image64#" destination="#ramfile#" overwrite="true">
    <cffile action="readbinary" file="#ramfile#" variable="image_bin">
    <cffile action="delete" file="#ramfile#">
    <cfquery name="InsertImage" datasource="#datasource#">
    INSERT INTO test_images
    image_blob
    SELECT
    <cfqueryparam value="#image_bin#" cfsqltype="CF_SQL_BLOB">
    FROM          dual
    </cfquery>

    Can't you use "alter index <shema.spatial_index_name> rebuild ONLINE" ? Thanks. I could switch to "rebuild ONLINE" and see if that helps. Are there any potential adverse effects going forward, e.g. significantly longer rebuild than not using the ONLINE keyword, etc? Also wondering if spatial index operations (index type = DOMAIN) obey all the typical things you'd expect with "regular" indexes, e.g. B-TREE, etc.

  • Error occurred while generating PDF. Reason: ERROR_PDF_CONVERSION

    I get an error generating my PDF whenever someone's name has a special character's in their name such as accents and diacritics.
    Is this a bug or how do I properly set the charset for the <cfhtmltopdf> tag. I didn't have this issue with Coldfusion 9 and cfdocument. Any help in this regard would be much appreciated.
    version: Coldfusion 11 Update 3 on Windows Server 2008 R2 on IIS 7.5
    SEE STACK TRACE BELOW
    coldfusion.document.webkit.PDFgErrorHandler$ServiceManagerConversionException: Error occurred while generating PDF. at coldfusion.document.webkit.PDFgErrorHandler.handleConversionError(PDFgErrorHandler.java:1 88) at coldfusion.document.webkit.HttpPDFRequestHandler.requestPDFGeneration(HttpPDFRequestHandl er.java:113) at coldfusion.tagext.lang.HtmlToPdfTag.processPDFgRequest(HtmlToPdfTag.java:1331) at coldfusion.tagext.lang.HtmlToPdfTag.handlePDFgConversionRequest(HtmlToPdfTag.java:1466) at coldfusion.tagext.lang.HtmlToPdfTag.convertToPDF(HtmlToPdfTag.java:1413) at coldfusion.tagext.lang.HtmlToPdfTag.doEndTag(HtmlToPdfTag.java:1551) at cfcfhtmltopdf_createPDF2ecfm2090701148.runPage(c:\inetpub\wwwroot\myapp.com\includes\docs \cfhtmltopdf_createPDF.cfm:25) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:246) at coldfusion.tagext.lang.IncludeTag.handlePageInvoke(IncludeTag.java:736) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:572) at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2986) at cfmethods2ecfm1148258034$funcSAVEPROXY.runFunction(c:\inetpub\wwwroot\myapp.com\cfc\docs\ methods.cfm:472) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:420) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:533) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:648) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:457) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2424) at cfmethods2ecfm1658643382$funcPROCESSSTEP.runFunction(c:\inetpub\wwwroot\myapp.com\cfc\mem berResults\methods.cfm:377) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487) at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:533) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:648) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:457) at coldfusion.filter.ComponentFilter.invoke(ComponentFilter.java:251) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:480) at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:42) at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at coldfusion.filter.PathFilter.invoke(PathFilter.java:142) at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:30) at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:94) at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:2 8) at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:58) at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at coldfusion.xml.rpc.CFCServlet.invoke(CFCServlet.java:156) at coldfusion.xml.rpc.CFCServlet.doPost(CFCServlet.java:348) at javax.servlet.http.HttpServlet.service(HttpServlet.java:646) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j ava:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42 ) at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j ava:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:422) at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:199) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.jav a:607) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Unknown Source)

    Does anyone have any suggestions?
    I've tried:
    adding charset meta tags to the top of my outputted HTML contents that comprise the PDF
    I've tried adding the <cfprocessingdirective pageencoding="utf-8" /> but doesn't seem to help.
    #encodeForHTML(pdfHTMLVariable)# and even just tried encoding the individual variables that contained the special characters but that didn't seem to help anything as encoding them still won't work I'm assuming if the Charset is mis-matched.
    Does the <cfprocessingdirective pageencoding="utf-8"> just have to be within the CFC method or does it need to be within the <cfhtmltopdf> tag?
    Any input or things to try would be much appreciated as this is a regression for our app.
    **As a side note: I would still just use CFDOCUMENT, but there was a different issue where the images were outputting a RED X where the image is supposed to be. Which from what I have been able to uncover has something to do with the server certificate not being trusted or something. However, our SSL provider is listed in the ROOT Certificate Authorities so not sure what's going on with that. Those images were being output with cfimage action of writeToBrowser .
    I'd really like to fix the encoding issue does this have anything to do with language packs or missing languages of that sort? My app displays the page just fine when the UTF-8 charset meta tag is set.

  • CFIMAGE not working when there is a . in the file path?

    I’m trying to use CFIMAGE for the first time and running into an issue. I am guess it is because my path has a period in it but I am not sure and I am not sure how to get around it if that is indeed the problem.
    I’m using ExpandPath to get the directory path but I have tried it other way with the same result. The path is
    C:\Websites\mywebsite.com\www\images
    I’m just trying to take a file in the C:\Websites\mywebsite.com\www\images\temp directory and resize it then rename it to the memberid with 300 on the end and save it to this directory C:\Websites\mywebsite.com\www\images\members
            <cfimage
            action = "resize"
            height = ""
            source = "#ExpandPath("..\images")#\temp\#TempFileName#"
            width = "300"
            optional
            destination = "#ExpandPath("..\images")#\members\"
            name = "#ARGUMENTS.MemberID#300"
            format = "jpg"
            overwrite = "yes">
    I keep getting the folowing error.
    The com\www\images\members\ image format is not supported on this operating system.
    Any ideas?

    was the fact that I ahd both destination and name being used
    at the same time.
    Using both "destination" and "name" works fine for me on windows. Though as I said, it is usually more common to use one or the other (not both).
    all I did was copy and paste
    from Adobe's example.
    Given the fact that your code contained the word "optional", you may have inadvertently copied a usage/syntax description rather an actual code example. Most of the descriptions contain the word "optional" to separate the mandatory and optional attributes. They are just descriptions not working code. Look for the actual code examples further down in the page (usually in a mono-font like courier).

  • Form Validation - Error Trapping Not Working.

    Hi,
    I'm a Coldfusion beginner desperately trying to get along with some database work for my site and have come across an annoying error that I just can't solve! I'm sure I'm missing something really basic - I just can't for the life of me figure out what it is!
    Basically, I have a form for users to sign-up. I have introduced several cfif statements and a basic CAPTCHA system to trap errors. If any errors are submitted then they should be displayed in a cfwindow. This process works fine until I specify the form action - after which it is completely ignored and the form contents are written to the database without any validation taking place. Even without specifying the form action the errors won't show in Internet Explorer.
    I really would appreciate any help - it's driving me crazy!
    Thanks in advance,
    Tom.
    Here is the code:
    <cfinclude template="CFIDE/headertemplate.cfm">
    <!-- RANDOM NUMBER GENERATOR  FOR CAPTCHA -->
    <cffunction name="makerandom" returnType="string" output="false">
    <cfset var chars = "23456789ABCDEFGHJKMNPQRSTW">
    <cfset var length = randRange(4,6)>
    <cfset var result = "">
    <cfset var i = "">
    <cfset var char = "">
    <cfscript>
         for(i=1; i <= length; i++) {
              char = mid(chars, randRange(1, len(chars)),1);
              result&=char;
    </cfscript>
    <cfreturn result>
    </cffunction>
    <!-- ERROR TRAPPING -->
      <cfset showForm = true>
      <cfparam name="form.email" default="">
      <cfparam name="form.artistname" default="">
      <cfparam name="form.city" default="">
      <cfparam name="form.postcode" default="">
      <cfparam name="form.pass" default="">
      <cfparam name="form.captcha" default="">
      <cfparam name="form.captchahash" default="">
      <cfparam name="form.terms" default="">
    <cfif isDefined("form.send")>
          <cfset errors = "">
    <cfif len (form.email) LT '4'>
    <cfset errors = errors & "You must include a valid e-mail address.<br />">
    </cfif>
    <cfif find('.',form.email) is '0'>
    <cfset errors = errors & "Your E-mail features no . symbol.<br />">
    </cfif>
    <cfif find('@',form.email) is '0'>
    <cfset errors = errors & "Your E-mail features no @ symbol.<br />">
    </cfif>
    <cfif not len(trim(form.artistname))>
    <cfset errors = errors & "You must include your name.<br />">
    </cfif>
    <cfif not len(trim(form.city))>
    <cfset errors = errors & "You must include your city.<br />">
    </cfif>
    <cfif not len(trim(form.postcode))>
    <cfset errors = errors & "You must include your postcode.<br />">
    </cfif>
    <cfif not len(trim(form.pass))>
    <cfset errors = errors & "You must specify a password.<br />">
    </cfif>
    <cfif len(form.pass) LT '6'>
    <cfset errors = errors & "Password must be between 6 and 10 characters.<br />">
    </cfif>
    <cfif hash(ucase(form.captcha)) neq form.captchahash>
    <cfset errors = errors & "You did not enter the correct Captcha text.<br />">
    </cfif>
    <cfif not len(trim(form.terms))>
    <cfset errors = errors & "You must agree to our Terms and Conditions.<br />">
    </cfif>
    <cfif errors is "">
    <cfset showForm = false>
    </cfif>
    </cfif>
    <cfif showForm>
    <cfset captcha = makerandom()>
    <cfset captchahash = hash(captcha)>
    <cfoutput>
    <h1>Artist Sign-Up</h1>
    <p>Your details are required for sign-up. Mandatory fields are indicated with a *.</p><br/><br/>
    <cfif isDefined("errors")>
    <cfwindow name="formerrors"
    title="Form Errors"
    width="450"
    height="250"
    modal="true"
    initshow="true"
    center="true"
    closable="true"
    minheight="200"
    minwidth="200">
    <center><b>Please correct the following errors and re-submit the form:</b><br /><br/>#errors#
    <br/><a href="javascript:ColdFusion.Window.hide('formerrors');">Close Window</a>
    </center>
    <br/></cfwindow>
    </cfif>
    <!-- FORM CONTENTS -->
    <cfform action="artist_insert.cfm" method="post">
    <table class="signup">
    <tr>
    <td class="noborder" width="200">
      <label for="email">E-Mail Address*:</label>
    </td>
    <td class="noborder" width="156">
    <input type="text" name="email" class="textbox" value="<cfoutput><cfif IsDefined("URL.email")>#URL.email#<cfelse></cfif></cfoutput>"/>
    </td>
    <td class="noborder">
    <cftooltip autoDismissDelay="9999" tooltip="This needs to be a valid e-mail so that<br/> promoters can get in contact with you. <br/>If several people will be using this<br/> account then try and make it a shared<br/> address."><img src="pics/i.jpg" alt="info" border="1" /></cftooltip>
    </td>
    </tr>
    <tr>
    <td class="noborder" width="200">
      Your Password* (6 to 10 chars.):
    </td>
    <td class="noborder">
    <input type="password" class="textbox" name="pass" maxlength="10"/>
    </td>
    <td class="noborder">
    </td>
    </tr>
    <tr>
    <td class="noborder" >
    Artist/Band Name*:
    </td>
    <td class="noborder">
    <input type="text" class="textbox" name="artistname" />
    </td>
    <td class="noborder">
    </td>
    </tr>
    <tr>
    <td class="noborder">
    City*:
    </td>
    <td class="noborder">
    <input type="text" class="textbox" name="city" />
    </td>
    <td class="noborder">
    <cftooltip autoDismissDelay="9999" tooltip="Entering your locational details enables Gig<br/>Digger to find the events and promoters<br/>in your area. Try specifying a well known<br/>city nearby for the best results."><img src="pics/i.jpg" alt="info" border="1" /></cftooltip>
    </td>
    </tr>
    <tr>
    <td class="noborder">
    Postcode*:
    </td>
    <td class="noborder">
    <input type="text" class="textbox" name="postcode" maxlength="8"/>
    </td>
    <td class="noborder">
    </td>
    </tr>
    <tr>
    <td class="noborder">
    Your Contact Number:
    </td>
    <td class="noborder">
    <input type="text" class="textbox" name="contact" maxlength="14"/>
    </td>
    <td class="noborder">
    </td>
    </tr>
    <tr>
    <td class="noborder">
    </td>
    </tr>
    <tr>
    <tr>
    <td class="noborder" valign="top" width="200">Please enter the CAPTCHA text in the box below*: </td>
    <td class="noborder" align="left">
    <center><cfimage action="captcha" width="156" height="50" text="#captcha#" border="1">
    <input type="hidden" name="captchaHash" value="#captchaHash#"></center>
    </td>
    <td class="noborder" valign="top">
    <cftooltip autoDismissDelay="9999" tooltip="This is here to ensure that<br/>you're human. It stops abuse <br/>of the site and makes it a safer <br/>place for us all."><img src="pics/i.jpg" alt="info" border="1" /></cftooltip>
    </td>
    </tr>
    <tr>
    <td class="noborder">
    </td>
    <td class="noborder" align="right"><font size="-2"><b><a href="javascript:location.reload(false)">Refresh Page</a></b></font>
    </td>
    <td class="noborder">
    </td>
    </tr>
    <tr>
    <td class="noborder"></td>
    <td class="noborder"><input type="text" name="captcha" class="textbox"></td>
    </tr>
    <tr>
    <td class="noborder">
    </td>
    </tr>
    <tr>
    <td class="noborder">
    </td>
    </tr>
    <tr>
    <td class="noborder" width="170">Please check this box to confirm that you agree<br/> to our <b><a href="termsandconditions.cfm">Terms and Conditions</a></b>*.
    </td>
    <td class="noborder">
    <input type="checkbox" class="textbox" name="terms" /></td>
    </tr>
    <tr>
    <td class="noborder">
    </td>
    </tr>
    <tr>
    <td class="noborder">
    </td>
    <td class="noborder" align="center">
    <cfinput type="image" src="pics/submit.png" name="send" value="Submit" validate="submitonce" border="1">
    </td>
    </tr>
    </table>
    </cfform><br/>
    </cfoutput>
    <cfelse>
    <cfoutput>
    Thank you for submitting your details, #form.name#. You may now log in with your e-mail and password.
    </cfoutput>
    </cfif>
    </td>
    </tr>
    </table>
    <!-- FOOTER START -->
    </body>
    </html>
    ARTIST INSERT PAGE - artist_insert.cfm
    <cfquery datasource="071907cs07to">
    INSERT INTO Artist(    Nsudate,
                        Nemail,
                        Npass,
                        Nname,
                        Ncity,
                        Npostcode,
                        Ncnumber
    VALUES(    ( #Now()# ),
            '#Trim(form.email)#',
            '#Trim(form.pass)#',
            '#Trim(form.artistname)#',
            '#Trim(form.city)#',
            '#Trim(form.postcode)#',
            '#Trim(form.contact)#'
    </cfquery>

    In addition to BreakawayPaul's answer.
    You are making it very difficult to troubleshoot your if/else logic because your code includes all the display stuff.  Since you're a self proclaimed beginner, you might want to try another approach.
    Save your old page and start a new one from scratch.  Solve all your logic problems first.  Display what you need to see with the cfdump tag.
    Here are some hints to make the whole thing easier.
    1.  In your cfform, use the validate and required attributes to catch errors earlier.
    2. You don't have to cfparam every form field.  The form has either been submitted to it hasn't.  If it has, all the fields will be there with the possible exception of checkboxes or radio button, if nothing was selected.

Maybe you are looking for

  • Lightroom 5.6 on Win 7 Pro 64 bit SP1 tying up CPUs, running very slowly

    Hi, I have Lightroom 5.6. Whenever I use the Spot removal, Graduated filter, Radial filter or Adjustment brush tools in the develop module, it ties up the 6 CPU cores (as viewed in Task Manager) so everything goes very slowly. For example, the effect

  • Sales analysis for selected reps

    Hi, I'm trying to find a way to use SAP's existing Sales Analysis reporting function to run a sales analysis report by a group of salesreps.  These salesreps are in a territory, so want to pull 1 sales analysis for this territory. For example, I have

  • Problem setting file extension with jspc

    I'm using xhtml which it appears the Jasper compiler (Tomcat 5.5) can't handle. It seems to only recognize files with the jsp and jspx extensions. Is there a way (either on the command line or via the Ant task) to set this? What is the proper way of

  • Install SOA suite for IDM

    Question about SOA suite installation After RCU setup creates tablespace for Identity Manager and SOA- question: how does SOA install connect or know about the tables created by RCU. Because in the SOA setup process there was no configuration for Dat

  • Adobe eLearning Suite 6 - Upgrading to 6 and keeping the previous version - is it allowed? Possible?

    I have just completed an enormous year long project in CP El Suite 5 and want to upgrade to 6. I need to keep a version 5 to handle edits to the legacy materials but need to get going in 6 so I can enjoy all those new features. Is there any way to ke