Hi I'm not sure if this has been asked before. I...
# questions
j
Hi I'm not sure if this has been asked before. I'm trying to create a Grails application using 4.0.12 and whenever I try to run the create-app command I get 416 error. Any idea what could possibly be wrong? I'm using Java 11 (OpenJDK Runtime Environment Corretto-11.0.16.8.1) Gradle 6.5.1
s
Hi @Jitin Dominic Just did a sample run:
Copy code
āÆ sdk current

Using:

grails: 4.0.12
java: 11.0.21-tem
āÆ grails create-app sample
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/home/sbglasius/.sdkman/candidates/grails/4.0.12/lib/org.codehaus.groovy/groovy/jars/groovy-2.5.14.jar) to method java.lang.Object.finalize()
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
UserDir: /home/sbglasius/projects/sandbox
| Application created at /home/sbglasius/projects/sandbox/sample
So it works here, What is your OS? Mine is Linux (Ubuntu 22.04 LST)
j
Mine is also Ubuntu 22.04
s
From your screenshot it looks like Ivy or Maven are getting their dependencies wrong, the server is throwing a 416. Could it be that you have a special setup for either Ivy or Maven? I'm not sure what it would be though.
j
Nope
Nothing specific
I've a Grails 2.5.4 application
and now I switched to 4.0.12 to create a new app
s
and you're not behind a proxy?
j
and got this issue
No No proxies involved
s
This is the result of my 4.0.12
grails create-app sample
j
Thank you for this
But it's really strange why this issue is happening
s
At least it will give you an option to do a
grails run-app
to see if it will resolve your dependencies.
j
Yes, the application is running fine
s
ok, then I'm currently out of ideas...
j
šŸ˜… Thank you
šŸ‘ 1
p
It seems like you're encountering a 416 error when trying to create a Grails application using version 4.0.12. This error typically indicates that the server is unable to fulfill the request due to an invalid range request header. Here are a few steps you can try to troubleshoot and resolve this issue: 1. Check Network Connectivity: Ensure that your internet connection is stable and that there are no network issues blocking the download. 2. Proxy Settings: If you're behind a proxy, make sure your proxy settings are configured correctly in Gradle (
gradle.properties
file) and your environment variables. 3. Clear Gradle and Maven Cache: Sometimes, cached artifacts can cause issues. Try clearing the Gradle cache by manually deleting the
~/.gradle
and the
~/.m2
folder. 4. Check Grails Version Compatibility: Ensure that Grails
4.0.12
is compatible with the versions of Java and other dependencies you're using (Try using Java 8). If these steps don't resolve the issue, please provide more details or try running the command with the
--verbose
flag to see the complete stack trace. This information will help in diagnosing the root cause of the error. Best regards, Puneet
šŸ™Œ 1
āœ… 1
j
Thank you, Puneet. Points #1, 2 and 4 are okay at my end. I will try point #3 by deleting the gradle and m2 folder.