# Usage of Apache POI 4.1.0 with xmlbeans-3.1.0

**URL:** <https://forum.katalon.com/t/usage-of-apache-poi-4-1-0-with-xmlbeans-3-1-0/48566>\
**Category:** Web Testing\
**Tags:** runtime-engine, katalon-studio\
**Created:** [October 23, 2020, 3:43am UTC](https://forum.katalon.com/t/usage-of-apache-poi-4-1-0-with-xmlbeans-3-1-0/48566 "2020-10-23T03:43:59Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![stjobiwtc](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/stjobiwtc/32/16103_2.png) [@stjobiwtc](https://forum.katalon.com/u/stjobiwtc)\
**Post date:** [October 23, 2020, 3:43am UTC](https://forum.katalon.com/t/usage-of-apache-poi-4-1-0-with-xmlbeans-3-1-0/48566/1 "2020-10-23T03:43:59Z")

</div>

Katalon Studio / Runtime Engine version : 7.7.2

Scenario/Background :

Currently I am using poi-4.1.0 for output some test evidence to Excel file.  
In order to use poi-4.1.0, instead of importing via Gradle or external library in project’s setting, I cloned the jar file to \Katalon\_Studio\_7.7.2\configuration\resources\lib and remove the following dependencies that are related to poi-3.17 as I am intended to use the newer version :

- poi-3.17.jar
- poi-ooxml-3.17.jar
- poi-ooxml-schemas-3.17.jar
- xmlbeans-2.6.0.jar. ( For poi-4.1.0, it needs xmlbeans-3.1.0.jar instead. )

I have to delete the above jars, otherwise when I use any class from poi such like XSSFWorkbook, it will keep referring the class from poi-3.17.

Issue :

I can use poi-4.1.0 without any issue in Katalon Studio after importing the dependencies like above.  
However, when I tried to run my test suite with Katalon Runtime Engine, it ran into the following error :

java.lang.NNoSuchMethodError : org.apache.xmlbeans.XmlOptions.setEntityExpansionLimit

I did some investigation and realize that it is because such method is not existed in org.apache.xmlbeans-2.6.0 which comes along with Katalon Studio and Katalon Runtime Engine ( in the \Katalon\_Studio\_7.7.2\plugins folder. )

Seems that in Katalon Runtime Engine’s case, the org.apache.xmlbeans-2.6.0 will be loaded before the xmlbeans-3.1.0 that I imported manually. ( Katalon Studio has different class paths loading precedence than Runtime Engine. )

I once tried replacing the xmlbeans in Katalon Runtime Engine with the newer version, but that breaks the engine itself.

Tagging @devalex88 @ThanhTo  
Is there any way that we can manage the dependency precedence if we want to use some depedencies that are also used by Katalon Runtime Engine ? or perhaps a workaround ?

---

<div class="post-metadata">

**Author:** ![ThanhTo](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/thanhto/32/697_2.png) [@ThanhTo](https://forum.katalon.com/u/ThanhTo)\
**Post date:** [October 23, 2020, 4:38am UTC](https://forum.katalon.com/t/usage-of-apache-poi-4-1-0-with-xmlbeans-3-1-0/48566/2 "2020-10-23T04:38:30Z")

</div>

Hi @stjobiwtc

Currently we’re working on the feature to allow you to exclude certain libraries from KSE/KRE and include your own. I will keep you updated when it’s out.

---

<div class="post-metadata">

**Author:** ![Jass](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/jass/32/9588_2.png) [@Jass](https://forum.katalon.com/u/Jass)\
**Post date:** [March 1, 2021, 3:59am UTC](https://forum.katalon.com/t/usage-of-apache-poi-4-1-0-with-xmlbeans-3-1-0/48566/3 "2021-03-01T03:59:35Z")

</div>

Assigned @duyluong on March 1, 2021, 3:59am UTC



---

<div class="post-metadata">

**Author:** ![stjobiwtc](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/stjobiwtc/32/16103_2.png) [@stjobiwtc](https://forum.katalon.com/u/stjobiwtc)\
**Post date:** [June 4, 2021, 4:35am UTC](https://forum.katalon.com/t/usage-of-apache-poi-4-1-0-with-xmlbeans-3-1-0/48566/4 "2021-06-04T04:35:30Z")

</div>

@Brandon_Hein

Thank you for bringing this thread up again.  
Recently I came back to this issue and see if the new library management feature can solve it.  
Unfortunately seems the issue still persists.  
Seems the library excluding feature only replaces the dependencies from  
**/Katalon\_Studio\_X.X.X/configuration/resources/lib/**.  
In this case the xmlbeans\_2.6.0.jar exists under these paths **/Katalon\_Studio\_X.X.X/plugins/org.apache.xmlbeans-2.6.0.jar**.  
/Katalon\_Studio\_X.X.X/configuration/resources/lib/xmlbeans-2.6.0.jar"

In KRE, seems the dependencies under **/plugins** will be loaded before **/resources/lib** , which causes the xmlbeans-3.1.0.jar not being referred.

---

<div class="post-metadata">

**Author:** ![oussama.naffati](https://avatars.discourse-cdn.com/v4/letter/o/ecc23a/32.png) [@oussama.naffati](https://forum.katalon.com/u/oussama.naffati)\
**Post date:** [August 17, 2021, 1:26pm UTC](https://forum.katalon.com/t/usage-of-apache-poi-4-1-0-with-xmlbeans-3-1-0/48566/5 "2021-08-17T13:26:16Z")

</div>

Hello,  
Have you please a news about this feature ?  
Thank you

---

<div class="post-metadata">

**Author:** ![ThanhTo](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/thanhto/32/697_2.png) [@ThanhTo](https://forum.katalon.com/u/ThanhTo)\
**Post date:** [August 18, 2021, 2:20am UTC](https://forum.katalon.com/t/usage-of-apache-poi-4-1-0-with-xmlbeans-3-1-0/48566/6 "2021-08-18T02:20:19Z")

</div>

Hi there, in KS we already implemented the feature that allows you to exclude built-in libraries so that there’s no conflict with the libraries that you manually add

> **[Libraries Management](https://docs.katalon.com/katalon-studio/docs/external-libraries.html#exclude-built-in-libraries)**
>
> Katalon Studio allows using external Java .jar libraries either through project settings or adding them to a designated folder. You can leverage this to extend the capabilities of Katalon Studio...

---

<div class="post-metadata">

**Author:** ![nurfatin\_1](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/nurfatin_1/32/23870_2.png) [@nurfatin\_1](https://forum.katalon.com/u/nurfatin_1)\
**Post date:** [November 22, 2023, 7:57am UTC](https://forum.katalon.com/t/usage-of-apache-poi-4-1-0-with-xmlbeans-3-1-0/48566/7 "2023-11-22T07:57:14Z")

</div>

can I use newer version of poi? when I disable poi-3.17.jar it causes error with katalon existing feature.
