Grails Spring Security示例应用程序无法正常工作

时间:2014-06-16 11:48:37

标签: grails grails-plugin grails-2.3

我从https://github.com/grails-plugins/grails-spring-security-core

获得了grails Spring安全示例应用程序

我没有改变任何东西,我收到了以下错误:

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

1 个答案:

答案 0 :(得分:7)

您需要执行以下操作

  1. 结帐来源
  2. 使用Grails 2.3.8
  3. 运行grails clean
  4. 运行grails upgrade< - 这会生成applicationContext.xml
  5. 运行grails run-app
  6. 完成。