Grails
  1. Grails
  2. GRAILS-7524

Shell throws flush error sometimes. Domain code unit tests fine.

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.4-M1
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Environment:
      Mac OSX 10.6.6

      Description

      Can run shell and execute the following code fine the first time. Control-C to end console (because shell does not restart). Run same commands again and get this error. Maybe hibernate session is not ended well on Control-C?

      groovy> package com.test
      groovy> def c = new Phone(number:'301-263-9169')
      groovy> c.save()

      Exception thrown

      org.hibernate.AssertionFailure: null id in com.test.Phone entry (don't flush the Session after an exception occurs)
      at org.hibernate.event.def.DefaultFlushEntityEventListener.checkId(DefaultFlushEntityEventListener.java:82)
      at org.hibernate.event.def.DefaultFlushEntityEventListener.getValues(DefaultFlushEntityEventListener.java:190)
      at org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:147)
      at org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:219)
      at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:99)
      at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)
      at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)
      at Console$_run_closure3_closure5_closure7.doCall(Console.groovy:64)
      at Console$_run_closure3_closure5.doCall(Console.groovy:63)
      at Console$_run_closure3_closure5.doCall(Console.groovy)

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Scott Eisenberg
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Last Reviewed:

              Development