[allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => kreca [ip] => webforumsuser@m [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 7 [islastshown] => [isfirstshown] => [attachments] => [allattachments] => ) --> CFFTP problem - Coldfusion - Advanced Techniques

CFFTP problem - Coldfusion - Advanced Techniques

There seems to be a bug with the cfftp connection caching, Im doing a simple recursive tag that lists all content in a file system with cfftp action=listdir This works fine until Im doing it with really large trees after about 70-90 seconds I get a java.lang.NullPointerException error without any more debug output, by writing other output out Ive found the problem to occur right on the listdir tag This really should work, I dont want to do a login/logout for each try Best Regards -Jonas Trollvik...

  1. #1

    Default CFFTP problem

    There seems to be a bug with the cfftp connection caching, Im doing a simple
    recursive tag that lists all content in a file system with cfftp action=listdir
    This works fine until Im doing it with really large trees after about 70-90
    seconds I get a java.lang.NullPointerException error without any more debug
    output, by writing other output out Ive found the problem to occur right on the
    listdir tag This really should work, I dont want to do a login/logout for each
    try Best Regards -Jonas Trollvik

    kreca Guest

  2. #2

    Default Re: CFFTP problem

    Im using cfmx 6.1 with the latest cfmx updater run on
    kreca Guest

  3. #3

    Default Re: CFFTP problem

    I find it weird that macromedia never takes their time to respond to serious
    bug issues Anyways, here's what I did to work around the problem: I downloaded
    the free java product called edtFTPj which is a set of java classes that can be
    simply used in coldfusion to replace the <cfftp> functionality You can grab the
    library from [url]http://www.enterprisedt.com/[/url] it's lincensed under the LGPL so
    there are no problems using this in a commercial application. After adding the
    library to the classpath here's how you setup the connection: <cfscript>
    FTPClient=createObject('java', 'com.enterprisedt.net.ftp.FTPClient');
    FTPMessageCollector=createObject('java',
    'com.enterprisedt.net.ftp.FTPMessageCollector');
    FTPTransferType=createObject('java',
    'com.enterprisedt.net.ftp.FTPTransferType');
    FTPConnectMode=createObject('java',
    'com.enterprisedt.net.ftp.FTPConnectMode'); FTPFile=createObject('java',
    'com.enterprisedt.net.ftp.FTPFile'); ftp =
    FTPClient.init(qGetMirror.ftp_host); listener = FTPMessageCollector;
    listener.init(); ftp.setMessageListener(listener);
    ftp.login(username,password); ftp.setConnectMode(FTPConnectMode.PASV);
    ftp.setType(FTPTransferType.ASCII); </cfscript> this should get you started
    -Jonas

    kreca Guest

  4. #4

    Default Re: CFFTP problem

    > I find it weird that macromedia never takes their time to respond to serious
    > bug issues
    This is not a Macromedia support channel, so they will never comment one
    way or the other to any posting on these forums. This is a community-based
    forum.

    If you have an issue you want Macromedia to look at, you need to raise a
    support call with them.

    As far as community support goes... without seeing your code, I personally
    can't offer any insight into your problem.

    If you are fixing it with Java (good idea), bear in mind that <cfftp> is
    simply a wrapper for Java classes that ship as part of CF anyhow. There's
    no need to get third-party ones.

    coldfusion.oroinc.net.ftp.FTPClient


    --

    Adam
    Adam Cameron Guest

  5. #5

    Default Re: CFFTP problem

    Ah, didnt know about coldfusion.oroinc.net.ftp.FTPClient, though most probably
    it will break aswell since somewhere along the path since a
    java.lang.NullPointerException is thrown. Im sorry about critizicing
    macromedia about bug reports since I should've posted the bug through the
    official channel. -Jonas

    kreca Guest

  6. #6

    Default Re: CFFTP problem

    If you have a reproducible case, I would be interested in seeing it. At
    least the CFML code.

    A server to connect to would be the best, but if not that then details about
    which server software you are connecting to (does it happen with any
    server?) and what kind of file list needs to be in the directory to trigger
    the bug.

    Thanks.
    --
    Tom Jordahl
    Macromedia Server Development


    Tom Jordahl Guest

  7. #7

    Default Re: CFFTP problem

    Thanks Tom, I can't provide an environment since this occurs at one of our
    customers closed servers. Though I made a small samle to show what's not
    working I tried this from their servers and could reproduce it once with the
    public server at ftp.funet.fi . This only throws the specified error
    occasionally, I think the error occurs when the link is slow and maybe laggy
    between the two hosts. For us to transfer a 10MB file it takes about 15 minutes
    between the hosts, that'll give you an idea of the environment The target ftp
    server is Serv-U ftp (though I reproduced this with the ftp.funet.fi which seem
    to run Pure-FTPd). The CFMX 6.1 server runs on Windows 2003 and has 2GB RAM
    Hope this can help out -Jonas

    ftp.cfm
    <cfftp action="OPEN" server="ftp.funet.fi" username="ftp"
    password="ftpleapfrog.se" stoponerror="Yes" connection="request.curFtp"
    retrycount="3">

    <cfmodule template="ftp_recurse.cfm" path="/pub">

    <cfftp action="CLOSE" stoponerror="Yes" connection="request.curFtp">

    ftp_recurse.cfm

    <cfftp connection = "request.curFtp"
    action = "LISTDIR"
    stopOnError = "Yes"
    name = "ListDirs"
    directory = "#attributes.path#">
    <cfoutput>
    <strong>#attributes.path#</strong><br>
    <cfflush>
    <cfloop query="ListDirs">
    <cfif left(name, 1) eq '.'> <!--- skip dirs starting with . --->

    <cfelseif not ISDIRECTORY>

    <cfelse>
    <cfmodule template="ftp_recurse.cfm" path="#PATH#">

    </cfif>
    </cfloop>
    </cfoutput>

    kreca Guest

  8. #8

    Default Re: CFFTP problem

    So I ran this test program on CFMX 7 and I was unable to see any problems.
    It ran for a looong time (> 1 hour) before I stopped it.

    Can you install CFMX 7 (developer edition) on a machine and see if the
    problem still exists on your local server?

    --
    Tom Jordahl
    Macromedia Server Development


    Tom Jordahl Guest

  9. #9

    Default Re: CFFTP problem

    > So I ran this test program on CFMX 7 and I was unable to see any problems.
    > It ran for a looong time (> 1 hour) before I stopped it.
    That's not much of a test, Tom, because CFMX7 uses a different FTP class
    than CFMX61 did, under the hood.

    Unless of course your solution would simply be "upgrade to 7"?

    --

    Adam
    Adam Cameron Guest

  10. #10

    Default Re: CFFTP problem

    We cant migrate our customers to CFMX 7 yet, though using a different ftp class
    will suffice for us at the moment. Will try this again when upgrading to MX7
    If you need anything more I will gladly help Thanks Jonas

    kreca Guest

  11. #11

    Default Re: CFFTP problem

    > That's not much of a test, Tom, because CFMX7 uses a different FTP class
    > than CFMX61 did, under the hood.
    This is both true and not true. We use a newer version of the library which
    it appears does not have the bug that Jonas is encountering. But your point
    is well taken.
    > Unless of course your solution would simply be "upgrade to 7"?
    I wouldn't call this a "solution", but it is certainly an option. The other
    alternative is to file a support incident and escalate this up for a hotfix
    to CFMX 6.1. I think Jonas has a work-around already however.
    --
    Tom Jordahl
    Macromedia Server Development



    Tom Jordahl Guest

Similar Threads

  1. problems using cfftp
    By AJax1219 in forum Coldfusion Flash Integration
    Replies: 0
    Last Post: December 15th, 07:10 PM
  2. CFFTP
    By sethman in forum Coldfusion - Getting Started
    Replies: 3
    Last Post: October 26th, 03:42 PM
  3. cfftp error
    By delphinele in forum Macromedia ColdFusion
    Replies: 2
    Last Post: June 27th, 04:11 AM
  4. Need help with cfftp
    By ronatzone in forum Coldfusion - Getting Started
    Replies: 1
    Last Post: February 24th, 06:39 PM
  5. Help with CFFTP
    By rottmanja in forum Coldfusion - Getting Started
    Replies: 2
    Last Post: February 24th, 07:12 AM

Bookmarks

Posting Permissions

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