Page 1 of 1

connection to OMERO from java application

PostPosted: Thu Oct 23, 2014 5:56 pm
by Akramhar
Hi all,
I developed a java application that loads data from OMERO.
We are still using 4.4.8 OMERO.server with ice 3.4.
I'm using omero_client.jar to interface with OMERO.

Everything works correctly when I launch the application from Eclipse, both in debug and release mode.
I'm able to connect to our OMERO server, load images and work on them.

But when I execute the jar version of the application and I'm trying to connect to the server I receive the attached ConnectionLost exception from Ice.
I produce the jar version of the application by using the export function of Eclipse.

At this point I'm thinking I may be missing something when I'm packing the application.
Do you have any experience of similar problems?

Many thanks
Ciao,
Alex

Re: connection to OMERO from java application

PostPosted: Fri Oct 24, 2014 1:30 pm
by jburel
hi Alex

i cloned your repository and built the jar using eclipse. I had no problem to connect to one of our servers running 4.4.12.
Which version of Java are you using client side?
We have fixed issue with Java 1.8 (handshake error) but for that you will need to upgrade the client jar.
That could be the reason why you have the lost connection exception.
It might also explain why it works in Eclipse if you are using a different Java version.(i.e. Preferences> Java> Compiler)


To generate the jar I used Export>Runnable jar File and select "Extract required libraries into generated jar"

If you have an account that I could use on your server to test, let me know (send me a private message)

Cheers

Jmarie

Re: connection to OMERO from java application

PostPosted: Fri Oct 24, 2014 5:50 pm
by Akramhar
Hi Jean Marie,

Thanks for you prompt answer.
Apparently I was fighting with the 1.8 handshake error and with a misconfiguration of java under windows at the same time.

Where can I find the updated version of the omero_client jar?

Thank you again
Ciao,
Alex

Re: connection to OMERO from java application

PostPosted: Mon Oct 27, 2014 12:13 pm
by jburel
Hi Alex

The support for the version you are using has ended.
It might be a good opportunity to upgrade to the 5.0 line (http://downloads.openmicroscopy.org/omero/5.0.5/), which gets the current updates.
We did not back port the fix to the 4.4.x line. (for information see fix https://github.com/openmicroscopy/openm ... /pull/2940)
If you cannot upgrade, you will have to prevent the usage of Java 8 client side.

Cheers
Jmarie