I want to deploy my grails app to heroku.
I have created a stack and am now at the stage where I want to push it: git push heroku master
However, I receive that:
Done precompiling AST Transformations!
| Compiling 3 source files
| Compiling 3 source files.
| Compiling 3 source files..
| Compiling 3 source files...
| Compiling 3 source files....
| Compiling 3 source files.....
-----> Executing ./grailsw -plain-output -Divy.default.ivy.user.dir=/app/tmp/cac
he war --non-interactive
|Loading Grails 2.3.4
|Configuring classpath
.
|Environment set to production
.................................
|Packaging Grails application
Precompiling AST Transformations ...
src /tmp/build_f6c7df12-acc1-407e-84b0-95928c52c3ff/target/work/plugins/p
ostgresql-extensions-0.6.1 /tmp/build_f6c7df12-acc1-407e-84b0-95928c52c3ff/targe
t/classes
Done precompiling AST Transformations!
..
|Compiling 3 source files
..................Error
|
Error packaging application: Error loading DataSource.groovy: 1 (Use --st
acktrace to see the full trace)
! Failed to build app
! Push rejected, failed to compile Grails app
To git@heroku.com:quiet-coast-2715.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:quiet-coast-2715.git'
I thought that my datasource is broken, so I thats my DataSource.groovy
:
dataSource {
pooled = true
driverClassName = "org.postgresql.Driver"
dialect = org.hibernate.dialect.PostgreSQLDialect
username = "admin"
password = "******"
}
hibernate {
cache.use_second_level_cache = true
cache.use_query_cache = false
cache.region.factory_class = 'net.sf.ehcache.hibernate.EhCacheRegionFactory' // Hibernate 3
// cache.region.factory_class = 'org.hibernate.cache.ehcache.EhCacheRegionFactory' // Hibernate 4
}
// environment specific settings
environments {
//...
production {
dataSource {
dbCreate = "update"
driverClassName = "org.postgresql.Driver"
dialect = org.hibernate.dialect.PostgreSQLDialect
uri = new URI(System.env.DATABASE_URL?:"postgres://myHerokuUsername:myPassoword@5432/TestDB")
url = "jdbc:postgresql://"+uri.host+uri.path
username = uri.userInfo.split(":")[0]
password = uri.userInfo.split(":")[1]
}
}
}
Furthermore, I have also added to my BuildConfig.groovy
:
runtime postgresql:postgresql:8.4-702.jdbc3'
I do not see what I have done wrong in my datasource?
I appreciate your answer!
PS.: Any recommendations how to get the full stacktrace in git?