When I try to debug my code it shows the below error in GGTS, how can I resolve it?
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: org.grails.plugins#code-coverage;1.1.7: not found
:: org.grails.plugins#tomcat;1.3.1: not found
:: org.grails.plugins#hibernate;1.3.1: not found
::::::::::::::::::::::::::::::::::::::::::::::
| Error Failed to resolve dependencies
(Set log level to 'warn' in BuildConfig.groovy for more information):
- org.grails.plugins:code-coverage:1.1.7
- org.grails.plugins:tomcat:1.3.1
- org.grails.plugins:hibernate:1.3.1
Did you just upgrade your grails version?
Grails changed a bit how it handles tomcat and hibernate versions.
In your BuildConfig.groovy, replace your tomcat line by build ":tomcat:7.0.47"; and your hibernate line by runtime ":hibernate:3.6.10.6" // or ":hibernate4:4.1.11.6"
Related
I am trying to upgrade a project to grails version 2.4.4 but it keep failing with the following error message:
:: problems summary ::
:::: WARNINGS
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: cglib#cglib;2.2.2: configuration not found in cglib#cglib;2.2.2: 'compile'. It was required from org.grails#grails-plugin-testing;2.4.4 runtime
::::::::::::::::::::::::::::::::::::::::::::::
Error |
Resolve error obtaining dependencies: Failed to resolve dependencies (Set log level to 'warn' in BuildConfig.groovy for more information):
- cglib:cglib:2.2.2
(Use --stacktrace to see the full trace)
Error |
Failed to resolve dependencies (Set log level to 'warn' in BuildConfig.groovy for more information):
- cglib:cglib:2.2.2
|Run 'grails dependency-report' for further information.
This s kind of weird since the library is available. I can see it under grails-2.4.4\lib\cglib\cglib\jars and in my home directory under .grails\ivy-cache\cglib\cglib\jars
My GRAILS_HOME is set correctly and for what I can see all looks fine but when I do a refresh dependencies it keeps throwing this error.
In upgrading from Grails 2.1 to 2.4.4 I found I had that same issue. The resolution was to explicitly set:
grails.project.dependency.resolver = "maven"
in BuildConfig.groovy. Then I was able to move on to the next issue in the upgrade ... ;-)
When I need searchable 0.6.5 plugin for grails 2.2.3, I modifed BuildConfigh.groovy as following:
dependencies {
compile ":searchable:0.6.5"
}
plugins {
runtime ":hibernate:$grailsVersion"
runtime ":jquery:1.8.3"
runtime ":resources:1.2"
test(":spock:0.7") {
exclude "spock-grails-support"}
// Uncomment these (or add new ones) to enable additional resources capabilities
//runtime ":zipped-resources:1.0"
//runtime ":cached-resources:1.0"
//runtime ":yui-minify-resources:0.1.5"
build ":tomcat:$grailsVersion"
runtime ":database-migration:1.3.2"
compile ':cache:1.0.1'
compile ":searchable:0.6.5"
}
After saving the file, I refresh dependency in order to install the plugin, but I got the message below:
Loading Grails 2.2.3
| Configuring classpath
| Downloading: searchable-0.6.5.pom.sha1
:: problems summary ::
:::: ERRORS
grailsCentral: bad organisation found in http://grails.org/plugins/grails-searchable/tags/RELEASE_0_6_5/searchable-0.6.5.pom: expected='' found='org.grails.plugins'
| Downloading: searchable-0.6.5.pom.sha1
:: problems summary ::
:::: ERRORS
grailsCentral: bad organisation found in http://grails.org/plugins/grails-searchable/tags/RELEASE_0_6_5/searchable-0.6.5.pom: expected='' found='org.grails.plugins'
| Downloading: searchable-0.6.5.pom.sha1
:: problems summary ::
:::: ERRORS
grailsCentral: bad organisation found in http://grails.org/plugins/grails-searchable/tags/RELEASE_0_6_5/searchable-0.6.5.pom: expected='' found='org.grails.plugins'
| Error Failed to resolve dependencies (Set log level to 'warn' in BuildConfig.groovy for more information):
- :searchable:0.6.5
Process was killed
I thought it could be my internet problem, but I checked the internet connection is OK. Did you encounter problem like this? Could anyone help me solve install searchable 0.6.5 problem? Many thanks.
You can't use version 0.6.5 with 2.2.3 - see the notes at the plugin page: http://grails.org/plugin/searchable
Use version 0.6.4. The only difference is a trivial fix to get the plugin working in 2.3.
Am using Grails 2.1.2 on Windows 7 64-Bit System, at the time of compile it gives below error, kindly help me how to fix this.
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: org.grails.plugins#mail;1.0-SNAPSHOT: not found
:: org.grails.plugins#tomcat;1.3.2: not found
:: org.grails.plugins#hibernate;1.3.2: not found
:: org.grails.plugins#csl-rest-lib;1.0: not found
::::::::::::::::::::::::::::::::::::::::::::::
In BuildConfig.groovy, try to declare the dependencies:
dependencies {
compile 'org.grails.plugins:mail:1-0-SNAPSHOT'
compile 'org.grails.plugins:tomcat:1.3.2'
...
}
If your application was updated from grails 1.3 (<2.) or create from grails 2., you need to check plugins version on the grails plugins
For example, current version of mail plugin is 1.0.1 mail plugin
And also you need to check this dependencies at conf/BuildConfig.groovy. It must have part like this:
plugins {
build ":tomcat:$grailsVersion"
runtime ":hibernate:${grailsVersion}"
runtime ":resources:1.1.6"
...
Describe your plugins at plugins part.
And you need to check latest libraries for plugins and describe it like this:
dependencies {
// specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes eg.
compile('org.apache.poi:poi:3.7',
'org.apache.poi:poi-contrib:3.6',
'org.apache.poi:poi-ooxml:3.7',
'antlr:antlr:2.7.6',
'org.apache.ant:ant-apache-log4j:1.7.1'
..
I have a app developed in grails 1.3.x and I upgraded to 2.0.4, There was an dependency error in the spring security plugin, so i did grails install-plugin spring-security-core, It installed 1.2.7.3 version. Then I ran the grails application, I got the below error.
Compilation error: startup failed:
Compile error during compilation with javac.
C:\Users\Vinay.hs\.grails\2.0.4\projects\steer\plugins\spring-security-core-1.2.7.3\src\java\org\codehaus\groovy\grails\plugins\springs
ecurity\AjaxAwareAuthenticationFailureHandler.java:48: cannot find symbol
symbol : method saveException(javax.servlet.http.HttpServletRequest,org.springframework.security.core.AuthenticationException)
location: class org.codehaus.groovy.grails.plugins.springsecurity.AjaxAwareAuthenticationFailureHandler
saveException(request, exception);
^
Then I added compile ':spring-security-core:1.2.7.3'. I got a different error as below
:::: WARNINGS
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: #spring-security-core;1.2.7.3: java.text.ParseException: inconsistent module descriptor file found in 'http://plugin
s.grails.org/grails-spring-security-core/tags/RELEASE_1_2_7_3/spring-security-core-1.2.7.3.pom': bad organisation: expected='' found='o
rg.grails.plugins';
::::::::::::::::::::::::::::::::::::::::::::::
:::: ERRORS
grailsCentral: bad organisation found in http://plugins.grails.org/grails-spring-security-core/tags/RELEASE_1_2_7_3/spr
ing-security-core-1.2.7.3.pom: expected='' found='org.grails.plugins'
I referred this jira issue, According to that we have to change the dependency to runtime, but it it was giving me the below error
inconsistent module descriptor file found in 'http://plugins.grails.org/grails-spring-security-core/tags/RELEASE_1_2_7_3/spring-security-core-1.2.7.3.pom': bad organisation: expected='' found='org.grails.plugins';
So, How to resolve this issue.
Looks like you put the dependency in the BuildConfig.groovy dependencies section but it should be in the plugins section:
plugins {
runtime ":hibernate:$grailsVersion"
build ":tomcat:$grailsVersion"
...
compile ':spring-security-core:1.2.7.3'
}
I'm running Grails 2.1.0 and I can't install the webflow plugin:
$ grails install-plugin webflow
| Plugin installed.
$ grails
| Configuring classpath
:: problems summary ::
:::: WARNINGS
module not found: org.springframework.webflow#org.springframework.webflow;2.0.8.RELEASE
...
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: org.springframework.webflow#org.springframework.webflow;2.0.8.RELEASE: not found
:: org.springframework.webflow#org.springframework.binding;2.0.8.RELEASE: not found
:: org.springframework.webflow#org.springframework.js;2.0.8.RELEASE: not found
::::::::::::::::::::::::::::::::::::::::::::::
Does anyone have any ideas?
Thanks
install-plugin is deprecated in grails 2.0. Edit plugins section from BuildConfig.groovy file:
plugins{
...
compile ":webflow:2.0.0"
}
And happy webflow coding. By the way, if you want understand more deeply grails webflow I recomend you to read http://livesnippets.cloudfoundry.com/docs/