【问题标题】:unable to resolve class java.sql.sqltype grails ggts无法解析类 java.sql.sqltype grails ggts
【发布时间】:2017-12-14 09:20:44
【问题描述】:

我也面临同样的问题。我已尝试多次清理该项目。尝试创建新工作区尝试干净安装,但仍然面临同样的问题

失败:

Loading Grails 2.4.4
.
|Environment set to production
.................................
|Packaging Grails application
...........
|Compiling 115 source files  [groovyc] org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
  [groovyc] C:\src\sw\compiler\test\reports\TRez\grails-app\domain\automatedreports\TestRun.groovy: 3: unable to resolve class java.sql.SQLType
  [groovyc]  @ line 3, column 1.
  [groovyc]    import java.sql.SQLType;
  [groovyc]    ^
  [groovyc] 
  [groovyc] 1 error

.Error 
|
Compilation error: startup failed:
C:\src\sw\compiler\test\reports\TRez\grails-app\domain\automatedreports\TestRun.groovy: 3: unable to resolve class java.sql.SQLType
 @ line 3, column 1.
   import java.sql.SQLType;
   ^
1 error
Error |
org.codehaus.groovy.grails.cli.ScriptExitException
Error |
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
Error |
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
Error |
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
Error |
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
---more like this

任何人都可以帮忙,因为我完全被困在这里

【问题讨论】:

标签: grails


【解决方案1】:

java.sql.SQLType 在 Java 8 之前不存在。几乎可以肯定,您正在编译的 Java 版本为 7 或更低版本存在问题。确保您已安装 Java 8,并且您的 JAVA_HOME 环境变量已正确设置为指向 Java 8 安装。更多细节请参考这个问题:How do I make grails choose the right JDK?

【讨论】:

  • 使用了 Java 8 并且错误消失了。感谢您的帮助
  • 很好,如果它解决了您的问题,请接受答案。
猜你喜欢
  • 1970-01-01
  • 2016-08-22
  • 1970-01-01
  • 1970-01-01
  • 2013-04-23
  • 1970-01-01
  • 1970-01-01
  • 2013-12-30
  • 2012-02-17
相关资源
最近更新 更多