grails 2.5.4 won't start from terminal StackOverflowError - grails

I'm running grails 2.5.4(I cannot upgrade the version), it successfully runs in my IDE (intellij) but I cannot get any grails command to run from the terminal. Even if I type just "grails" and nothing else, it will throw an error.
The error is:Exception: java.lang.StackOverflowError thrown from the UncaughtExceptionHandler in thread "main"
I can't seem to get anymore information out of it with --verbose
Also, I am running java 8

so I found out what was going on through excessive trial an error. The issue was that I had db2 installed on my machine. I don't know why that was causing the issue. But for anyone that might be running into this issue, that's what the problem was for me.

We had the same problem; in our case, all it took was an empty .inputrc file in the user's home directory to make grails work.

Related

Exception with running Neo4j version 3 communitiy edition

I unpacked the tar file of Neo4j linux version.
When running the server (./bin start) it seems like the server is up, but I cant access the browser (although I get a message it is ready).
Running the console (./bin console) - returns an error: "Error: Could not find or load main class org.neo4j.server.CommunityEntryPoint"
Did anyone also encountered this issue? How can I solve this?
Thank you
How did you run ./bin console? I'm curious since such a thing does not exist.
To start up the database you use bin/neo4j start - then you point your browser to localhost:7474.
For command line based access use bin/neo4j-shell.

"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 from command line gets number format exceptions in threads and cannot recover

When running Grails in the Windows Command Prompt in development mode, after invoking run-app, I often get a few NumberFormatExceptions thrown for Threads after making changes to code and saving. This particularly happens when changing conf files or if there is a compile error in my code.
The only way to recover that I've found is to close the command prompt window, open a new one, start Grails again, then issue a stop-app and run-app.
Is there another way?
Text from the command window is below:
| Compiling 1 source files.
grails>
Exception: java.lang.NumberFormatException thrown from the UncaughtExceptionHandler in thread "Thread-14"
Exception: java.lang.NumberFormatException thrown from the UncaughtExceptionHandler in thread "Thread-24"
#BurtBeckwith found the solution to this. It appears to be related to running grails on a Windows development environment. Raised in JIRA: http://jira.grails.org/browse/GRAILS-9356. The issue occurs when you start a DOS command window, type "grails" then within grails, do run-app. The solution is to start the DOS command window and type "grails run-app" together. It runs much more stable like this. Then, closing the command window kills the java.exe task and no need to do a stop-app.

No thread-bound Exception after installing grails profiler plugin

After I installed the profiler plugin (http://grails.org/plugin/profiler) I started getting the following error for every request to my server:
2012-03-01 14:57:42,224 ERROR: [[default]] Servlet.service() for servlet default threw exception
java.lang.IllegalStateException: No thread-bound request found: Are you referring to request attributes outside of an actual web request, or processing a request outside of the originally receiving thread? If you are actually operating within a web request and still receive this message, your code is probably running outside of DispatcherServlet/DispatcherPortlet: In this case, use RequestContextListener or RequestContextFilter to expose the current request.
at org.springframework.web.context.request.RequestContextHolder.currentRequestAttributes(RequestContextHolder.java:131)
at org.codehaus.groovy.grails.web.util.WebUtils.retrieveGrailsWebRequest(WebUtils.java:497)
at org.codehaus.groovy.grails.plugins.springsecurity.AnnotationFilterInvocationDefinition.determineUrl(AnnotationFilterInvocationDefinition.java:63)
at org.codehaus.groovy.grails.plugins.springsecurity.AbstractFilterInvocationDefinition.getAttributes(AbstractFilterInvocationDefinition.java:77)
at org.springframework.security.access.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:171)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:106)
I can paste the full exception if desired. If I uninstall the plugin, the error disappears.
I am running grails 1.3.7
I searched for related issues, and this is the closest I could find: http://padcom13.blogspot.com/2011/12/grails-heroku-and-spring-security-core.html I attempted the fix Padcom suggested, but it didn't seem to work here.
Has anyone run into this issue or have some idea how to fix it?
I fixed this earlier this week with version 0.4 of the plugin. It depends on the webxml plugin, but that should be automatically installed with version 0.4. If not you can manually install it.
Okay, so the problem here was a little annoying to figure out. Burt was on the right track, it was related to webxml being installed. It seems like when its installed, spring-security-core version 1.1.3 was causing the error. When I updated to 1.2.7 (as suggested by Burt in this thread: http://grails.1312388.n4.nabble.com/No-thread-bound-request-error-with-Spring-security-ldap-plugin-on-Grails-2-td4270779.html ) the problem went away and I was able to install profiler without any issues.
So, the oddity here was that spring-security-core 1.1.3 only seems to cause this exception when webxml is installed (any version).

Grails hangs on command line

I just downloaded Grails 2.0.1.
Created a new project and then tried adding the mysql connector as per the documentation but Grails hangs at command prompt without any message. I tried to execute in verbose and stacktrace mode but it prints nothing.
I tried cleaning and re-executing but all the grails commands are getting stuck.
They don't print anything beyond "configuring classpath" message .
Please help.
Thanks
Cleaning .ivy cache helps
$HOME/.grails/ivy-cache
Had the same problem on grails 2.0.4.
The cause was one of the repos not responding and grails waits for it to timeout.
Setting log "verbose" in BuildConfig.groovy helped me find which repository caused the problem.
Try to add --offline to te command
$ grails clean --offline
worked for me, as I was stuck on configuring classpath due to unresolved dependencies.

Resources