Search code examples
javahibernatetomcatgrails

Grails default app not deploying to tomcat


I have a very basic grails app which was generated using create-app and creating a simple controller. It works locally, but when I use 'grails war' and deploy it in a tomcat server, there seems to be a database issue. The last 'caused by' in the tomcat logs is

Caused by: org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set

I have not made any changes to the database configuration generated by create-app (thus using an embedded DB).

The environment is: grails 3, debian 9, tomcat 8.

How to solve this ?


Solution

  • Running grails war causes the production environment configuration to be used, by default. The db config is different for production and is probably the cause of the problem. You should try grails -Dgrails.env=development war or grails dev war instead.