We're Hiring!

UserId issues from Matlab.

General and open developer discussion about using OMERO APIs from C++, Java, Python, Matlab and more! Please new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

If you are having trouble with custom code, please provide a link to a public repository, ideally GitHub.

UserId issues from Matlab.

Postby i.munro » Wed Jul 05, 2017 2:49 pm

Hi All

I wonder if anyone can help me?

I'm attempting to update the Java interface that the (Matlab) FLIMfit app uses to browse OMERO to work with 5.3 servers.

The working version (for 5.2 servers) is at https://github.com/flimfit/omeUiUtils/tree/master

So far I have simply updated the pom.
https://github.com/flimfit/omeUiUtils/tree/5.3Test2
Testing from the Java test harness in https://github.com/flimfit/omeUiUtils/b ... #L858-L875 everything looks good.

However when I call the same code from Matlab it crashes on the line
Experimenter exp = session.getAdminService().getExperimenter(userId);
https://github.com/flimfit/omeUiUtils/b ... .java#L185

With the errors below:
I have checked that the userId is the correct one & ( just to eliminate type passing oddities) tried hard-coding it to the correct No.

Is it possible that this error is some new group-related behaviour that I've missed?
Many Thanks

Ian

Java exception occurred:
Ice.MarshalException
reason = "invalid object id"
at IceInternal.BasicStream$EncapsDecoder10.readObject(BasicStream.java:3042)
at IceInternal.BasicStream.readObject(BasicStream.java:2048)
at omero.model.IObject.__readImpl(IObject.java:520)
at omero.model.Experimenter.__readImpl(Experimenter.java:1537)
at Ice.ObjectImpl.__read(ObjectImpl.java:365)
at IceInternal.BasicStream$EncapsDecoder.unmarshal(BasicStream.java:2936)
at IceInternal.BasicStream$EncapsDecoder10.readInstance(BasicStream.java:3307)
at IceInternal.BasicStream$EncapsDecoder10.readPendingObjects(BasicStream.java:3235)
at IceInternal.BasicStream.readPendingObjects(BasicStream.java:584)
at omero.api._IAdminDelM.getExperimenter(_IAdminDelM.java:1159)
at omero.api.IAdminPrxHelper.getExperimenter(IAdminPrxHelper.java:5783)
at omero.api.IAdminPrxHelper.getExperimenter(IAdminPrxHelper.java:5746)
at OMEuiUtils.OMEROImageChooser.<init>(OMEROImageChooser.java:186)
at OMEuiUtils.OMEROImageChooser.<init>(OMEROImageChooser.java:130)
i.munro
 
Posts: 50
Joined: Thu Apr 25, 2013 1:01 pm

Re: UserId issues from Matlab.

Postby i.munro » Wed Jul 05, 2017 3:11 pm

I should add that the Matlab code to log on to OMERO is at

https://github.com/flimfit/FLIMfit/blob ... m#L84-L125

and the java code is called from e.g. https://github.com/flimfit/FLIMfit/blob ... #L388-L392
i.munro
 
Posts: 50
Joined: Thu Apr 25, 2013 1:01 pm

Re: UserId issues from Matlab.

Postby i.munro » Thu Jul 06, 2017 9:04 am

IT occurs to me that if I'm really seeing different behaviour , as I think, then it has to be a Java version mismatch. FYI version -java in Matlab gives me: Java 1.7.0_75-b13
but I seem to be using 1.8 to build omeUiUtils.
i.munro
 
Posts: 50
Joined: Thu Apr 25, 2013 1:01 pm

Re: UserId issues from Matlab.

Postby sbesson » Thu Jul 06, 2017 10:42 am

Hi Ian,

the `Ice.MarshalException` you are receiving is similar to the error one would receive if the server and client versions were mismatching. For instance that would be what you get if you try to connect to an OMERO 5.3 server using the OMERO 5.2 command line interface with `bin/omero login`.

As far as I understand, the individual Java component works standalone when built using the OMERO 5.3 dependencies against a OMERO 5.3 server.

I assume the version of OMERO.matlab used is also OMERO 5.3.3. First debugging question would be: does the connection work if you are calling the method directly from the MATLAB as in this minimal example without invoking the OMEROImageChooser utility?

Sebastien
User avatar
sbesson
Team Member
 
Posts: 421
Joined: Tue Feb 28, 2012 7:20 pm

Re: UserId issues from Matlab.

Postby i.munro » Fri Jul 07, 2017 11:15 am

Hi Sebastien

Thank you for your input. You are entirely correct! I had stupidly managed to start testing with an old version
of the OMERO.Matlab toolbox. Installing the latest version solved my issue.

My apologies for wasting your time with something that I should have spotted myself.

Sincerely

Ian
i.munro
 
Posts: 50
Joined: Thu Apr 25, 2013 1:01 pm

Re: UserId issues from Matlab.

Postby i.munro » Sun Jul 09, 2017 2:22 pm

Hi again Sebastien

On a different note, In the minimal example you linked above an unencrypted session is used for faster data transfer.
Can I ask if there are are circumstances where I shouldn't use such a session or can I safely use it for everything once logged on?

Thanks

Ian
i.munro
 
Posts: 50
Joined: Thu Apr 25, 2013 1:01 pm

Re: UserId issues from Matlab.

Postby jmoore » Sun Jul 09, 2017 4:20 pm

Hi Ian,

Can I ask if there are are circumstances where I shouldn't use such a session or can I safely use it for everything once logged on?


Any method that we consider truly unsafe for invocation with a non-encrypted session (change of password, etc) will throw an exception if you attempt to do so. A user could conceivably consider other metadata of sufficient value that s/he doesn't want it transmitted without encryption which is why the little lock symbol is made available in insight. (In the web, it's having an HTTPS connection which is of importance.)

Cheers,
~Josh.
User avatar
jmoore
Site Admin
 
Posts: 1591
Joined: Fri May 22, 2009 1:29 pm
Location: Germany

Re: UserId issues from Matlab.

Postby i.munro » Mon Jul 10, 2017 11:19 am

Thanks Josh

Best Wishes

Ian
i.munro
 
Posts: 50
Joined: Thu Apr 25, 2013 1:01 pm


Return to Developer Discussion

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

cron