[ome-users] loading data frmo matlab to an Image in OMERO in two phases

Alexander Tournier alexander.tournier at cancer.org.uk
Thu Jul 28 12:07:03 BST 2011


Hi All,

I want to write data to OMERO Images, however sometimes I don't have all 
the data at that time.
So say I load up timeframes 1 to 10 in one go and 11 to 20 later, for 
example.

However, when I try to 'open' the image object a second time I get a 
long error message.
I've written a short script to show this, attached, error message below.

The way I'm doing it now is keeping hold of the rawPixelsStore instance, 
so I can write to the image as long as I have that. Now that only works 
within one matlab session.

Any ideas how to go about this/what I'm doing wrong?
Thanks,
Alex


??? Java exception occurred:
omero.ApiUsageException
     serverStackTrace = "ome.conditions.ApiUsageException: Write-method 
not permitted.
                             at
                                 
ome.io.nio.RomioPixelBuffer.throwIfReadOnly(RomioPixelBuffer.java:109)
                                                             at
                                 
ome.io.nio.RomioPixelBuffer.setPlane(RomioPixelBuffer.java:666)
                                                             at
                                 
ome.services.RawPixelsBean.setPlane(RawPixelsBean.java:564)
                                                             at
                                 
sun.reflect.GeneratedMethodAccessor1483.invoke(Unknown
                                 Source)
                             at
                                 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                                                             at
                                 
java.lang.reflect.Method.invoke(Method.java:616)
                             at
                                 
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
                                                             at
                                 
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
                                                             at
                                 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
                                                             at
                                 
ome.security.basic.EventHandler.invoke(EventHandler.java:150)
                                                             at
                                 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
                                                             at
                                 
ome.tools.hibernate.SessionHandler.doStateful(SessionHandler.java:182)
                                                             at
                                 
ome.tools.hibernate.SessionHandler.invoke(SessionHandler.java:166)
                                                             at
                                 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
                                                             at
                                 
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:108)
                                                             at
                                 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
                                                             at
                                 
ome.tools.hibernate.ProxyCleanupFilter$Interceptor.invoke(ProxyCleanupFilter.java:231)
                                                             at
                                 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
                                                             at
                                 
ome.services.util.ServiceHandler.invoke(ServiceHandler.java:116)
                                                             at
                                 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
                                                             at
                                 
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
                                                             at
                                 $Proxy85.setPlane(Unknown Source)
                             at 
sun.reflect.GeneratedMethodAccessor1483.invoke(Unknown
                                 Source)
                             at
                                 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                                                             at
                                 
java.lang.reflect.Method.invoke(Method.java:616)
                             at
                                 
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
                                                             at
                                 
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
                                                             at
                                 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
                                                             at
                                 
ome.security.basic.BasicSecurityWiring.invoke(BasicSecurityWiring.java:83)
                                                             at
                                 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
                                                             at
                                 
ome.services.blitz.fire.AopContextInitializer.invoke(AopContextInitializer.java:43)
                                                             at
                                 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
                                                             at
                                 
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
                                                             at
                                 $Proxy85.setPlane(Unknown Source)
                             at 
sun.reflect.GeneratedMethodAccessor1486.invoke(Unknown
                                 Source)
                             at
                                 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                                                             at
                                 
java.lang.reflect.Method.invoke(Method.java:616)
                             at
                                 
ome.services.blitz.util.IceMethodInvoker.invoke(IceMethodInvoker.java:179)
                                                             at
                                 
ome.services.throttling.Callback.run(Callback.java:56)
                             at
                                 
ome.services.throttling.InThreadThrottlingStrategy.callInvokerOnRawArgs(InThreadThrottlingStrategy.java:56)
                                                             at
                                 
ome.services.blitz.impl.AbstractAmdServant.callInvokerOnRawArgs(AbstractAmdServant.java:136)
                                                             at
                                 
ome.services.blitz.impl.RawPixelsStoreI.setPlane_async(RawPixelsStoreI.java:211)
                                                             at
                                 
omero.api._RawPixelsStoreTie.setPlane_async(_RawPixelsStoreTie.java:281)
                                                             at
                                 
omero.api._RawPixelsStoreDisp.___setPlane(_RawPixelsStoreDisp.java:943)
                                                             at
                                 
omero.api._RawPixelsStoreDisp.__dispatch(_RawPixelsStoreDisp.java:1301)
                                                             at
                                 
IceInternal.Incoming.invoke(Incoming.java:159)
                             at 
Ice.ConnectionI.invokeAll(ConnectionI.java:2037)
                             at 
Ice.ConnectionI.message(ConnectionI.java:972)
                             at 
IceInternal.ThreadPool.run(ThreadPool.java:577)
                             at 
IceInternal.ThreadPool.access$100(ThreadPool.java:12)
                             at
                                 
IceInternal.ThreadPool$EventHandlerThread.run(ThreadPool.java:971)
                                                         "
     serverExceptionClass = "ome.conditions.ApiUsageException"
     message = "Write-method not permitted."
     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native 
Method)
     at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown 
Source)
     at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
     at java.lang.reflect.Constructor.newInstance(Unknown Source)
     at java.lang.Class.newInstance0(Unknown Source)
     at java.lang.Class.newInstance(Unknown Source)
     at
         
IceInternal.BasicStream$DynamicUserExceptionFactory.createAndThrow(BasicStream.java:2243)
             at 
IceInternal.BasicStream.throwException(BasicStream.java:1632)
     at IceInternal.Outgoing.throwUserException(Outgoing.java:442)
     at 
omero.api._RawPixelsStoreDelM.setPlane(_RawPixelsStoreDelM.java:1566)
     at 
omero.api.RawPixelsStorePrxHelper.setPlane(RawPixelsStorePrxHelper.java:2159)
     at 
omero.api.RawPixelsStorePrxHelper.setPlane(RawPixelsStorePrxHelper.java:2131)



NOTICE AND DISCLAIMER
This e-mail (including any attachments) is intended for the above-named person(s). If you are not the intended recipient, notify the sender immediately, delete this email from your system and do not disclose or use for any purpose. 

We may monitor all incoming and outgoing emails in line with current legislation. We have taken steps to ensure that this email and attachments are free from any virus, but it remains your responsibility to ensure that viruses do not adversely affect you. 
Cancer Research UK
Registered in England and Wales
Company Registered Number: 4325234.
Registered Charity Number: 1089464 and Scotland SC041666
Registered Office Address: Angel Building, 407 St John Street, London EC1V 4AD.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bugtest2.m
Type: text/x-objcsrc
Size: 1934 bytes
Desc: not available
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-users/attachments/20110728/eb1cd69a/attachment.bin>


More information about the ome-users mailing list