title: Issue With Dependencies for Apache POI in Intellij IDEA. Inconsistent errors
body: <p><strong>Overview</strong></p>
  
  <p>So I have been trying to parse an Excel .xlsx file with Apache POI and then output a PDF file using Apache PDFBox. The PDFBox portion works fine in my Intellij environment but not so much the POI part...</p>
  
  <p><strong>The Problem</strong></p>
  
  <p>When I run the program I get either </p>
  
  <p><code>Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/xmlbeans/XmlException</code> </p>
  
  <p>or </p>
  
  <p><code>Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/collections4/ListValuedMap</code> </p>
  
  <p>at the line </p>
  
  <p><code>XSSFWorkbook workbook = new XSSFWorkbook(new File("MY_FILE.xlsx"));</code></p>
  
  <p>Even though ALL of the JARs are in External Libraries!</p>
  
  <p><strong>What I've Tried</strong></p>
  
  <p>Now while this is an obvious dependency issue I have tried almost every combination of maven dependencies as suggested by other similar SO questions as well as checked out all of the official <a href="https://poi.apache.org/overview.html" rel="nofollow noreferrer">POI Component Information</a> and FAQ. Although I seem to be doing everything spot on, it just seems to randomly not find one of the two above classes. Below are a few pictures of my environment that may help to debug the dependency issue!</p>
  
  <p>Intellij Project External Libraries:
  <a href="https://i.stack.imgur.com/J7QnO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/J7QnO.png" alt="Dependencies"></a></p>
  
  <p>Intellij Project Structure Modules:
  <a href="https://i.stack.imgur.com/heHyK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/heHyK.png" alt="Compile Dependencies"></a></p>
  
  <p>Intellij Project Structure Libraries:
  <a href="https://i.stack.imgur.com/Vi8Ys.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Vi8Ys.png" alt="Maven Dependency"></a></p>
  
  <p><strong>Edit 1</strong></p>
  
  <p>Unfortunately, I already tried removing the 'xmlbeans-2.3.0.jar' from the 'org.apache.poi:ooxml-schemas:1.3' maven dependency and just leaving the other jars as well as removing that dependency as a whole with no luck. Also this is not an Intellij maven project, so I have no pom.xml in my project directories. My project uses Intellij's built-in dependency management which allows me to add dependencies from maven given a resource location.</p>
  
  <p><strong>Edit 2</strong></p>
  
  <p>Even after downloading the binaries from <a href="https://www.apache.org/dyn/closer.lua/poi/release/bin/poi-bin-3.17-20170915.zip" rel="nofollow noreferrer">the Apache POI site</a> and then adding all of the JARs directly into my environment (No maven at all), there is still the same issue as described above. See below...</p>
  
  <p>Intellij Project External Libraries: 
  <a href="https://i.stack.imgur.com/FFWV7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FFWV7.png" alt="Mavenless"></a></p>
  
  <p>Stack Traces:</p>
  
  <p><a href="https://i.stack.imgur.com/fuzbj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fuzbj.png" alt="ST1"></a>
  <a href="https://i.stack.imgur.com/HEVZz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HEVZz.png" alt="ST2"></a></p>
  
  <p><strong>Edit 3</strong></p>
  
  <p>It worked in eclipse!!! Still does not change the fact that I would like to fix this in my Intellij environment if anyone is interested in looking into a strange problem.</p>