Grails 2.4.4 UNRESOLVED DEPENDENCIES cglib 2.2.2 - grails

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 ... ;-)

Related

This what I get in GGTS what to do to resolve it?

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"

grails upgrade from 2.2.0 to 2.3.4

Hi I upgraded my Grails application from 2.2.0 to Grails 2.3.4, but I'm getting this error :
|Loading Grails 2.3.4
|Configuring classpath
Error |
Resolve error obtaining dependencies: Failed to resolve dependencies (Set log level to 'warn' in BuildConfig.groovy for more information):
- org.apache.tomcat.embed:tomcat-embed-core:7.0.47
- org.apache.tomcat:tomcat-catalina-ant:7.0.47
- org.apache.tomcat.embed:tomcat-embed-jasper:7.0.47
(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:grails-datastore-gorm-hibernate:2.0.6.RELEASE
- junit:junit-dep:4.10
(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:grails-datastore-gorm-hibernate:2.0.6.RELEASE
(Use --stacktrace to see the full trace)
Error |
Failed to resolve dependencies (Set log level to 'warn' in BuildConfig.groovy for more information):
- org.apache.tomcat.embed:tomcat-embed-core:7.0.47
- org.apache.tomcat:tomcat-catalina-ant:7.0.47
- org.apache.tomcat.embed:tomcat-embed-jasper:7.0.47
Any recommendations to fix this issue ?
From the Grails 2.3.4 Release Notes
If you are upgrading from previous versions of Grails 2.3.x and you use the Hibernate and/or Tomcat plugins you will need to update the versions in BuildConfig:
build ':tomcat:7.0.47'
runtime ':hibernate:3.6.10.6'
And since you are upgrading from 2.3, I think you should also read What's new in Grails 2.3?
Grails 2.3.4 requires you to upgrade most of your dependencies. I don't know all but I think you have to upgrade hibernate to hibernate 3. Here's what my current project's BuildConfig looks like:
dependencies {
// specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes e.g.
runtime 'mysql:mysql-connector-java:5.1.24'
//compile 'com.paypal.sdk:merchantsdk:2.4.103'
compile 'joda-time:joda-time:2.2'
compile ('org.apache.poi:poi:3.9','org.apache.poi:poi-ooxml:3.9')
compile 'com.stripe:stripe-java:1.3.0'
}
plugins {
// plugins for the build system only
build ":tomcat:7.0.41"
// plugins for the compile step
compile ":scaffolding:2.0.0.RC1"
compile ':cache:1.1.1'
// plugins needed at runtime but not for compilation
runtime ":hibernate:3.6.10.6" // or ":hibernate4:4.1.11.M2"
runtime ":database-migration:1.3.5"
compile ":jquery:1.10.2"
runtime ":resources:1.2"
// Uncomment these (or add new ones) to enable additional resources capabilities
//runtime ":zipped-resources:1.0.1"
//runtime ":cached-resources:1.1"
//runtime ":yui-minify-resources:0.1.5"
//app plugins
compile ':webflow:2.0.8.1'
compile ":mail:1.0.1"
compile ":asynchronous-mail:1.0-RC5" //1.0
compile ":spring-security-core:1.2.7.3"
compile ':excel-export:0.1.10'
compile ":spring-security-core:1.2.7.3"
test ":spock:0.7"
}
This works for me.

Unable to Install searchable 0.6.5 for grails 2.2.3

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.

Error in Spring Security core plugin while upgrading grails from 1.3.x to 2.0.4

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'
}

Grails 2.1.0 unable to install webflow plugin

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/

Resources