|
Hello!
After several years of Grails development today I got my most annoying startup problem ever. Grails 2.1.0 fails to start without giving a single message (not just error but any message). I'll list the hints that could point to what's going wrong, I have no idea.
Nothing more I can add to it. No messages, just exit code 1 milliseconds after startup. Let me know if you have any ideas! Thanks! Adam Sandor
|
|
Perhaps you could find the grails.bat command and add:
@ECHO ON To the beginning, so that you can see exactly what is happening? You MAY need to add @ECHO ON in various places in grails.bat and in startGrails.bat (which grails.bat eventually runs) but this SHOULD let you see more about what is happening. I'm sure grails runs for > 1ms before quitting ;-) BOB >Hello! >After several years of Grails development today I got my most annoying >startup problem ever. Grails 2.1.0 fails to start without giving a single >message (not just error but any message). I'll list the hints that could >point to what's going wrong, I have no idea. > > >* This exact project (and Grails version) was working fine just a week >ago when I last touched it. >* It makes no difference what Grails command I try to run. >* It happens the same way whether I run it from command line (which runs >the grails.bat script) or from Intellij (which runs the grails runtime >directly). >* My system is Windows 7, I tried both JDK 1.6 and 1.7. >* Grails 2.0.4 works fine. >* JAVA_HOME, GRAILS_HOME are set correctly (not needed for Intellij >anyway) >* I tried to redownload 2.1.0 to rule out if the current Grails >installation is corrupted. Didn't help. > >Nothing more I can add to it. No messages, just exit code 1 milliseconds >after startup. Let me know if you have any ideas! Thanks! > > >Adam Sandor --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
Hi Bob!
Thanks for your reply! I think the problem is not in the startGrails.bat script because the same problem happens when running from Intellij. Intellij doesn't use the
startGrails.bat script, but runs grails directly using the following command line: "C:\Program Files\Java\jdk1.6.0_27\bin\java" -Dgrails.home=C:\Grails\grails-2.1.0 -Dbase.dir=C:\Users\asandor\Projects\GrailsShop\grails-shop "-Dtools.jar=C:\Program Files\Java\jdk1.6.0_27\lib\tools.jar" -Dgroovy.starter.conf=C:\Grails\grails-2.1.0/conf/groovy-starter.conf -Dgrails.work.dir=staging -Dshop.object_image_directory=C:\Users\asandor\Projects\GrailsShop\object-images -Xmx512M -XX:MaxPermSize=192m -Djline.WindowsTerminal.directConsole=false -javaagent:C:\Grails\grails-2.1.0\lib\com.springsource.springloaded\springloaded-core\jars\springloaded-core-1.0.6.jar -noverify -Dspringloaded=profile=grails -Didea.launcher.port=7533 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 11.1\bin" -Dfile.encoding=UTF-8 -classpath "C:\Grails\grails-2.1.0\lib\org.codehaus.groovy\groovy-all\jars\groovy-all-1.8.6.jar;C:\Grails\grails-2.1.0\dist\grails-bootstrap-2.1.0.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA 11.1\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain org.codehaus.groovy.grails.cli.support.GrailsStarter --main org.codehaus.groovy.grails.cli.GrailsScriptRunner --conf C:\Grails\grails-2.1.0/conf/groovy-starter.conf run-app
This is the usual way I run grails and didn't have problem with it until now. As for the 1 millisecond comment, I didn't mean grails runs for 1ms, but that it returns error code 1 after a very short time, which also shows that it stops very early in it's execution. Nevertheless I'll try to put echo commands in the
startGrails.bat script, see if it show something interesting.
On Sun, Jul 22, 2012 at 11:34 AM, Bob Brown <[hidden email]> wrote: Perhaps you could find the grails.bat command and add: |
|
And here is the result of running "grails help" with @ECHO ON in a random directory on my disk:
C:\Users\asandor\Projects>grails help No error message there either, but maybe you can make out something out of the ordinary.
On Sun, Jul 22, 2012 at 12:04 PM, Adam Sandor <[hidden email]> wrote: Hi Bob! With regards Ádám SándorDVSK s.r.o. Email & GTalk: [hidden email]
Skype: sandor.adam83 Oovoo: adam.sandor Phone: +421 918 391 823 |
|
What happens if you try running the constructed command line:
"c:\Program Files\Java\jdk1.6.0_27\bin\java.exe" -server -Xmx768M -Xms768M -XX:PermSize=256m -XX:MaxPermSize=256m -Dfile.encoding =UTF-8 -Dprogram.name="" -Dgrails.home="c:\Grails\grails-2.1.0" -Dgrails.version=2.1.0 -Dbase.dir=. -Dtools.jar="c:\Program Files\Java\jdk1.6.0_27\lib\tools.j ar" -Dgroovy.starter.conf="c:\Grails\grails-2.1.0\conf\groovy-starter.conf" -classpath "c:\Grails\grails-2.1.0\lib\org.codehaus.groovy\groovy-all\jars\groovy-al l-1.8.6.jar;c:\Grails\grails-2.1.0\dist\grails-bootstrap-2.1.0.jar" org.codehaus.groovy.grails.cli.support.GrailsStarter --main org.codehaus.groovy.grails.cli.s upport.GrailsStarter --conf "c:\Grails\grails-2.1.0\conf\groovy-starter.conf" --classpath ";.;C:\Program Files (x86)\Java\jre6\lib\ext\QTJava.zip" " help" I guess you could also try adding -verbose before the -server argument, to see what the JVM is doing. That will probably give you LOTS of output, but something might stand out at you. Another thing: i always avoid using paths containing spaces in them. So instead of "program files", you can use 'progra~1" and so on. This is particularly true for JAVA_HOME, GRAILS_HOME and PATH. DIR /X will show you the 8.3 version of any filename/directoryuse whatever it tell you. BOB --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
Hi Bob!
Sorry it took so long, but I finally got around to try the command line you gave me. Unfortunately it produced the same problem as before. Even with the -verbose argument I only got a long list of classess that the JVM is loading then it just exits.
You can see the output here: https://dl.dropbox.com/u/2479032/out.txt On Sun, Jul 22, 2012 at 1:17 PM, Bob Brown <[hidden email]> wrote: What happens if you try running the constructed command line: With regards Ádám SándorDVSK s.r.o. Email & GTalk: [hidden email]
Skype: sandor.adam83 Oovoo: adam.sandor Phone: +421 918 391 823 |
|
I had a look at the verbose trace.
Sadly, nothing that might indicate a problem jumped out at me. Java is starting nicely, it IS referencing your grails installation Have you tried making a new Grails app to see what happens to it. Just: grails create-app X cd X grails run-app Might prove illuminating. All I can now suggest are common things like reinstalling Grails, grails clean, removing your ~/.grails folder, moving it somewhere out of your profile (see http://naleid.com/blog/2010/05/07/using-a-unique-grails-working-directory-f or-each-mercurial-branch/ and http://jira.grails.org/browse/GRAILS-4117). Check your environment variables to ensure that things like user.home are pointing to the correct location, etc. Otherwise, I'm all out of ideas. BOB On 7/25/12 5:02 AM, "Adam Sandor" <[hidden email]> wrote: >Hi Bob! >Sorry it took so long, but I finally got around to try the command line >you gave me. Unfortunately it produced the same problem as before. Even >with the -verbose argument I only got a long list of classess that the >JVM is loading then it just exits. > >You can see the output here: https://dl.dropbox.com/u/2479032/out.txt > >On Sun, Jul 22, 2012 at 1:17 PM, Bob Brown <[hidden email]> wrote: > >What happens if you try running the constructed command line: > >"c:\Program Files\Java\jdk1.6.0_27\bin\java.exe" -server -Xmx768M -Xms768M >-XX:PermSize=256m -XX:MaxPermSize=256m -Dfile.encoding >=UTF-8 -Dprogram.name="" -Dgrails.home="c:\Grails\grails-2.1.0" >-Dgrails.version=2.1.0 -Dbase.dir=. -Dtools.jar="c:\Program >Files\Java\jdk1.6.0_27\lib\tools.j >ar" >-Dgroovy.starter.conf="c:\Grails\grails-2.1.0\conf\groovy-starter.conf" >-classpath >"c:\Grails\grails-2.1.0\lib\org.codehaus.groovy\groovy-all\jars\groovy-al >l-1.8.6.jar;c:\Grails\grails-2.1.0\dist\grails-bootstrap-2.1.0.jar" >org.codehaus.groovy.grails.cli.support.GrailsStarter --main >org.codehaus.groovy.grails.cli.s >upport.GrailsStarter --conf >"c:\Grails\grails-2.1.0\conf\groovy-starter.conf" --classpath >";.;C:\Program Files (x86)\Java\jre6\lib\ext\QTJava.zip" " help" > > >I guess you could also try adding -verbose before the -server argument, to >see what the JVM is doing. > >That will probably give you LOTS of output, but something might stand out >at you. > >Another thing: i always avoid using paths containing spaces in them. So >instead of "program files", you can use 'progra~1" and so on. This is >particularly true for JAVA_HOME, GRAILS_HOME and PATH. > >DIR /X will show you the 8.3 version of any filename/directoryŠuse >whatever it tell you. > >BOB > > > >--------------------------------------------------------------------- >To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > > > > > > > > >-- >With regards >Ádám SándorDVSK s.r.o. > >Email & GTalk: [hidden email] >Skype: sandor.adam83 >Oovoo: adam.sandor >Phone: +421 918 391 823 > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
I believe you're running into http://jira.grails.org/browse/GRAILS-9279
Make your home directory writeable should fix it -- Graeme Rocher On Wednesday, July 25, 2012 at 12:43 AM, Bob Brown wrote:
|
|
Thanks for your replies guys!
Unfortunately I tried all this already. I can run any grails command in any directory on my harddisk, it doesn't make a difference. The grails work dir is writable, I'm working in my user dir on a simple win7 install - no jenkins running under a different user is involved, so i guess it's not GRAILS-9279 either. I guess it 2.0.4 for me then. This evening I'll try to double-check everything again.
On Wed, Jul 25, 2012 at 8:35 AM, Graeme Rocher <[hidden email]> wrote:
|
|
This post has NOT been accepted by the mailing list yet.
In reply to this post by Adam Sandor
I had the exact same symptom, however without any actual exception its difficult to determine if we are having the same issue.
The problem I had was in the Config.groovy file. Originally I had environments { development { grails.serverURL = "http://localhost:8081/${appName}" } } I replaced this with development { grails.logging.jul.usebridge = true } This solved my issue. I also attempted with the development block totally empty. That also seemed to work. Good Luck! |
|
This post has NOT been accepted by the mailing list yet.
In reply to this post by Adam Sandor
I've seen this problem before as well on a Windows machine. Problem turned out that the .grails_history directory had been marked as HIDDEN. Setting it back to UNHIDDEN and WRITABLE fixed the problem.
Hope this helps, Rob |
| Powered by Nabble | Edit this page |
