SAS 9.4 M8 Java 11 and CORBA

Recently I was trying to run some custom Java code using the latest SAS 9.4 M8 libraries with Java 11 and ran into a unexpected exception:

java.lang.NoClassDefFoundError: org/omg/CORBA/Object

This was a surprise as CORBA underpins the SAS 9.4 IOM servers and their APIs (like the SAS Metadata Server and SAS Workspace Server). My code worked fine with SAS 9.4 M7 and so I assumed it must be related to the switch to Java 11 in SAS 9.4 M8 and there must be a way to get it working again.

I searched up Java 11 and CORBA, and as one often does, landed on a StackOverflow page: https://stackoverflow.com/questions/13517497/java-lang-noclassdeffounderror-org-omg-corba-interfacedef

One of the answers explained that the CORBA libraries were deprecated in Java 9 and 10 and then dropped in Java 11. It also included a Java 11 solution to download and use 5 GlassFish CORBA JAR files. The thing that really caught my eye though was a link to a SAS Problem Note containing the same info. You don’t see links to SAS notes everyday on StackOverflow!

Problem Note 63716: The error “java.lang.NoClassDefFoundError: org/omg/CORBA/UserException” occurs in custom applications when you upgrade or change Java versionshttp://support.sas.com/kb/63/716.html

I would add to that info to say that you can also find those JAR files in the SAS Versioned JAR Repository (VJR) where you have SAS 9.4 M8 software installed. If you have been developing custom SAS applications in Java then you are probably familiar with the SAS VJR – a shared collection of JAR files and dependencies that the various Java based SAS applications use via their picklists (I’d like to find our more about picklists but have yet to find any documentation on them).

I found all of the 5 GlassFish CORBA JAR files in my SAS 9.4 M8 installation in the following locations:

  • /opt/sas94m8/sashome/SASVersionedJarRepository/eclipse/plugins/glassfish-corba_4.2.4.0_SAS_20210813131912/glassfish-corba-orb.jar
  • /opt/sas94m8/sashome/SASVersionedJarRepository/eclipse/plugins/glassfish-corba_4.2.4.0_SAS_20210813131912/glassfish-corba-internal-api.jar
  • /opt/sas94m8/sashome/SASVersionedJarRepository/eclipse/plugins/glassfish-corba_4.2.4.0_SAS_20210813131912/glassfish-corba-omgapi.jar
  • /opt/sas94m8/sashome/SASVersionedJarRepository/eclipse/plugins/glassfish-pfl_4.1.2.0_SAS_20210813130217/pfl-basic.jar
  • /opt/sas94m8/sashome/SASVersionedJarRepository/eclipse/plugins/glassfish-pfl_4.1.2.0_SAS_20210813130217/pfl-tf.jar

These JARs seem to be new in the SAS 9.4 M8 VJR and are not present in the SAS 9.4 M7 VJR I have to hand. This makes sense as SAS 9.4 M8 uses Java 11 (without CORBA) and SAS 9.4 M7 uses Java 8 (with CORBA).

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.