1

I am using grails dbm plugin to insert records with in transaction so that I don't need to use 'flush:true'. But somehow it hangs & does not go forward. This used to work fine without withTransaction & with 'flush:true'.

Can you please let me know what is wrong with this code?

grailsChange {
                    change {
                        def list1 =     [record1,record2]

                        list1.each {
                            DomainClass.withTransaction{
                                    new DomainClass(it).save(failOnError: true)
                                  }

                            }
                    }
                }   

console log says...

Starting dbm-update for database test @ jdbc:postgresql://localhost:5432/test

& does not go forward...& after long time I get this exception

iquibase.exception.LockException: Could not acquire change log lock.  Currently locked by ... since ....
user1298426
  • 2,537
  • 7
  • 34
  • 72
  • I searched for the exception & got the answer here http://stackoverflow.com/questions/15528795/liquibase-lock-reasons – user1298426 Mar 26 '14 at 09:45

0 Answers0