有沒有人得到Grails與Postgres合作?我已經使用這個tutorial,一切似乎都有道理,對我來說是正確的。然而,當我「Grails的運行程序」我得到這個錯誤與Grails一起使用Postgres
Cannot create JDBC driver of class 'org.postgresql.Driver' for connect URL 'jdbc:postgres://10.0.0.21/tribes'
java.sql.SQLException: No suitable driver
我的數據源文件是
dataSource {
pooled = true
driverClassName = "org.postgresql.Driver"
dialect = org.hibernate.dialect.PostgreSQLDialect
}
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 {
dbCreate = "update"
url = "jdbc:postgres://10.0.0.21:5432/tribes"
username = "grails"
password = "grails"
}
}
test {
dataSource {
dbCreate = "update"
url = "jdbc:postgres://10.0.0.21:5432/tribes"
username = "grails"
password = "grails"
}
}
production {
dataSource {
dbCreate = "update"
url = "jdbc:postgres://10.0.0.21:5432/tribes"
username = "grails"
password = "grails"
}
}
}
是。我已經嘗試了幾個版本,但很確定我有正確的一個 – 2009-10-06 20:49:30