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

Opened 13 years ago

Closed 12 years ago

Last modified 11 years ago

Import fails when PixelSizeX is very small.

Reported by: omero Owned by: jamoore
Priority: major Cc: bwzloranger, linkert@…, cxallan
Sprint: n.a.
Total Remaining Time: n.a.

Description

Attempting to import a file with PixelSizeX=2.2169e-41 produces the following exception:

ome.conditions.InternalException:  Wrapped Exception: (org.springframework.orm.hibernate3.HibernateJdbcException ):
JDBC exception on Hibernate data access; nested exception is org.hibernate.exception.DataException: could not insert: [ome.model.core.PixelsDimensions]
    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.flush(HibernateTemplate.java:799)
    at ome.logic.UpdateImpl.afterUpdate(UpdateImpl.java:261)
    at ome.logic.UpdateImpl.doAction (UpdateImpl.java:272)
    at ome.logic.UpdateImpl.saveAndReturnArray(UpdateImpl.java:163)
    at sun.reflect.GeneratedMethodAccessor419.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
    at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed (InvocationContextImpl.java:166)
    at ome.tools.spring.AOPAdapter.invokeJoinpoint(AOPAdapter.java:52)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154)
    at ome.security.basic.EventHandler.invoke(EventHandler.java:139)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
    at org.springframework.orm.hibernate3.HibernateInterceptor.invoke (HibernateInterceptor.java:104)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke (TransactionInterceptor.java:107)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
    at ome.tools.hibernate.ProxyCleanupFilter$Interceptor.invoke(ProxyCleanupFilter.java :148)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
    at ome.services.util.ServiceHandler.invoke(ServiceHandler.java:91)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed (ReflectiveMethodInvocation.java:176)
    at org.springframework.aop.interceptor.AbstractTraceInterceptor.invoke(AbstractTraceInterceptor.java:113)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed (ReflectiveMethodInvocation.java:176)
    at ome.security.basic.BasicSecurityWiring.invoke(BasicSecurityWiring.java:79)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java :176)
    at ome.services.util.OmeroAroundInvoke.call(OmeroAroundInvoke.java:144)
    at ome.services.util.OmeroAroundInvoke.loginAndSpringWrap(OmeroAroundInvoke.java:118)
    at sun.reflect.GeneratedMethodAccessor176.invoke (Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed (InvocationContextImpl.java:118)
    at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java :101)
    at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java :101)
    at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
    at org.jboss.ejb3.tx.BMTInterceptor.handleStateless (BMTInterceptor.java:71)
    at org.jboss.ejb3.tx.BMTInterceptor.invoke(BMTInterceptor.java:131)
    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
    at org.jboss.aspects.tx.TxPropagationInterceptor.invoke (TxPropagationInterceptor.java:76)
    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
    at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java :62)
    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
    at org.jboss.aspects.security.RoleBasedAuthorizationInterceptor.invoke(RoleBasedAuthorizationInterceptor.java:167)
    at org.jboss.ejb3.security.RoleBasedAuthorizationInterceptor.invoke(RoleBasedAuthorizationInterceptor.java:100)
    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
    at org.jboss.aspects.security.AuthenticationInterceptor.invoke (AuthenticationInterceptor.java:78)
    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
    at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
    at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext (MethodInvocation.java:101)
    at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:225)
    at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
    at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke (AOPRemotingInvocationHandler.java:82)
    at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:828)
    at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:681)
    at org.jboss.remoting.transport.socket.ServerThread.processInvocation (ServerThread.java:358)
    at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:412)
    at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:239)
    at org.jboss.remoting.RemoteClientInvoker.invoke (RemoteClientInvoker.java:190)
    at org.jboss.remoting.Client.invoke(Client.java:525)
    at org.jboss.remoting.Client.invoke(Client.java:488)
    at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java :55)
    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
    at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext (MethodInvocation.java:101)
    at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:55)
    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
    at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:65)
    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
    at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke (StatelessRemoteProxy.java:102)
    at $Proxy15.saveAndReturnArray(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java :39)
    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:280)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:199)
    at $Proxy7.saveAndReturnArray(Unknown Source)
    at ome.formats.OMEROMetadataStore.saveToDB (OMEROMetadataStore.java:738)
    at ome.formats.importer.ImportLibrary.importMetadata(ImportLibrary.java:239)
    at ome.formats.importer.ImportHandler.importImage(ImportHandler.java:235)
    at ome.formats.importer.ImportHandler.importImages (ImportHandler.java:141)
    at ome.formats.importer.ImportHandler.access$0(ImportHandler.java:98)
    at ome.formats.importer.ImportHandler$1.run(ImportHandler.java:79)

Change History (6)

comment:1 Changed 13 years ago by jmoore

  • Owner changed from callan to jmoore
  • Status changed from new to assigned

Looking at the psql/java types:

PSQL JAVA
real float
4 Bytes 4 Byte
-1E+37 bis +1E37 ±1,5 × 10e−45 zu ± 3,4 × 10e38

double precision double
8 Bytes 8 Byte
1E-307 to 1E+308 ±5 × 10e-324 zu ± 1,7 × 10e308

The java types are slightly wider. For now to prevent any errors like this, we're going to widen all the postgres float4/real columns to float8/"double precision", while keeping the Java types at "float". This is a bit of a waste, but it will solve the immediate issue. Later, it may be necessary to move all float fields to Java double, and have some software check for types between e-307 and e-324, for example.

comment:2 Changed 13 years ago by jmoore

Sorry, that should have been

PSQL               JAVA 
real               float 
4 Bytes            4 Byte 
-1E+37 bis +1E37   ±1,5 × 10e−45 zu ± 3,4 × 10e38

double precision   double 
8 Bytes            8 Byte 
1E-307 to 1E+308   ±5 × 10e-324 zu ± 1,7 × 10e308 

comment:3 Changed 13 years ago by jmoore

  • Cc brain linkert@… added
  • Milestone changed from Unscheduled to 3.0-Beta3
  • Priority changed from minor to major

r1867 added an initial upgrade, which as mentioned in #822 led to corruption (rounding errors). Because of this, we should probably wait on the database upgrade until beta3, when we'll have more time to test it. Brian, can you catch the extreme values for b2.2? Melissa, under what circumstances do such values get importer?

comment:4 Changed 12 years ago by jmoore

  • Cc callan added

I've already begun using these upgrades for 3.0-Beta3. The instructions under wiki:UpgradeGuide_3_0_Beta3 also include instructions to do full upgrade to OMERO3__7 before upgrading to OMERO3A_1.

comment:5 Changed 12 years ago by jmoore

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

The combined upgrade for OMERO3A__3 also has the fix.

comment:6 Changed 11 years ago by jmoore

See also #1150 which converted all fields (as opposed to all columns) to doubles.

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

We're Hiring!