Dear all, 

I am working in the development of a driver, which use the httpclient
and commons-vfs.

The complete stack is:

org.apache.commons.vfs.FileSystemException: Could not connect to HTTP
server on "localhost".
at
org.apache.commons.vfs.provider.http.HttpClientFactory.createConnection(HttpClientFactory.java:186)
at
org.apache.commons.vfs.provider.http.HttpClientFactory.createConnection(HttpClientFactory.java:53)
at
org.apache.commons.vfs.provider.http.HttpFileProvider.doCreateFileSystem(HttpFileProvider.java:97)
at
org.apache.commons.vfs.provider.AbstractOriginatingFileProvider.getFileSystem(AbstractOriginatingFileProvider.java:103)
at
org.apache.commons.vfs.provider.AbstractOriginatingFileProvider.findFile(AbstractOriginatingFileProvider.java:82)
at
org.apache.commons.vfs.provider.AbstractOriginatingFileProvider.findFile(AbstractOriginatingFileProvider.java:66)
at
org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:706)
at
org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:623)
at
org.icenigrid.gridsam.core.plugin.transfer.protocol.AbstractTransferAgent.getFileObject(AbstractTransferAgent.java:239)
at
org.icenigrid.gridsam.core.plugin.transfer.protocol.TransferAgentFactory.resolveSourceFile(TransferAgentFactory.java:168)
at
org.icenigrid.gridsam.core.plugin.transfer.protocol.TransferAgentFactory.<init>(TransferAgentFactory.java:120)
at
org.icenigrid.gridsam.core.plugin.transfer.provider.AFTFileTransferJob.execute(AFTFileTransferJob.java:131)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool
$WorkerThread.run(SimpleThreadPool.java:525)
Caused by: org.apache.commons.httpclient.NoHttpResponseException: The
server localhost failed to respond
at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(Unknown
Source)
at org.apache.commons.httpclient.HttpMethodBase.readResponse(Unknown
Source)
at org.apache.commons.httpclient.HttpMethodBase.execute(Unknown Source)
at
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(Unknown 
Source)
at
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(Unknown
Source)
at org.apache.commons.httpclient.HttpClient.executeMethod(Unknown
Source)
at org.apache.commons.httpclient.HttpClient.executeMethod(Unknown
Source)
at
org.apache.commons.vfs.provider.http.HttpClientFactory.createConnection(HttpClientFactory.java:182)
... 13 more
 
The version of httpclient is 3.0.1, and I am not using any
authentication mechanism. 

This error is found when a URI from a GASS session is requested, such as
http://localhost:8180/opt/mytext.txt , where /opt/mytext.txt is on /.
However, using a web server or tomcat servlet container, httpclient has
not problems.

Tracking the code, in the generateRequestLine method of
HttpMethodBase.java, it does not receives the correct path.

protected static String generateRequestLine(HttpConnection connection,
        String name, String requestPath, String query, String version)

Thus, for the GASS session , requestPath shows:
HEAD / HTTP/1.1 , instead of HEAD /opt/mytext.txt HTTP/1.1

But, using a URI of tomcat, such as http://localhost:8080/index.jsp , it
shows:
HEAD /index.jsp HTTP/1.1

Any comment or suggestion is welcome. Regards.

Reply via email to