Grails重新加载文件观察程序错误

时间:2016-04-05 10:18:01

标签: java spring grails

我正在开发一个grails项目,该项目分为多个子项目(grails插件项目),如 -

  • MainProject
    • Subproject1(grails.plugin.location.'Subproject1'=“../ Subproject1”)
    • Subproject2(grails.plugin.location.'Subproject2'=“../ Subproject2”)
    • Subproject3(grails.plugin.location.'Subproject3'=“../ Subproject3”)

现在的问题是,当我编辑Main项目中的任何文件(例如某些控制器或服务)时,Grails会在保存时重新加载更改。但是当我尝试在SubProject中执行相同操作时,它会抛出以下错误并且从不重新加载它,因此我需要在每次更改后停止并重新启动项目。

注意

  • 我正在使用IntelliJ Idea,但我也在Grails命令行上尝试过,所以它不是由于IDE。
  • 我也尝试过重新安装Grails(2.4.4),它没有任何区别,所以我的Grails安装没有损坏!检查。
  • 我使用的是Java 1.8.0_31,但切换到Java 1.7.0_79没有任何区别。

错误 -

Error java.lang.IllegalStateException: No file extensions list found for path not being watched
| Error     at org.codehaus.groovy.grails.compiler.WatchServiceDirectoryWatcher.run(WatchServiceDirectoryWatcher.java:87)
| Error     at org.codehaus.groovy.grails.compiler.DirectoryWatcher.run(DirectoryWatcher.java:154)
| Error     at org.codehaus.groovy.grails.project.compiler.GrailsProjectWatcher.run(GrailsProjectWatcher.java:161)
| Error     at java_lang_Runnable$run.call(Unknown Source)
| Error     at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
| Error     at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
| Error     at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
| Error     at org.codehaus.groovy.grails.cli.fork.ForkedGrailsProcess.startProjectWatcher(ForkedGrailsProcess.groovy:748)
| Error     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| Error     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
| Error     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
| Error     at java.lang.reflect.Method.invoke(Method.java:606)
| Error     at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1270)
| Error     at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
| Error     at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
| Error     at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207)
| Error     at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016)
| Error     at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1152)
| Error     at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110)
| Error     at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016)
| Error     at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)
| Error     at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49)
| Error     at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
| Error     at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:145)
| Error     at org.codehaus.groovy.grails.cli.fork.ForkedGrailsProcess$_setupReloading_closure17.doCall(ForkedGrailsProcess.groovy:737)
| Error     at org.codehaus.groovy.grails.cli.fork.ForkedGrailsProcess$_setupReloading_closure17.doCall(ForkedGrailsProcess.groovy)
| Error     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| Error     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
| Error     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
| Error     at java.lang.reflect.Method.invoke(Method.java:606)
| Error     at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1270)
| Error     at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
| Error     at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
| Error     at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207)
| Error     at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110)
| Error     at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016)
| Error     at groovy.lang.Closure.call(Closure.java:423)
| Error     at groovy.lang.Closure.call(Closure.java:417)
| Error     at groovy.lang.Closure.run(Closure.java:504)
| Error     at java.lang.Thread.run(Thread.java:745)
WARNING: There was an error setting up reloading. Changes to classes will not be reflected: No file extensions list found for path not being watched

0 个答案:

没有答案