commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "vikas (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (VFS-113) NullPointerException during getting InputStream from SftpFileObject
Date Wed, 04 Jul 2007 13:16:04 GMT

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

vikas edited comment on VFS-113 at 7/4/07 6:14 AM:
---------------------------------------------------

Hi Mario Ivankovits 
   I am using commons-vfs-20070703.jar
I am facing this problem as in above comments:
Please give me some suggestion on this issue .
What can i do to resolve this problem in secure ftp.
there is any another way to resolve this problem.

org.apache.commons.vfs.FileSystemException: Could not read file "sftp://maan:maan@vikas/transport/source/students1.txt".

at org.apache.commons.vfs.provider.AbstractFileObject.getInputStream(AbstractFileObject.java:1163)

at org.apache.commons.vfs.provider.DefaultFileContent.getInputStream(DefaultFileContent.java:360)

at com.adeptia.indigo.services.transport.ftp.SecuredFtp.download(SecuredFtp.java:161) 
at com.adeptia.indigo.services.transport.ftp.FtpSource.createInputStream(FtpSource.java:179)

at com.adeptia.indigo.services.transport.support.AbstractStreamSource.initialize(AbstractStreamSource.java:44)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 
at java.lang.reflect.Method.invoke(Unknown Source) 
at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:483) 
at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(Unknown Source) 
at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(Unknown Source) 
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source) 
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source) 
at com.adeptia.indigo.utils.RemoteMBeanProxy$LocalHandler.invokeOperation(RemoteMBeanProxy.java:441)

at com.adeptia.indigo.utils.RemoteMBeanProxy$Handler.invoke(RemoteMBeanProxy.java:294) 
at $Proxy2.initialize(Unknown Source) 
at com.adeptia.indigo.jelly.ActivityTag.runSync(ActivityTag.java:313) 
at com.adeptia.indigo.jelly.ActivityTag.doTag(ActivityTag.java:250) 
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:278) 
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:133) 
at com.werken.blissed.jelly.JellyActivity.perform(JellyActivity.java:120) 
at com.werken.blissed.ProcessEngine.enterState(ProcessEngine.java:391) 
at com.werken.blissed.ProcessEngine.followTransition(ProcessEngine.java:509) 
at com.werken.blissed.ProcessEngine.checkTransitions(ProcessEngine.java:458) 
at com.werken.blissed.ProcessEngine.startProcess(ProcessEngine.java:366) 
at com.werken.blissed.ProcessEngine.spawn(ProcessEngine.java:299) 
at com.adeptia.indigo.processflow.BlissedProcessFlow.execute(BlissedProcessFlow.java:159)

at com.adeptia.indigo.transaction.IndigoTransaction.execute(IndigoTransaction.java:423) 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 
at java.lang.reflect.Method.invoke(Unknown Source) 
at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:483) 
at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(Unknown Source) 
at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(Unknown Source) 
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source) 
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source) 
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(Unknown Source) 
at javax.management.remote.rmi.RMIConnectionImpl.access$100(Unknown Source) 
at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(Unknown Source) 
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(Unknown Source) 
at javax.management.remote.rmi.RMIConnectionImpl.invoke(Unknown Source) 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 
at java.lang.reflect.Method.invoke(Unknown Source) 
at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source) 
at sun.rmi.transport.Transport$1.run(Unknown Source) 
at java.security.AccessController.doPrivileged(Native Method) 
at sun.rmi.transport.Transport.serviceCall(Unknown Source) 
at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source) 
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source) 
at java.lang.Thread.run(Unknown Source) 

Caused by: org.apache.commons.vfs.FileSystemException: Could not connect to SFTP server at
"sftp://maan:maan@vikas/". 
at org.apache.commons.vfs.provider.sftp.SftpFileSystem.getChannel(SftpFileSystem.java:144)

at org.apache.commons.vfs.provider.sftp.SftpFileObject.doGetInputStream(SftpFileObject.java:380)

at org.apache.commons.vfs.provider.AbstractFileObject.getInputStream(AbstractFileObject.java:1159)

... 53 more 


Caused by: com.jcraft.jsch.JSchException: java.io.IOException: inputstream is closed 
at com.jcraft.jsch.ChannelSftp.start(Unknown Source) 
at com.jcraft.jsch.Channel.connect(Unknown Source) 
at com.jcraft.jsch.Channel.connect(Unknown Source) 
at org.apache.commons.vfs.provider.sftp.SftpFileSystem.getChannel(SftpFileSystem.java:123)

... 55 more 


Caused by: java.io.IOException: inputstream is closed 
at com.jcraft.jsch.ChannelSftp.fill(Unknown Source) 
at com.jcraft.jsch.ChannelSftp.header(Unknown Source) 
... 59 more 
2007-07-04 16:41:59,984 ERROR [Flow Thread(192168001166118354716240600002)] flow com.adeptia.indigo.jelly.ActivityTag.runSync(ActivityTag.java:320)
- Process_Flow_For_SecureFTP|FTP_Source_Secure_Test|FtpSource|Failed|administrators|192168001166118294134403100005|192168001166118354716031200001|192168001166118294076370300003||admin|Error
initializing activity FtpSource:FTP_Source_Secure_Test:192168001166118294076370300003[Could
not read file "sftp://maan:maan@vikas/transport/source/students1.txt".]|wshost 
org.apache.commons.vfs.FileSystemException: Could not read file "sftp://maan:maan@vikas/transport/source/students1.txt".


please help me regards this


 was:
Hi Mario Ivankovits 
   I am using commons-vfs-20070703.jar
I am facing this problem 

Exception  ************************  org.apache.commons.vfs.FileSystemException: Could not
connect to SFTP server at "sftp://maan:maan@vikas/".
org.apache.commons.vfs.FileSystemException: Could not connect to SFTP server at "sftp://maan:maan@vikas/".
	at org.apache.commons.vfs.provider.sftp.SftpFileProvider.doCreateFileSystem(SftpFileProvider.java:99)
	at org.apache.commons.vfs.provider.AbstractOriginatingFileProvider.findFile(AbstractOriginatingFileProvider.java:81)
	at org.apache.commons.vfs.provider.AbstractOriginatingFileProvider.findFile(AbstractOriginatingFileProvider.java:62)
	at org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:641)
	at org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:582)
	at com.adeptia.indigo.services.transport.ftp.SecuredFtp.connect(SecuredFtp.java:272)
	at com.adeptia.indigo.services.transport.ftp.SecuredFtp.download(SecuredFtp.java:145)
	at com.adeptia.indigo.services.transport.ftp.FtpSource.createInputStream(FtpSource.java:179)
	at com.adeptia.indigo.services.transport.support.AbstractStreamSource.initialize(AbstractStreamSource.java:44)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:483)
	at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(Unknown Source)
	at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(Unknown Source)
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source)
	at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source)
	at com.adeptia.indigo.utils.RemoteMBeanProxy$LocalHandler.invokeOperation(RemoteMBeanProxy.java:441)
	at com.adeptia.indigo.utils.RemoteMBeanProxy$Handler.invoke(RemoteMBeanProxy.java:294)
	at $Proxy2.initialize(Unknown Source)
	at com.adeptia.indigo.jelly.ActivityTag.runSync(ActivityTag.java:313)
	at com.adeptia.indigo.jelly.ActivityTag.doTag(ActivityTag.java:250)
	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:278)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:133)
	at com.werken.blissed.jelly.JellyActivity.perform(JellyActivity.java:120)
	at com.werken.blissed.ProcessEngine.enterState(ProcessEngine.java:391)
	at com.werken.blissed.ProcessEngine.followTransition(ProcessEngine.java:509)
	at com.werken.blissed.ProcessEngine.checkTransitions(ProcessEngine.java:458)
	at com.werken.blissed.ProcessEngine.startProcess(ProcessEngine.java:366)
	at com.werken.blissed.ProcessEngine.spawn(ProcessEngine.java:299)
	at com.adeptia.indigo.processflow.BlissedProcessFlow.execute(BlissedProcessFlow.java:159)
	at com.adeptia.indigo.transaction.IndigoTransaction.execute(IndigoTransaction.java:423)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:483)
	at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(Unknown Source)
	at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(Unknown Source)
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source)
	at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source)
	at javax.management.remote.rmi.RMIConnectionImpl.doOperation(Unknown Source)
	at javax.management.remote.rmi.RMIConnectionImpl.access$100(Unknown Source)
	at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(Unknown Source)
	at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(Unknown Source)
	at javax.management.remote.rmi.RMIConnectionImpl.invoke(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
	at sun.rmi.transport.Transport$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.Transport.serviceCall(Unknown Source)
	at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)


Caused by: org.apache.commons.vfs.FileSystemException: Could not connect to SFTP server at
"vikas".
	at org.apache.commons.vfs.provider.sftp.SftpClientFactory.createConnection

(SftpClientFactory.java:214)
	at org.apache.commons.vfs.provider.sftp.SftpFileProvider.doCreateFileSystem(SftpFileProvider.java:90)
	... 57 more
Caused by: com.jcraft.jsch.JSchException: Session.connect: java.net.ConnectException: Connection
refused: connect
	at com.jcraft.jsch.Session.connect(Unknown Source)
	at com.jcraft.jsch.Session.connect(Unknown Source)
	at org.apache.commons.vfs.provider.sftp.SftpClientFactory.createConnection(SftpClientFactory.java:210)
	... 58 more
com.adeptia.indigo.utils.IndigoException: Could not connect to SFTP server at "sftp://maan:maan@vikas/".
	at com.adeptia.indigo.services.transport.ftp.SecuredFtp.connect(SecuredFtp.java:278)
	at com.adeptia.indigo.services.transport.ftp.SecuredFtp.download(SecuredFtp.java:145)
	at com.adeptia.indigo.services.transport.ftp.FtpSource.createInputStream(FtpSource.java:179)
	at com.adeptia.indigo.services.transport.support.AbstractStreamSource.initialize(AbstractStreamSource.java:44)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:483)
	at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(Unknown Source)
	at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(Unknown Source)
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source)
	at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source)
	at com.adeptia.indigo.utils.RemoteMBeanProxy$LocalHandler.invokeOperation(RemoteMBeanProxy.java:441)
	at com.adeptia.indigo.utils.RemoteMBeanProxy$Handler.invoke(RemoteMBeanProxy.java:294)
	at $Proxy2.initialize(Unknown Source)
	at com.adeptia.indigo.jelly.ActivityTag.runSync(ActivityTag.java:313)
	at com.adeptia.indigo.jelly.ActivityTag.doTag(ActivityTag.java:250)
	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:278)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:133)
	at com.werken.blissed.jelly.JellyActivity.perform(JellyActivity.java:120)
	at com.werken.blissed.ProcessEngine.enterState(ProcessEngine.java:391)
	at com.werken.blissed.ProcessEngine.followTransition(ProcessEngine.java:509)
	at com.werken.blissed.ProcessEngine.checkTransitions(ProcessEngine.java:458)
	at com.werken.blissed.ProcessEngine.startProcess(ProcessEngine.java:366)
	at com.werken.blissed.ProcessEngine.spawn(ProcessEngine.java:299)
	at com.adeptia.indigo.processflow.BlissedProcessFlow.execute(BlissedProcessFlow.java:159)
	at com.adeptia.indigo.transaction.IndigoTransaction.execute(IndigoTransaction.java:423)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:483)
	at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(Unknown Source)
	at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(Unknown Source)
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source)
	at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source)
	at javax.management.remote.rmi.RMIConnectionImpl.doOperation(Unknown Source)
	at javax.management.remote.rmi.RMIConnectionImpl.access$100(Unknown Source)
	at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(Unknown Source)
	at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(Unknown Source)
	at javax.management.remote.rmi.RMIConnectionImpl.invoke(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
	at sun.rmi.transport.Transport$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.Transport.serviceCall(Unknown Source)
	at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Print Exception**************************    
2007-07-04 18:26:49,859 ERROR [Flow Thread(192168001166118355380787500016)]  flow     com.adeptia.indigo.jelly.ActivityTag.runSync(ActivityTag.java:320)
- Process_Flow_For_SecureFTP|FTP_Source_Secure_Test|FtpSource|Failed|administrators|192168001166118294134403100005|192168001166118355380753100015|192168001166118294076370300003||admin|Error
initializing activity FtpSource:FTP_Source_Secure_Test:192168001166118294076370300003[Could
not connect to SFTP server at "sftp://maan:maan@vikas/".]|wshost
com.adeptia.indigo.utils.IndigoException: Could not connect to SFTP server at "sftp://maan:maan@vikas/".



please help me regards this

> 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


Mime
View raw message