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 #735 (closed)

Opened 17 years ago

Closed 16 years ago

IPojos.findContainerHierarchies() fails with ValidationException

Reported by: dwhitehurst-x Owned by: jamoore
Priority: critical Cc:
Sprint: n.a.
Total Remaining Time: n.a.

Description (last modified by jmoore)

Client integration tests fail with nested Hibernate error "not null property references a null or transient value" in PojoServiceTest?, method testFindContainerHierarchies rather than the expected Api usage exception.

Test marked as "broken"

try {
       results = iPojos.findContainerHierarchies(Dataset.class, ids, empty
                   .map());
           fail("Should fail");
       } catch (ApiUsageException e) {
           // ok.
       }

Change History (5)

comment:1 Changed 17 years ago by dwhitehurst-x

  • Owner changed from Josh to jmoore

comment:2 Changed 17 years ago by jmoore

  • Description modified (diff)
  • Milestone changed from 3.0-Beta2 to 3.0-Beta3

comment:3 Changed 16 years ago by jmoore

  • Priority changed from minor to critical

Investigating this now. Has appeared in the wild.

comment:4 Changed 16 years ago by jmoore

  • Description modified (diff)
  • Status changed from new to assigned
  • Summary changed from PojoServiceTest Fails as Noted to IPojos.findContainerHierarchies() fails with ValidationException
  • Version set to 3.0-Beta1

This issue was not was to track down. The implementation of findContainerHierarchies walks a graph returned from Hibernate and rearranges the entities in a read-only graph. However, to prevent Hibernate from saving the rearragements, first the entities are evicted from the session.

The exception that's being thrown here:

ome.conditions.ValidationException: not-null property references a null or transient value: ome.model.containers.DatasetImageLink.details.creati
onEvent; nested exception is org.hibernate.PropertyValueException: not-null property references a null or transient value: ome.model.containers.DatasetImageLink.detail
s.creationEvent
        at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:628)
        at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)
        at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:377)
        at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:338)
        at ome.security.basic.EventHandler.invoke(EventHandler.java:160)
...

just says that one of the read-only links created for the read-only graph is missing some values. That's fine, we expect as much. The question is why is it even checking. Because an object is still reachable that shouldn't be.

Turns out the cyclical relationship image->defaultPixels->image is again causing problems (this will probably be removed in the next version.)

Fixed by r1921.

comment:5 Changed 16 years ago by jmoore

  • Milestone changed from 3.0-Beta3 to 3.0-Beta2.2
  • Resolution set to fixed
  • Status changed from assigned to closed

Included in milestone:3.0-Beta2.2.

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.62818 sec.)

We're Hiring!