Erro ao fazer deploy - classe duplicada
16/01/2012 05:45
0

Quando estou fazendo o deploy da minha aplicação.. está dando um erro dizendo que uma das minhas classes está com definição duplicada... só que não está.

Error executing script War:
...

"One of the classes is a explicit generated class using the class statement, the other is a class generated from the script body based on the file name. Solutions are to change the file name or to change the class name."

Tags: deploy classes


0
Evellinne, tem como você postar o stacktrace aqui?


0
at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:302)
at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:839)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:521)
at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:497)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:474)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:453)
at org.codehaus.groovy.control.CompilationUnit$compile.call(Unknown Source)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at _GrailsCompile_groovy$_run_closure8.doCall(_GrailsCompile_groovy:175)
at _GrailsWar_groovy$_run_closure4.doCall(_GrailsWar_groovy:91)
at War$_run_closure1.doCall(War.groovy:38)
at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381)
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
at gant.Gant.withBuildListeners(Gant.groovy:427)
at gant.Gant.this$2$withBuildListeners(Gant.groovy)
at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
at gant.Gant.dispatch(Gant.groovy:415)
at gant.Gant.this$2$dispatch(Gant.groovy)
at gant.Gant.invokeMethod(Gant.groovy)
at gant.Gant.executeTargets(Gant.groovy:590)
at gant.Gant.executeTargets(Gant.groovy:589)
Error executing script War: : org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
17/01/2012 13:29


0
Eu refiz todas as classes e agora quando vou rodar a aplicação, o erro continua:


Welcome to Grails 1.3.7 - http://grails.org/
Licensed under Apache Standard License 2.0
Grails home is set to: C:\grails\

Base Directory: C:\Users\Line\Documents\workspace-sts-2.7.1.RELEASE\Database_EA_UFRPE
Resolving dependencies...
Dependencies resolved in 1207ms.
Running script C:\grails\scripts\RunApp.groovy
Environment set to development
[groovyc] Compiling 15 source files to C:\Users\Line\Documents\workspace-sts-2.7.1.RELEASE\Database_EA_UFRPE\target\classes
[groovyc] org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
[groovyc] C:\Users\Line\Documents\workspace-sts-2.7.1.RELEASE\Database_EA_UFRPE\grails-app\domain\database_ea_ufrpe\Autor.groovy: 5: Invalid duplicate class definition of class Autor : The source C:\Users\Line\Documents\workspace-sts-2.7.1.RELEASE\Database_EA_UFRPE\grails-app\domain\database_ea_ufrpe\Autor.groovy contains at least two definitions of the class Autor.
[groovyc] One of the classes is a explicit generated class using the class statement, the other is a class generated from the script body based on the file name. Solutions are to change the file name or to change the class name.
[groovyc] @ line 5, column 1.
[groovyc] class Autor {
[groovyc] ^
[groovyc]
[groovyc] C:\Users\Line\Documents\workspace-sts-2.7.1.RELEASE\Database_EA_UFRPE\grails-app\domain\database_ea_ufrpe\Evento.groovy: 3: Invalid duplicate class definition of class Evento : The source C:\Users\Line\Documents\workspace-sts-2.7.1.RELEASE\Database_EA_UFRPE\grails-app\domain\database_ea_ufrpe\Evento.groovy contains at least two definitions of the class Evento.
[groovyc] One of the classes is a explicit generated class using the class statement, the other is a class generated from the script body based on the file name. Solutions are to change the file name or to change the class name.
[groovyc] @ line 3, column 1.
[groovyc] class Evento {
[groovyc] ^
[groovyc]
[groovyc] C:\Users\Line\Documents\workspace-sts-2.7.1.RELEASE\Database_EA_UFRPE\grails-app\domain\database_ea_ufrpe\Instituicao.groovy: 3: Invalid duplicate class definition of class Instituicao : The source C:\Users\Line\Documents\workspace-sts-2.7.1.RELEASE\Database_EA_UFRPE\grails-app\domain\database_ea_ufrpe\Instituicao.groovy contains at least two definitions of the class Instituicao.
[groovyc] One of the classes is a explicit generated class using the class statement, the other is a class generated from the script body based on the file name. Solutions are to change the file name or to change the class name.
[groovyc] @ line 3, column 1.
[groovyc] class Instituicao {
[groovyc] ^
[groovyc]
[groovyc] C:\Users\Line\Documents\workspace-sts-2.7.1.RELEASE\Database_EA_UFRPE\grails-app\domain\database_ea_ufrpe\Trabalho.groovy: 3: Invalid duplicate class definition of class Trabalho : The source C:\Users\Line\Documents\workspace-sts-2.7.1.RELEASE\Database_EA_UFRPE\grails-app\domain\database_ea_ufrpe\Trabalho.groovy contains at least two definitions of the class Trabalho.
[groovyc] One of the classes is a explicit generated class using the class statement, the other is a class generated from the script body based on the file name. Solutions are to change the file name or to change the class name.
[groovyc] @ line 3, column 1.
[groovyc] class Trabalho {
[groovyc] ^
[groovyc]
[groovyc] 4 errors
Compilation error: Compilation Failed
30/01/2012 12:31


0
Eu notei agora que esse problema se deu quando eu fiz algumas alterações no CSS do sistema, através do Notepad++ .. pq estava rodando normalmente antes.
30/01/2012 12:32



Ainda não faz parte da comunidade???

Para se registrar, clique aqui.


Aprenda Groovy e Grails com a Formação itexto!

Newsletter Semana Groovy

Assinar

Envie seu link!


Livro de Grails


/dev/All

Os melhores blogs de TI (e em português) em um único lugar!

 
Creative Commons
RSS Grails Brasil é mantido por itexto Consultoria.
Em caso de problemas contacte Henrique Lobo Weissmann (Kico) por e-mail: kico@itexto.com.br
Todo o conteúdo presente neste site adota o Creative Commons como licença padrão.
Ver: 4.14.0
itexto