Search code examples
grailsnullrun-app

Grails project throws null in UnmodifiableMap when executing run-app


I have a project I haven't touched for a while, and when I execute the run-app command I get the following error:

grails> run-app
| Running Grails application
Error |
2014-03-12 13:20:34,741 [localhost-startStop-1] ERROR context.GrailsContextLoader  - Error initializing the application: null
Message: null
    Line | Method
->> 1342 | put       in java.util.Collections$UnmodifiableMap
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|     22 | doCall    in elektrova.Disponent$__clinit__closure1
|    262 | run . . . in java.util.concurrent.FutureTask
|   1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
|    615 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^    744 | run       in java.lang.Thread
Error |
2014-03-12 13:20:34,791 [localhost-startStop-1] ERROR context.GrailsContextLoader  - Error initializing Grails: null
Message: null
    Line | Method
->> 1342 | put       in java.util.Collections$UnmodifiableMap
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|     22 | doCall    in elektrova.Disponent$__clinit__closure1
|    262 | run . . . in java.util.concurrent.FutureTask
|   1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
|    615 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^    744 | run       in java.lang.Thread
Error |
2014-03-12 13:20:34,821 [localhost-startStop-1] ERROR [localhost].[/ElektroVA]  - Exception sending context initialized event to listener instance of class org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener
Message: Error executing bootstraps; nested exception is java.lang.UnsupportedOperationException
    Line | Method
->>  262 | run       in java.util.concurrent.FutureTask
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|   1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
|    615 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^    744 | run       in java.lang.Thread
Caused by UnsupportedOperationException: null
->> 1342 | put       in java.util.Collections$UnmodifiableMap
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|     22 | doCall    in elektrova.Disponent$__clinit__closure1
|    262 | run . . . in java.util.concurrent.FutureTask
|   1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
|    615 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^    744 | run       in java.lang.Thread
Error |
2014-03-12 13:20:34,837 [localhost-startStop-1] ERROR core.StandardContext  - Error listenerStart
Error |
2014-03-12 13:20:34,873 [localhost-startStop-1] ERROR core.StandardContext  - Context [/ElektroVA] startup failed due to previous errors
| Server running. Browse to http://localhost:8080/ElektroVA
| Application loaded in interactive mode. Type 'stop-app' to shutdown.
| Enter a script name to run. Use TAB for completion:
grails>

So now I have no idea how to figure out where the error is comming from. Any ideas or suggestions would be great. Thanks!


Solution

  • Sounds as if you need to run a grails clean command on your project. Typically this will clear strange errors such as this.