title: S3 error Exception in thread "main" java.lang.UnsatisfiedLinkError: org.apache.hadoop.io.nativeio.NativeIO$Windows.access0
body: <p>I used following dependencies:</p>
  
  <pre><code>&lt;properties&gt;
      &lt;javac-source.version&gt;1.8&lt;/javac-source.version&gt;
      &lt;javac-target.version&gt;1.8&lt;/javac-target.version&gt;
      &lt;hadoop.version&gt;3.2.1&lt;/hadoop.version&gt;
  &lt;/properties&gt;
  
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.avro&lt;/groupId&gt;
          &lt;artifactId&gt;avro&lt;/artifactId&gt;
          &lt;version&gt;1.8.2&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;!-- Thanks for using https://jar-download.com --&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.parquet&lt;/groupId&gt;
          &lt;artifactId&gt;parquet-hadoop&lt;/artifactId&gt;
          &lt;version&gt;1.8.1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;!-- https://mvnrepository.com/artifact/org.apache.parquet/parquet-avro --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.parquet&lt;/groupId&gt;
          &lt;artifactId&gt;parquet-avro&lt;/artifactId&gt;
          &lt;version&gt;1.8.1&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.hadoop&lt;/groupId&gt;
          &lt;artifactId&gt;hadoop-common&lt;/artifactId&gt;
          &lt;version&gt;${hadoop.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.hadoop&lt;/groupId&gt;
          &lt;artifactId&gt;hadoop-azure-datalake&lt;/artifactId&gt;
          &lt;version&gt;${hadoop.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.hadoop&lt;/groupId&gt;
          &lt;artifactId&gt;hadoop-azure&lt;/artifactId&gt;
          &lt;version&gt;${hadoop.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.hadoop&lt;/groupId&gt;
          &lt;artifactId&gt;hadoop-aws&lt;/artifactId&gt;
          &lt;version&gt;${hadoop.version}&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;com.amazonaws&lt;/groupId&gt;
          &lt;artifactId&gt;aws-java-sdk-bundle&lt;/artifactId&gt;
          &lt;version&gt;1.11.762&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.hadoop&lt;/groupId&gt;
          &lt;artifactId&gt;hadoop-core&lt;/artifactId&gt;
          &lt;version&gt;1.2.1&lt;/version&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  </code></pre>
  
  <p>Set following configuration: </p>
  
  <pre><code>    Configuration conf = new Configuration();
      conf.set("fs.s3.impl", "org.apache.hadoop.fs.s3a.S3AFileSystem");
      conf.set("fs.s3a.impl", "org.apache.hadoop.fs.s3a.S3AFileSystem");
      conf.set("fs.s3a.access.key","key_id");
      conf.set("fs.s3a.secret.key","key");
      conf.set("fs.s3a.endpoint","s3.us-east-1.amazonaws.com");
      conf.set("fs.s3a.aws.credentials.provider",org.apache.hadoop.fs.s3a.SimpleAWSCredentialsProvider.NAME);
      conf.set("fs.file.impl", org.apache.hadoop.fs.LocalFileSystem.class.getName());
  </code></pre>
  
  <p>used following Path: </p>
  
  <pre><code>new Path("s3a://bucket_name/" + filename)
  </code></pre>
  
  <p>and I also tried to set <code>HADOOP_HOME</code>,it does not help</p>
  
  <p>I get always the following error:</p>
  
  <pre><code>20/04/15 17:55:09 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
  20/04/15 17:55:13 WARN impl.MetricsConfig: Cannot locate configuration: tried hadoop-metrics2-s3a-file-system.properties,hadoop-metrics2.properties
  20/04/15 17:55:13 INFO impl.MetricsSystemImpl: Scheduled Metric snapshot period at 10 second(s).
  20/04/15 17:55:13 INFO impl.MetricsSystemImpl: s3a-file-system metrics system started
  Exception in thread "main" java.lang.UnsatisfiedLinkError: org.apache.hadoop.io.nativeio.NativeIO$Windows.access0(Ljava/lang/String;I)Z
  at org.apache.hadoop.io.nativeio.NativeIO$Windows.access0(Native Method)
  at org.apache.hadoop.io.nativeio.NativeIO$Windows.access(NativeIO.java:645)
  at org.apache.hadoop.fs.FileUtil.canRead(FileUtil.java:1230)
  at org.apache.hadoop.util.DiskChecker.checkAccessByFileMethods(DiskChecker.java:160)
  at org.apache.hadoop.util.DiskChecker.checkDirInternal(DiskChecker.java:100)
  at org.apache.hadoop.util.DiskChecker.checkDir(DiskChecker.java:77)
  at org.apache.hadoop.util.BasicDiskValidator.checkStatus(BasicDiskValidator.java:32)
  at org.apache.hadoop.fs.LocalDirAllocator$AllocatorPerContext.confChanged(LocalDirAllocator.java:331)
  at org.apache.hadoop.fs.LocalDirAllocator$AllocatorPerContext.getLocalPathForWrite(LocalDirAllocator.java:394)
  at org.apache.hadoop.fs.LocalDirAllocator$AllocatorPerContext.createTmpFileForWrite(LocalDirAllocator.java:477)
  at org.apache.hadoop.fs.LocalDirAllocator.createTmpFileForWrite(LocalDirAllocator.java:213)
  at org.apache.hadoop.fs.s3a.S3AFileSystem.createTmpFileForWrite(S3AFileSystem.java:589)
  at org.apache.hadoop.fs.s3a.S3ADataBlocks$DiskBlockFactory.create(S3ADataBlocks.java:811)
  at org.apache.hadoop.fs.s3a.S3ABlockOutputStream.createBlockIfNeeded(S3ABlockOutputStream.java:190)
  at org.apache.hadoop.fs.s3a.S3ABlockOutputStream.&lt;init&gt;(S3ABlockOutputStream.java:168)
  at org.apache.hadoop.fs.s3a.S3AFileSystem.create(S3AFileSystem.java:822)
  at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:1118)
  at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:1098)
  at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:987)
  at org.apache.parquet.hadoop.ParquetFileWriter.&lt;init&gt;(ParquetFileWriter.java:223)
  at org.apache.parquet.hadoop.ParquetWriter.&lt;init&gt;(ParquetWriter.java:266)
  at org.apache.parquet.hadoop.ParquetWriter$Builder.build(ParquetWriter.java:489)
  at Main.main(Main.java:43)
  </code></pre>
  
  <p>The same credential with s3n worked on the 2.8.2 version of hadoop. But know for 3.2.1 s3n is deprecated.</p>