title: Apache POI java.lang.NoSuchMethodError
body: <p>My code is below:</p>
  
  <pre><code> import java.util.*;
   import java.io.FileInputStream;
   import java.io.FileNotFoundException;
   import java.io.InputStream;
   import java.io.IOException;
  
   import org.apache.poi.ss.usermodel.Cell;
   import org.apache.poi.ss.usermodel.Row;
   import org.apache.poi.xssf.usermodel.*;
  
   public class ExcelRead{
  
       public static void main(String[] args){
          String docName = "C:\\Users\\Name\\Desktop\\excelExample.xlsx";
          try{
              InputStream xlsxDoc = new FileInputStream(docName);
              XSSFWorkbook wb = new XSSFWorkbook(xlsxDoc);
              XSSFSheet sheet = wb.getSheetAt(0);
              System.out.println(sheet.getSheetName());          
          }
          catch(Exception e){  
              e.printStackTrace();
          }
       }
  }
  </code></pre>
  
  <p>And the error code I get is:</p>
  
  <pre><code>Exception in thread "main" java.lang.NoSuchMethodError: 
  org.apache.poi.util.POILogger.log(ILjava/lang/Object;)V
  at org.apache.poi.openxml4j.opc.PackageRelationshipCollection.parseRelationshipsPart(PackageRelationshipCollection.java:313)
  at org.apache.poi.openxml4j.opc.PackageRelationshipCollection.&lt;init&gt;(PackageRelationshipCollection.java:163)
  at org.apache.poi.openxml4j.opc.PackageRelationshipCollection.&lt;init&gt;(PackageRelationshipCollection.java:131)
  at org.apache.poi.openxml4j.opc.PackagePart.loadRelationships(PackagePart.java:559)
  at org.apache.poi.openxml4j.opc.PackagePart.&lt;init&gt;(PackagePart.java:112)
  at org.apache.poi.openxml4j.opc.PackagePart.&lt;init&gt;(PackagePart.java:83)
  at org.apache.poi.openxml4j.opc.PackagePart.&lt;init&gt;(PackagePart.java:128)
  at org.apache.poi.openxml4j.opc.ZipPackagePart.&lt;init&gt;(ZipPackagePart.java:78)
  at org.apache.poi.openxml4j.opc.ZipPackage.getPartsImpl(ZipPackage.java:243)
  at org.apache.poi.openxml4j.opc.OPCPackage.getParts(OPCPackage.java:673)
  at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:274)
  at org.apache.poi.util.PackageHelper.open(PackageHelper.java:37)
  at org.apache.poi.xssf.usermodel.XSSFWorkbook.&lt;init&gt;(XSSFWorkbook.java:258)
  at AristocratProject_1.ExcelRead.main
  </code></pre>
  
  <p>The dependencies for Apache that I have added to my netbeans library are:</p>
  
  <pre><code>poi-3.17.jar
  poi-ooxml-3.11.jar
  xmlbeans-2.6.0.jar
  </code></pre>
  
  <p>And from here I pretty much have no idea what to do. Can anyone tell me if my code is wrong or what other dependencies I need?</p>