Summary: | Java error message showed when deploying to AIX environment. | ||
---|---|---|---|
Product: | POI | Reporter: | henry.sze |
Component: | POI Overall | Assignee: | POI Developers List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | ||
Priority: | P2 | ||
Version: | 3.9-FINAL | ||
Target Milestone: | --- | ||
Hardware: | Other | ||
OS: | AIX | ||
Attachments: |
List of included JAR files ; Error prompt in WebLogic 12c
JVM version and vendor using in Windows and AIX |
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. Created attachment 31651 [details]
JVM version and vendor using in Windows and AIX
Please find attached the screen showing the JVM difference in both environment. Seems there is not exact matched JVM version provided by IBM. See https://builds.apache.org/view/POI/job/POI-JDK-IBM/7/console for the same on the Apache Jenkins instance. 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... After I swapped out Oracle 1.8 for openjdk openj9 1.8, my build is failing from this problem. openjdk version "1.8.0_192" OpenJDK Runtime Environment (build 1.8.0_192-b12) Eclipse OpenJ9 VM (build openj9-0.11.0, JRE 1.8.0 Windows 10 amd64-64-Bit Compressed References 20181019_105 (JIT enabled, AOT enabled) OpenJ9 - 090ff9dc OMR - ea548a66 JCL - 51609250b5 based on jdk8u192-b12) Exception in thread "main" java.lang.RuntimeException: java.lang.NoSuchFieldException: classes [java] [java] [java] at org.apache.poi.ooxml.util.OOXMLLite$2.run(OOXMLLite.java:340)OK (2473 tests) [java] [java] at org.apache.poi.ooxml.util.OOXMLLite$2.run(OOXMLLite.java:331) [java] [java] at java.security.AccessController.doPrivileged(AccessController.java:647) [java] at org.apache.poi.ooxml.util.OOXMLLite.getLoadedClasses(OOXMLLite.java:331)Copying classes to poi-trunk2\build\ooxml-lite-classes [java] [java] at org.apache.poi.ooxml.util.OOXMLLite.build(OOXMLLite.java:196) [java] at org.apache.poi.ooxml.util.OOXMLLite.main(OOXMLLite.java:107) [java] Caused by: java.lang.NoSuchFieldException: classes [java] at java.lang.Class.getDeclaredField(Class.java:820) [java] at org.apache.poi.ooxml.util.OOXMLLite$2.run(OOXMLLite.java:336) [java] ... 5 more |
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 ?