You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Tim Rademacher (JIRA)" <ji...@apache.org> on 2007/03/20 08:33:32 UTC

[jira] Commented: (VFS-113) NullPointerException during getting InputStream from SftpFileObject

    [ https://issues.apache.org/jira/browse/VFS-113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12482326 ] 

Tim Rademacher commented on VFS-113:
------------------------------------

It's been a while since I wrote this. ;-) So by now, the only exception I get while trying to reproduce this was this IOException. As far as I remember, this has the same origin as the NullPointerException.

But I'll keep on trying to get you a stacktrace of the NullPointerException!

Regards,

Tim

org.apache.commons.vfs.FileSystemException: Could not copy "sftp://blavla@blabla/blabla.txt" to "sftp://blavla@blabla/archive/blabla.txt".
	at org.apache.commons.vfs.provider.AbstractFileObject.copyFrom(AbstractFileObject.java:919)
	at org.apache.commons.vfs.provider.AbstractFileObject.moveTo(AbstractFileObject.java:981)
	at de.inka.service.file.InkaFileSystemConnection.move(InkaFileSystemConnection.java:463)
	... 11 more
Caused by: org.apache.commons.vfs.FileSystemException: Could not read file "sftp://blavla@blabla/blabla.txt".
	at org.apache.commons.vfs.provider.AbstractFileObject.getInputStream(AbstractFileObject.java:1140)
	at org.apache.commons.vfs.provider.DefaultFileContent.getInputStream(DefaultFileContent.java:320)
	at org.apache.commons.vfs.FileUtil.writeContent(FileUtil.java:71)
	at org.apache.commons.vfs.FileUtil.copyContent(FileUtil.java:103)
	at org.apache.commons.vfs.provider.AbstractFileObject.copyFrom(AbstractFileObject.java:910)
	... 13 more
Caused by: 4: 
	at com.jcraft.jsch.ChannelSftp._get(ChannelSftp.java:968)
	at com.jcraft.jsch.ChannelSftp.get(ChannelSftp.java:861)
	at com.jcraft.jsch.ChannelSftp.get(ChannelSftp.java:837)
	at org.apache.commons.vfs.provider.sftp.SftpFileObject.doGetInputStream(SftpFileObject.java:385)
	at org.apache.commons.vfs.provider.AbstractFileObject.getInputStream(AbstractFileObject.java:1136)
	... 17 more
Caused by: java.io.IOException: inputstream is closed
	at com.jcraft.jsch.ChannelSftp.fill(ChannelSftp.java:2131)
	at com.jcraft.jsch.ChannelSftp.header(ChannelSftp.java:2155)
	at com.jcraft.jsch.ChannelSftp._get(ChannelSftp.java:906)
	... 21 more

> NullPointerException during getting InputStream from SftpFileObject
> -------------------------------------------------------------------
>
>                 Key: VFS-113
>                 URL: https://issues.apache.org/jira/browse/VFS-113
>             Project: Commons VFS
>          Issue Type: Bug
>            Reporter: Tim Rademacher
>             Fix For: 1.1
>
>         Attachments: SftpFileObject.diff
>
>
> Hi, 
> I experienced unregular NullPointerExceptions while getting an InputStream from an SftpFileObject. It only occures in a multithreading environment.
> I made a patch. By now it seems to work!
> Regards,
> Tim

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org