mowwwalker
mowwwalker

Reputation: 17392

Grails error initializing application: null

When I try to run "grails run-app", I get the error and small stacktrace:

context.GrailsContextLoaderListener Error initializing the application: null
java.lang.NullPointerException
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:617)
        at java.lang.Thread.run(Thread.java:745)

I'm using Grails 2.5.0 and Java 1.8.0_51.

How can I get more information about what's going wrong?

edit: I've tried grails clean and grails refresh-dependencies in all related projects.

Upvotes: 1

Views: 1856

Answers (2)

mowwwalker
mowwwalker

Reputation: 17392

Our app consists of two projects. Project 1 has all the Bootstrap files and Project 2 all the domain/view/controller files. The branch I was on for Project 1 had a bootstrap file which used a domain object that was on a different branch of Project 2, so I commented out the bootstrap file. As it turns out, this is what was causing the error. To fix it, I had to DELETE the bootstrap file to get the app to run.

I guess Grails doesn't like it when there's a Bootstrap file with no code in it..

Upvotes: 1

YeIIowsnow
YeIIowsnow

Reputation: 41

I think this is related to reloading or recompilation. Could you retry booting after a grails clean

Upvotes: 1

Related Questions