本文介绍了grails clean后,我无法运行应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我做了一个 grails clean ,然后当我通过 grails run-app 运行时,应用程序永远不会启动,以下是重复显示(永远持续下去,陷入某种循环)。

I did a grails clean and afterwards when I run via grails run-app the app never starts and the following is repeatedly displayed (goes on forever, stuck in some kind of loop).

我在Windows XP上运行Grails 1.0.4,Java 1.6。

I'm running Grails 1.0.4, Java 1.6 on Windows XP.

Grails以某种方式停留在无效配置中。任何想法如何恢复它?

Grails is somehow stuck in an invalid configuration. Any idea how to restore it?

  [groovyc] Compiling 3 source files to C:\Documents and Settings\Steve\.grails\1.0.4\projects\myproject\classes
    [javac] Compiling 3 source files to C:\Documents and Settings\Steve\.grails\1.0.4\projects\myproject\classes
2008-12-28 10:40:27.549:/myproject:INFO:  Destroying Spring FrameworkServlet 'grails'
[6688] spring.GrailsWebApplicationContext Closing org.codehaus.groovy.grails.commons.spring.GrailsWebApplicationContext@1c3c6d8: display name [org.codehaus.groovy.grails.commons.spring.GrailsWebApplicationContext@1c3c6d8]; startup date [Sun Dec 28 10:40:23 PST 2008]; parent: org.springframework.web.context.support.XmlWebApplicationContext@93912f
2008-12-28 10:40:27.549:/myproject:INFO:  Shutting down log4j
  [groovyc] Compiling 3 source files to C:\Documents and Settings\Steve\.grails\1.0.4\projects\myproject\classes
    [javac] Compiling 3 source files to C:\Documents and Settings\Steve\.grails\1.0.4\projects\myproject\classes
2008-12-28 10:40:27.877::INFO:  jetty-6.1.12
2008-12-28 10:40:27.892::INFO:  No Transaction manager found - if your webapp requires one, please configure one.
2008-12-28 10:40:27.970:/myproject:INFO:  Set web app root system property: 'myproject-development-0.1' = [C:\dev\myproject\web-app]
2008-12-28 10:40:27.970:/myproject:INFO:  Initializing log4j from [file:C:\Documents and Settings\Steve/.grails/1.0.4/projects/myproject/resources/log4j.properties]
2008-12-28 10:40:27.970:/myproject:INFO:  Initializing Spring root WebApplicationContext
[7297] spring.GrailsWebApplicationContext Refreshing org.codehaus.groovy.grails.commons.spring.GrailsWebApplicationContext@1ada1e0: display name [org.codehaus.groovy.grails.commons.spring.GrailsWebApplicationContext@1ada1e0]; startup date [Sun Dec 28 10:40:27 PST 2008]; parent: org.springframework.web.context.support.XmlWebApplicationContext@18b24cb
[7297] spring.GrailsWebApplicationContext Bean factory for application context [org.codehaus.groovy.grails.commons.spring.GrailsWebApplicationContext@1ada1e0]: org.springframework.beans.factory.support.DefaultListableBeanFactory@1cf6930
2008-12-28 10:40:27.299:/myproject:INFO:  Initializing Spring FrameworkServlet 'grails'
2008-12-28 10:40:27.314::INFO:  Started [email protected]:8080


推荐答案

Okay, I tracked it down. I had a single .java file that was completely commented out. This is 100% legal as far as Java is concerned but apparently Grails can't handle it. Grails must be assuming that any .java will have a corresponding .class files. Since the file contained no Java code, it produced no corresponding class file.

后续:这已在2.0-M2中修复,请参阅

Follow-up: This has been fixed in 2.0-M2, see GRAILS-3763

这篇关于grails clean后,我无法运行应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 14:44