[Pdl] java 17 compatibility

Fee, Jeremy M jmfee at usgs.gov
Wed Dec 8 21:01:39 UTC 2021


Hello,

We received a report of errors running PDL with Java 17 when connecting to an EIDS-based hub (prod01-pdl01 or prod02-pdl01).  An example stack trace is included below.


To work around this issue in the short term, you can add an "--add-opens java.base/java.lang=ALL-UNNAMED" argument to the command line used to start PDL.  This argument should appear before "-jar":

java --add-opens java.base/java.lang=ALL-UNNAMED -jar ProductClient.jar --configFile=config.ini --receive


Example stack trace:
[Info] Connecting to server at 'prod01-pdl01.cr.usgs.gov:39977'
[Warning] Connection init error:  Error creating CORBA ORB or POA:  org.omg.CORBA.INITIALIZE: Unable to initialize orb loader (java.lang.ExceptionInInitializerError)
org.omg.CORBA.INITIALIZE: Unable to initialize orb loader (java.lang.ExceptionInInitializerError)
        at org.openorb.orb.core.ORB.set_parameters(ORB.java:1127)
        at org.omg.CORBA.ORB.init(ORB.java:296)
        at com.isti.openorbutil.OrbManager.initImplementation(OrbManager.java:260)
        at com.isti.openorbutil.OrbManager.initImplementation(OrbManager.java:311)
        at com.isti.quakewatch.util.QWCorbaConnector$EventChannelConnectThread.connect(QWCorbaConnector.java:1311)
        at com.isti.quakewatch.util.QWCorbaConnector$EventChannelConnectThread.run(QWCorbaConnector.java:1197)
Caused by: java.lang.ExceptionInInitializerError
        at org.openorb.orb.config.OpenORBLoader.<clinit>(OpenORBLoader.java:64)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
        at java.base/java.lang.reflect.ReflectAccess.newInstance(ReflectAccess.java:128)
        at java.base/jdk.internal.reflect.ReflectionFactory.newInstance(ReflectionFactory.java:347)
        at java.base/java.lang.Class.newInstance(Class.java:645)
        at org.openorb.orb.core.ORB.set_parameters(ORB.java:1121)
        ... 5 more
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @724b93a8
        at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
        at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
        at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)
        at java.base/java.lang.reflect.Method.setAccessible(Method.java:193)
        at org.openorb.util.urlhandler.HandlerLoader.<clinit>(HandlerLoader.java:43)
        ... 14 more
INFO    thread=1        Started
[Info] Reinitializing connection to server



Thanks,

--

Jeremy Fee (he/him)
Computer Scientist
USGS Geologic Hazards Science Center, Golden, CO









More information about the PDL mailing list