Quantcast

'Could not find or load main class' after upgrading to latest Grails

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

'Could not find or load main class' after upgrading to latest Grails

Jacek Furmankiewicz
I am attempting to port an ancient version of Grails to the latest and greatest of everything.
However, when trying to run

    gradlew bootRun

I get this error

    Could not find or load main class

I am not sure why it is not finding my main class, it is sitting in the proper default package name (gsp in the case of this app):


package gsp

import grails.boot.GrailsApp
import grails.boot.config.GrailsAutoConfiguration

class Application extends GrailsAutoConfiguration {
 
static void main(String[] args) {
 
GrailsApp.run(Application, args)
 
}
}



located in 'grails-app/init/gsp/Application.groovy'.

Is there some reason Grails cannot find this class? Do I need to set some other config file to point to it?

Thank you
Jacek

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/8734a649-c240-44bc-be60-c0383ddbf684%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 'Could not find or load main class' after upgrading to latest Grails

Graeme Rocher-2
Did you move it around? Try and do a clean

Cheers


On Mon, May 2, 2016 at 9:24 PM, Jacek Furmankiewicz <[hidden email]> wrote:
I am attempting to port an ancient version of Grails to the latest and greatest of everything.
However, when trying to run

gradlew bootRun

I get this error

Could not find or load main class

I am not sure why it is not finding my main class, it is sitting in the proper default package name (gsp in the case of this app):


package gsp

import grails.boot.GrailsApp
import grails.boot.config.GrailsAutoConfiguration

class Application extends GrailsAutoConfiguration {
static void main(String[] args) {
GrailsApp.run(Application, args)
}
}



located in 'grails-app/init/gsp/Application.groovy'.

Is there some reason Grails cannot find this class? Do I need to set some other config file to point to it?

Thank you
Jacek

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/8734a649-c240-44bc-be60-c0383ddbf684%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/1462985006336-ee3a5856-928a7866-a6be97c4%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Loading...