small medium large xlarge

Back to: All Forums  Grails
Generic-user-small
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

/TekDays/grails-app/controllers/tekdays/DashboardController.groovy

if (!blurb){
	blurb = new Blurb(name:"custom_${event.id}" , 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

http://localhost:8080/TekDays/blurb/create

Can anyone please point me in the right direction?

Thanks

Generic-user-small
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

Generic-user-small
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