title: Null pointer exception in SFTP upload using Apache Commons VFS
body: <p>I have code to use SFTP for uploading file to a remote server. I am using Kotlin/Java and Apache commons library.</p>
  <pre><code>val manager = StandardFileSystemManager()
  manager.init()
  ...
  val tempFile: File = File (&quot;/test.txt&quot;)
  </code></pre>
  <p>I am following the example <a href="https://stackoverflow.com/questions/21399561/sftp-upload-download-exist-and-move-using-apache-commons-vfs/21399562">here</a> . However I get following error at <code>manager.init()</code> call</p>
  <pre><code>java.lang.NullPointerException: Cannot invoke 
  &quot;java.nio.file.attribute.BasicFileAttributes.lastModifiedTime()&quot; because 
  &quot;this.attrs&quot; is null
  </code></pre>
  <p>Stacktrace</p>
  <pre><code>0 = {StackTraceElement@4220} &quot;java.base/java.util.zip.ZipFile$Source$Key.hashCode(ZipFile.java:1235)&quot;
  1 = {StackTraceElement@4221} &quot;java.base/java.util.HashMap.hash(HashMap.java:338)&quot;
  2 = {StackTraceElement@4222} &quot;java.base/java.util.HashMap.getNode(HashMap.java:568)&quot;
  3 = {StackTraceElement@4223} &quot;java.base/java.util.HashMap.get(HashMap.java:556)&quot;
  4 = {StackTraceElement@4224} &quot;java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1271)&quot;
  5 = {StackTraceElement@4225} &quot;java.base/java.util.zip.ZipFile$CleanableResource.&lt;init&gt;(ZipFile.java:709)&quot;
  6 = {StackTraceElement@4226} &quot;java.base/java.util.zip.ZipFile.&lt;init&gt;(ZipFile.java:243)&quot;
  7 = {StackTraceElement@4227} &quot;java.base/java.util.zip.ZipFile.&lt;init&gt;(ZipFile.java:172)&quot;
  8 = {StackTraceElement@4228} &quot;java.base/java.util.jar.JarFile.&lt;init&gt;(JarFile.java:347)&quot;
  9 = {StackTraceElement@4229} &quot;java.base/sun.net.www.protocol.jar.URLJarFile.&lt;init&gt;(URLJarFile.java:103)&quot;
  10 = {StackTraceElement@4230} &quot;java.base/sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:72)&quot;
  11 = {StackTraceElement@4231} &quot;java.base/sun.net.www.protocol.jar.JarFileFactory.getOrCreate(JarFileFactory.java:106)&quot;
  12 = {StackTraceElement@4232} &quot;java.base/sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:132)&quot;
  13 = {StackTraceElement@4233} &quot;java.base/sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:175)&quot;
  14 = {StackTraceElement@4234} &quot;org.apache.commons.vfs2.util.CombinedResources.loadResources(CombinedResources.java:85)&quot;
  15 = {StackTraceElement@4235} &quot;org.apache.commons.vfs2.util.CombinedResources.init(CombinedResources.java:48)&quot;
  16 = {StackTraceElement@4236} &quot;org.apache.commons.vfs2.util.CombinedResources.handleGetObject(CombinedResources.java:123)&quot;
  17 = {StackTraceElement@4237} &quot;java.base/java.util.ResourceBundle.getObject(ResourceBundle.java:555)&quot;
  18 = {StackTraceElement@4238} &quot;java.base/java.util.ResourceBundle.getString(ResourceBundle.java:521)&quot;
  19 = {StackTraceElement@4239} &quot;org.apache.commons.vfs2.util.Messages.findMessage(Messages.java:93)&quot;
  20 = {StackTraceElement@4240} &quot;org.apache.commons.vfs2.util.Messages.getString(Messages.java:76)&quot;
  21 = {StackTraceElement@4241} &quot;org.apache.commons.vfs2.util.Messages.getString(Messages.java:60)&quot;
  22 = {StackTraceElement@4242} &quot;org.apache.commons.vfs2.impl.DefaultFileReplicator.init(DefaultFileReplicator.java:180)&quot;
  23 = {StackTraceElement@4243} &quot;org.apache.commons.vfs2.impl.PrivilegedFileReplicator$InitAction.run(PrivilegedFileReplicator.java:127)&quot;
  24 = {StackTraceElement@4244} &quot;java.base/java.security.AccessController.doPrivileged(AccessController.java:569)&quot;
  25 = {StackTraceElement@4245} &quot;org.apache.commons.vfs2.impl.PrivilegedFileReplicator.init(PrivilegedFileReplicator.java:83)&quot;
  26 = {StackTraceElement@4246} &quot;org.apache.commons.vfs2.impl.DefaultFileSystemManager.setupComponent(DefaultFileSystemManager.java:434)&quot;
  27 = {StackTraceElement@4247} &quot;org.apache.commons.vfs2.impl.DefaultFileSystemManager.setReplicator(DefaultFileSystemManager.java:393)&quot;
  28 = {StackTraceElement@4248} &quot;org.apache.commons.vfs2.impl.StandardFileSystemManager.init(StandardFileSystemManager.java:94)&quot;
  </code></pre>
  <p>What could be the issue here? Is it due to Kotlin? What am I missing?</p>
  <p>Thanks</p>