https://bz.apache.org/bugzilla/show_bug.cgi?id=61478

--- Comment #30 from Andrey Kulikov <[email protected]> ---
Colleagues, this fix caused a problem on WebLogic server.

1. WebLogic has own classloaders hierarchy:
https://docs.oracle.com/cd/E24329_01/web.1211/e24368/classloading.htm#WLPRG323 
2. WebLogic Java process starts with own implementation of XMLBeans: WebLogic
10.3.6 uses XmlBeans 2.2.0 and 2.5.0 for internal purposes. This dependency is
loaded by system classloader and used in child classloaders if it is not
overridden explicitly. To make POI 3.17 work I had to add XMLBeans 2.6.0 to
system classpath before WebLogic's dependencies.
2. Shared libraries for all web applications are placed in /lib directory.
These libs are loaded by application classloader. I placed POI here (poi.jar,
poi-ooxml.jar, ooxml-schemas.jar). 
3. Web applications are loaded by WebLogic classloaders. 

As a result, POIXMLTypeLoader creates SchemaTypeLoader using system classloader
(which loaded XmlBeans), but lib with schemas (ooxml-schemas.jar) loaded by
application classloader. System classloader doesn't have access to JARs loaded
by application classloader which causes invalid XML generation for Word
documents. 

Solution is simple: add all POI-related libs to system classpath, but it took
me a lot of time to understand root cause of the problem.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to