Torsten
Torsten

Reputation: 752

Grails ClassPath Error, when update to 3.2.1

After upgrading from 3.1.12 to 3.2.1 I get the following error: Error:

  ClassPathScanner - The application defines a Groovy source using    the  default package. Please move all Groovy sources into a package.

Caused by: java.lang.ClassNotFoundException: org.grails.datastore.gorm.plugin.support.ConfigSupport
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)

The message seems clear, but I cannot find any source which don't have a package. Can any body help me either with a solution or an idea how to debug it.

Thanks

Upvotes: 3

Views: 2095

Answers (2)

meDev
meDev

Reputation: 917

I had same error as OP @Torsten.

Per @Burt Beckwith's suggestion, ran grails console and ctx.grailApplication..... . It showed Bootstrap. So I moved Bootstrap.groovy from grails-app/init folder to grails-app/init/my/package/name folder where Application.groovy was.

When re-ran grails run-app the ClassPathScanner.... error is gone !

Thanks OP and Burt Beckwith to post question and answer. It helped me.

PS: I wanted to add comment to Burt BeckWith's answer, but I don't have enough reputation yet.

Upvotes: 5

Burt Beckwith
Burt Beckwith

Reputation: 75681

It's probably BootStrap.groovy (under grails-app/init) or UrlMappings.groovy (under grails-app/controllers)

Upvotes: 6

Related Questions