Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Grails Spring Security sample application not working

I got grails Spring security sample application from https://github.com/grails-plugins/grails-spring-security-core

I did not change anything, I am getting below error:

2014-06-16 17:10:00,397 [localhost-startStop-1] ERROR context.ContextLoader  - Context initialization failed
Message: IOException parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
    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 FileNotFoundException: Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
->>  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-06-16 17:10:00,441 [localhost-startStop-1] ERROR context.GrailsContextLoader  - Error initializing the application: IOException parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
Message: IOException parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
    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 FileNotFoundException: Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
->>  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
like image 944
Sun Avatar asked Mar 19 '23 08:03

Sun


1 Answers

You need to do as follows

  1. Checkout source
  2. Use Grails 2.3.8
  3. Run grails clean
  4. Run grails upgrade <-- This generates the applicationContext.xml
  5. Run grails run-app

Done.

like image 142
saw303 Avatar answered Apr 26 '23 05:04

saw303