Unable to run grails 2.3.0 M2 through command line - grails

I just downloaded the milestone edition grails 2.3.0 M2 .zip from the grails page and extracted in the c:\ directory after which it created the folder : C:\grails-2.3.0.M2.
Then I added C:\grails-2.3.0.M2\bin to the path system variable. After that when I try to run grails from command line (using C:\grails-2.3.0.M2\bin>grails), it gives me the following error:
Error opening zip file or JAR manifest missing : C:/grails-2.2.1/lib/org.springs
ource.springloaded/springloaded-core/jars/springloaded-core-1.1.3.jar
Error occurred during initialization of VM
agent library failed to init: instrument
It is interesting to note that the Jar belongs to the grails-2.2.1 installation folder and not the 2.3.0-m2.
I feel it worth mentioning that I already have grails 2.2.1 in my C drive (C:\grails-2.2.1) and before installing this new version, I was using this version. Also I have removed the old grails bin folder address (C:\grails-2.2.1\bin) from system variables. So anyone can guess what is causing the error?

Check you don't have a %GRAILS_HOME% variable set pointing to the old folder

Related

oracle.xml.parser.v2.XMLParseException error in websphere 8.5.5

I'm trying to connect Websphere 8.5.5 with oracle 12c DB and WAS throwing an error saying java.lang.ClassNotFoundException: oracle.xml.parser.v2.XMLParseException. Initially we got xdbtype class was not found and we resolved this by adding xdb6.jar to WAS's lib directory. Now even after adding xmlparserv2.jar to WAS's lib directory we are facing the same issue and it looks like WAS is not recognizing the jar file we deployed in lib directory. We are not sure whether this is problem in loading the jar file or its a version mismatch issue since xmlparserv2.jar is not available in Oracle pages to download. Please guide me on how to fix this issue.

grails-2.4.3 not working?

I just downloaded grails 2.4.3 and created a test application, but it fails when trying to run the application.
Anybody knows why its going wrong here?
Thanks
C:\workspace\grails_apps\testApp>grails run-app
| Running Grails application
Error occurred during initialization of VM
agent library failed to init: instrument
Error opening zip file or JAR manifest missing : C:\Program%20Files%20(x86)\Grails\grails-2.4.3\lib\org.springframework\springloaded\jars\springloaded-1.2.0.RELEASE.jar
| Error Forked Grails VM exited with error
C:\workspace\grails_apps\testApp>
For anyone interested,
this problem was solved by moving the grails installation from
C:\Program Files (x86)\Grails\grails-2.4.3
to
C:\Grails\grails-2.4.3
eg. by removing the spaces in the GRAILS_HOME path as explained in the post found here.
Note, it did not work to remove the spaces by setting GROOVY_HOME = C:\PROGRA~2\Grails\grails-2.4.3

ggts null pointer "Retrieving available scripts"

I installed a fresh copy of GGTS on a fresh copy of windows 8 with JDK 1.7 installed.
I tried to get it to compile my existing project which was based on 2.3.6 and it failed miserably as GGTS comes with grails 2.4.2.
I know serveral people who had problems with 2.4.x so decided to stick with 2.3.
So I downloaded 2.3.11 (latest 2.3) and created a GRAILS_HOME pointing to 2.3.11 dir, and JAVA_HOME pointing to the root of the JDK.
On command line, I can now type grails - version and get back 2.3.11.
I restarted GGTS, and deleted the project and createde it again, adding 2.3.11 as a new Grails version, and set the project to use that.
It fails to compile, saying version is wrong. Fair enough. But when I try to launch the command line from GGTS using the gree circular button at the top which looks like 3 cups, it says:
Retrieving available scripts
Retrieving available scripts
An internal error occurred during: "Retrieving available scripts".
java.lang.NullPointerException
Any ideas?
In my case the problem was, that I had moved grails to a different folder. I just had to change the location of grails in the settings. Hope that helps somebody.
check all grails-project's 'app.grails.version' in application.properties, then open window - preferences - groovy -grails, make sure that all VERSIONs were defined ( I use sts, maybe a little difference ).
alternatively
update all application.properties set app.grails.version=2.3.11 ( the version your ggts defined )
Check if your environment variable of GRAILS_HOME is set to the right version of Grails.
I ran into this same issue, and the problem was caused by the Grails installation it was trying to use. It wanted to use the default version that comes with GGTS rather than the one I installed myself.
To fix, go to Window > Preferences > Groovy > Grails, then "Edit" the Grails installation it shows. I had to switch mine from C:\ggts-bundle\grails-2.4.4\ to C:\grails-2.4.2\.

java.io.IOException when running grails project

I got a grails Project from my friend, i imported that project in GGTS and after i refreshed dependence, i have no error.
When i trying to run I got
Error Error executing script RunApp: java.io.IOException: Cannot run program "grails": java.io.IOException: error=2, No such file or directory (Use --stacktrace to see the full trace)
I am using Ubuntu 12.4.
But, i imported same project in my another system which runs in windows 7, i didn't get any error or exception in windows.
What is the reason for this Exception ?
echo $PATH output
/home/ard006/Documents/senchaCmd/Sencha/Cmd/3.0.0.250:/home/ard006/Viswa/scala/sbt/bin:/home/ard006/Documents/senchaCmd/Sencha/Cmd/3.0.0.250:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/ard006/Viswa/springsource/grails-2.1.2/bin:/home/ard006/groovy-2.0.0/bin
It looks to me like GGTS can't find the grails executable.
Is it on your PATH ? I suspect you need to set the PATH variable thus:
$ PATH=$GRAILSHOME/bin:$PATH
and then invoke GGTS from that shell, such that it inherits the PATH setting (I've assumed PATH is exported)
Just run into the same problem.
I had the Grails bin folder on the path using this notation in the .bash.rc file
export PATH="${PATH}:~/grails/bin"
The tilde broke it and I changed it to:
export PATH="${PATH}:/home/myuser/grails/bin"
Now it's working, the IOException is gone.

Error in Grails

Anyone knows how to fix this ?
It works fine on my env (Me being the developer) and doesn't work on my colleagues machine who unzips the whole
Welcome to Grails null - http://grails.org/
Licensed under Apache Standard License 2.0
Grails home is set to: C:\abc\products\grails-1.1
Base Directory: C:\abc\products\foo\bar
Running script C:\abc\products\grails-1.1\scripts\RunApp.groovy
Environment set to development
Application expects grails version [1.1], but GRAILS_HOME is version [null] - us
e the correct Grails version or run 'grails upgrade' if this Grails version is n
ewer than the version your application expects.
Some clarifications
1) There has been no Grails version change , either on my machine or my colleagues machine. In fact some of them are installing for the first time
2) Under C:\Documents and Settings\myfriend.grails I can see a folder called 'null'
I tried removing this folder - but it gets created he runs my application
3) The way I am giving him the release is- I unzip the whole folder and he unzips it
SO there are three steps
A_ grails create-app to create the APp
B_ Unzip my folder to replace the generated folder
C_ Grails run-app
Things are fine after the step A- but degenerate after Step C
It appears that his Grails installation is corrupted or not set up correctly. I would have him reinstall a fresh copy of Grails - http://www.grails.org/Installation and try again.
The error that you are getting is telling us that the application that you are trying to run is identified as version 1.1 and I assume that this is correct. The fact that Grails is not able to identify what version is installed makes me point to a corrupted or mis-configured Grails installation
If he types 'grails' at the command line what does he see?
I found the problem.
This was because I had added a file- build.properties
And since the file was there- it was expecting it to have certain properties defined in it
Once I renamed it to something else- it started to work

Resources