Details
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
- All
- Comments
- Work Log
- History
- Activity
- Git Commits