PDA

View Full Version : problems create controller



yuryd
15-11-2012, 09:32 AM
Hello everybody!
I have a problem with creating the new controller. The error I got is:

at org.codehaus.groovy.grails.cli.GrailsScriptRunner$ executeScriptWithCaching.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray .defaultCall(CallSiteArray.java:42)
at org.codehaus.groovy.runtime.callsite.AbstractCallS ite.call(AbstractCallSite.java:108)
at org.codehaus.groovy.runtime.callsite.AbstractCallS ite.call(AbstractCallSite.java:116)
at org.codehaus.groovy.grails.cli.interactive.Interac tiveMode.parseAndExecute(InteractiveMode.groovy:27 2)
at org.codehaus.groovy.grails.cli.interactive.Interac tiveMode$parseAndExecute.callCurrent(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray .defaultCallCurrent(CallSiteArray.java:46)
at org.codehaus.groovy.runtime.callsite.AbstractCallS ite.callCurrent(AbstractCallSite.java:133)
at org.codehaus.groovy.runtime.callsite.AbstractCallS ite.callCurrent(AbstractCallSite.java:141)
at org.codehaus.groovy.grails.cli.interactive.Interac tiveMode.run(InteractiveMode.groovy:135)
at org.codehaus.groovy.grails.cli.GrailsScriptRunner. main(GrailsScriptRunner.java:222)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at com.springsource.loaded.ri.ReflectiveInterceptor.j lrMethodInvoke(ReflectiveInterceptor.java:1231)
at org.codehaus.groovy.grails.cli.support.GrailsStart er.rootLoader(GrailsStarter.java:234)
at org.codehaus.groovy.grails.cli.support.GrailsStart er.main(GrailsStarter.java:262)

1 error
| Error Error running script create-controlle appl: org.codehaus.groovy.grails.cli.ScriptExitException (Use --stacktrace to see the full trace)

The OS I use is Debian 6 (64-bit)
Grails-2.1.1 just installed (/usr/local/grails)
Java 1.6.0_18
/etc/bash.bashrc →
ln -s grails-2.1.1/ grails

export JAVA_HOME=/usr/lib/jvm/java-6-openjdk
export PATH="$PATH:$JAVA_HOME/bin"
export GRAILS_HOME=/usr/local/grails
export PATH="$PATH:$GRAILS_HOME/bin"

Grails was downloaded, unpacked and copied to /usr/local catalog.

I can not see either the full trace nor find the stacktrace.log file.

After that I tried to compile grails project from source and run command ./gradlew assemble from /usr/local/grails and got en error:

FAILURE: Build failed with an exception.

* Where:
Script '/usr/local/grails-2.1.1/gradle/assemble.gradle' line: 3

* What went wrong:
A problem occurred evaluating script.
> Could not find property 'org' on root project 'grails-2.1.1'.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 33.922 secs

Could you please help me to understand what is going wrong with my grails? By the way, I've managed to install grails 2.0.0 in Ubuntu 12. But iInstallation of the version 2.1.1 gave me the same errors.

Regards Yury

yuryd
15-11-2012, 02:30 PM
the problem is solved. The correct java JDK shall be installed!
+ do not do any "ln" (linking). GRAILS_HOME path shall point to the real directory (ex. /usr/local/grails-2.1.1)