Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can not create-app using grails 2.5.5 #10011

Closed
snimavat opened this issue Jun 25, 2016 · 44 comments
Closed

can not create-app using grails 2.5.5 #10011

snimavat opened this issue Jun 25, 2016 · 44 comments
Labels
Milestone

Comments

@snimavat
Copy link
Contributor

snimavat commented Jun 25, 2016

@graemerocher

  • Steps to reproduce
    -- Install grails 2.5.5 using sdkman
    -- run command grails create-app (or just start grails console using > grails)
  • Stacktrace
        module not found: org.codehaus.groovy#groovy-all;2.4.4
    ==== grailsPlugins: tried
      -- artifact org.codehaus.groovy#groovy-all;2.4.4!groovy-all.jar:
      /Users/sudhir/work/9ci/lib/groovy-all-2.4.4.jar
    ==== grailsHome: tried
      /Users/sudhir/.sdkman/candidates/grails/2.5.5/lib/org.codehaus.groovy/groovy-all/ivy-2.4.4.xml
      -- artifact org.codehaus.groovy#groovy-all;2.4.4!groovy-all.jar:
      /Users/sudhir/.sdkman/candidates/grails/2.5.5/lib/org.codehaus.groovy/groovy-all/jars/groovy-all-2.4.4.jar
      /Users/sudhir/.sdkman/candidates/grails/2.5.5/lib/org.codehaus.groovy/groovy-all/bundles/groovy-all-2.4.4.jar
    ==== grailsHome: tried
      /Users/sudhir/.sdkman/candidates/grails/2.5.5/dist/groovy-all-2.4.4.pom
      -- artifact org.codehaus.groovy#groovy-all;2.4.4!groovy-all.jar:
      /Users/sudhir/.sdkman/candidates/grails/2.5.5/dist/groovy-all-2.4.4.jar
    ==== grailsHome: tried
      /Users/sudhir/.grails/2.5.5/cached-installed-plugins/groovy-all-2.4.4.xml
      -- artifact org.codehaus.groovy#groovy-all;2.4.4!groovy-all.jar:
      /Users/sudhir/.grails/2.5.5/cached-installed-plugins/groovy-all-2.4.4.jar
    ==== grailsHome: tried
      /Users/sudhir/.sdkman/candidates/grails/2.5.5/plugins/groovy-all-2.4.4.pom
      -- artifact org.codehaus.groovy#groovy-all;2.4.4!groovy-all.jar:
      /Users/sudhir/.sdkman/candidates/grails/2.5.5/plugins/groovy-all-2.4.4.jar
        ::::::::::::::::::::::::::::::::::::::::::::::
        ::          UNRESOLVED DEPENDENCIES         ::
        ::::::::::::::::::::::::::::::::::::::::::::::
        :: org.codehaus.groovy#groovy-all;2.4.4: not found
        ::::::::::::::::::::::::::::::::::::::::::::::

| Error Resolve error obtaining dependencies: Failed to resolve dependencies (Set log level to 'warn' in BuildConfig.groovy for more information):

- org.codehaus.groovy:groovy-all:2.4.4

 (Use --stacktrace to see the full trace)
:: problems summary ::
:::: WARNINGS
        module not found: org.codehaus.groovy#groovy-all;2.4.4
    ==== grailsPlugins: tried
      -- artifact org.codehaus.groovy#groovy-all;2.4.4!groovy-all.jar:
      /Users/sudhir/work/9ci/lib/groovy-all-2.4.4.jar
    ==== grailsHome: tried
      /Users/sudhir/.sdkman/candidates/grails/2.5.5/lib/org.codehaus.groovy/groovy-all/ivy-2.4.4.xml
      -- artifact org.codehaus.groovy#groovy-all;2.4.4!groovy-all.jar:
      /Users/sudhir/.sdkman/candidates/grails/2.5.5/lib/org.codehaus.groovy/groovy-all/jars/groovy-all-2.4.4.jar
      /Users/sudhir/.sdkman/candidates/grails/2.5.5/lib/org.codehaus.groovy/groovy-all/bundles/groovy-all-2.4.4.jar
    ==== grailsHome: tried
      /Users/sudhir/.sdkman/candidates/grails/2.5.5/dist/groovy-all-2.4.4.pom
      -- artifact org.codehaus.groovy#groovy-all;2.4.4!groovy-all.jar:
      /Users/sudhir/.sdkman/candidates/grails/2.5.5/dist/groovy-all-2.4.4.jar
    ==== grailsHome: tried
      /Users/sudhir/.grails/2.5.5/cached-installed-plugins/groovy-all-2.4.4.xml
      -- artifact org.codehaus.groovy#groovy-all;2.4.4!groovy-all.jar:
      /Users/sudhir/.grails/2.5.5/cached-installed-plugins/groovy-all-2.4.4.jar
    ==== grailsHome: tried
      /Users/sudhir/.sdkman/candidates/grails/2.5.5/plugins/groovy-all-2.4.4.pom
      -- artifact org.codehaus.groovy#groovy-all;2.4.4!groovy-all.jar:
      /Users/sudhir/.sdkman/candidates/grails/2.5.5/plugins/groovy-all-2.4.4.jar
        ::::::::::::::::::::::::::::::::::::::::::::::
        ::          UNRESOLVED DEPENDENCIES         ::
        ::::::::::::::::::::::::::::::::::::::::::::::
        :: org.codehaus.groovy#groovy-all;2.4.4: not found
        ::::::::::::::::::::::::::::::::::::::::::::::

| Error Resolve error obtaining dependencies: Failed to resolve dependencies (Set log level to 'warn' in BuildConfig.groovy for more information):

- org.codehaus.groovy:groovy-all:2.4.4

 (Use --stacktrace to see the full trace)
:: problems summary ::
:::: WARNINGS
        module not found: org.codehaus.groovy#groovy-all;2.4.4
    ==== grailsPlugins: tried
      -- artifact org.codehaus.groovy#groovy-all;2.4.4!groovy-all.jar:
      /Users/sudhir/work/9ci/lib/groovy-all-2.4.4.jar
    ==== grailsHome: tried
      /Users/sudhir/.sdkman/candidates/grails/2.5.5/lib/org.codehaus.groovy/groovy-all/ivy-2.4.4.xml
      -- artifact org.codehaus.groovy#groovy-all;2.4.4!groovy-all.jar:
      /Users/sudhir/.sdkman/candidates/grails/2.5.5/lib/org.codehaus.groovy/groovy-all/jars/groovy-all-2.4.4.jar
      /Users/sudhir/.sdkman/candidates/grails/2.5.5/lib/org.codehaus.groovy/groovy-all/bundles/groovy-all-2.4.4.jar
    ==== grailsHome: tried
      /Users/sudhir/.sdkman/candidates/grails/2.5.5/dist/groovy-all-2.4.4.pom
      -- artifact org.codehaus.groovy#groovy-all;2.4.4!groovy-all.jar:
      /Users/sudhir/.sdkman/candidates/grails/2.5.5/dist/groovy-all-2.4.4.jar
    ==== grailsHome: tried
      /Users/sudhir/.grails/2.5.5/cached-installed-plugins/groovy-all-2.4.4.xml
      -- artifact org.codehaus.groovy#groovy-all;2.4.4!groovy-all.jar:
      /Users/sudhir/.grails/2.5.5/cached-installed-plugins/groovy-all-2.4.4.jar
    ==== grailsHome: tried
      /Users/sudhir/.sdkman/candidates/grails/2.5.5/plugins/groovy-all-2.4.4.pom
      -- artifact org.codehaus.groovy#groovy-all;2.4.4!groovy-all.jar:
      /Users/sudhir/.sdkman/candidates/grails/2.5.5/plugins/groovy-all-2.4.4.jar
        ::::::::::::::::::::::::::::::::::::::::::::::
        ::          UNRESOLVED DEPENDENCIES         ::
        ::::::::::::::::::::::::::::::::::::::::::::::
        :: org.codehaus.groovy#groovy-all;2.4.4: not found
        ::::::::::::::::::::::::::::::::::::::::::::::

| Error Resolve error obtaining dependencies: Failed to resolve dependencies (Set log level to 'warn' in BuildConfig.groovy for more information):

- org.codehaus.groovy:groovy-all:2.4.4

 (Use --stacktrace to see the full trace)
| Error Failed to resolve dependencies (Set log level to 'warn' in BuildConfig.groovy for more information):

- org.codehaus.groovy:groovy-all:2.4.4
  • Operating System: OSX EI Capitan
  • Grails Version: 2.5.5
  • JDK Version: 1.7.0_79
@snimavat
Copy link
Contributor Author

I see that i have /Users/sudhir/.sdkman/candidates/grails/2.5.5/lib/org.codehaus.groovy/groovy-all/jars/groovy-all-2.4.5.jar available instead of /Users/sudhir/.sdkman/candidates/grails/2.5.5/lib/org.codehaus.groovy/groovy-all/jars/groovy-all-2.4.4.jar

@graemerocher
Copy link
Member

I can't reproduce this personally

@snimavat
Copy link
Contributor Author

snimavat commented Jun 25, 2016

i just installed a fresh 2.5.5 copy using sdk man, tried to create a sample app, and it failed with above error, also i dont have groovy-all 2.4.4 jar at the location it is looking for (inside grails-home/lib/xxx) - instead there's 2.4.5 jar available at tht location

@snimavat
Copy link
Contributor Author

Ok, so i downloaded and manually put the 2.4.4 jar at the location it was expecting and it worked.

@snimavat
Copy link
Contributor Author

Just a note: before i did create-app - i did grails compile (after changing grails.version to 2.5.5 in application.properties) on one of the old project which was on grails 2.4.4. if that makes any difference.

@osscontributor
Copy link
Member

I also cannot reproduce this problem.

@osscontributor
Copy link
Member

Grails 2.5.5 uses Groovy 2.4.5. The errors above indicate that Grails is looking for Groovy 2.4.4. It looks like your environment somehow got confused.

@snimavat
Copy link
Contributor Author

snimavat commented Jun 27, 2016

@jeffbrown i had the issue, i dont know how come i had no groovy 2.4.4 in /Users/sudhir/.sdkman/candidates/grails/2.5.5/lib/org.codehaus.groovy/groovy-all/jars .. (instead i had groovy 2.4.5 jar there)

I just manually put the groovy 2.4.4 jar there, and i am good. if you want you can close the issue.. but it was definitely looking for groovy 2.4.4

@osscontributor
Copy link
Member

i dont know how come i had no groovy 2.4.4 in /Users/sudhir/.sdkman/candidates/grails/2.5.5/lib/org.codehaus.groovy/groovy-all/jars .. (instead i had groovy 2.4.5 jar there)

That is expected:

~ $ ls ~/.sdkman/candidates/grails/2.5.5/lib/org.codehaus.groovy/groovy-all/jars
groovy-all-2.4.5-javadoc.jar    groovy-all-2.4.5-sources.jar    groovy-all-2.4.5.jar
~ $ ls ~/.sdkman/candidates/grails/2.5.4/lib/org.codehaus.groovy/groovy-all/jars
groovy-all-2.4.4-javadoc.jar    groovy-all-2.4.4-sources.jar    groovy-all-2.4.4.jar

@snimavat
Copy link
Contributor Author

Ah okay, so from logs, you can see grails was looking for groovy 2.4.4 - its a freshly installed grails using sdkman

@osscontributor
Copy link
Member

Ah okay, so from logs, you can see grails was looking for groovy 2.4.4

Yes, I see that. I don't know why that is though and can't reproduce it.

@osscontributor
Copy link
Member

Can you try this?

rm -rf ~/.sdkman/candidates/grails/2.5.5/
sdk install grails 2.5.5
sdk use grails 2.5.5
mkdir ~/someNewDir
cd ~/someNewDir
grails create-app demo

And let us know if the problem persists?

@snimavat
Copy link
Contributor Author

snimavat commented Jun 27, 2016

Just tried, and works perfect, no idea what went wrong the first time..

@osscontributor
Copy link
Member

Thanks for the feedback.

@katherinessmith
Copy link

I've run into a similar problem installing grails 2.5.5 via sdkman.

sdk install groovy 2.4.4
sdk use groovy 2.4.4
sdk install grails 2.5.5
sdk use grails 2.5.5
grails create-app test

Same errors as snimavat

        module not found: org.codehaus.groovy#groovy-all;2.4.4
    ==== grailsPlugins: tried
      -- artifact org.codehaus.groovy#groovy-all;2.4.4!groovy-all.jar:
      /Users/ksmith/Repos/lib/groovy-all-2.4.4.jar
    ==== grailsHome: tried
      /Users/ksmith/.sdkman/candidates/grails/2.5.5/lib/org.codehaus.groovy/groovy-all/ivy-2.4.4.xml
      -- artifact org.codehaus.groovy#groovy-all;2.4.4!groovy-all.jar:
      /Users/ksmith/.sdkman/candidates/grails/2.5.5/lib/org.codehaus.groovy/groovy-all/jars/groovy-all-2.4.4.jar
      /Users/ksmith/.sdkman/candidates/grails/2.5.5/lib/org.codehaus.groovy/groovy-all/bundles/groovy-all-2.4.4.jar
    ==== grailsHome: tried
      /Users/ksmith/.sdkman/candidates/grails/2.5.5/dist/groovy-all-2.4.4.pom
      -- artifact org.codehaus.groovy#groovy-all;2.4.4!groovy-all.jar:
      /Users/ksmith/.sdkman/candidates/grails/2.5.5/dist/groovy-all-2.4.4.jar
    ==== grailsHome: tried
      /Users/ksmith/.grails/2.5.5/cached-installed-plugins/groovy-all-2.4.4.xml
      -- artifact org.codehaus.groovy#groovy-all;2.4.4!groovy-all.jar:
      /Users/ksmith/.grails/2.5.5/cached-installed-plugins/groovy-all-2.4.4.jar
    ==== grailsHome: tried
      /Users/ksmith/.sdkman/candidates/grails/2.5.5/plugins/groovy-all-2.4.4.pom
      -- artifact org.codehaus.groovy#groovy-all;2.4.4!groovy-all.jar:
      /Users/ksmith/.sdkman/candidates/grails/2.5.5/plugins/groovy-all-2.4.4.jar
        ::::::::::::::::::::::::::::::::::::::::::::::
        ::          UNRESOLVED DEPENDENCIES         ::
        ::::::::::::::::::::::::::::::::::::::::::::::
        :: org.codehaus.groovy#groovy-all;2.4.4: not found
        ::::::::::::::::::::::::::::::::::::::::::::::

| Error Resolve error obtaining dependencies: Failed to resolve dependencies (Set log level to 'warn' in BuildConfig.groovy for more information):

- org.codehaus.groovy:groovy-all:2.4.4

 (Use --stacktrace to see the full trace)

Removing the directory or running sdk rm grails 2.5.5 and trying again doesn't fix the problem.

rm -rf ~/.sdkman/candidates/grails/2.5.5/
repeat above
same errors

sdk rm grails 2.5.5
sdk rm groovy 2.4.4

repeat above
same errors

Everything works fine with grails 2.5.4.

I also have other versions of grails/groovy for other applications I work on.

Same OS/versions as snimavat:
Operating System: OSX EI Capitan
Grails Version: 2.5.5
JDK Version: 1.7.0_79

A coworker can reproduce with Yosemite.

@katherinessmith
Copy link

katherinessmith commented Jun 30, 2016

Third time's the charm, and as soon as I posted this, it started working.

The below fixed it for a coworker and me, though the previous suggestion did not:

uninstall 2.5.5 with sdk or removing the candidate directory
sdk install grails 2.5.4
sdk use grails 2.5.4
grails create-app x
delete that application
sdk install grails 2.5.5
sdk use grails 2.5.5
grails create-app x then works

@olavgg
Copy link

olavgg commented Jul 5, 2016

I also had the same problem. To work around this I did as @katherinessmith said and created a new app with Grails 2.5.4.

If you want to reproduce this I guess a new Linux installation with openjdk should reproduce this.

@ZacharyKlein
Copy link
Member

I can reproduce this issue on OS X El Capitan, fresh install of 2.5.5 from sdkman.

@thojo
Copy link

thojo commented Jul 14, 2016

Same problem here. The dependency report lists Groovy 2.4.4 as dependency of org.grails:grails-bootstrap:

build - Dependencies for the build system only (total: 26)
+--- xalan:serializer:2.7.2
+--- org.grails:grails-bootstrap:2.5.5
|    \--- org.apache.ant:ant-launcher:1.9.4
|    \--- org.apache.ant:ant-junit:1.9.4
|    \--- org.slf4j:jcl-over-slf4j:1.7.5
|    \--- org.codehaus.groovy:groovy-all:2.4.4
|    \--- jline:jline:2.12
|    \--- net.java.dev.jna:jna:4.0.0
|    \--- org.fusesource.jansi:jansi:1.11
|    \--- org.codehaus.gant:gant_groovy1.8:1.9.6
|    \--- org.apache.ant:ant-trax:1.7.1
|    \--- org.apache.ivy:ivy:2.3.0
|    \--- org.slf4j:slf4j-api:1.7.5
|    \--- org.apache.ant:ant:1.9.4
...

So I think @jeffbrown is right with his comment (0ec157d#comments). There should be Groovy 2.4.5 in GrailsCoreDependencies ...

@gschueler
Copy link

same problem installing with sdkman

@osscontributor
Copy link
Member

same problem installing with sdkman

I doubt sdkman has anything to do with it.

@snimavat
Copy link
Contributor Author

snimavat commented Jul 15, 2016

Was setting up a new linux vm, and same problem.. also removing and reinstalling doesnt help

@gschueler
Copy link

to follow up: using sdkman to install 2.5.4 first, and then 2.5.5 worked as suggested by @katherinessmith

@marvinthepa
Copy link

I have the same problem with an existing app, org.grails:grails-bootstrap:2.5. depending on org.codehaus.groovy:groovy-all:2.4.4 in grails 2.5.5. Grails was not installed using sdkman, but downloaded manually.
I get the same bogus dependency when using the grails wrapper when installed using grails 2.5.5.

@topr
Copy link

topr commented Sep 7, 2016

I'm facing the same issue. Although I haven't got to the bottom of it, I was able to figure out why this odd sequence with using version 2.5.4 and just then 2.5.5 works.

  1. Grails 2.5.5 still pulls groovy-all 2.4.4. It's in dependency-report report.
  2. When app is created with grails installed in the system (whether it is via sdkman or not) then grails resolves dependencies by default with ivy.
  3. When wrapper is used it usually happens from within an existing app, in which BuildConfig.groovy by default has set dependency resolving with maven. Maven is able to fetch groovy 2.4.4 while it fails with ivy (at least for grails 2.5.5). This inconsistent behaviour may lead to cannot reproduce situation, I guess.
  4. Grails 2.5.4 fetches dependencies with ivy well, grails 2.5.5 fails on some.
  5. Speaking shortly to reproduce ( @jeffbrown ): delete groovy-all folder from ivy cache and ensure create-app is run with ivy as dependency resolver.

As I'm migrating some legacy app from grails 2.2.1 to 2.5.5 and this app didn't have maven set as dependency resolver, it has happened to me that the same issue manifested itself not only on groovy-all-2.4.4 but on other dependencies as well.
For example groovy-all-2.4.5 and spring-test-4.1.8.RELEASE. Setting resolver to maven solved that.
Seems there might be some bug related to ivy resolver in grails 2.5.5 plus possible some reference left to older version of groovy as jars for both versions of groovy-all are pulled: 2.4.4 and 2.4.5, while dependency-report command shows only 2.4.4.

Another evidence of the same issue 'fixed' with switching to maven resolver, this time failure was on cglib jar:
http://stackoverflow.com/questions/27145013/grails-2-4-4-unresolved-dependencies-cglib-2-2-2

One more evidence of the issue itself but as well multiple groovy-all versions dependency I mentioned above - here it's failing on groovy-all-2.4.5:
http://stackoverflow.com/questions/38829209/grails-upgrade-to-2-5-5-unresolved-dependencies-groovy-all-2-4-5

@bernji
Copy link

bernji commented Sep 9, 2016

EDIT: ok. The "fix" is to create a project with 2.5.4 and then you can create a project with 2.5.5

@osscontributor
Copy link
Member

@rpalcolea Yes. See my comment at the bottom of 0ec157d

@rpalcolea
Copy link
Contributor

Oops! didn't see that :( my mistake

@astecker
Copy link

Same Problem here using manually downloaded zip under Windows 7 64bit / Oracle JDK 8.

@snimavat
Copy link
Contributor Author

Is it going to be fixed in next 2.5.x ?

@graemerocher
Copy link
Member

if there is another 2.x release yes

@snimavat
Copy link
Contributor Author

snimavat commented Oct 16, 2016

Can we have it fixed plz and a 2.5.6 release.. this is really painful to not to be able to create-app or plugins, or a hot fix or just a patch build..

Whts the use of 2.5.5 if devs cant create app/plugins without doing some hacks... and lots of ppl are facing this issue, there are questions on stackoverflow pointing to this ticket.

@graemerocher graemerocher added the relates-to: v2 Grails 2 label Oct 28, 2016
@ken-roberts
Copy link

+1 for 2.5.6 release. We shouldn't have to dirty up our grails installation because of a bug.

@larsauswsw
Copy link

larsauswsw commented Nov 30, 2016

grails.project.dependency.resolver = "maven"
in BuildConfig.groovy fixed it for me.

@wehe64
Copy link

wehe64 commented Feb 3, 2017

still the same over here - also using sdkman.
and also, first installing grails 2.5.4 and create-app with that did help...
kinda weird and quite ugly, but this page helped a lot.
+1 for a 2.5.6 or whatever the fix would be
thanks everyone! weHe

@mdaloia
Copy link

mdaloia commented Feb 16, 2017

As a workaround, you can define an environment variable specifying the Groovy version:

export CI_GROOVY_VERSION=2.4.5

@ciscoo
Copy link

ciscoo commented Mar 3, 2017

Same issue on Windows and macOS, fresh install of 2.5.5 and grails create-app fails with the same stacktrace above.

@jpalmer1026
Copy link

Same issue here as well.

@snimavat
Copy link
Contributor Author

snimavat commented Mar 10, 2017

Create a brand new docker container for 2.5.5 and trying to run grails console would fail with same error too. CI_GROOVY_VERSION=2.4.5 worked

@pguerin
Copy link

pguerin commented Mar 13, 2017

+1 for 2.5.6 ! Please.

@ColinHarrington
Copy link
Contributor

It does look like an old dependency declaration as Jeff noted. There are several workarounds:

FYI, I can reproduce this in docker: https://github.com/ColinHarrington/grails-10011

@graemerocher graemerocher added this to the grails-2.5.6 milestone Mar 21, 2017
graemerocher added a commit that referenced this issue Mar 21, 2017
@snimavat
Copy link
Contributor Author

Thanks for the release @graemerocher

@ghost
Copy link

ghost commented Mar 31, 2021

  1. Install Grails 2.5.5 and Get Grails 2.4.4
  2. Copy/transfer groovy-all from Grails 2.4.4 to Grails 2.5.5 [ jar dependency match]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests