Installing jive on Debian Stretch

Hello,

we’re trying to get Tango up and running on a new Debian 9 system. However, jive does not seem to be in any of the packages listed in the manual:

http://tango-controls.readthedocs.io/en/latest/installation/tango-on-linux.html

Which is especially ironic since jive is referenced further down in the manual :-P.

The download link on http://tango-controls.readthedocs.io/en/latest/tools-and-extensions/jive/index.html also seems to be a dead-end. It goes to a bintray site that does not have any downloads.

What’s the recommended way to install jive on Debian 9 right now?

Cheers,
Marius

Hi Marius,

you are right this is not obvious! The Java based tools are not available as official Debian packages because of an long standing issue with the use of JacORB which has a licence which is not compatible with Debian. The licence will not be changed because it depends on some code from the OMG which it has stopped supporting i.e. will not change.

What I do on my laptop is to install the source code package of Tango which install jive and all the other java based tools as well. You can find the source code here: Download tango-9.2.5a.tar.gz (TANGO Control System)

I would still use the binary packages for the libraries and database server.

Providing binary Jive packages on bintray is on our TODO list. If someone wants to help us that would be great!

Andy

Well, the binaries are already on the bintray, look under files:

Jive 7.18

Download the jar-with-dependencies and run as following:


TANGO_HOST=localhost:10000 java -jar Jive-7.18-jar-with-dependencies.jar

Hi Marius,

You can also download the libtango-java Debian package available here: https://people.debian.org/~picca/libtango-java_9.2.5a-1_all.deb

You can then install it using dpkg:

sudo dpkg -i ./whereyoudownload/libtango-java.XX.version.deb

I found this trick advertised in the following page describing how to install Tango on a Raspberry PI:
http://www.tango-controls.org/developers/howto/how-install-tango-raspberry-pi-one-line-command/

This works as well on other Debian-like operating systems.

Hoping this helps,
Reynald

Very interesting - I will try this out on my laptop.

Is this updated with the latest jive?

Andy

This is built from the source distribution, so you will get the same version as in Tango 9.2.5a source distribution.

I have added this recipe for the Java binaries to the Linux Debian installation section in the manual:

http://tango-controls.readthedocs.io/en/latest/installation/tango-on-linux.html

Andy

Hej, I was just trying to get Jive running on Linux Mint 19 Beta system but got the following error when using the deb-package (installation without problems):

Exception in thread "main" 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:1009)
	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:190)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
	at org.jacorb.orb.ORB._getDelegate(ORB.java:563)
	at org.jacorb.orb.ORB.string_to_object(ORB.java:2378)
	at fr.esrf.TangoApi.ConnectionDAODefaultImpl.createDevice(ConnectionDAODefaultImpl.java:337)
	at fr.esrf.TangoApi.ConnectionDAODefaultImpl.connect_to_dbase(ConnectionDAODefaultImpl.java:613)
	at fr.esrf.TangoApi.ConnectionDAODefaultImpl.init(ConnectionDAODefaultImpl.java:104)
	at fr.esrf.TangoApi.Connection.<init>(Connection.java:159)
	at fr.esrf.TangoApi.Database.<init>(Database.java:97)
	at fr.esrf.TangoApi.ApiUtilDAODefaultImpl.get_db_obj(ApiUtilDAODefaultImpl.java:131)
	at fr.esrf.TangoApi.ApiUtil.get_db_obj(ApiUtil.java:130)
	at jive3.MainPanel.initComponents(MainPanel.java:154)
	at jive3.MainPanel.<init>(MainPanel.java:123)
	at jive3.MainPanel.<init>(MainPanel.java:107)
	at jive3.MainPanel.main(MainPanel.java:1335)
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:190)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
	... 22 more

Any ideas to solve this issue?

Best

Daniel

Hi Daniel,

very strange. I don’t recall encountering this issue before. It looks like a problem with the CORBA classes. Which version of the jdk are you using - open-jdk or oracle-jdk? I will try to reproduce your problem on ubuntu 18.04.

Would it help if you have a dockerised version of jive?

Andy

Hi Daniel,

You are probably using a recent version of java (>=9) where java.corba module is deprecated (java.corba (Java SE 9 & JDK 9 )).
This question on stackoverflow might give you some hints:
https://stackoverflow.com/questions/28983922/alternative-for-deprecated-endorsed-standards-override-mechanism-and-extension-m

It looks like there are some ways to work around this issue by specifying additional options when invoking java (–add-module “java.corba” --add-exports=…, …).

The easiest way to solve this problem would be to install java 8 and start jive using java 8.

Hoping this helps,
Reynald

Reynald,

you are absolutely right. I could reproduce the problem on Ubuntu 18.04 with java 10.0.1 (the latest default java jdk in Ubuntu 18.04).

I followed the recipe you pointed out on stack overflow. It almost worked - I had to download the jacorb-omgapi-3.4.jar and add org.omg.Timebase to the list of exports. I modified the jive script as follows and then jive worked (and atk):

usr/bin/java --add-modules "java.corba"  --patch-module "java.corba=/home/goetz/tango/jacorb-omgapi-3.4.jar" --add-exports=java.corba/org.omg.CONV_FRAME=ALL-UNNAMED --add-exports=java.corba/org.omg.CORBA_2_5=ALL-UNNAMED --add-exports=java.corba/org.omg.PortableGroup=ALL-UNNAMED --add-exports=java.corba/org.omg.ETF=ALL-UNNAMED --add-exports=java.corba/org.omg.GIOP=ALL-UNNAMED --add-exports=java.corba/org.omg.SSLIOP=ALL-UNNAMED --add-exports=java.corba/org.omg.CSIIOP=ALL-UNNAMED --add-exports=java.corba/org.omg.TimeBase=ALL-UNNAMED -mx128m -DTANGO_HOST=$TANGO_HOST $applet_name $@

I will add something to the documentation so others do not fall into this trap. Maybe we could include this in the official scripts in the future.

Daniel can you try this to see if it works for you?

Andy

I have created a docker image of the latest version of Jive (7.19) which includes openjdk:8: https://hub.docker.com/r/andygotz/tango-jive/

You can try it out on any Linux system where docker is installed with:

docker pull andygotz/tango-jive:7.19
docker run -ti --rm -e DISPLAY=$DISPLAY -e TANGO_HOST=$TANGO_HOST -v /tmp/.X11-unix:/tmp/.X11-unix --net=host andygotz/tango-jive:7.19

It avoids the issue with the Java version by including openjdk:8. Should work on any system where docker works …

Andy

p.s. this uses the X11 DISPLAY of your Linux desktop. To make it work on WIndows you need to run a X11 server on your Windows desktop e.g. Xming.

Hej guys,

Indeed I can run jive and all the other libtango-java apps with openjdk-8 and version 11 did not work.
For now I am working with v. 8 because I have a similar issue with an EPICS Java app.

Thanks so much

Daniel

Hello, I just started a discussion on the debian-java[1] mailing list in order to be sure that CORBA will be usable on Debian based systems.

They proposed to package[2]. Do you know if the tango java part could work with it ?

Cheers

[1] RE:OpenJDK 11 -- testing needed
[2] GitHub - javaee/glassfish-corba: Formerly the home of GlassFish CORBA ORB. Please follow the link below for the current project page

@picca,

The package[2] seems like an interesting alternative to OpenJDK and Jacorb. It would be a nice exercise to try it. Hopefully I will find some time for that this Autumn.

Cheers,