# XMLBeans Jar File Issue

**URL:** <https://forum.inductiveautomation.com/t/xmlbeans-jar-file-issue/23708>\
**Category:** Module Development\
**Created:** [March 29, 2019, 12:40pm UTC](https://forum.inductiveautomation.com/t/xmlbeans-jar-file-issue/23708 "2019-03-29T12:40:54Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![grietveld](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/grietveld/32/6984_2.png) [@grietveld](https://forum.inductiveautomation.com/u/grietveld)\
**Post date:** [March 29, 2019, 12:40pm UTC](https://forum.inductiveautomation.com/t/xmlbeans-jar-file-issue/23708/1 "2019-03-29T12:40:54Z")

</div>

I'm running into the same issue described in the linked post, and the solution described seems like it should work, but if I modify the file Maven decides it needs to re-download the file which just generates the issue again. Is there any tips or tricks to get around this? Nevermind maven doesn't re-download unless I remove things I'm not supposed to.

But I still am having issues having Ignition find this Class in order to execute my script.

```auto
Traceback (most recent call last):
  File "<buffer>", line 61, in <module>
  File "<buffer>", line 23, in getParseDataset
	at org.apache.poi.POIXMLDocumentPart.<clinit>(POIXMLDocumentPart.java:59)

	at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:86)

	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

	at java.lang.reflect.Method.invoke(Unknown Source)

java.lang.NoClassDefFoundError: java.lang.NoClassDefFoundError: org/apache/xmlbeans/XmlOptions

```

> [@Apache POI and XMLBeans](http://forum.inductiveautomation.com/t/apache-poi-and-xmlbeans/7127):
>
> I am trying to use Apache POI and have successfully made a module. When I tried using some of the classes I received a java.lang.ClassNotFoundException: org.apache.xmlbeans.XmlException error message. I then made a module for Apache’s XMLBeans, but now when I try launching the designer I receive a message about a duplicate class. Can someone please help me with how to get either POI to work without XMLBeans or how to get XMLBeans in the gateway without conflicting with the existing classes? T…

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [March 29, 2019, 3:16pm UTC](https://forum.inductiveautomation.com/t/xmlbeans-jar-file-issue/23708/2 "2019-03-29T15:16:04Z")

</div>

What issue are you having exactly? Do you have a custom module that includes poi and/or other jars?

---

<div class="post-metadata">

**Author:** ![grietveld](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/grietveld/32/6984_2.png) [@grietveld](https://forum.inductiveautomation.com/u/grietveld)\
**Post date:** [March 29, 2019, 3:38pm UTC](https://forum.inductiveautomation.com/t/xmlbeans-jar-file-issue/23708/3 "2019-03-29T15:38:38Z")

</div>

As of now the module is just being built so that we can import the poi libraries to import excel files for a project. I managed to get version 4.0.1 to work, but poi is used for reporting module, and having the multiple versions seemed to cause some troubles.

I’m back to trying to use 3.14, but then it still is saying it can’t find the xmlbeans class even though the jar is included in the module.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [March 29, 2019, 3:49pm UTC](https://forum.inductiveautomation.com/t/xmlbeans-jar-file-issue/23708/4 "2019-03-29T15:49:24Z")

</div>

Can you attach your module? And/or another error? The one you posted originally must be from attempting to use a newer version of poi.

---

<div class="post-metadata">

**Author:** ![grietveld](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/grietveld/32/6984_2.png) [@grietveld](https://forum.inductiveautomation.com/u/grietveld)\
**Post date:** [March 29, 2019, 3:55pm UTC](https://forum.inductiveautomation.com/t/xmlbeans-jar-file-issue/23708/5 "2019-03-29T15:55:57Z")

</div>

That error should be from trying to use 3.14, but I am getting the following error after I switched from using poi-ooxml-schemas to ooxml-schemas as one post I read suggested. Haven’t looked into this one much yet though.

```auto
Jython 2.5.3 (v2.5.3:3d2dbae23c52+, Nov 17 2012, 11:51:23) 
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.8.0_201

>>> 
Java Traceback:

	at org.python.core.Py.JavaError(Py.java:495)

	at org.python.core.Py.JavaError(Py.java:488)

	at org.python.core.PyReflectedFunction. __call__ (PyReflectedFunction.java:188)

	at org.python.core.PyReflectedFunction. __call__ (PyReflectedFunction.java:204)

	at org.python.core.PyObject. __call__ (PyObject.java:387)

	at org.python.core.PyObject. __call__ (PyObject.java:391)

	at org.python.pycode._pyx4.getParseDataset$2(<buffer>:41)

	at org.python.pycode._pyx4.call_function(<buffer>)

	at org.python.core.PyTableCode.call(PyTableCode.java:165)

	at org.python.core.PyBaseCode.call(PyBaseCode.java:301)

	at org.python.core.PyFunction.function ___call__ (PyFunction.java:376)

	at org.python.core.PyFunction. __call__ (PyFunction.java:371)

	at org.python.core.PyFunction. __call__ (PyFunction.java:361)

	at org.python.pycode._pyx4.f$0(<buffer>:43)

	at org.python.pycode._pyx4.call_function(<buffer>)

	at org.python.core.PyTableCode.call(PyTableCode.java:165)

	at org.python.core.PyCode.call(PyCode.java:18)

	at org.python.core.Py.runCode(Py.java:1275)

	at org.python.core.Py.exec(Py.java:1319)

	at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:215)

	at org.python.util.InteractiveInterpreter.runcode(InteractiveInterpreter.java:89)

	at org.python.util.InteractiveInterpreter.runsource(InteractiveInterpreter.java:70)

	at com.inductiveautomation.ignition.designer.gui.tools.jythonconsole.JythonConsole$InterpreterWorker.doInBackground(JythonConsole.java:476)

	at com.inductiveautomation.ignition.designer.gui.tools.jythonconsole.JythonConsole$InterpreterWorker.doInBackground(JythonConsole.java:464)

	at javax.swing.SwingWorker$1.call(Unknown Source)

	at java.util.concurrent.FutureTask.run(Unknown Source)

	at javax.swing.SwingWorker.run(Unknown Source)

	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

	at java.lang.Thread.run(Unknown Source)

Caused by: org.apache.poi.POIXMLException: java.lang.reflect.InvocationTargetException

	at org.apache.poi.POIXMLFactory.createDocumentPart(POIXMLFactory.java:65)

	at org.apache.poi.POIXMLDocumentPart.read(POIXMLDocumentPart.java:601)

	at org.apache.poi.POIXMLDocument.load(POIXMLDocument.java:174)

	at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:249)

	at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:211)

	at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:170)

	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

	at java.lang.reflect.Method.invoke(Unknown Source)

	at org.python.core.PyReflectedFunction. __call__ (PyReflectedFunction.java:186)

	... 27 more

Caused by: java.lang.reflect.InvocationTargetException

	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

	at java.lang.reflect.Constructor.newInstance(Unknown Source)

	at org.apache.poi.xssf.usermodel.XSSFFactory.createDocumentPart(XSSFFactory.java:56)

	at org.apache.poi.POIXMLFactory.createDocumentPart(POIXMLFactory.java:62)

	... 37 more

Caused by: java.lang.NoSuchMethodError: org.apache.xmlbeans.XmlOptions.setLoadEntityBytesLimit(I)Lorg/apache/xmlbeans/XmlOptions;

	at org.apache.poi.POIXMLTypeLoader.<clinit>(POIXMLTypeLoader.java:50)

	at org.apache.poi.xssf.model.ThemesTable.<init>(ThemesTable.java:85)

	... 43 more

Traceback (most recent call last):
  File "<buffer>", line 61, in <module>
  File "<buffer>", line 23, in getParseDataset
	at org.apache.poi.POIXMLFactory.createDocumentPart(POIXMLFactory.java:65)

	at org.apache.poi.POIXMLDocumentPart.read(POIXMLDocumentPart.java:601)

	at org.apache.poi.POIXMLDocument.load(POIXMLDocument.java:174)

	at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:249)

	at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:211)

	at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:170)

	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

	at java.lang.reflect.Method.invoke(Unknown Source)

org.apache.poi.POIXMLException: org.apache.poi.POIXMLException: java.lang.reflect.InvocationTargetException

```

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [March 29, 2019, 3:57pm UTC](https://forum.inductiveautomation.com/t/xmlbeans-jar-file-issue/23708/6 "2019-03-29T15:57:02Z")

</div>

It seems like all the other libraries your’e trying to use are depending on a newer version of POI than you have available to you.

For example, `POIXMLDocumentPart` doesn’t exist in poi 3.14.

---

<div class="post-metadata">

**Author:** ![grietveld](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/grietveld/32/6984_2.png) [@grietveld](https://forum.inductiveautomation.com/u/grietveld)\
**Post date:** [March 29, 2019, 3:57pm UTC](https://forum.inductiveautomation.com/t/xmlbeans-jar-file-issue/23708/7 "2019-03-29T15:57:41Z")

</div>

As for the module, its too big to upload, but here are the main parts.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/b/bfd15ce5ecf2d78ece178ff63737a47d8edd24ec.png)

[module.xml](https://us1.discourse-cdn.com/inductiveautomation/original/2X/6/64df90709eebf098b943b107f6d057c005fed21e.xml) (1.4 KB)

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [March 29, 2019, 4:17pm UTC](https://forum.inductiveautomation.com/t/xmlbeans-jar-file-issue/23708/8 "2019-03-29T16:17:48Z")

</div>

This stuff is hard to troubleshoot. Nothing looks wrong with your module contents, but I couldn’t say for sure if everything that’s supposed to be there is actually there, and if all your dependencies are present and sane.

You might be able to use mavens dependency plugin to analyze what your dependencies are and compare them to what’s in the module. Use `mvn dependency:list` or `mvn dependency:analyze`.

Also just sanity check and look for the class that’s supposedly missing among the jar files being included.

---

<div class="post-metadata">

**Author:** ![grietveld](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/grietveld/32/6984_2.png) [@grietveld](https://forum.inductiveautomation.com/u/grietveld)\
**Post date:** [March 29, 2019, 4:21pm UTC](https://forum.inductiveautomation.com/t/xmlbeans-jar-file-issue/23708/9 "2019-03-29T16:21:12Z")

</div>

Thanks for the pointers at least. Wasn’t sure if I was missing something blatantly obvious since I’m finding my way around Maven and some of these libraries a bit.

---

<div class="post-metadata">

**Author:** ![grietveld](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/grietveld/32/6984_2.png) [@grietveld](https://forum.inductiveautomation.com/u/grietveld)\
**Post date:** [March 29, 2019, 4:45pm UTC](https://forum.inductiveautomation.com/t/xmlbeans-jar-file-issue/23708/10 "2019-03-29T16:45:07Z")

</div>

I think that last issue was because I had poi-ooxml-schemas and ooxml-schemas. I switched back to just poi-ooxml-schemas, followed by a clean and invalidate caches and it looks like I’m up and running.
