Domanda

I've installed Grails on my Windows XP, but when i try to make a "grails complile" I've got an error:

| Configuring classpath
| Error Error executing script Compile: startup failed:
__Compile: 1: unexpected char: 0x0 @ line 1, column 1.
1 error
 (Use --stacktrace to see the full trace)

Please, provide a solution for resolve this problem.

Thanks

Some useful information: Grails Version is 2.2.4

GRAILS_HOME=c:\grails    
GROOVY_HOME=C:\Program Files\Groovy 
JAVA_HOME=c:\Program Files\Java\jdk1.7.0_07 
PATH=%JAVA_HOME%\bin;c:\OpenSSL\bin;%GRAILS_HOME%\bin;%GROOVY_HOME%\bin

add:

C:\grails\xxx>grails run-app --stacktrace
| Configuring classpath
| Error Error executing script RunApp: startup failed:
__RunApp: 1: unexpected char: 0x0 @ line 1, column 1.
1 error
 (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
__RunApp: 1: unexpected char: 0x0 @ line 1, column 1.
1 error

        at gant.Gant.compileScript(Gant.groovy:631)
        at gant.Gant.this$2$compileScript(Gant.groovy)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1259)
        at gant.Gant$_closure1.doCall(Gant.groovy:129)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1259)
        at gant.Gant.loadScript(Gant.groovy:266)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1259)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1259)
| Error Error executing script RunApp: startup failed:
__RunApp: 1: unexpected char: 0x0 @ line 1, column 1.
1 error
È stato utile?

Soluzione

Similar to this question i think your error lies on using %GRAILS_HOME% ,lets leave that to the LINUX.

you can refer other question i have answered here [1] Grails is not recognized as an internal or external command (Windows 7)

But Make sure the following in your environment.

First try this one on CMD commandline type

echo %GRAILS_HOME%

Then type path and see if the grails paths is something like :

C:\Windows\system32;C:\Windows;C:\grails2.1.1

ok , if in any case i sugget you replace the GRAILS_HOME with C:\grails2.1.1

C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\Win‌​d owsPowerShell\v1.0\;%JAVA_HOME%\bin;%GRAILS_HOME%\bin;

with

C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\Win‌​d owsPowerShell\v1.0\;%JAVA_HOME%\bin;c:\grails2.1.1\bin;

Then logout or restart the PC it should work ,if not check your package of grails for a file names grails.bat something or try to run it by giving the exact path from CMD!!

like :

cmd > c:\grails2.1.1\bin\startGrails.bat 

Cheers ,Dman!!

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top