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"

Task #5216 (closed)

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

Bug: Version mismatch non-descriptive error

Reported by: cxallan Owned by: jamoore
Priority: critical Milestone: OMERO-4.4
Component: General Version: n.a.
Keywords: n.a. Cc: jamoore
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: 0.0d
Sprint: 2012-01-17 (6)

Description (last modified by jmoore)

When having an omero41 database the startup errors are not database version mismatches but:

Caused by: org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL [insert into session (id,permissions,timetoidle,timetolive,started,closed,defaulteventtype,uuid,owner,n
ode) values (?,-35,?,?,?,null,?,?,?,?)]; ERROR: null value in column "defaultpermissions" violates not-null constraint; nested exception is org.postgresql.util.PSQLException: ERROR: null value in column
 "defaultpermissions" violates not-null constraint
        at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:245)
        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
        at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:602)
        at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:811)
        at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:833)
        at org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.update(NamedParameterJdbcTemplate.java:233)
        at org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.update(NamedParameterJdbcTemplate.java:237)
        at org.springframework.jdbc.core.simple.SimpleJdbcTemplate.update(SimpleJdbcTemplate.java:239)
        at ome.util.actions.PostgresSqlAction.insertSession(PostgresSqlAction.java:174)
        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:307)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
        at ome.util.SqlAction$LoggingSqlAction.invoke(SqlAction.java:65)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
        at $Proxy51.insertSession(Unknown Source)
        at ome.services.sessions.SessionManagerImpl$11.doWork(SessionManagerImpl.java:1052)
        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:307)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:108)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
        at $Proxy53.doWork(Unknown Source)
        at ome.services.util.Executor$Impl.executeSql(Executor.java:420)
        at ome.services.sessions.SessionManagerImpl.executeInternalSession(SessionManagerImpl.java:1015)
        at ome.services.sessions.SessionManagerImpl.init(SessionManagerImpl.java:181)
        ... 71 more
Caused by: org.postgresql.util.PSQLException: ERROR: null value in column "defaultpermissions" violates not-null constraint
        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1608)
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1343)
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:194)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:451)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:350)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:304)
        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 bitronix.tm.resource.jdbc.BaseProxyHandlerClass.invoke(BaseProxyHandlerClass.java:63)
        at $Proxy57.executeUpdate(Unknown Source)
        at org.springframework.jdbc.core.JdbcTemplate$2.doInPreparedStatement(JdbcTemplate.java:817)
        at org.springframework.jdbc.core.JdbcTemplate$2.doInPreparedStatement(JdbcTemplate.java:1)
        at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:586)
        ... 103 more

Change History (6)

comment:1 Changed 8 years ago by jmoore

  • Owner set to jmoore
  • Remaining Time set to 0.25
  • Status changed from new to accepted

comment:2 Changed 8 years ago by jmoore

  • Description modified (diff)
  • Milestone changed from OMERO-Beta4.3.1 to Unscheduled
  • Priority changed from major to critical
  • Remaining Time changed from 0.25 to 0.5
  • Sprint 2011-07-07 (1) deleted

This is the error that appears when running against a 4.1 database, not 4.2. In order to properly check, the DbUpgradeCheck will need to be re-written to not access any of the Hibernate infrastructure, otherwise there are "circular bean definition" issues in Spring. Changing this for 4.3.1 is probably not the best idea. Pushing.

comment:3 Changed 8 years ago by jmoore

  • Milestone changed from Unscheduled to OMERO-Beta4.4
  • Remaining Time changed from 0.5 to 0.25
  • Sprint set to 2012-01-17 (6)

comment:4 Changed 8 years ago by jmoore

  • Remaining Time changed from 0.25 to 0
  • Resolution set to fixed
  • Status changed from accepted to closed

Fixed and on my sprint6-server-backlog branch.

comment:5 Changed 8 years ago by jmoore <josh@…>

(In [a3eae6b181d7816a71057b1da50761002e9995bd/ome.git] on branch develop) Run dbPatchCheck before creating sessions (Fix #5216)

comment:6 Changed 8 years ago by jmoore <josh@…>

(In [6de1a51292744d4d7a7a93fa1671c935b746374a/ome.git] on branch develop) Repair broken indexer/pixeldata (See #5216)

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

We're Hiring!