• Views
  • Iteration Report
  • My Iteration Report
  •  
OMERO.server
  • Login
  • Help/Guide
  • About Trac
  • Preferences
  • Wiki
  • Timeline
  • Roadmap
  • Browse Source
  • View Tickets
  • Search

Context Navigation

  • ← Previous Ticket
  • Next Ticket →

Ticket #778 (closed defect: fixed)

Opened 13 months ago

Last modified 12 months ago

Save and Return

Reported by: jburel Owned by: jmoore
Priority: critical Milestone: 3.0-Beta2.2
Component: API Version: 3.0-M3
Keywords: Cc: jburel, callan, dsloan@…

Description

Trying to update a project, new problem. Connected to valewalker Follow the error

ome.conditions.InternalException:  Wrapped Exception: (org.springframework.orm.hibernate3.HibernateJdbcException):
JDBC exception on Hibernate data access; nested exception is org.hibernate.exception.SQLGrammarException: could not initialize a collection: [ome.model.containers.Project.annotations#2]
	at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:636)
	at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:408)
	at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:367)
	at org.springframework.orm.hibernate3.HibernateTemplate.merge(HibernateTemplate.java:752)
	at ome.logic.UpdateImpl.internalSave(UpdateImpl.java:240)
	at ome.logic.UpdateImpl$5.run(UpdateImpl.java:132)
	at ome.logic.UpdateImpl$5.run(UpdateImpl.java:131)
	at ome.logic.UpdateImpl.doAction(UpdateImpl.java:271)
	at ome.logic.UpdateImpl.saveAndReturnObject(UpdateImpl.java:129)
	at ome.logic.PojosImpl.updateDataObject(PojosImpl.java:458)

Change History

Changed 13 months ago by jmoore

  • milestone changed from 3.0-Beta3 to 3.0-Beta2.2

Changed 12 months ago by jmoore

  • status changed from new to assigned

Hey J-M.

So, I did the following to reproduce this:

     public void test_ProjAnnCollectionError() throws Exception {
         Project p = new Project();
         p.setName("ticket:778");
         p = sf.getPojosService().
             createDataObject(p, new PojoOptions().map());

         Project fromServer = 
             sf.getQueryService().get(Project.class,p.getId());
         fromServer.setDescription("desc updated");
         fromServer.accept(new CollectionUnloader());
         sf.getPojosService().updateDataObject(fromServer,
                 new PojoOptions().map());

     }

But it works. What box are you running this against so I can look at the DB? Also which versions are being run? JBoss 4.0.4 still?

jean-marie writes:

Hi Josh I retrieve a project modify name or description try to update it method used in client

> public DataObject updateDataObject(DataObject object)
>              throws DSOutOfServiceException, DSAccessException
>      {
>          if (object == null)
>              throw new DSAccessException("No object to update.");
>          IObject ho = null;
>          IObject oldObject = null;
>          oldObject = object.asIObject();
>          ho = gateway.findIObject(oldObject); //make sure the object  
> is current.
> 
>          if (ho == null) return null;
>          ModelMapper.fillIObject(oldObject, ho); //set name and  
> description
>          ModelMapper.unloadCollections(ho); //unload collections
>          IObject updated = gateway.updateObject(ho,
>                                          (new PojoOptions()).map());
>          return PojoMapper.asDataObject(updated);
>      }

gateway.updateObject does the following IPojos service = getPojosService(); return service.updateDataObject(object, options); Ciao jmarie

Changed 12 months ago by jburel

Tested again server with Beta 2 version installed and JBOSS 4.0.$

Changed 12 months ago by jmoore

  • cc callan, dsloan@… added

Sorry, missed the valewalker reference above. Weird:

  • old hibernate and jboss, so no change there
  • only thing that's somewhat interesting is that the table belongs to Chris:
     public | projectannotation             | table    | callan
     public | projectdatasetlink            | table    | omero
     public | pulse                         | table    | omero
     public | quantumdef                    | table    | omero
     public | region                        | table    | omero
    

but that shouldn't really matter. We'll need to find out when this started happening and what changed to know what's what.

Changed 12 months ago by jburel

Tested the call using this time Warlock. And seems to work.

Changed 12 months ago by jmoore

  • status changed from assigned to closed
  • resolution set to fixed

Let's reopen if this arises again.

Note: See TracTickets for help on using tickets.

Download in other formats:

  • Comma-delimited Text
  • Tab-delimited Text
  • RSS Feed

Trac Powered

Powered by Trac 0.11
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.org/