有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java数据源。找不到groovy。Grails2.4.4

我在运行应用程序时遇到此错误。我正在使用Postgres9.4数据库。我确保了数据源。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]错误核心。StandardContext-错误listenerStart |错误2015-04-10 12:24:40288[localhost-startStop-1]错误核心。StandardContext-由于以前的错误,上下文[/yazh]启动失败 |服务器正在运行。浏览至http://localhost:8080/yazh |以交互模式加载应用程序。键入“停止应用程序”以关闭。 |输入要运行的脚本名称。使用“完成”选项卡: |父进程关闭。退出。。。 |错误分叉Grails VM已退出,出现错误


共 (2) 个答案

  1. # 1 楼答案

    这不是一个很好的答案,但我刚刚经历了这个错误,并且能够通过grails清理和grails编译来消除它

  2. # 2 楼答案

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