[grails-user] Eclipse 'duplicate class' error.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[grails-user] Eclipse 'duplicate class' error.

Edward Povazan
Hello,

Does anyone know the meaning of this error? Grails is quite happy to run my
code, but the Eclipse plugin logs this:
BUG! exception in phase 'conversion' in source unit
'c:\...\grails-app\controllers\LicenseController.groovy' Error: duplicate class
declaration for name: LicenseController and class:
...

In my class, commenting out one line stops the error, but of course my code
doesn't do anything this way. Am I doing something really silly?
class LicenseController {
        @Property index = { }
       
        @Property requestLicense = {
                ...
                if (params.productVersion ==~ /.*b.*/)
                        redirect(action: requestBeta) // <-- commenting this stops the exception
being thrown.
        }
       
        @Property requestBeta = { ... }
}

Any ideas? Else I will just turn off the GroovyBuilder again.

Thanks
-Ed

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply | Threaded
Open this post in threaded view
|

Re: [grails-user] Eclipse 'duplicate class' error.

prpatel
*bump*

I'm getting the same error:
BUG! exception in phase 'conversion' in source unit 'C:\dev\workspace\workout\grails-app\taglib\ValidationTagLib.groovy' Error: duplicate class declaration for name: ValidationTagLib and class: org.codehaus.groovy.ast.ClassNode@96954c[name: ValidationTagLib]
        at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:902)
        at org.codehaus.groovy.control.CompilationUnit.convert(CompilationUnit.java:624)

Using: grails-bin-0.2-SNAPSHOT.zip d/l June 9 2006. Eclipse 3.2 Callisto latest. Windows XP. JDK 1.5.

I've tried shuffling things around and exluding things on the Java build path in the project properties with no luck. I suspect that I need to tweak something in the Groovy plugin rather than grails itself, but was hoping that another grails user had already crossed this bridge.
I believe the problem stems from the fact that the tmp/ directory, when firing up run-app, is in the project workspace itself, and is the cause of the "duplication" problem. Any way to move this to a directory outside the workspace?