Omero Gateway - MAVEN build

I’m trying to build a simple Java app that uses OMERO Gateway.
I have it working when I run it from Eclipse, but when I try to build it in MAVEN, I get a generic login failure.

Omero: Login Failed : omero.gateway.exception.DSOutOfServiceException: Cannot log in. User credentials not valid
at omero.gateway.Gateway.login(
at omero.gateway.Gateway.connect(

Caused by: Ice.UnmarshalOutOfBoundsException
reason = “”
at IceInternal.BasicStream.readAndCheckSeqSize(
at omero.sys.EventContext.__readImpl(
at Ice.ObjectImpl.__read(
at IceInternal.BasicStream$EncapsDecoder.unmarshal(
at IceInternal.BasicStream$EncapsDecoder10.readInstance(
at IceInternal.BasicStream$EncapsDecoder10.readPendingObjects(
at IceInternal.BasicStream.readPendingObjects(
at omero.api.IAdminPrxHelper.end_getEventContext(
at omero.api.IAdminPrxHelper.getEventContext(
at omero.api.IAdminPrxHelper.getEventContext(
at omero.gateway.Gateway.login(

I believe it has to do how I have my POM set up. Possibly a mismatch.

This is what I am using:


I also get a warning about not finding dependencies for
[WARNING] The POM for org.openmicroscopy:omero-gateway:jar:5.6.5 is missing, no dependency information available

Do you have a sample POM with the dependencies needed to use GATEWAY?

hi @khaugh

Did you have a look at GitHub - ome/minimal-omero-client?
This should give you the starting point you need.



I had looked at it earlier, but on revisiting it, I saw what I was missing. Thanks, it is now working!