Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Bug #1774 (closed)

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

Permissions : sudo broken after work on #1434

Reported by: jamoore Owned by: jamoore
Priority: blocker Cc: carlos@…
Sprint: n.a.
Total Remaining Time: n.a.

Description

This is a regression due to #1434

 I can create new users, no 
problem, but then I try to sudo into one such user by doing

        p = omero.sys.Principal()
        p.name = username
        p.group = ANN_GROUP
        p.eventType = "User"
        # This connection will have a 20 minute timeout
        newConnId = self.getSessionService().createSessionWithTimeout(p, 
1200000)
        client = self.clone()
        client.connect(sUuid=newConnId.getUuid().val)

and createSessionWithTimeout dies a horrible death with some data 
integrity issue on defaultPermissions or whatever. Full traceback below. 
I tried to update the session to both include a non null and also null 
out defaultPermissions, but that also triggers the same issue... help?

2010-02-04 21:49:45,598 INFO  [        ome.services.util.ServiceHandler] 
(1-thread-2)  Args:    [null, 
ome.tools.spring.InternalServiceFactory@879dd3]
2010-02-04 21:49:45,604 INFO  [         ome.security.basic.EventHandler] 
(1-thread-2)  Auth:    
user=0,group=0,event=4405(Sessions),sess=fdfd401b-baae-4a3d-87e3-ab72a3447965
2010-02-04 21:49:45,611 INFO  [                 org.perf4j.TimingLogger] 
(1-thread-2) start[1265320185598] time[13] tag[omero.call.success]
2010-02-04 21:49:45,611 INFO  [        ome.services.util.ServiceHandler] 
(1-thread-2)  Rslt:    (ome.model.meta.Experimenter:Id_5, 
ome.model.meta.ExperimenterGroup:Id_4, [4, 1], ... 4 more)
2010-02-04 21:49:45,612 INFO  [        ome.services.util.ServiceHandler] 
(1-thread-2)  Executor.doWork -- 
ome.services.sessions.SessionManagerImpl.update
2010-02-04 21:49:45,612 INFO  [        ome.services.util.ServiceHandler] 
(1-thread-2)  Args:    [null, 
ome.tools.spring.InternalServiceFactory@21a9b0]
2010-02-04 21:49:45,618 INFO  [         ome.security.basic.EventHandler] 
(1-thread-2)  Auth:    
user=0,group=0,event=4406(Sessions),sess=fdfd401b-baae-4a3d-87e3-ab72a3447965
2010-02-04 21:49:45,674 INFO  [                 org.perf4j.TimingLogger] 
(1-thread-2) start[1265320185612] time[62] tag[omero.call.exception]
2010-02-04 21:49:45,693 WARN  [        ome.services.util.ServiceHandler] 
(1-thread-2) DataIntegrityViolationException thrown.

org.springframework.dao.DataIntegrityViolationException: not-null 
property references a null or transient value: 
ome.model.meta.Session.defaultPermissions; nested exception is 
org.hibernate.PropertyValueException: not-null property references a 
null or transient value: ome.model.meta.Session.defaultPermissions
    at 
org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:630)
    at 
org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)
    at 
org.springframework.orm.hibernate3.HibernateInterceptor.invoke(HibernateInterceptor.java:117)
    at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at 
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
    at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at 
ome.tools.hibernate.ProxyCleanupFilter$Interceptor.invoke(ProxyCleanupFilter.java:175)
    at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at ome.services.util.ServiceHandler.invoke(ServiceHandler.java:110)
    at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at 
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    at $Proxy55.doWork(Unknown Source)
    at ome.services.util.Executor$Impl.execute(Executor.java:324)
    at 
ome.services.sessions.SessionManagerImpl.update(SessionManagerImpl.java:418)
    at ome.services.sessions.SessionBean$2.call(SessionBean.java:112)
    at ome.services.sessions.SessionBean$2.call(SessionBean.java:108)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
    at java.util.concurrent.FutureTask.run(FutureTask.java:123)
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651)
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676)
    at java.lang.Thread.run(Thread.java:613)
Caused by: org.hibernate.PropertyValueException: not-null property 
references a null or transient value: 
ome.model.meta.Session.defaultPermissions
    at 
org.hibernate.engine.Nullability.checkNullability(Nullability.java:72)
    at 
org.hibernate.event.def.DefaultFlushEntityEventListener.scheduleUpdate(DefaultFlushEntityEventListener.java:270)
    at 
org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:128)
    at 
ome.security.basic.FlushEntityEventListener.onFlushEntity(FlushEntityEventListener.java:52)
    at 
org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:196)
    at 
org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:76)
    at 
org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26)
    at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
    at ome.logic.UpdateImpl.afterUpdate(UpdateImpl.java:288)
    at ome.logic.UpdateImpl.doAction(UpdateImpl.java:306)
    at ome.logic.UpdateImpl.doAction(UpdateImpl.java:296)
    at ome.logic.UpdateImpl.saveAndReturnObject(UpdateImpl.java:117)
    at 
ome.services.sessions.SessionManagerImpl.executeUpdate(SessionManagerImpl.java:867)
    at 
ome.services.sessions.SessionManagerImpl.access$300(SessionManagerImpl.java:76)
    at 
ome.services.sessions.SessionManagerImpl$4.doWork(SessionManagerImpl.java:421)
    at sun.reflect.GeneratedMethodAccessor211.invoke(Unknown Source)
    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:592)
    at 
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
    at 
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
    at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    at ome.services.util.Executor$Impl$Interceptor.invoke(Executor.java:394)
    at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at ome.security.basic.EventHandler.invoke(EventHandler.java:133)
    at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at 
org.springframework.orm.hibernate3.HibernateInterceptor.invoke(HibernateInterceptor.java:111)
    ... 18 more
2010-02-04 21:49:45,694 INFO  [        ome.services.util.ServiceHandler] 
(1-thread-2)  Excp:    
org.springframework.dao.DataIntegrityViolationException: not-null 
property references a null or transient value: 
ome.model.meta.Session.defaultPermissions; nested exception is 
org.hibernate.PropertyValueException: not-null property references a 
null or transient value: ome.model.meta.Session.defaultPermissions
2010-02-04 21:49:45,694 INFO  [       ome.services.sessions.SessionBean] 
(.Server-33) Handling session exception:
ome.conditions.ValidationException: not-null property references a null 
or transient value: ome.model.meta.Session.defaultPermissions; nested 
exception is org.hibernate.PropertyValueException: not-null property 
references a null or transient value: 
ome.model.meta.Session.defaultPermissions
    at 
org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:630)
    at 
org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)
    at 
org.springframework.orm.hibernate3.HibernateInterceptor.invoke(HibernateInterceptor.java:117)
    at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at 
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
    at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at 
ome.tools.hibernate.ProxyCleanupFilter$Interceptor.invoke(ProxyCleanupFilter.java:175)
    at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at ome.services.util.ServiceHandler.invoke(ServiceHandler.java:110)
    at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at 
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    at $Proxy55.doWork(Unknown Source)
    at ome.services.util.Executor$Impl.execute(Executor.java:324)
    at 
ome.services.sessions.SessionManagerImpl.update(SessionManagerImpl.java:418)
    at ome.services.sessions.SessionBean$2.call(SessionBean.java:112)
    at ome.services.sessions.SessionBean$2.call(SessionBean.java:108)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
    at java.util.concurrent.FutureTask.run(FutureTask.java:123)
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651)
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676)
    at java.lang.Thread.run(Thread.java:613)
2010-02-04 21:49:45,694 INFO  [                 org.perf4j.TimingLogger] 
(.Server-33) start[1265320185572] time[122] tag[omero.call.exception]
2010-02-04 21:49:45,694 INFO  [        ome.services.util.ServiceHandler] 
(.Server-33)  Excp:    ome.conditions.AuthenticationException: Error 
creating session.
2010-02-04 21:49:45,783 INFO  [        ome.services.util.ServiceHandler] 
(.Server-40)  Meth:    interface ome.api.ISession.createSessionWithTimeout
2010-02-04 21:49:45,783 INFO  [        ome.services.util.ServiceHandler] 
(.Server-40)  Args:    [cn, 1200000]
2010-02-04 21:49:45,783 INFO  [        ome.services.util.ServiceHandler] 
(1-thread-2)  Executor.doWork -- 
ome.services.sessions.SessionManagerImpl.createSession

Change History (3)

comment:1 Changed 14 years ago by jmoore

Possibly caused by #1731

comment:2 Changed 14 years ago by jmoore

  • Resolution set to fixed
  • Status changed from new to closed

r6043 should fix this, Carlos.

comment:3 Changed 14 years ago by jmoore

  • r6043 non-null constraint on session.defaultPermissions Forcing …
  • r6042 Changing "default" group to "CHANGE_ME" for simplicity
Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.64209 sec.)

We're Hiring!