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

  • Home
  • SEARCH
  • 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 6135125
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:26:28+00:00 2026-05-23T17:26:28+00:00

I have configured for the MySql database in grails by installing MySql in my

  • 0

I have configured for the MySql database in grails by installing MySql in my system and placed its driver in X/lib directory(where X is my app name). I have changed the DataSource.groovy to conflict the changes. But when i run my app using the command grails run-app i’m getting an error as

 ERROR spring.BeanBuilder  - WARNING: Your cache provider is set to 'com.opensymphony.oscache.hibernate.OSCacheProvider' in DataSource.groovy, however the class for this provider cannot be found.

And Grails started to use its built in database..

How to get rid of this error?

DataSource.groovy Code is:

dataSource {
pooled = true
driverClassName = "com.mysql.jdbc.Driver"
username = "grails"
password = "server"
}
hibernate {
cache.use_second_level_cache = true
cache.use_query_cache = true
cache.provider_class =
'com.opensymphony.oscache.hibernate.OSCacheProvider'
}
// environment specific settings
environments {
development {
dataSource {
// one of 'create', 'create-drop','update'
dbCreate = "create-drop"
url = "jdbc:mysql://localhost:3306/racetrack_dev?autoreconnect=true"
}
}
test {
dataSource {
dbCreate = "update"
url = "jdbc:mysql://localhost:3306/racetrack_dev?autoreconnect=true"
}
}
production {
dataSource {
dbCreate = "update"
url = "jdbc:mysql://localhost:3306/racetrack_dev?autoreconnect=true"
}
}
}

Thanks in advance.

  • 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-23T17:26:28+00:00Added an answer on May 23, 2026 at 5:26 pm

    What version of grails are you using to create that DataSource.groovy file?

    Grails 1.3.7 has the hibernate block as:

    hibernate {
        cache.use_second_level_cache = true
        cache.use_query_cache = true
        cache.provider_class = 'net.sf.ehcache.hibernate.EhCacheProvider'
    }
    

    Which I think would explain your error message? (as you have set it up to use the old OSCacheProvider


    Edit

    These are the steps I just tried, and it all worked as expected:

    1. Make a new database (I called mine ants)

    2. Create the grails app

      grails create-app ants
      cd ants
      
    3. Edit the grails-app/conf/BuildConfig.groovy file, and uncomment the lines:

      mavenCentral()
      

      and

      runtime 'mysql:mysql-connector-java:5.1.13'
      
    4. Edit the file grails-app/conf/DataSource.groovy.

      Change the dataSource block to:

      dataSource {
          pooled = true
          driverClassName = "com.mysql.jdbc.Driver"
          username = ""
          password = ""
      }
      

      And the url (in each of the environments) to

          url = "jdbc:mysql://localhost:3306/ants?autoreconnect=true"
      
    5. Create a domain class:

      grails create-domain-class ants.Runners
      
    6. Run the app

      grails run-app
      

    Then, when you inspect the DB, you will have a runners table

    I am guessing that you are inspecting the wrong database (you have a dev, test, and main db set up, one for each environment)

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

Sidebar

Related Questions

I have MySQL running on my machine configured with MyISAM as its default tables.
I have a mysql DB configured with the innoDB storage engine. I dropped the
I have some jsp pages that connect to a mysql database and I intermittently
I'm using Grails 1.3.7 + MySQL 5.5 + Liquibase through the database-migration plugin 0.2.1.
I have a tomcat instance setup but the database connection I have configured in
I have web app in jsf2.0 on tomcat 6 and MySQL. I'm using special
I am migrating a mysql database from one site to another. Its encodign: utf8
I am using Hibernate to access MySQL database for my java application. I configured
I'm working with JPA (Hibernate as provider) and an underlying MySQL database. I have
I have configured java to dump garbage collection information into the logs ( verbose

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.