Grails lattice issue: Hibernate session is not thread related,

I am trying to learn the Grails console and there is a problem. It looks like this:

When I start the grails console in my project WITHOUT starting the project, I can save the data in my postgreSQL database.

However, when I started the project (after error messages appeared from netbeans output), I can no longer do what I did from the Grails console.

He says the following:

An exception was thrown: the Hibernate session is not associated with the stream, and the configuration does not allow the creation of a non-transactional transaction here

....

This means that I lost the Hibername session when starting my project through netbean ...

Can someone give me a hand?

Thank you very much in advance!

John

+3
1

DomainClass.withTransaction {

}

+3

Source: https://habr.com/ru/post/1738459/


All Articles