We're Hiring!

Save H5 table on OMERO server (without attaching to anything

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.

Re: Save H5 table on OMERO server (without attaching to anyt

Postby jmoore » Tue Dec 13, 2011 3:58 pm

Hi BK,

really all that's missing is the creation of the new table.

Code: Select all

        table2 = ... # Create like you're creating the other one
        table2.initialize(table.getHeaders()) # Initialize with the same columns

        num_data = table.getNumberOfRows()
        # Loop through the data like before
        # ...

        table2.addData(columns) # Add to the new table

        table.close()
        table2.close()


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

Unable to modify Tag by another account (in the same group)

Postby bhcho » Thu Dec 15, 2011 5:14 pm

Hi Josh,

you said every account (in the same collaborative rw group) should be able to modify the same tag.
But I got violation error when I tried to modify a tag using different account.

I performed the following code
Code: Select all
    query_string = "select ann from ExperimenterGroupAnnotationLink as grl join grl.child as ann where grl.parent.id = :gid and ann.ns=:namesp order by ann.id desc"
    result = query.findByQuery(query_string, params.page(0,1))

    result.setTextValue(omero.rtypes.RStringI(DBName_new))
    # update the tag
    conn.getUpdateService().saveObject(result)

and I got the following error.
SecurityViolation: exception ::omero::SecurityViolation
{
serverStackTrace = ome.conditions.SecurityViolation: Updating ome.model.annotations.TagAnnotation:Id_202 not allowed.
at ome.security.basic.BasicACLVoter.throwUpdateViolation(BasicACLVoter.java:171)
at ome.security.CompositeACLVoter.throwUpdateViolation(CompositeACLVoter.java:90)
at ome.security.ACLEventListener.onPreUpdate(ACLEventListener.java:129)
at org.hibernate.action.EntityUpdateAction.preUpdate(EntityUpdateAction.java:236)
at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:87)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:267)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:259)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:179)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1208)
at ome.logic.UpdateImpl.afterUpdate(UpdateImpl.java:294)
at ome.logic.UpdateImpl.doAction(UpdateImpl.java:312)
at ome.logic.UpdateImpl.doAction(UpdateImpl.java:302)
at ome.logic.UpdateImpl.saveObject(UpdateImpl.java:108)
at sun.reflect.GeneratedMethodAccessor990.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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 org.springframework.orm.hibernate3.HibernateInterceptor.invoke(HibernateInterceptor.java:111)
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 $Proxy81.saveObject(Unknown Source)
at sun.reflect.GeneratedMethodAccessor990.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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 $Proxy81.saveObject(Unknown Source)
at sun.reflect.GeneratedMethodAccessor1024.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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.UpdateI.saveObject_async(UpdateI.java:81)
at omero.api._IUpdateTie.saveObject_async(_IUpdateTie.java:113)
at omero.api._IUpdateDisp.___saveObject(_IUpdateDisp.java:141)
at omero.api._IUpdateDisp.__dispatch(_IUpdateDisp.java:377)
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.SecurityViolation
message = Updating ome.model.annotations.TagAnnotation:Id_202 not allowed.
}


Do you have any idea about this?

BK
bhcho
 
Posts: 236
Joined: Mon Apr 05, 2010 2:15 pm

Re: Save H5 table on OMERO server (without attaching to anyt

Postby jmoore » Mon Dec 19, 2011 9:17 am

Yes, I do. My apologies, BK. I had forgotten that the logic was changed from GROUP-WRITE to GROUP-LINK during the work on ticket 1992. This is also a blocker for migrating some other of our work to 4.3 and is on the agenda to be discussed tomorrow.

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

Re: Save H5 table on OMERO server (without attaching to anyt

Postby bhcho » Mon Feb 27, 2012 6:09 pm

Hi Josh,

is there any update about "WORLD-WRITEABLE" data?
I want to have that kind of tag and OMERO.table so that every one can modify/(even delete?).

BK
bhcho
 
Posts: 236
Joined: Mon Apr 05, 2010 2:15 pm

Re: Save H5 table on OMERO server (without attaching to anyt

Postby jmoore » Mon Feb 27, 2012 7:34 pm

Hi BK,

no coding has taken place, but there have been discussions about how to integrate public groups into 4.4, and initial work should start soon.

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

Previous

Return to Developer Discussion

Who is online

Users browsing this forum: Google [Bot] and 0 guests