I am trying to execute my application of java 11 (openjdk) with jacorb 3.9.The application starts executing but crashes complaining about missing :
javax.rmi.CORBA.Stub
I have included all jacorb libraries in the CLASSPATH
set CLASSPATH = ${JACORB_PATH}/jacorb.jar:${CLASSPATH}
set CLASSPATH = ${JACORB_PATH}/jacorb-3.9.jar:${CLASSPATH}
set CLASSPATH = ${JACORB_PATH}/jacorb-omgapi.jar:${CLASSPATH}
set CLASSPATH = ${JACORB_PATH}/slf4j-api.jar:${CLASSPATH}
set CLASSPATH = ${JACORB_PATH}/slf4j-jdk14-1.7.14.jar:${CLASSPATH}
set CLASSPATH = ${JACORB_PATH}/jacorb-services.jar:${CLASSPATH}
set CLASSPATH = ${JACORB_PATH}/picocontainer.jar:${CLASSPATH}
set CLASSPATH = ${JACORB_PATH}/wrapper.jar:${CLASSPATH}
set CLASSPATH = ${JACORB_PATH}/antlr.jar:${CLASSPATH}
set CLASSPATH = ${JACORB_PATH}/idl.jar:${CLASSPATH}
When executing , I get this:
java.lang.reflect.InvocationTargetException
...
Caused by: java.lang.ClassNotFoundException: javax.rmi.CORBA.Stub
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
I have tried also to set up the JDK_JAVA_OPTIONS with:
--module-path ${JACORB_PATH} --add-modules java.corba
-Dorg.omg.CORBA.ORBClass=org.jacorb.orb.ORB -Dorg.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORBSingleton
But complains about "Two versions of module slf4j.jdk14 found"
The command for executing the program is:
java -classpath $CLASSPATH myprog.MYPROG
The application was originally written for Java 8 and working OK with jacorb passing the following parameters to java command:
-Djava.endorsed.dirs=JACORB_PATH
-Dorg.omg.CORBA.ORBClass=org.jacorb.orb.ORB
-Dorg.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORBSingleton
The application does not use rmi at all. It is a 'classic' CORBA client. It crashes when trying to resolve the initial reference of the naming Service
It seems that the issue have been raised on the project mailing list. A workaround is to add on the classpath next to jacorb-3.8.jar and the sfl4j jars these 2: