Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/amazon-web-services/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Grails插件安装错误:java.lang.NoClassDefFoundError:org/Grails/plugins/tomcat/fork/ForkedTomcatServer$\u findSystemClasspathJars\u closure3_Tomcat_Grails_Amazon Web Services_Grails Plugin_Grails 2.3 - Fatal编程技术网

Grails插件安装错误:java.lang.NoClassDefFoundError:org/Grails/plugins/tomcat/fork/ForkedTomcatServer$\u findSystemClasspathJars\u closure3

Grails插件安装错误:java.lang.NoClassDefFoundError:org/Grails/plugins/tomcat/fork/ForkedTomcatServer$\u findSystemClasspathJars\u closure3,tomcat,grails,amazon-web-services,grails-plugin,grails-2.3,Tomcat,Grails,Amazon Web Services,Grails Plugin,Grails 2.3,在安装插件后,我遇到了这个错误,(我试图安装2个插件,但发生了相同的错误)我正在尝试安装Grails AWS插件 但以下是Buildconfig.groovy和错误: grails.servlet.version = "3.0" // Change depending on target container compliance (2.5 or 3.0) grails.project.class.dir = "target/classes" grails.project.test.class.d

在安装插件后,我遇到了这个错误,(我试图安装2个插件,但发生了相同的错误)我正在尝试安装Grails AWS插件
但以下是Buildconfig.groovy和错误:

grails.servlet.version = "3.0" // Change depending on target container compliance (2.5 or 3.0)
grails.project.class.dir = "target/classes"
grails.project.test.class.dir = "target/test-classes"
grails.project.test.reports.dir = "target/test-reports"
grails.project.work.dir = "target/work"
grails.project.target.level = 1.6
grails.project.source.level = 1.6
//grails.project.war.file = "target/${appName}-${appVersion}.war"

grails.project.fork = [
    // configure settings for compilation JVM, note that if you alter the Groovy version forked compilation is required
    //  compile: [maxMemory: 256, minMemory: 64, debug: false, maxPerm: 256, daemon:true],

    // configure settings for the test-app JVM, uses the daemon by default
    test: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256, daemon:true],
    // configure settings for the run-app JVM
    run: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256, forkReserve:false],
    // configure settings for the run-war JVM
    war: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256, forkReserve:false],
    // configure settings for the Console UI JVM
    console: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256]
]

grails.project.dependency.resolver = "maven" // or ivy
grails.project.dependency.resolution = {
    // inherit Grails' default dependencies
    inherits("global") {
        // specify dependency exclusions here; for example, uncomment this to disable ehcache:
        // excludes 'ehcache'
    }
    log "error" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose'
    checksums true // Whether to verify checksums on resolve
    legacyResolve false // whether to do a secondary resolve on plugin installation, not advised and here for backwards compatibility

    repositories {
        inherits true // Whether to inherit repository definitions from plugins

        grailsPlugins()
        grailsHome()
        mavenLocal()
        grailsCentral()
        mavenCentral()
        // uncomment these (or add new ones) to enable remote dependency resolution from public Maven repositories
        //mavenRepo "http://repository.codehaus.org"
        //mavenRepo "http://download.java.net/maven/2/"
        //mavenRepo "http://repository.jboss.com/maven2/"
        mavenRepo 'http://repo.spring.io/milestone'
    }

    dependencies {
        // specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes e.g.
        // runtime 'mysql:mysql-connector-java:5.1.24'
    }

    plugins {
        // plugins for the build system only
        build ":tomcat:7.0.50"

        // plugins for the compile step
        compile ":scaffolding:2.0.1"
        compile ':cache:1.1.1'
        compile ":spring-security-core:2.0-RC2" //s2-quickstart
        compile ":spring-security-ui:1.0-RC1"
        compile ":aws:1.6.7.5"

        // plugins needed at runtime but not for compilation
        runtime ":hibernate:3.6.10.7"// or ":hibernate4:4.1.11.6"
        runtime ":database-migration:1.3.8"
        runtime ":jquery:1.10.2.2"
        runtime ":resources:1.2.1"

        // Uncomment these (or add new ones) to enable additional resources capabilities
        //runtime ":zipped-resources:1.0.1"
        //runtime ":cached-resources:1.1"
        //runtime ":yui-minify-resources:0.1.5"
    }

    |Loading Grails 2.3.5
|Configuring classpath
.
|Environment set to development
.................................
|Packaging Grails application
|Installing zip aws-1.6.7.5.zip...
...
|Installed plugin aws-1.6.7.5
....................
|Compiling 233 source files
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
.......
|Compiling 48 source files
..............................................Error 
|
Error executing script RunApp: org/grails/plugins/tomcat/fork/ForkedTomcatServer$_findSystemClasspathJars_closure3 (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
java.lang.NoClassDefFoundError: org/grails/plugins/tomcat/fork/ForkedTomcatServer$_findSystemClasspathJars_closure3
    at org.grails.plugins.tomcat.fork.ForkedTomcatServer.findSystemClasspathJars(ForkedTomcatServer.groovy:179)
    at org.grails.plugins.tomcat.fork.TomcatExecutionContext.buildMinimalIsolatedClasspath(TomcatExecutionContext.groovy:44)
    at org.grails.plugins.tomcat.fork.TomcatExecutionContext.initialize(TomcatExecutionContext.groovy)
    at org.grails.plugins.tomcat.TomcatServerFactory.createForked(TomcatServerFactory.groovy:48)
    at org.grails.plugins.tomcat.TomcatServerFactory.createForked(TomcatServerFactory.groovy)
    at org.grails.plugins.tomcat.TomcatServerFactory.createInline(TomcatServerFactory.groovy:35)
    at RunApp$_run_closure1.doCall(RunApp:60)
    at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1254)
    at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133)
    at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy:185)
    at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1254)
    at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy)
    at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1254)
    at org.codehaus.gant.GantBinding.withTargetEvent(GantBinding.groovy:90)
    at org.codehaus.gant.GantBinding.this$4$withTargetEvent(GantBinding.groovy)
    at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1254)
    at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy:185)
    at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1254)
    at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy)
    at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1254)
    at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133)
    at RunApp$_run_closure1.doCall(RunApp.groovy:33)
    at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1254)
    at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133)
    at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy:185)
    at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1254)
    at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy)
    at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1254)
    at org.codehaus.gant.GantBinding.withTargetEvent(GantBinding.groovy:90)
    at org.codehaus.gant.GantBinding.this$4$withTargetEvent(GantBinding.groovy)
    at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1254)
    at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy:185)
    at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1254)
    at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy)
    at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1254)
    at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381)
    at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1254)
    at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
    at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1254)
    at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
    at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1254)
    at gant.Gant.withBuildListeners(Gant.groovy:427)
    at gant.Gant.this$2$withBuildListeners(Gant.groovy)
    at gant.Gant$this$2$withBuildListeners$0.callCurrent(Unknown Source)
    at gant.Gant.dispatch(Gant.groovy:415)
    at gant.Gant.this$2$dispatch(Gant.groovy)
    at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1254)
    at gant.Gant.invokeMethod(Gant.groovy)
    at gant.Gant.executeTargets(Gant.groovy:591)
    at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1254)
    at gant.Gant.executeTargets(Gant.groovy:590)
    at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1254)
Caused by: java.lang.ClassNotFoundException: org.grails.plugins.tomcat.fork.ForkedTomcatServer$_findSystemClasspathJars_closure3
    ... 52 more
Error |
Error executing script RunApp: org/grails/plugins/tomcat/fork/ForkedTomcatServer$_findSystemClasspathJars_closure3

在没有分叉的情况下运行应用程序修复了该问题

只需将这一行添加到BuildConfig.groovy

grails.project.fork.run=false

我在受影响的回购中运行了
rm-Rf./target
,然后重建了你尝试过清理你的应用程序吗?是的,我尝试过,但没有成功。但是当我手动将插件解压到plugins文件夹并手动安装时,它就工作了。