Boris Petrov created VFS-679:
--------------------------------
Summary: FtpFileObject is not thread safe
Key: VFS-679
URL: https://issues.apache.org/jira/browse/VFS-679
Project: Commons VFS
Issue Type: Bug
Affects Versions: 2.2, Nightly Builds
Reporter: Boris Petrov
This is similar to https://issues.apache.org/jira/browse/VFS-294 but it is very
old so I'm not sure how relevant it is.
We're getting numerous exceptions like:
{noformat}
org.apache.commons.vfs2.FileSystemException: Could not determine the size of
file "ftp://ftp.pbteu.com/VMRType.reg".
at
org.apache.commons.vfs2.provider.DefaultFileContent.getSize(DefaultFileContent.java:134)
...
at
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)
at
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:844)
Caused by: java.lang.NullPointerException: null
at
org.apache.commons.vfs2.provider.ftp.FtpFileObject.doGetContentSize(FtpFileObject.java:449)
at
org.apache.commons.vfs2.provider.DefaultFileContent.getSize(DefaultFileContent.java:132)
... 13 common frames omitted
{noformat}
And:
{noformat}
10:21:15.427 [Thread-20] ERROR o.a.c.vfs2.impl.DefaultFileMonitor - Could not
determine the last modified timestamp of "ftp://ftp.pbteu.com/VMRType.reg".
org.apache.commons.vfs2.FileSystemException: Could not determine the last
modified timestamp of "ftp://ftp.pbteu.com/VMRType.reg".
at
org.apache.commons.vfs2.provider.DefaultFileContent.getLastModifiedTime(DefaultFileContent.java:156)
at
org.apache.commons.vfs2.impl.DefaultFileMonitor$FileMonitorAgent.check(DefaultFileMonitor.java:526)
at
org.apache.commons.vfs2.impl.DefaultFileMonitor$FileMonitorAgent.access$200(DefaultFileMonitor.java:367)
at
org.apache.commons.vfs2.impl.DefaultFileMonitor.run(DefaultFileMonitor.java:330)
at java.base/java.lang.Thread.run(Thread.java:844)
Caused by: java.lang.NullPointerException: null
at
org.apache.commons.vfs2.provider.ftp.FtpFileObject.doGetLastModifiedTime(FtpFileObject.java:469)
at
org.apache.commons.vfs2.provider.DefaultFileContent.getLastModifiedTime(DefaultFileContent.java:154)
... 4 common frames omitted
{noformat}
This is happening on 2.2 and on the current trunk. I'm not sure where to start
digging from but this is a show-stopper for us. Any help is appreciated!
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)