grails generate-all: erro [Resolvido]  XML
Índice dos Fóruns » Outras Linguagens
Autor Mensagem
tnaires
Forum Spammer
[Avatar]

Membro desde: 22/12/2003 08:05:58
Mensagens: 1378
Localização: Natal - RN
Offline

Boa noite.
Estou estudando Grails por este livro. Na página 32 do capítulo 3 o texto sugere a utilização do comando grails generate-all para gerar o código-fonte das classes de controle. Porém, quando eu utilizo o comando, aparece o seguinte erro:
Welcome to Grails 1.0 - http://grails.org/
Licensed under Apache Standard License 2.0
Grails home is set to: C:\Java\grails-1.0

Base Directory: D:\Tarso\Projetos\Java\Grails\racetrack
Environment set to development
Note: No plugin scripts found
Running script C:\Java\grails-1.0\scripts\GenerateAll.groovy
Error executing script GenerateAll: startup failed, GenerateAll_groovy: 53: you
tried to assign a value to the class 'resources'. Do you have a script with this
name?
@ line 53, column 4.
1 error

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed,
GenerateAll_groovy: 53: you tried to assign a value to the class 'resources'. Do
you have a script with this name?
@ line 53, column 4.
1 error

at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollecto
r.java:296)
at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(Compil
ationUnit.java:787)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.j
ava:43
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.j
ava:417)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:
86)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:226)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:899)
at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:946)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:740)
at org.codehaus.groovy.runtime.InvokerHelper.invokePojoMethod(InvokerHel
per.java:765)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.
java:753)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(Scrip
tBytecodeAdapter.java:167)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethod0(Scrip
tBytecodeAdapter.java:195)
at gant.Gant.compileScript(Gant.groovy:447)
at gant.Gant.this$2$compileScript(Gant.groovy)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:
86)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:226)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:899)
at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:946)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:740)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:867)
at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:946)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurre
ntN(ScriptBytecodeAdapter.java:77)
at gant.Gant$_processTargets_closure13.doCall(Gant.groovy:415)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:
86)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:226)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:899)
at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:946)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurre
ntN(ScriptBytecodeAdapter.java:77)
at gant.Gant$_processTargets_closure13.call(Gant.groovy)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:
86)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:226)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:899)
at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:946)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:740)
at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHel
per.java:777)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.
java:757)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(Scrip
tBytecodeAdapter.java:167)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeClosure(Scrip
tBytecodeAdapter.java:59
at gant.Gant.processTargets(Gant.groovy:420)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:
86)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:226)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:899)
at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:946)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurre
ntN(ScriptBytecodeAdapter.java:77)
at gant.Gant.processArgs(Gant.groovy:372)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:
86)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:226)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:899)
at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:946)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:740)
at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHel
per.java:777)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.
java:757)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(Scrip
tBytecodeAdapter.java:167)
at org.codehaus.groovy.grails.cli.GrailsScriptRunner.callPluginOrGrailsS
cript(GrailsScriptRunner.groovy:204)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:
86)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:226)
at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1094)

at groovy.lang.ExpandoMetaClass.invokeStaticMethod(ExpandoMetaClass.java
:957)
at org.codehaus.groovy.runtime.InvokerHelper.invokeStaticMethod(InvokerH
elper.java:800)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeStaticMethodN
(ScriptBytecodeAdapter.java:212)
at org.codehaus.groovy.grails.cli.GrailsScriptRunner.main(GrailsScriptRu
nner.groovy:124)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.groovy.grails.cli.support.GrailsStarter.rootLoader(Grail
sStarter.java:140)
at org.codehaus.groovy.grails.cli.support.GrailsStarter.main(GrailsStart
er.java:169)

Alguém sabe o que aconteceu?
Abraços

This message was edited 1 time. Last update was at 22/02/2008 06:44:02


Tarso Nunes Aires

Blog - http://cabritin.wordpress.com/
Delicious - http://delicious.com/tnaires
Twitter - @tnaires
Mauricio Linhares
Moderador
[Avatar]

Membro desde: 09/01/2005 23:28:22
Mensagens: 3654
Localização: João Pessoa, Paraíba - Brasil
Offline

Bug no script da versão 1.0 do Grails (não é uma boa maneira de se começar né...)

Vá no arquivo C:\Java\grails-1.0\scripts\GenerateAll.groovy , procure pela linha 53 onde tem "resources" e coloque um "this." antes de resources.

Blog pt-br | Blog en | My Last.fm | Blog de RPG
----------------------------------------
PBJUG - Grupo de Usuários Java da Paraíba | Paraíba.rb - Paraíba Ruby Brigade
How do we tell truths that might hurt?
[WWW] [MSN]
tnaires
Forum Spammer
[Avatar]

Membro desde: 22/12/2003 08:05:58
Mensagens: 1378
Localização: Natal - RN
Offline

Maurício Linhares wrote:Bug no script da versão 1.0 do Grails (não é uma boa maneira de se começar né...)


Obrigado, deu certo.
Sabe onde eu poderia reportar esse bug, caso alguém não o tenha feito?
Abraços

Tarso Nunes Aires

Blog - http://cabritin.wordpress.com/
Delicious - http://delicious.com/tnaires
Twitter - @tnaires
jack_-_ganzha
JavaEvangelist
[Avatar]

Membro desde: 31/03/2003 13:18:12
Mensagens: 315
Localização: Recife - Pernambuco
Offline

tnaires wrote:Sabe onde eu poderia reportar esse bug, caso alguém não o tenha feito?
Abraços

Já foi corrigido na versão 1.0.1.

valeuz...

Marcos Silva Pereira

http://www.javafree.org
http://marcospereira.wordpress.com
[MSN] [ICQ]
 
Índice dos Fóruns » Outras Linguagens
Ir para:   
Powered by JForum 2.1.8 © JForum Team