grails-gson icon indicating copy to clipboard operation
grails-gson copied to clipboard

error running grails compile : unable to resolve class org.apache.commons.beanutils.PropertyUtils

Open mnickel opened this issue 10 years ago • 12 comments

Getting this error: unable to resolve class org.apache.commons.beanutils.PropertyUtils

when running: grails compile grails version: 2.4.0

I am admittedly very new to grails but learning!! Thank you!

error details:

| Compiling 14 source files

| Compiling 14 source files

| Compiling 15 source files
  [groovyc] org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
  [groovyc] /Users/marknickel/mainline/development/github/grails-gson/src/groovy/grails/plugin/gson/adapters/GrailsDomainSerializer.groovy: 7: unable to resolve class org.apache.commons.beanutils.PropertyUtils
  [groovyc]  @ line 7, column 1.
  [groovyc]    import org.apache.commons.beanutils.PropertyUtils
  [groovyc]    ^
  [groovyc]
| Compiling 15 source files.
| Error Compilation error: startup failed:
/Users/marknickel/mainline/development/github/grails-gson/src/groovy/grails/plugin/gson/adapters/GrailsDomainSerializer.groovy: 7: unable to resolve class org.apache.commons.beanutils.PropertyUtils
 @ line 7, column 1.
   import org.apache.commons.beanutils.PropertyUtils
   ^

1 error

mnickel avatar Jun 04 '14 19:06 mnickel

run into the same problem. Grails version: 2.4.3

amlee avatar Sep 22 '14 14:09 amlee

Same problem... Grails 2.4.4

Iptron avatar Dec 28 '14 00:12 Iptron

  • 1 Have the same issue. Is there a resolution to this issue ?

Gigen

gigenthomas avatar Mar 20 '15 19:03 gigenthomas

:+1:

maheshchari avatar May 22 '15 06:05 maheshchari

same issue here, Grails 2.5.0

zxzjim avatar Jul 10 '15 21:07 zxzjim

After some digging, it's possible to work around this problem by adding compile "commons-beanutils:commons-beanutils:1.9.2" to your dependencies in BuildConfig.groovy along with commons-lang3. I'm having other issues with the plugin in Grails 2.5.0 as well, but this at least allows it to compile.

vilhalmer avatar Aug 04 '15 15:08 vilhalmer

I have same issue Grails 2.5.1

richardwooding avatar Sep 11 '15 10:09 richardwooding

@vilhalmer added compile "commons-beanutils:commons-beanutils:1.9.2" as you suggested along with mavenRepo "http://repo.grails.org/grails/core". but i keep getting error - Could not find artifact commons-beanutils:commons-beanutils:zip:1.9.2 in grailsCentral (https://repo.grails.org/grails/plugins) Not sure why is it looking in grailsCentral rather than the grails core repo i added.

Has anyone else got over this issue. I am developing REST API for my app and this plugin looked awesome when it comes to binding of nested domain classes, but this issue is blocking one.

ask10000 avatar Dec 08 '15 04:12 ask10000

to all struggling with this, getting beanutils from apache site and putting the jar to /lib folder solved the issue for me

amfg avatar Jun 28 '16 09:06 amfg

I had the same issue with the export excel plugin and grails 2.4.4, I used 1.9.3 jar file from here: http://repo.grails.org/grails/core/commons-beanutils/commons-beanutils/1.9.3/ put it in lib folder, then added: repositories { mavenRepo "http://repo.grails.org/grails/core" ... } ... plugins { ... compile ":export:1.6" } and the problem solved.

bitsnaps avatar Aug 06 '17 18:08 bitsnaps

Hi All, I had placed commons-beanutils-1.9.3.jar under /lib/ directory and added the following in BuildConfig.groovy

repositories { mavenRepo "http://repo.grails.org/grails/core" ... } ... plugins { ... compile ":export:1.6" }

But still I get the following error: | Configuring classpath | Error Resolve error obtaining dependencies: Could not find artifact commons-beanutils:commons-beanutils:zip:1.9.2 in grailsCentr al (http://repo.grails.org/grails/plugins) (Use --stacktrace to see the full trace) | Error Resolve error obtaining dependencies: Could not find artifact commons-beanutils:commons-beanutils:zip:1.9.2 in grailsCentr al (http://repo.grails.org/grails/plugins) (Use --stacktrace to see the full trace) | Error Resolve error obtaining dependencies: Could not find artifact commons-beanutils:commons-beanutils:zip:1.9.2 in grailsCentr al (http://repo.grails.org/grails/plugins) (Use --stacktrace to see the full trace) | Error Could not find artifact commons-beanutils:commons-beanutils:zip:1.9.2 in grailsCentral (http://repo.grails.org/grails/plug ins) | Run 'grails dependency-report' for further information.

I am have this issue with grails 2.4.1 please help me ASAP!!!!

vvara avatar Apr 05 '18 09:04 vvara

@vvara you may need to grails clean first before running

matthiasak avatar May 08 '18 18:05 matthiasak