Cannot create application with Grails - grails

I've downloaded Grails from
Manual Installation
https://docs.grails.org/latest/guide/gettingStarted.htm
and followed all the instructions there.
But when I ran
grails create-app helloworld --stacktrace
I got the error:
| Error Error occurred running Grails CLI: Could not find artifact org.grails:grails-bom:pom:3.3.9 in nexus (http://<ip>:<port>/nexus/content/groups/public) (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact org.grails:grails-bom:pom:3.3.9 in nexus (http://<ip>:<port>/nexus/content/groups/public)
at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:39)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:355)
at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:581)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:249)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:520)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:367)
at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.resolve(AetherGrapeEngine.java:318)
at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.resolve(AetherGrapeEngine.java:300)
at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.resolve(AetherGrapeEngine.java:292)
at org.grails.cli.boot.GrailsDependencyVersions.<init>(GrailsDependencyVersions.groovy:54)
at org.grails.cli.boot.GrailsDependencyVersions.<init>(GrailsDependencyVersions.groovy:50)
at org.grails.cli.profile.repository.MavenProfileRepository.<init>(MavenProfileRepository.groovy:53)
at org.grails.cli.GrailsCli.createMavenProfileRepository(GrailsCli.groovy:333)
at org.grails.cli.GrailsCli.execute(GrailsCli.groovy:234)
at org.grails.cli.GrailsCli.main(GrailsCli.groovy:159)
| Error Error occurred running Grails CLI: Could not find artifact org.grails:grails-bom:pom:3.3.9 in nexus (http://<ip>:<port>/nexus/content/groups/public)
Has anyone experienced the same issue? I've googled it but there aren't many results and the suggested solutions didn't help me.
The one "did nothing" and it started working, and the other suggested cleaning maven repository. I didn't do the last one as I didn't see how a fresh Grails installation is related to installed Maven... However I'm new to Grails.
Maybe a proxy should be set...
Nope. When I tried to set proxy I got:
grails add-proxy client --host=<ip> --port=<port>
| Error Error occurred running Grails CLI: Could not find artifact org.grails:grails-bom:pom:3.3.9 in nexus (http://<ip>:<port>/nexus/content/groups/public) (Use --stacktrace to see the full trace)
All that happened when I used Grails 3.3.9 on Windows 10

Using Grails version 2.5.0 fixed the error for me.

Related

How to set grails proxy have error & grails install

i want to know error grails can you help me
|Loading Grails 2.4.0
|Configuring classpath
Error |
Resolve error obtaining dependencies: Failed to read artifact descriptor for xalan:serializer:jar:2.7.1 (Use --stacktrace to see the full trace)
Error |
Required Grails build dependencies were not found. This is normally due to internet connectivity issues (such as a misconfigured proxy) or missing repositories in grails-app/conf/BuildConfig.groovy. Please verify your configuration to continue.
Process finished with exit code 1
In Grails 2, the proxy is configured and set in a file that (I believe) is in your ~/.grails directory. There are command-line arguments for setting that documented in the grails documentation here: https://grails.github.io/grails2-doc/2.4.2/ref/Command%20Line/add-proxy.html
In general you would do something like
grails add-proxy client --host=proxy-server --port=4300 --username=guest --password=guest
And then activate it like
grails set-proxy client

unable to start grails application

Hi since 2 days i've got an error i can't understand when i try to run my app asset pipeline have some trouble
Error |Resolve error obtaining dependencies: Could not transfer artifact org.grails.plugins:asset-pipeline:zip:1.9.9 from/to grailsCentral (https://repo.grails.org/grails/plugins): Received fatal alert: protocol_version (Use --stacktrace to see the full trace)
If any idea for these kind of problems known that i've the same issues with all my grails version

Grails 3.1.4 cannot run-app

I have just moved to the new Grails 3.1, and my first app in Grails worked fine. But when I created a another new Grails 3.1 app I ran into a new problem; the problem occurs when try to run using run-app interactively in the new application root:
| Running application...
Error: Could not find or load main class try3grails.Application
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':bootRun'.
> Process 'command '/usr/lib/jvm/java-8-oracle/bin/java'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
| Error Failed to start server (Use --stacktrace to see the full trace)
The class try3grails.Application referers to the first app's main method class I created; so the error seems to be that Grails cannot 'forget' the old app classpath. Does any one have a solution to this or is there something I missed?
Running grails --version gives:
| Grails Version: 3.1.4
| Groovy Version: 2.4.6
| JVM Version: 1.8.0_77
Grails is installed using SDKMan on a ubuntu linux machine.
Make sure you are running run-app from the right directory.
Also try to do some cleaning:
grails clean could help.
If nothing helps - you can clear grails/gradle cache, or create a new app.
I believe I have found "workaround" by updating the gradle wrapper version from 2.9 to 2.12(or 2.10 works too).
This is done by updating the version number in gradle.properties
and in gradle/wrapper/gradle-wrapper.properties, and then executing:
./gradlew wrapper

"Error occurred running Grails CLI: null" when running grails 3.0 command line

I'm trying to run grails list-profiles, but receive the following error:
snowch#snowch-ws2:~/repos$ grails list-profiles --stacktrace
| Error Error occurred running Grails CLI: null (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
java.lang.NullPointerException
at org.grails.cli.profile.git.GitProfileRepository.getAllProfiles(GitProfileRepository.groovy:72)
at org.grails.cli.profile.commands.ListProfilesCommand.handle(ListProfilesCommand.groovy:43)
at org.grails.cli.GrailsCli.execute(GrailsCli.groovy:173)
at org.grails.cli.GrailsCli.main(GrailsCli.groovy:99)
| Error Error occurred running Grails CLI: null
My versions are:
snowch#snowch-ws2:~/repos$ grails --version
| Grails Version: 3.0.1
| Groovy Version: 2.4.3
| JVM Version: 1.7.0_75
This was on a fresh install of grails and gvm.
The command grails create-app myapp works without error.
This question is similar to Grails 3.0 error, nullpointer, however, that question does not state what command is being run.
After searching online, I found that I needed to set my GRAILS_OPTS environment variable as follows before running the command:
export GRAILS_OPTS="-XX:-UseSplitVerifier -Xverify:none"
Source of fix: https://grails.org/news/1292028
I have not figured out, what is the exact cause of the error, but it seems to occur if you try to run grails 3 in the system where grails 2 is also installed.
What I did to get the command run - I created the project in a new directory. The directory for my old grails app was:
/home/me/projects/oldgrailsapp
when I tried to execute the grails command in /home/me/projects it failed, but when I tried this in another directory /home/me/projects_new, it succeeded. So I guess that the problem was that old grails configuration was somehow interfering with the new one.
I also removed references to old grails and groovy versions from the PATH variable by editing .bashrc file in my home directory (I really do not know if it was needed).
I had same experience when I was working on "Building an Andoird Client" guide, I got the following message whenever I try to create an app in the same folder where I've created the first app grails-app :
| Error Error occurred running Grails CLI: null (Use --stacktrace to see the ful
l trace)
So obviously, when you create a grails app in folder containing "grails-app" directory, grails will consider this folder as full grails application, hence cannot create-app in that directory.
I used:
Grails 3.1.15
Java 1.8.0.101
Hope this help.
It worked for me now.
this was my setting
GRAILS_HOME=C:\Users\murali.solayappan\apps\grails-3.1.11
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_102
I received the same error while launching "grails" for the first time
**Error occurred running Grails CLI: connect timed out**
After reading GRAILS_HOME\bin\grails.bat i found that executing "grails" while in GRAILS_HOME dir makes some difference. So I did the same
Now i received error stating that GRAILS couldn't find a particular maven package from my mirror repository - printed my private nexus repository url. I know that's my private repo and not connected to internet.
so I changed the MY_HOME_DIR.m2\"settings.xml" with the one came by default in Maven.
After that executed "grails" while in %GRAILS_HOME% dir.
It worked like breeze !!! I got grails prompt.
C:\Users\murali.solayappan\apps>grails
| Enter a command name to run. Use TAB for completion:
grails> exit
Somethimes it happens when you have wrong version of grails installed for the project you want to run it on
try to run it somewhere else and see if you get the same error
i had the same issue because i was using Grails 1.3.5 witj Java 8 which are incompatibles. I changed with Java 7 and it works fine.

Grails VM exited with error

I am facing problem in executing a the test cases for grails application. I'm using grails 2.3.7 and jdk1.7.0_25. when I am trying to perform the test-app command to test my grails application, I am getting the bellow error.
|Loading Grails 2.3.7 |Configuring classpath . |Environment set to test ...................................... |Running without daemon... Error | Error running forked test-app: org/codehaus/gant/GantBinding (Use --stacktrace to see the full trace) Error | Forked Grails VM exited with error
any guess, why this type of error comes? Please check in this regard and suggest any help.
It looks like this may be an issue with a missing tools.jar file, according to this bug. Seems like it may have been fixed in a later version of Grails, so if you can't add the jar, perhaps upgrading may help.

Resources