Re: [VFS] ftp and path problems?

2005-09-06 Thread Mario Ivankovits

Hi!

I found the problem.
Its the parent directory where it looks like there is a wrong filename 
entry (from the point of the ftp-parser). It looks like this filename do 
have a trailing new-line and thus an extra empty line is transferred.


I fixed VFS to be a little bit more lenient and unparseable directory 
entries (where an empty line is one of them) will simply be skipped (and 
logged using log.debug())


So it works for your case now.

The next nightly or svn head should do the job.

Regards,
Mario


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[VFS] ftp and path problems?

2005-09-05 Thread nice
Hi again,

I want to define the absolute path for my ftp dir like this:

remDir = fsManager.resolveFile(ftp://me:[EMAIL PROTECTED]/import/home2/me);

That is home2 is probably a mounted dir on the server. This does not seem to 
work.

when using an ftp client the PWD is:
/.automount/idefix/root/export/home2/me

But that too does not work as path.

I have used the:
FileSystemOptions opts = new FileSystemOptions();
FtpFileSystemConfigBuilder.getInstance().setUserDirIsRoot(opts, true);

That works great, but it is not exactly what I want.

any help is welcome :-)

Jens


org.apache.commons.vfs.FileSystemException: Could not determine the type of
file ftp://me:[EMAIL PROTECTED]/import/home2/me.
at
org.apache.commons.vfs.provider.AbstractFileObject.attach(AbstractFileObject.java:1229)
at
org.apache.commons.vfs.provider.AbstractFileObject.getChildren(AbstractFileObject.java:515)
at app.CloneTask.run(CloneTask.java:96)
at app.Clone.main(Clone.java:88)
at app.CloneTask.main(CloneTask.java:62)
Caused by: java.lang.NullPointerException
at
org.apache.commons.vfs.provider.ftp.FtpFileObject.doGetChildren(FtpFileObject.java:136)
at
org.apache.commons.vfs.provider.ftp.FtpFileObject.getChildFile(FtpFileObject.java:93)
at
org.apache.commons.vfs.provider.ftp.FtpFileObject.getInfo(FtpFileObject.java:169)
at
org.apache.commons.vfs.provider.ftp.FtpFileObject.doAttach(FtpFileObject.java:158)
at
org.apache.commons.vfs.provider.AbstractFileObject.attach(AbstractFileObject.java:1215)
... 4 more

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [VFS] ftp and path problems?

2005-09-05 Thread Mario Ivankovits

[EMAIL PROTECTED] wrote:

Caused by: java.lang.NullPointerException
at
org.apache.commons.vfs.provider.ftp.FtpFileObject.doGetChildren(FtpFileObject.java:136)
at
 


It looks like commons-net do have some problems to parse your directory 
listing.

What ftp server do you use?

Could you issue the commands syst and dir in your ftp client and 
post the output here.

If it contains sensitive data you can send the output through personal mail.

Thanks!
---
Mario


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [VFS] ftp and path problems?

2005-09-05 Thread nice
Boy you are fast :-)

I use commons-net-1.4.0

I am not sure about the dir command. But here goes:

Cmd: SYST
215: UNIX Type: L8

Cmd: NLST
425: Use PORT or PASV first.

Cmd: STAT
211: FTP server status:
  Connected to 70.19.88.199
  Logged in as schodt
  TYPE: ASCII
  No session bandwidth limit
  Session timeout in seconds is 300
  Control connection is plain text
  Data connections will be plain text
  At session startup, client count was 4
  vsFTPd 2.0.1 - secure, fast, stable
 End of status

Cmd: PWD
257: /.automount/idefix/root/export/home2/schodt

Thanks

Jens

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [VFS] ftp and path problems?

2005-09-05 Thread Mario Ivankovits

Hi

Cmd: NLST
425: Use PORT or PASV first.
 

Do your ftp client do not have a dir or ls command?

I guess it has something to do with your language setup on the ftp 
server, but I would like to see a directory listing to confirm this.



Do you work on an linux/unix machine? Then we can try to tcpdump the 
communication between you and your ftp server.



---
Mario


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]