Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
kreca #1
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
-
problems using cfftp
someone please help. I have this so far <cfset log_name = "ex#dateformat(dateadd('d', -1, now()),'YYMMDD')#.log.gz"> <cfftp action="open"... -
CFFTP
Okay.... it's ben awhile so bare with me... I have a form that uploads a file via CFFTP but, it only works on the local machine. When uploading a... -
cfftp error
Hello, I have a problem with the tag cfftp action = "putfile" . this tag works but it generates a unknown error when the file's length is large... -
Need help with cfftp
:confused; I keep getting a 500 STOR Unknown Command Error from the ftp server when using <cfftp> uploading a file. From the looks of it <cfftp> is... -
Help with CFFTP
I am working on a small app that downloads a file every day, via an ftp server. I can get the app to connect and display the files on the server.... -
-
kreca #3
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
-
Adam Cameron #4
Re: CFFTP problem
> I find it weird that macromedia never takes their time to respond to serious
This is not a Macromedia support channel, so they will never comment one> bug issues
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
-
kreca #5
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
-
Tom Jordahl #6
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
-
kreca #7
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="ftp@leapfrog.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
-
Tom Jordahl #8
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
-
Adam Cameron #9
Re: CFFTP problem
> So I ran this test program on CFMX 7 and I was unable to see any problems.
That's not much of a test, Tom, because CFMX7 uses a different FTP class> It ran for a looong time (> 1 hour) before I stopped it.
than CFMX61 did, under the hood.
Unless of course your solution would simply be "upgrade to 7"?
--
Adam
Adam Cameron Guest
-
kreca #10
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
-
Tom Jordahl #11
Re: CFFTP problem
> That's not much of a test, Tom, because CFMX7 uses a different FTP class
This is both true and not true. We use a newer version of the library which> than CFMX61 did, under the hood.
it appears does not have the bug that Jonas is encountering. But your point
is well taken.
I wouldn't call this a "solution", but it is certainly an option. The other> Unless of course your solution would simply be "upgrade to 7"?
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



Reply With Quote

