commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vikas Kumar" <vikas.ku...@adeptia.com>
Subject FTP issue
Date Mon, 02 Jul 2007 16:14:58 GMT


Hi

 I am getting this problem:

DefaultFileSystemManager fsManager;

fileName = fileName.replace( ( char ) 0xA0, ( char ) 0x20 );

try{

fsManager = getManager();

FileSystemOptions fileSystemOptions = new FileSystemOptions();

FtpFileSystemConfigBuilder.getInstance().setPassiveMode(fileSystemOptions, true);

FtpFileSystemConfigBuilder.getInstance().setEntryParser(fileSystemOptions,"org.apache.commons.net.ftp.parser.NTFTPEntryParser"
);

String url = prepareSecuredUrl( hostName, portNumder, ftpUserId, ftpPassword,

fileName);


_fileObject = fsManager.resolveFile( url, fileSystemOptions );

 

FileContent content = _fileObject.getContent();

// System.out.println(""+content.toString());

try

{

if ( content.getInputStream() == null )

throw new Exception(

"Not able to retrieve file from Secured FTP server running at "

+ host );

}catch (FileSystemException e)

{

e.printStackTrace();

throw new Exception(

"Not able to retrieve file from Secured FTP server running at "

+ host + " because no such file exists");

}

org.apache.commons.vfs.FileSystemException: Could not read from "ftp://administrator:ashish@ashish/students1.txt"
because it is a not a file.

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

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

at com.adeptia.indigo.services.transport.ftp.FTP.download1(FTP.java:163)

at com.adeptia.indigo.services.transport.ftp.FtpSource.createInputStream(FtpSource.java:171)

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.GeneratedMethodAccessor133.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)





Pls help me regards this issue.

at java.lang.Thread.run(Unknown Source)

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message