在开发模式下以开发模式在Windows命令提示符下运行Grails时,调用run-app之后,在更改代码并保存后,我经常会为线程抛出一些NumberFormatExceptions。当更改conf文件或我的代码中出现编译错误时,尤其会发生这种情况。
我发现的唯一恢复方法是关闭命令提示符窗口,打开一个新窗口,再次启动Grails,然后发出stop-app和run-app。
还有另一种方法吗?
命令窗口中的文本如下:
| Compiling 1 source files.
grails>
Exception: java.lang.NumberFormatException thrown from the UncaughtExceptionHandler in thread "Thread-14"
Exception: java.lang.NumberFormatException thrown from the UncaughtExceptionHandler in thread "Thread-24"
最佳答案
@BurtBeckwith找到了解决方案。它似乎与在Windows开发环境中运行grails有关。在JIRA中提出:http://jira.grails.org/browse/GRAILS-9356。当您启动DOS命令窗口时,键入“grails”,然后在grails中,执行run-app,就会出现此问题。解决方案是启动DOS命令窗口并一起键入“grails run-app”。这样运行起来更加稳定。然后,关闭命令窗口将杀死java.exe任务,无需执行stop-app。
关于grails - 命令行中的Grails在线程中获取数字格式异常,无法恢复,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21266827/