Using Grails 3.1.9, spring-security-core 3.1.1 and spring-security-ui3.0.M2 I get the following when executing
grails s2ui-override layout
Command [s2ui-override] error: class path resource [layouts/springSecurityUI.gsp] cannot be opened because it does not exist (Use --stacktrace to see the full trace)
Any dieas on how to fix this or if spring-security-ui is even worth using? I noticed the only releases appear to have been milestone releases.
Same error here... I think I simply used the template from source: https://github.com/grails-plugins/grails-spring-security-ui/blob/master/grails-app/views/layouts/springSecurityUI.gsp
Related
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
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.
Whenever I enter the grails command: test-app I get this error:
Error executing script TestApp: java.lang.ClassNotFoundException: grails.plugin.spock.test.GrailsSpecTestType (Use --stacktrace to see the full trace)
In my BuildConfig.groovy I have:
grails.project.dependency.resolution = {
...
plugins {
...
compile ":spock:0.7"
}
}
I've tried replacing it with test ":spock:0.7" . I've also tried cleaning the application and refreshing the dependencies but no luck.
Any ideas what it could be and how I could fix it?
Thanks
With Grails 2.4.0 you don't need to make any mention of Spock in BuildConfig.groovy. See the sample project at https://github.com/jeffbrown/spockdemo.
When you can, you should look at upgrading to the latest in the 2.4.x line. A number of issues have been addressed since 2.4.0 was released.
I hope that helps.
#zzKozak is correct - you should upgrade. It has no bearing here, but getting to the latest version of Grails within your minor version (in this case 2.4.3) should happen before you ask others for help with issue that could have been fixed youself with a simple upgrade.
In 2.4, Grails switched to Spock tests by default, and you have to uninstall the old plugin since they're incompatible. Delete that line in BuildConfig.groovy and change your base classes to core the new Grails/Spock base classes. For integration queries, use grails.test.spock.IntegrationSpec. For unit tests and more information about this, check out the testing section in the docs: http://grails.org/doc/latest/guide/testing.html
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.
I have developed a Grails application and have deployed it many times to Heroku without an issue. However just recently I have changed the solution to use plugins from within a folder I have called "plugins". I have then basically added the following code to the BuildConfig in order to include those plugins in the application:
grails.plugin.location.'spring-security-ui'="plugins/grails-spring-security-ui"
Now when I run the delpoy to Heroku I get the following error:
|Generating plugin.xml for inline plugin
Error |
Error executing script War: java.lang.NullPointerException: Cannot get property 'file' on null object (Use --stacktrace to see the full trace)
! Failed to build app
! Heroku push rejected, failed to compile Grails app
I think this is due to the new plugins I have added to the solution via the new method. Can anyone tell me if I am missing something or what is wrong??
Also I have tested this locally and runs fine :-S
Thanks
EDIT 1......
I have tried to build the WAR file locally i got the following:
Building WAR file.....
| Error Exception occurred trigger event [CreateWarStart]: /home/admin/workspace/APP_NAME/grails-app/migrations does not exist. (Use --stacktrace to see the full trace)
| Done creating WAR target/APP_NAME-0.1.war
Try grails war locally to see if you can reproduce the problem.
This might possibly be related to GRAILS-9006 which was fixed in 2.0.4.
From trying multiple different things I have found that Heroku is rubbish at handling local plugins within Grails. So I moved over to Jelastic and runs like a dream :-)
Thanks for the help!!