无法解析类java.sql.sqltype grails ggts

时间:2017-12-14 09:20:44

标签: grails

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

失败:

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

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

1 个答案:

答案 0 :(得分:0)

java.sql.SQLType在Java 8之前不存在。对于您编译为7或更低版​​本的Java版本,几乎肯定存在问题。确保安装了Java 8,并且正确设置了JAVA_HOME环境变量以指向Java 8安装。有关详细信息,请参阅此问题:How do I make grails choose the right JDK?