Omero Gateway - MAVEN build

Hi,
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(Gateway.java:1149)
at omero.gateway.Gateway.connect(Gateway.java:247)

at org.jboss.threads.JBossThread.run(JBossThread.java:485)
Caused by: Ice.UnmarshalOutOfBoundsException
reason = “”
at IceInternal.BasicStream.readAndCheckSeqSize(BasicStream.java:691)
at omero.sys.LongListHelper.read(LongListHelper.java:47)
at omero.sys.EventContext.__readImpl(EventContext.java:171)
at Ice.ObjectImpl.__read(ObjectImpl.java:368)
at IceInternal.BasicStream$EncapsDecoder.unmarshal(BasicStream.java:3132)
at IceInternal.BasicStream$EncapsDecoder10.readInstance(BasicStream.java:3513)
at IceInternal.BasicStream$EncapsDecoder10.readPendingObjects(BasicStream.java:3440)
at IceInternal.BasicStream.readPendingObjects(BasicStream.java:566)
at omero.api.IAdminPrxHelper.end_getEventContext(IAdminPrxHelper.java:4062)
at omero.api.IAdminPrxHelper.getEventContext(IAdminPrxHelper.java:3935)
at omero.api.IAdminPrxHelper.getEventContext(IAdminPrxHelper.java:3922)
at omero.gateway.Gateway.login(Gateway.java:1093)

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

This is what I am using:

    <dependency> 
       <groupId>org.openmicroscopy</groupId> 
       <artifactId>omero-gateway</artifactId> 
       <version>5.6.5</version> 
    </dependency> 
    
     <dependency>
		<groupId>ome</groupId>
		<artifactId>omero-client</artifactId>
		<version>5.3.0-ice36</version>
</dependency>

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?
Thanks,
Kevin

hi @khaugh

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

Cheers

Jmarie

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