From ian.roberts at microfocus.com Wed Apr 26 18:01:29 2023 From: ian.roberts at microfocus.com (Ian Roberts) Date: Wed, 26 Apr 2023 16:01:29 +0000 Subject: [jacorb-developer] JacORB 3.9 and JDK11: issues with jboss-rmi-api_1.0_spec-1.0.6.Final.jar Message-ID: I've been working on running JacORB 3.9 under JDK11 onwards, and have run into the same main issue that everyone else has -- that the javax.rmi package has been removed from the JDK. The JBoss RMI implementation looks to be the easiest approach, and definitely seems to work for some people: https://lists.spline.inf.fu-berlin.de/pipermail/jacorb-developer/2018-November/000936.html However, jboss-rmi-api_1.0_spec-1.0.6.Final.jar isn't working for me for two reasons. (1) The org.jboss.com.sun.corba.se.impl.javax.rmi.CORBA.Util class imports three exceptions from javax.transaction: InvalidTransactionException, TransactionRequiredException and TransactionRolledbackException. The javax.transaction package has also been removed from JDK11 onwards, and while there are replacement implementations, I've not seen anyone else mention this as an additional requirement. (2) The org.jboss.sun.corba.Bridge class makes a call to an inner class of sun.reflect.ReflectionFactory that's no longer public: reflectionFactory = (ReflectionFactory) AccessController .doPrivileged(new ReflectionFactory.GetReflectionFactoryAction()); In JDK8, this inner class is public and thus accessible, but it's no longer public in JDK11 and above. There's an issue on GitHub from 2016 about this: https://github.com/jboss/jboss-rmi-api_spec/issues/4 It should be possible to deal with both of these: For (1), the Util class either needs a replacement javax.transaction implementation or could handle the three exceptions differently. For (2), the Bridge class could instead use jdk/internal/reflect/ReflectionFactory$GetReflectionFactoryAction. The second point is a definite blocker, and (since RMI-IIOP seems to be a legacy technology with very little uptake) an alternative would be to remove RMI-IIOP support going forward. I'd much prefer to keep the functionality unchanged, though, and the JBoss RMI implementation seems to be very close to what's needed. My concern is that I'm seeing issues that I haven't seen reported by anyone else, and I'm wondering if I'm missing something.