I have upgraded my Grails project from version 2.1.2 to 2.2.3. Before the upgrade, the project worked flawlessly. However, I am not able to run the project now. I get a strange error :
| Compiling 143 source files.....
| Error Error generating web.xml file (Use --stacktrace to see the full trace)
and the compilation stops.
I thought that the "--stacktrace" option would provide some useful information. However, I am not able to decipher the error.
Error here > http://pastebin.com/zwR4YzXS
Googling / searching this problem did not help. I hope I am not the only one, who is getting this error.
Thank you for your advices !
Some useful info :
Grails 2.2.3
Java version :
java version "1.7.0_21"
OpenJDK Runtime Environment (IcedTea 2.3.9) (7u21-2.3.9-0ubuntu0.12.10.1)
OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)
OS: Ubuntu 12.04 x64
Faced the same issue while working with grails 2.3.2. Actually, I added and then removed clojure plugin. Right after got such problem.
$ grails clean just worked for me.
Same problem i was facing i used the below command :
grails clean
grails refresh-dependencies
and that worked for me
If you are using Intellij the problem is that:
the reason for this is that IDEA adds classpath by default on creating integration test run configuration. So if you run tests you might cause that error
Open Run → Edit Configurations... (or press Alt-Shift-F10)
Select your configuration that fails
Uncheck Add --classpath checkbox
You are done! Run.
Related
When I run my Grails project in Eclipse then the following error comes. What is the meaning of the error? How to remove this? I am using the Git to share the application on Bitbucket. Why is it showing the list of the plugins? Also when I run the app from the command prompt of the Grails then the app runs and there are no errors. Why is this?
|Loading Grails 2.5.0
|Configuring classpath
Error |
G:\programming\TE\TE_intern_grails\local directory for grails using git\arpte\arpte does not appear to be part of a Grails application.
Error |
The following commands are supported outside of a project:
add-proxy
clear-proxy
create-app
create-multi-project-build
create-plugin
help
install-app-templates
list-plugins
package-plugin
plugin-info
remove-proxy
set-proxy
|Run 'grails help' for a complete list of available scripts.Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
You could import the project as a Git project in eclipse and try to run. This has fixed my issue recently.
Otherwise
Right click on the project
Click on run
Go to Run As, then select Run Configurations
Delete the existing run configurations of the present project
Run the project now.
It will work perfectly.
I have freshly downloaded GGTS 3.5.1 and pointed it to grails-2.4.0 and jdk_1.8.0_05 but I can't build just a blank grails project without getting build errors.
The exact error is.
Building Workspace
Errors Occurred During The Build
Errors running builder 'Java Builder' on project 'test'.
org.codehaus.groovy.runtime.DefaultGroovyMethods.count(Ljava/lang/Iterable;Lgroovy/lang/Closure;)Ljava/lang/Number;
I have tried booting using the -clean flag, downloading other versions of groovy, grails and jdk. This error even occurs exactly the same on my desktop and laptop, so I guess something I'm doing in the setup has to be wrong.
What was the Groovy compiler specified for in your GGTS? I think for Grails 2.4 you'd need Groovy 2.3 compiler set in the preferences.
I am struggling to configure grails 2.3.X in IntelliJ idea 12.0.1. Grails 2.2.X is configured successfully.
Grails 2.3.2 is working properly from terminal. I can compile, test, run my application. But while trying to configure it in IntelliJ so that dependencies get resolved, I get the IntelliJ shouting straight to me(as pictured below).
Looks like Grails Distribution in specified path is broken. Cannot
determinate version.
What I see is changes in grails-2.3.x/dist/ to earlier version's grails-2.2.x/dist/.
Is this because there's no support for newer version(2.3.x) of grails in IntelliJ 12 or what ?
I want nothing else but my application (jar) dependencies to be resolved in the IDE.
Make sure you are running the latest version of IntelliJ IDEA - v12.1.6. There was a "Grails 2.3.0 not working" bug fixed in 12.1.6.
You may also want to take a look at the Grails SDK is not configured question. One of the IntelliJ IDEA developers has a detailed answer in that question that may help.
Also, this thread on the IntelliJ IDEA forum may be useful.
For Information to reload the dependencies in IntelliJ 12.1.6 , following path works fine.
Tools
-> Grails
-> Synchronize Grails settings
I’m trying to upgrade Grails to version 2.2.0. I used gvm and installed Grails 2.2.0. After this I changed my project in GGTS to use Grails version 2.2.0 and Groovy version 2.0.0. But when I finally tried to run the project, I got the following error:
Error occurred during initialization of VMError opening zip file or JAR manifest
missing : null
agent library failed to init: instrument
What is the problem?
We had the same problem.
This is due to eclipse saving old run configuration for the previous grails version.
Just remove old launch configuration and retry.
To remove old launch configuration :
go to Run\RunConfiguration\Grails
select all nodes and remove them.
I had the same problem when I started using Grails 2.2.0 - The solution Ian mentioned works, here is the link to the issue and resolution that occurred in my project
Grails 2.2.0 error
Added on 1/15/2013 Other suggestions based on 2.2.0/ivy cache issues
I am running on windows, a couple of things to try.
Based on your error message seems like the issue might be related to the Ivy cached, I would suggest cleaning that out using the clean command.
I would also go ahead and delete the Icy cache folders on your machine at \ivy-cache(after backing it up just in case)
Read grails documentation at http://grails.org/doc/2.0.0/guide/gettingStarted.html, refer to section 2.3 regarding Ivy cache – there might be issues running 2.x and 1.x grails projects side by side.
When install, I do not have to install groovy explicitly - I just install grails and that take care of the groovy code implicitly. Is that possible for you to do? To rule out dependency issues?
On my version of grails I have the groovy version showing up as 2.0.5 – I assume you meant grails 2.2.0 – can you ensure that you have a groovy version installed with is compatible with grails 2.2.0?
If possible try your code on a fresh device where grails has not been installed before. This is to rule out interference due to other existing issues
It's a known issue to do with the fact that the version of the springloaded reloading agent used by 2.2 (and 2.1.3) has a different name from that used by previous versions of Grails. There's a workaround in the bug report, or you can upgrade to a nightly build of GGTS which knows about the new name (as described in this bug report).
I am using GGTS 3.2 with Groovy compiler 2.1.1 on Windows XP.
Had imported a project from GGTS 3.1, upgraded compiler to 2.1.1 and got in mess, so
deleted the project and removed it from .grails cache, then re-created project from scratch. When it came to running the project I got the ivy error.
Removing the old launch configuration via Run->RunConfiguration...Grails fixed problem without switching to a night build of GGTS.
(BTW Deleting ivy-cache didn't help at all)
I have upgraded my application from grails 1.2.2 to 1.3.1-RC1. While things seem to work when executing grails from command prompt, I cannot make it run from my IDE IntelliJ (last development version).
The error I got straightaway is:
Error executing script RunApp: net/sf/json/JSONException
...
Caused by: java.lang.ClassNotFoundException: net.sf.json.JSONException
Adding the library json-lib.jar to the modules dependencies does not change anything in IntelliJ.
Also, it seems that there are 2 JSONException classes defined in 2 different packages :
org.codehaus.groovy.grails.web.json in grails.jar
another package net.sf.json in json-lib-2.3-jdk15.jar located in lib folder of cloud-foundry plugin
Do you have any idea about what's happening?
In case, someone encountered the same problem, I finally managed to solve the issue without being sure what was the real fix.
In any case, my problem happened after I have upgraded my Grails from 1.2 to 1.3 and I had old libraries attached to plugins. What I did is:
Project Settings -> Modules -> irofoot-grailsPlugins -> Dependencies -> Grails User Library -> Edit -> Detach old libraries (with Grails-1.2 path)
and then it worked (no more ClassNotFoundException)!!