[jacorb-developer] Making JacORB work for Java 11

Tredinnick, Jacob jacob_tredinnick at mentor.com
Thu Dec 6 20:34:57 CET 2018


Fredrik,

Thanks very much for confirming this!

I got your demonstration working and fixed the problem in our build scripts (I had missed some of the dependencies of course!).
Tests are currently running and initial results look good.

It is probably worth noting (for anyone else searching for the exception), that putting the following in the classpath:
jboss-rmi-api_1.0_spec-1.0.6.Final.jar

Will fix a start-up exception like:
Exception in thread "Thread-7" java.lang.NoClassDefFoundError: javax/rmi/CORBA/Stub
     at java.base/java.lang.ClassLoader.defineClass1(Native Method)
     at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:994)
     at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
     at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:801)
     at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:699)
     at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:622)
     at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:580)
     at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
     at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
     at org.jacorb.orb.ORB.getReference(ORB.java:1243)
     at org.jacorb.poa.POA.getReference(POA.java:1349)
     at org.jacorb.poa.POA.create_reference_with_id(POA.java:961)
     at org.jacorb.naming.NameServer.main(NameServer.java:315)
   ... <Your app> ...
Caused by: java.lang.ClassNotFoundException: javax.rmi.CORBA.Stub
     at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
     at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
     at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
     ... 14 more

(The other dependencies described in the previous messages are also needed of course).

Thanks again for your help!

Jacob Tredinnick

------------------------------

Message: 2
Date: Wed, 5 Dec 2018 20:28:46 +0100
From: Fredrik ?hrstr?m <oehrstroem at gmail.com>
To: jacorb-developer at lists.spline.inf.fu-berlin.de
Subject: Re: [jacorb-developer] Making JacORB work for Java 11
Message-ID:
	<CALZT+jDK5hLu0omzWO14bQhTc0HVDSsTi4Rb9bfs0mHnU224AA at mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"

On Wed, Dec 5, 2018 at 1:11 PM Tredinnick, Jacob < jacob_tredinnick at mentor.com> wrote:

> Can you please comment on whether linking the jars above will work for 
> Java *11*?
>

I tried with openjdk11 for linux downloaded from here:
https://jdk.java.net/11/
A trivial test seems to be working. (I also noticed that jaco does not work on the latest Ubuntu, unles you replace #!/bin/sh with #!/bin/bash)

You can clone the test code here:
https://github.com/weetmuts/CorbaExperiments
put java/javac11 in your path and do: 2make", "make server" and in a different window "make client".

//Fredrik


------------------------------

_______________________________________________
jacorb-developer maillist  -  jacorb-developer at lists.spline.inf.fu-berlin.de
https://lists.spline.inf.fu-berlin.de/mailman/listinfo/jacorb-developer


End of jacorb-developer Digest, Vol 183, Issue 1
************************************************


More information about the jacorb-developer mailing list