PROBLEM
If an ArcObjects SDK for Java Server Object Extension (SOE) or Server Object Interceptor (SOI) references certain Java APIs that are present in JDK 8, but removed in later JDK releases, such as classes in the 'java.xml.ws', 'java.corba', or 'java.transaction' modules, accessing the service’s endpoint that triggers the SOE’s or SOI’s code referencing classes from these modules may result in an error message. The following severe level messages appear in server logs:
Level | Time | Message | Source |
---|---|---|---|
SEVERE | Jul 1, 2021, 10:03:03 AM | Instance of service 'USA.MapServer' failed to process a request. AutomationException: sun/misc/BASE64Encoder | USA.MapServer |
SEVERE | Jul 1, 2021, 10:03:00 AM | Instance of service 'USA.MapServer' failed to process a request. AutomationException: org/omg/CORBA/StringHolder | USA.MapServer |
SEVERE | Jul 1, 2021, 10:02:57 AM | Instance of service 'USA.MapServer' failed to process a request. AutomationException: javax/xml/ws/Service$Mode | USA.MapServer |
The SOE or SOI project can be built successfully, and there is no compile error. The issue can only be seen during runtime when the SOE or SOI is deployed to ArcGIS Server in 10.7 or later versions.
Since ArcGIS Server 10.7, the service runtime that powers ArcMap-based services has been upgraded from Java 8 to Java 11, even though ArcObjects Java SOEs and SOIs are still required to be built with JDK 8. Therefore, in 10.7 or later versions of ArcGIS Server, the Java classes that were removed from JDK 11 but referenced in an ArcObjects SOE or SOI are not loaded automatically by the service runtime running on Java 11, as with previous versions of ArcGIS Server.
To view the list of the Java modules that are removed in JDK 11, see Removal of Java EE and CORBA Modules
If your ArcObjects Java SOE or SOI used to work before ArcGIS Server 10.7, but you start seeing similar issues in later versions of ArcGIS Server, first confirm that the Java class reported in the log message is from a Java module that is removed from JDK 11. Once this is confirmed, there are two options to proceed:
Option 1: Add the JAR files of the Java modules removed from JDK 11 as dependencies in your SOE or SOI project and export the SOE or SOI with dependencies
Refer to How to export Java SOEs with dependencies for step-by-step instructions on packaging third-party dependencies in an SOE or SOI. In this way, the service runtime can load the Java classes from the JAR file packaged in the SOE or SOI, which should resolve the issue.
Option 2: Migrate ArcObjects SOE or SOI to be compiled with Enterprise SDK
Since Enterprise SDK supports building Java SOEs and SOIs with JDK 11 for ArcGIS Pro-based services, you can also migrate your ArcObjects SOE or SOI to be built with Enterprise SDK. To use the classes from the Java modules removed from JDK 11, you must add those modules as third-party dependencies in your SOE or SOI project. Otherwise, your SOE or SOI project fails to be compiled, and the Java compiler prompts error messages for those classes that are not present in JDK 11, unless relevant dependencies are added. This helps to detect this Java class loading issue during compile time rather than runtime.
Article ID: 000026040
Get help from ArcGIS experts
Download the Esri Support App