Java 找不到DataSource.groovy。Grails2.4.4

Java 找不到DataSource.groovy。Grails2.4.4,java,spring,hibernate,grails,gorm,Java,Spring,Hibernate,Grails,Gorm,我在运行应用程序时遇到此错误。我正在使用Postgres9.4数据库。我确保DataSource.groovy存在。我使用的是MAC OS X 10.10 grails> r-a | Starting daemon... | Compiling 450 source files | Parent process shutdown. Exiting... | Error Forked Grails VM exited with error | Starting daemon..... | W

我在运行应用程序时遇到此错误。我正在使用Postgres9.4数据库。我确保DataSource.groovy存在。我使用的是MAC OS X 10.10

grails> r-a
| Starting daemon...
| Compiling 450 source files
| Parent process shutdown. Exiting...
| Error Forked Grails VM exited with error
| Starting daemon.....
| Warning No config found for the application.
| Warning DataSource.groovy not found, assuming dataSource bean is configured by Spring
| Running Grails application
objc[2087]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.
| Error 2015-04-10 12:24:40,201 [localhost-startStop-1] ERROR context.ContextLoader  - Context initialization failed
Message: Error creating bean with name 'grailsApplication' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.codehaus.groovy.grails.exceptions.GrailsConfigurationException: Class not found loading Grails application: BootStrap
    Line | Method
->>  262 | run       in java.util.concurrent.FutureTask
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|   1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
|    615 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^    745 | run       in java.lang.Thread
Caused by GrailsConfigurationException: Class not found loading Grails application: BootStrap
->>  262 | run       in java.util.concurrent.FutureTask
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|   1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
|    615 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^    745 | run       in java.lang.Thread
Caused by ClassNotFoundException: BootStrap
->>  366 | run       in java.net.URLClassLoader$1
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|    355 | run       in     ''
|    354 | findClass in java.net.URLClassLoader
|    425 | loadClass in java.lang.ClassLoader
|    262 | run . . . in java.util.concurrent.FutureTask
|   1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
|    615 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^    745 | run       in java.lang.Thread
| Error 2015-04-10 12:24:40,261 [localhost-startStop-1] ERROR context.GrailsContextLoaderListener  - Error initializing the application: Error creating bean with name 'grailsApplication' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.codehaus.groovy.grails.exceptions.GrailsConfigurationException: Class not found loading Grails application: BootStrap
Message: Error creating bean with name 'grailsApplication' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.codehaus.groovy.grails.exceptions.GrailsConfigurationException: Class not found loading Grails application: BootStrap
    Line | Method
->>  262 | run       in java.util.concurrent.FutureTask
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|   1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
|    615 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^    745 | run       in java.lang.Thread
Caused by GrailsConfigurationException: Class not found loading Grails application: BootStrap
->>  262 | run       in java.util.concurrent.FutureTask
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|   1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
|    615 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^    745 | run       in java.lang.Thread
Caused by ClassNotFoundException: BootStrap
->>  366 | run       in java.net.URLClassLoader$1
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|    355 | run       in     ''
|    354 | findClass in java.net.URLClassLoader
|    425 | loadClass in java.lang.ClassLoader
|    262 | run . . . in java.util.concurrent.FutureTask
|   1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
|    615 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^    745 | run       in java.lang.Thread
|错误2015-04-10 12:24:40277[localhost-startStop-1]错误core.StandardContext-错误listenerStart |错误2015-04-10 12:24:40288[localhost-startStop-1]错误core.StandardContext-Context[/yazh]由于以前的错误,启动失败 |服务器正在运行。浏览到 |以交互模式加载应用程序。键入“停止应用程序”以关闭。 |输入要运行的脚本名称。使用“完成”选项卡: |父进程关闭。退出。。。
|Error Forked Grails VM退出时出错

这通常发生在域、控制器或服务类出错时。使用--stacktrace运行,您将找到根本原因

这不是一个很好的答案,但我刚刚经历了这个错误,并通过grails清理和grails编译摆脱了它。

据我所知,找不到的是
BootStrap.groovy
类。@daddyBootstarp.groovy也可以在config文件夹下找到。