install Grails on Windows 10

49 views
Skip to first unread message

Moustafa Farouk

unread,
Mar 31, 2020, 9:28:42 AM3/31/20
to Grails Dev Discuss
I am trying to install Grails on Windows, which is an easy process. But, I got an error which I can't understand its reason?
I configured java home and grails home properly. Any idea why grails isn't installed?

C:\Users\admin>java -version
java version
"14" 2020-03-17
Java(TM) SE Runtime Environment (build 14+36-1461)
Java HotSpot(TM) 64-Bit Server VM (build 14+36-1461, mixed mode, sharing)


C
:\Users\admin>echo %grails_home%
C
:\grails-4.0.0


C:\Users\admin>grails -version
java
.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7
        at org
.codehaus.groovy.vmplugin.VMPluginFactory.<clinit>(VMPluginFactory.java:43)
        at org
.codehaus.groovy.reflection.GroovyClassValueFactory.<clinit>(GroovyClassValueFactory.java:35)
        at org
.codehaus.groovy.reflection.ClassInfo.<clinit>(ClassInfo.java:107)
        at org
.codehaus.groovy.reflection.ReflectionCache.getCachedClass(ReflectionCache.java:95)
        at org
.codehaus.groovy.reflection.ReflectionCache.<clinit>(ReflectionCache.java:39)
        at org
.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.registerMethods(MetaClassRegistryImpl.java:209)
        at org
.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:107)
        at org
.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:85)
        at groovy
.lang.GroovySystem.<clinit>(GroovySystem.java:36)
        at org
.codehaus.groovy.runtime.InvokerHelper.<clinit>(InvokerHelper.java:86)
        at org
.codehaus.groovy.runtime.ScriptBytecodeAdapter.bitwiseNegate(ScriptBytecodeAdapter.java:842)
        at org
.grails.config.NavigableMap.<clinit>(NavigableMap.groovy)
        at org
.grails.cli.GrailsCli.<clinit>(GrailsCli.groovy:77)
Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.reflection.ReflectionCache
        at org
.codehaus.groovy.runtime.dgmimpl.NumberNumberMetaMethod.<clinit>(NumberNumberMetaMethod.java:33)
        at java
.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at java
.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at java
.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java
.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
        at java
.base/java.lang.reflect.ReflectAccess.newInstance(ReflectAccess.java:124)
        at java
.base/jdk.internal.reflect.ReflectionFactory.newInstance(ReflectionFactory.java:346)
        at java
.base/java.lang.Class.newInstance(Class.java:604)
        at org
.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.createMetaMethodFromClass(MetaClassRegistryImpl.java:257)
        at org
.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:110)
        at org
.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:85)
        at groovy
.lang.GroovySystem.<clinit>(GroovySystem.java:36)
        at org
.codehaus.groovy.runtime.InvokerHelper.<clinit>(InvokerHelper.java:86)
        at org
.codehaus.groovy.runtime.ScriptBytecodeAdapter.bitwiseNegate(ScriptBytecodeAdapter.java:842)
        at org
.grails.config.NavigableMap.<clinit>(NavigableMap.groovy)
        at org
.grails.cli.GrailsCli.<clinit>(GrailsCli.groovy:77)



Daniel Leahy

unread,
Mar 31, 2020, 9:31:58 AM3/31/20
to grails-de...@googlegroups.com
I would guess that grails 4 is not compatible with java 14, try it with java 8.



--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grails-dev-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/37fa217d-e1b6-46c2-9536-4aa147fedfa7%40googlegroups.com.

Jeff Scott Brown

unread,
Mar 31, 2020, 11:38:22 AM3/31/20
to grails-de...@googlegroups.com
On 31 Mar 2020, at 8:31, Daniel Leahy wrote:

> I would guess that grails 4 is not compatible with java 14, try it
> with
> java 8.
>
>

8 would be fine but 11 is a more recent LTS version and obviously closer
to 14.



JSB

--
Jeff Scott Brown
Partner and Practice Lead, Grails and Micronaut

Disruptive solutions for a connected world.™
http://objectcomputing.com

Autism Strikes 1 in 166
Find The Cause ~ Find The Cure
http://www.autismspeaks.org/
Reply all
Reply to author
Forward
0 new messages