Reputation: 303
I've updated my project's grails version but unable to run the application because of dependencies. I know what the problem is, which is made obvious by the logs, but I'm not sure how to go about fixing it. I could use help.
"C:\Program Files\Java\jdk1.7.0_11\bin\java" -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:49981,suspend=y,server=n -Dgrails.home=C:\Users\per245\.grails\2.4.0 -Dbase.dir=C:\Users\per245\workWebsites\spine\Website "-Dtools.jar=C:\Program Files\Java\jdk1.7.0_11\lib\tools.jar" -Dgroovy.starter.conf=C:\Users\per245\.grails\2.4.0/conf/groovy-starter.conf -Xmx768M -Xms768M -XX:MaxPermSize=256m -XX:PermSize=256m -Djline.WindowsTerminal.directConsole=false -javaagent:C:\Users\per245\.grails\2.4.0\lib\org.springframework\springloaded\jars\springloaded-1.2.0.RELEASE.jar -noverify -Dspringloaded=profile=grails -Dfile.encoding=UTF-8 -classpath "C:\Users\per245\.grails\2.4.0\lib\org.codehaus.groovy\groovy-all\jars\groovy-all-2.3.1.jar;C:\Users\per245\.grails\2.4.0\dist\grails-bootstrap-2.4.0.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA 13.1.3\lib\idea_rt.jar" org.codehaus.groovy.grails.cli.support.GrailsStarter --main org.codehaus.groovy.grails.cli.GrailsScriptRunner --conf C:\Users\per245\.grails\2.4.0/conf/groovy-starter.conf "run-app -plain-output"
Connected to the target VM, address: '127.0.0.1:49981', transport: 'socket'
|Loading Grails 2.4.0
|Configuring classpath
Error |
Resolve error obtaining dependencies: Failed to resolve dependencies (Set log level to 'warn' in BuildConfig.groovy for more information):
- org.grails.plugins:tomcat:2.4.0
(Use --stacktrace to see the full trace)
Error |
Resolve error obtaining dependencies: Failed to resolve dependencies (Set log level to 'warn' in BuildConfig.groovy for more information):
- org.grails.plugins:hibernate:2.4.0
- org.springframework:spring-test:4.0.5.RELEASE
(Use --stacktrace to see the full trace)
Error |
Resolve error obtaining dependencies: Failed to resolve dependencies (Set log level to 'warn' in BuildConfig.groovy for more information):
- org.grails.plugins:hibernate:2.4.0
(Use --stacktrace to see the full trace)
Disconnected from the target VM, address: '127.0.0.1:49981', transport: 'socket'
Error |
Failed to resolve dependencies (Set log level to 'warn' in BuildConfig.groovy for more information):
- org.grails.plugins:tomcat:2.4.0
|Run 'grails dependency-report' for further information.
Process finished with exit code 1
Upvotes: 1
Views: 1295
Reputation: 1615
It could be achieved via explicitly setting versions to tomcat 7.0.x and hibernate 4.3.x or 3.6.x, but those two are not the only one, because scaffolding, resources / asset-pipeline have to be updated as well.
The better solution seems to be, to create a new 2.4.0 app, and copy your content in the new app. This is also proposed in the Book "Programming Grails" by Burt Beckwith. The advantage of this approach is, that you can check new default config settings explicitly and then decide, which one of your config settings have to change or could even be removed. After changing the config settings you can move your contents into the new app and adjust controllers / domain classes to the new stuff (like the respond method, which was introduced in 2.3).
Upvotes: 1
Reputation: 50245
Starting from version 2.3, those plugins (tomcat, hibernate) do not carry the same version as the surrounding Grails version.
Create a brand new app in 2.4.0 and copy the entries of tomcat and hibernate to the one which was upgraded from 2.2.3 to 2.4.0.
Upvotes: 2