1 Replies Last post: Oct 13, 2008 10:32 PM by Ilya Sergey  
John Robens Newbie 5 posts since
Aug 15, 2008
Currently Being Moderated

Oct 9, 2008 2:52 PM

Groovy source file calling grails domain class

I think this is another classpath issue.

 

Code is  http://code.google.com/p/groovypublish/.

 

File src/groovy/dsl/PostDsl.groovy has a reference to Post which is a grails domain class.

 

This runs from the command line, but not in Intellij Idea.

 

Idea: 7.0.4, grails 1.0.3, jetgroovy 1.6.19053

 

 

Information:Compilation completed with 1 error and 0 warnings

Information:1 error

Information:0 warnings

/home/jrobens/.IntelliJIdea70/system/compiler/groovypublish.groovypublisha774697d/.generated/Groovy_to_java_source_code_generator/groovypublish.a774691a/production/dsl/PostDsl.java

    Error:Error:line (16)cannot find symbol class Post

Ilya Sergey JetBrains 233 posts since
Sep 11, 2007
Currently Being Moderated
Oct 13, 2008 10:32 PM in response to: John Robens
Re: Groovy source file calling grails domain class

Hello, John.

 

I've tried to reproduce bug you've name. At first, application in last revision  cannot be run. It seems, you've forgot to capitalize args.viewBuilder expression in PostController.groovy, at line 153.

Yes, in distinction form Java, Groovy may resolve unqualified classes from top-level package. This is definitely bug, and it will be fixed in one of near-term releases.

 

With best regards,

Ilya

More Like This

  • Retrieving data ...