Bug 56550 - Java error message showed when deploying to AIX environment.
Summary: Java error message showed when deploying to AIX environment.
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: POI Overall (show other bugs)
Version: 3.9-FINAL
Hardware: Other AIX
: P2 blocker (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-21 09:47 UTC by henry.sze
Modified: 2014-12-22 12:44 UTC (History)
0 users



Attachments
List of included JAR files ; Error prompt in WebLogic 12c (243.00 KB, application/msword)
2014-05-21 09:47 UTC, henry.sze
Details
JVM version and vendor using in Windows and AIX (200.00 KB, application/msword)
2014-05-23 02:58 UTC, henry.sze
Details

Note You need to log in before you can comment on or make changes to this bug.
Description henry.sze 2014-05-21 09:47:44 UTC
Created attachment 31644 [details]
List of included JAR files ; Error prompt in WebLogic 12c

Below steps will reproduce the problem :
1. Included the required XDocReport jar files (Including the "poi-ooxml-3.9.jar")in my JavaEE project and export to an EAR file.
2. Deployed the EAR file to WebLogic Server 12c on the AIX.
3. Update the EAR and start the project as an application on WebLogic Server 12c.

Expected: The project is started and state is "Active".
Actual: Java error showed "java.lang.NoSuchFieldException: classes"

- Seems there is no problem if the same EAR is deployed to WebLogic Server 12c in Windows environment.

- I further found the below error lines in WebLogic 12c's log files :

....
....
Caused By: java.lang.NoSuchFieldException: classes
	at java.lang.Class.getDeclaredFieldImpl(Native Method)
	at java.lang.Class.getDeclaredField(Class.java:599)
	at org.apache.poi.util.OOXMLLite.<clinit>(OOXMLLite.java:39)
	at java.lang.J9VMInternals.initializeImpl(Native Method)
	at java.lang.J9VMInternals.initialize(J9VMInternals.java:236)
	at java.lang.Class.forNameImpl(Native Method)
	at java.lang.Class.forName(Class.java:219)
....
....

Refer to line 4 >> at org.apache.poi.util.OOXMLLite.<clinit>(OOXMLLite.java:39)
I further found the "OOXMLLite.class" in "poi-ooxml-3.9.jar", and next I try to read the content with a decompiler and found some "classes" definition in the files which I guess maybe the cause of the error ?
Comment 1 Dominik Stadler 2014-05-21 11:48:22 UTC
Can you please describe which exact version of the JDK you are using on the two environments?

This might be related to IBM JDK being used on AIX by default. I have created and started a separate Jenkins run on IBM JDK to see if we can reproduce the problem with IBM JDK on Linux or really some AIX machine is needed to reproduce the problem.
Comment 2 henry.sze 2014-05-23 02:58:43 UTC
Created attachment 31651 [details]
JVM version and vendor using in Windows and AIX
Comment 3 henry.sze 2014-05-23 03:01:34 UTC
Please find attached the screen showing the JVM difference in both environment. 
Seems there is not exact matched JVM version provided by IBM.
Comment 4 Dominik Stadler 2014-12-22 12:21:30 UTC
See https://builds.apache.org/view/POI/job/POI-JDK-IBM/7/console for the same on the Apache Jenkins instance.
Comment 5 Dominik Stadler 2014-12-22 12:44:43 UTC
I have now adjust the code which fails to not try to access this field during static initialization of the class. This should prevent this case, however please note that compiling POI itself will still not work with IBM JDK as there we currently need this information for creating the Schema jars.

See https://builds.apache.org/view/POI/job/POI-JDK-IBM/ for the latest tries of compiling with IBM JDK which still fail.

I am closing this as the problem you reported should be fixed and full support for compiling POI with IBM JDK is not planned.

Please try with a nightly build that includes this fix to see if there are additional hurdles for running on IBM JDK, unfortunately we do not have good test environments for this available currently...