I'm trying to use Apache POI (3.10 or 3.15) with XpertIvy Designer v5.0.18 and I'm getting the following exception:
I saw a few older threads (POI conflicted xmlbeans.jar [2014] or what is axis lib used for [2015]) regarding this issue. Is it really true that you still have to hack the designer plugins folder and some server folder too??? asked 11.11.2016 at 14:33 Oliver |
In short: The hack is no longer required. Since 6.6.1 POI can be used in a project without any library conflicts at runtime. Axon.ivy 6.6.1 and younger These kinds of JAR hell issues are gone from 6.6.1 upwards. In the Designer many libraries were removed from the Axon.ivy Classpath container. Practically this means that The Engine is now also delivered as OSGI version. This means that the proper ClassLoader isolation per Bundle behaves as it does in the Designer. So a huge runtime behavior difference is gone since 6.6.1. The OSGI Engine will become the default version of the Engine. We do not plan to support the OS specific packages any longer due its classloading shortcomings. But for a short time we still release the alternative packages that can be used if you face migration issues. Axon.ivy 6.5.0 and older The ugly workaround is still required.
answered 14.11.2016 at 08:52 Reguel Werme... ♦♦ |
You could try to work around the problem by setting a ThreadContextClassloader in the area where you access POI code.
Maybe this makes engine and designer hacks obsolete. answered 18.11.2016 at 15:11 Reguel Werme... ♦♦ Once again it's been a while until I found some time to test your workaround, sorry. I've tried it with the newest POI 3.16 (poi, poi-ooxml, poi-ooxml-schemas, poi-scratchpad jar files on the build path) but it didn't work out. I've put the logic to create a word file into a seperate class file (not inside an ivy script block etc). Inside the constructor I've added the try / catch block you noted. The failing expression is XWPFDocument doc = new XWPFDocument();. Any other ideas?
(30.05.2017 at 10:43)
Oliver
The latest Axon.ivy 6.6.1 can run and isolate your POI libraries without any additional hacking. So you could plan a migration. The only way out for 5.0 is to repackage POI and all its dependencies into one FAT-JAR that contains all classes to run it. There are several tools that support repackaging. See http://repackage.org. But unfortunately google already lists some forum posts of users that failed to repackage POI.
(31.05.2017 at 09:20)
Reguel Werme... ♦♦
|
Once you sign in you will be able to subscribe for any updates here
By RSS:Markdown Basics
Tags:
Asked: 11.11.2016 at 14:33
Seen: 4,995 times
Last updated: 01.06.2017 at 02:46