HibernateException in Grails 3 whenever doing GORM in console or shell

95 views
Skip to first unread message

Paul Waldo

unread,
Dec 5, 2015, 3:03:28 PM12/5/15
to Grails Dev Discuss

In grails 2.x I could perform GORM operation in both the console and shell.  Now when I try to do the same thing in 3.0.9, I get this error:


groovy:000> Person.count()

ERROR org.springframework.dao.DataAccessResourceFailureException:

Could not obtain current Hibernate Session; nested exception is org.hibernate.HibernateException: No Session found for current thread


I can wrap my statements in a transaction, but that defeats the ease of the shell and the console.  Any ideas how to resolve this?  Thanks!

Paul

Milton Hagler

unread,
Sep 16, 2016, 8:17:09 AM9/16/16
to Grails Dev Discuss
Same issue with 3.0.19. 

Runs perfectly inside Intellij IDE, using run-app and as a JAR file from the command line, but not as a WAR file in Tomcat 7. 


Reply all
Reply to author
Forward
0 new messages