【发布时间】:2014-07-18 19:07:52
【问题描述】:
我正在尝试使用上传器,但我无法使用它...即使 Uploadr-demo 也无法运行。
所以,这是我迄今为止尝试过的:
使用 Grails 2.4.2 并在现有项目中添加插件: 运行项目时出现此错误:
| Error 2014-07-16 16:00:54,667 [localhost-startStop-1] ERROR resource.ResourceMeta - Resource not found: /assets/jquery.tipTip.minified.js
| Error 2014-07-16 16:00:54,697 [localhost-startStop-1] ERROR resource.ResourceMeta - Resource not found: /assets/tipTip.css
| Error 2014-07-16 16:00:54,727 [localhost-startStop-1] ERROR resource.ResourceMeta - Resource not found: /assets/jquery.uploadr.js
| Error 2014-07-16 16:00:54,754 [localhost-startStop-1] ERROR resource.ResourceMeta - Resource not found: /assets/jquery.uploadr.css
但是服务器启动了,但是当我尝试使用上传器打开页面时,我收到了这个错误:
Error 500: Internal Server Error
[...]
Class: java.lang.IllegalArgumentException
Message: Module [tipTip] depends on resource [/assets/jquery.tipTip.minified.js] but the file cannot be found
我试图打开的页面只是为了调用上传者演示:
<head>
<g:javascript library='jquery' />
<r:require modules="uploadr"/>
<r:layoutResources/>
</head>
<body>
<uploadr:demo/>
<r:layoutResources/>
</body>
构建配置:
plugins {
// plugins for the build system only
build ":tomcat:7.0.54"
// plugins for the compile step
compile ":scaffolding:2.1.2"
compile ':cache:1.1.7'
compile ":asset-pipeline:1.8.11"
//uploadr
runtime ":resources:latest.integration"
compile ":modernizr:latest.integration"
compile ":uploadr:latest.integration"
compile ":quartz:latest.integration" //1.0.1"
// plugins needed at runtime but not for compilation
runtime ":hibernate4:4.3.5.4" // or ":hibernate:3.6.10.16"
runtime ":database-migration:1.4.0"
runtime ":jquery:1.11.1"
}
由于它不起作用,我尝试从 github 下载 Uploadr-demo。 首先,我无法导入(我使用的是 Spring Tool Suite v.:3.5.1.RELEASE),因为演示是针对 grails 2.3.3 的。好吧,我得到了 grails 2.3.3,但它又没用。这次出现新错误:
Loading Grails 2.3.3
|Environment set to development
........
|Compiling 10 source files
..
|Compiling 154 source files
.Error
|
Compilation error: startup failed:
/home/ainsoph/workspace-sts-3.5.1.RELEASE/grails-uploadr-demo/target/work/plugins/uploadr-0.8.2/grails-app/controllers/hungry/wombat/UploadController.groovy: -1: Repetitive method name/signature for method 'java.lang.Object withFormat(groovy.lang.Closure)' in class 'hungry.wombat.UploadController'.
@ line -1, column -1.
/home/ainsoph/workspace-sts-3.5.1.RELEASE/grails-uploadr-demo/target/work/plugins/uploadr-0.8.2/grails-app/controllers/hungry/wombat/UploadController.groovy: -1: Repetitive method name/signature for method 'java.lang.Object withFormat(groovy.lang.Closure)' in class 'hungry.wombat.UploadController'.
@ line -1, column -1.
/home/ainsoph/workspace-sts-3.5.1.RELEASE/grails-uploadr-demo/target/work/plugins/database-migration-1.3.8/grails-app/controllers/grails/plugin/databasemigration/DbdocController.groovy: -1: Repetitive method name/signature for method 'java.lang.Object withFormat(groovy.lang.Closure)' in class 'grails.plugin.databasemigration.DbdocController'.
@ line -1, column -1.
/home/ainsoph/workspace-sts-3.5.1.RELEASE/grails-uploadr-demo/target/work/plugins/database-migration-1.3.8/grails-app/controllers/grails/plugin/databasemigration/DbdocController.groovy: -1: Repetitive method name/signature for method 'java.lang.Object withFormat(groovy.lang.Closure)' in class 'grails.plugin.databasemigration.DbdocController'.
@ line -1, column -1.
4 errors
我也尝试使用 grails 2.3.3 创建一个新项目,但它甚至无法编译:
Command terminated with an exception: java.lang.Exception (see details for partial output)
Command: GrailsCommand(P/grails-uploadr> compile --non-interactive --refresh-dependencies)
---- System.out ----
Loading Grails 2.3.3
.
|Environment set to development
..........
|Compiling 79 source files
.Error
|
Compilation error: startup failed:
/home/ainsoph/workspace-sts-3.5.1.RELEASE/grails-uploadr/target/work/plugins/database-migration-1.3.8/grails-app/controllers/grails/plugin/databasemigration/DbdocController.groovy: -1: Repetitive method name/signature for method 'java.lang.Object withFormat(groovy.lang.Closure)' in class 'grails.plugin.databasemigration.DbdocController'.
@ line -1, column -1.
/home/ainsoph/workspace-sts-3.5.1.RELEASE/grails-uploadr/target/work/plugins/database-migration-1.3.8/grails-app/controllers/grails/plugin/databasemigration/DbdocController.groovy: -1: Repetitive method name/signature for method 'java.lang.Object withFormat(groovy.lang.Closure)' in class 'grails.plugin.databasemigration.DbdocController'.
@ line -1, column -1.
2 errors
当我尝试使用 grails 2.3.3 创建一个新项目时,我首先将 $GRAILS_HOME 更改为指向 2.3.3,然后从已更新路径的终端调用 spring
好吧,我尝试了所有我能想到或在 Google 上找到的东西……有什么想法吗?
【问题讨论】:
-
我想使用了 JDK 8,它只支持 Grails 2.4 及更高版本。因此,在您回退到 JDK 7 之前,您第二次尝试使用 Grails 2.3.3 将无法正常工作。
-
@dmahapatro,确实我使用的是 JDK 8。我试图回退到 JDK 7(Oracle jdk1.7.0_65),但仍然是同样的错误......
标签: grails grails-plugin