small medium large xlarge

Back to: All Forums  Grails
11 May 2011, 14:11
James Nierodzik (7 posts)

I’m working through the book running Grails 1.3.7 and I’m working in STS if that matters. The issue I’m running into is this line of code


if (!blurb){
	blurb = new Blurb(name:"custom_${}" , content:"" ).save()   <-- Error here

The error is unable to resolve class Blurb.

I have verified that the plugin has loaded though because this action/view renders properly


Can anyone please point me in the right direction?


12 May 2011, 06:31
Joseph Ku (1 post)

Hi James. I have the same problem as you. I am using grails 1.3.7. Compiling my project from the command line also fails:

grails compile

12 May 2011, 15:25
James Nierodzik (7 posts)

Most of this response has been ‘liberated’ from another source

bq. The problem appears to be due to the way Grails compiles plugin code separately from application code. Create a ‘tekdays’ directory in the plugin’s grails-app/domain folder and move Blurb.groovy there, and add a “package tekdays” line at the top.

If you use STS refactor ability then it already adds “package tekdays” to the Blurb class for you.

Once I did this the issue was solved. Hope this helps anyone else!

You must be logged in to comment