Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6891529
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:25:18+00:00 2026-05-27T06:25:18+00:00

I have a grails app that I am trying to deploy onto Tomcat. I

  • 0

I have a grails app that I am trying to deploy onto Tomcat. I used to develop on hsql and wanted to use mysql for production. But when I build the war by running

grails prod war demo.war 

and deploy the created war in the tomcat/webapps directory, I get the following error

INFO: Deploying web application archive demo.war
2011-11-29 17:30:03,193 [Thread-2] INFO  cfg.Environment  - Hibernate 3.3.1.GA
2011-11-29 17:30:03,224 [Thread-2] INFO  cfg.Environment  - hibernate.properties not found
2011-11-29 17:30:03,240 [Thread-2] INFO  cfg.Environment  - Bytecode provider name : javassist
2011-11-29 17:30:03,251 [Thread-2] INFO  cfg.Environment  - using JDK 1.4 java.sql.Timestamp handling
2011-11-29 17:31:25,451 [Thread-2] ERROR context.ContextLoader  - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messageSource': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Cannot resolve reference to bean 'hibernateProperties' while setting bean property 'hibernateProperties'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateProperties': Cannot resolve reference to bean 'dialectDetector' while setting bean property 'properties' with key [hibernate.dialect]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dialectDetector': Invocation of init method failed; nested exception is org.springframework.jdbc.support.MetaDataAccessException: Error while extracting DatabaseMetaData; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class 'org.hsqldb.jdbcDriver' for connect URL 'jdbc:mysql://localhost:3306/demoapp?autoreconnect=true'
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)

What’s puzzling is that I have removed the hsql dependency completely from the Datasource.groovy file. Here is how my Datasource.groovy looks now.

dataSource {
    pooled = true
    driver.name = "com.mysql.jdbc.Driver"   
    username = "root"
    password = "root"
}
hibernate {
    cache.use_second_level_cache = true
    cache.use_query_cache = true
    cache.provider_class = 'net.sf.ehcache.hibernate.EhCacheProvider'
}
// environment specific settings
environments {
    development {
        dataSource {
            dbCreate = "create-drop" // one of 'create', 'create-drop','update'
            pooled = true
            driver.name = "com.mysql.jdbc.Driver"
            url = "jdbc:mysql://localhost/demoapp_dev?autoreconnect=true"
            username = "root"
            password = ""
        }
    }
    test {
        dataSource {
            pooled = true
            driver.name = "com.mysql.jdbc.Driver"
            dbCreate = "update"
            url = "jdbc:mysql://localhost/demoapp_test?autoreconnect=true"
            username = "root"
            password = ""
        }
    }
    production {
        dataSource {
            pooled = true
            driver.name = "com.mysql.jdbc.Driver"
            dbCreate = "update"
            url = "jdbc:mysql://localhost/demoapp?autoreconnect=true"
            username = "root"
            password = ""
        }
    }
}

How do I get around this problem? Any help is appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T06:25:18+00:00Added an answer on May 27, 2026 at 6:25 am

    Try using driverClassName instead of driver.name to define your DataSource driver.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Grails app that loads its data from xml files and delivers
My current requirement is: I have to package my grails app and use teamcity
I have been trying for 4 days to get app-engine and grails working together
I have a Grails 2.0.0 project that was created using grails create-app . In
Im building a Grails app that will have multiple similar websites (each it's own
All, I am trying to test my grails app using Hudson. I have in
I have a grails app that uses functionality from a set of custom java
I have a Groovy/Grails web app that reads e-mails from Gmail. It gets messages
I have noticed that after my Grails app has been deployed for about 2
I have a Grails 1.3.7 application and am trying to setup log4j for production

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.