grailssqljdbc

Adding .jar to Grails Dependencies of a Project


I have this project having MSSQL 2008 R2 as its database server. The connection between the Services view of IReport and the database is established and running. The problem here is that the project cannot connect to the database server when running it.

These is the error showned on grails console prior to start-up completion:

ERROR hbm2ddl.SchemaUpdate - could not complete schema update

I've seen similar case but the way to resolve it is having the driver sqljdbc4.jar put inside the [Project Name]\classpath\Grails Dependencies (project explorer heirarchy) where the driver is located in the [Project Name]\lib. But the do how has gone missing.

I've also tried to manually install the dependency following the commmand below but grails return that the driver is not found.

grials> install-dependency sqljdbc4

The question is how can I include the driver into the Grails Dependencies?


Solution

  • Assuming you are running Grails 2+, this article should help you. I also had to restart Eclipse before everything actually showed up correctly.