title: No method XMLEventFactory.newFactory() while making Groovy Script to read .xlsx files on IntelliJ IDEA with JDK 1.8
body: <p>I'm trying to make a groovy script that reads certain .xlsx files and parses them. I want to use Apache POI but I run into several problems. If I try to run the script from IntelliJ IDEA on Mac OS X with a JDK 1.8, with a 3.11 POI @Grab annotation (previous versions won't download because of problems with the xml-apis dependency), this is what happens:</p>
  
  <pre><code>Caught: java.lang.NoSuchMethodError: 
  
  javax.xml.stream.XMLEventFactory.newFactory()Ljavax/xml/stream/XMLEventFactory;
  java.lang.NoSuchMethodError: javax.xml.stream.XMLEventFactory.newFactory()Ljavax/xml/stream/XMLEventFactory;
  </code></pre>
  
  <p>However, the same code in console throws:</p>
  
  <pre><code>Caught: java.lang.NoClassDefFoundError: org/openxmlformats/schemas/spreadsheetml/x2006/main/CTExtensionList
  java.lang.NoClassDefFoundError: org/openxmlformats/schemas/spreadsheetml/x2006/main/CTExtensionList
  Caused by: java.lang.ClassNotFoundException: org.openxmlformats.schemas.spreadsheetml.x2006.main.CTExtensionList
  </code></pre>
  
  <p>This is the code I'm trying to run:</p>
  
  <pre><code>import org.apache.poi.xssf.usermodel.XSSFSheet
  import org.apache.poi.xssf.usermodel.XSSFWorkbook
  
  @Grapes([
          @Grab(group='org.apache.poi', module='poi', version='3.11'),
          @Grab(group='org.apache.poi', module='poi-ooxml', version='3.11'),
          @Grab(group='org.apache.poi', module='poi-ooxml-schemas', version='3.11')
  ])
      def path = args[0]
      File file = new File(path)
  
      XSSFWorkbook workbook = new XSSFWorkbook(file)
      XSSFSheet sheet = workbook.getSheetAt(0)
      println sheet.getRow(2).getCell(2).getStringCellValue()
  </code></pre>
  
  <p>Where could the problem be?</p>