Grails 2.4.3 Tomcat上的应用程序部署错误

时间:2014-08-21 19:33:49

标签: grails tomcat7 grails-2.4

尝试将Grails 2.4.3应用程序部署到Tomcat 7.55

不断收到此错误:

LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
    at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1247)
    at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1898)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: jline.console.completer.CompletionHandler
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 18 more

这是BuildConfig:

我在本地计算机上运行它没有问题。即使用#34; grails prod run-war"。我将尝试取出依赖项以查看是否存在问题。不知道jLine来自哪里。通过搜索,我发现Jasper Reports使用了jLine(我以前安装过,但不再使用)。我还没有找到任何使用它的其他库。 Tomcat中有什么东西可以使用它吗?

    grails.project.dependency.resolver = "maven" 

    grails.project.dependency.resolution = {
        // inherit Grails' default dependencies
        inherits("global") {
            // uncomment 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

        repositories {
            inherits true // Whether to inherit repository definitions from plugins
            grailsPlugins()
            grailsHome()
            grailsCentral()
            mavenCentral()
            mavenLocal()
            mavenRepo "http://repo.spring.io/milestone/"

        }
        dependencies {
            runtime 'org.drools:drools-core:5.6.0.Final'
            runtime 'org.drools:drools-compiler:5.6.0.Final'
            test "org.grails:grails-datastore-test-support:1.0-grails-2.4"
        }

        plugins {
            runtime ":jquery:1.11.1"
            runtime ":hibernate4:4.3.5.5"
            runtime ":database-migration:1.4.0"
            compile ":cache-headers:1.1.7"
            compile ":spring-security-core:2.0-RC4"
        compile ":rendering:1.0.0"
            compile ":quartz2:2.1.6.2"
            compile ":joda-time:1.5"
            compile ":asset-pipeline:1.9.6"
            compile ":browser-detection:0.4.3"
            compile ":cache:1.1.7"
            compile ":grails-melody:1.52.0"

            compile ":scaffolding:2.1.2"


            build ":tomcat:7.0.55"

        }
    }

1 个答案:

答案 0 :(得分:1)

原来这是由application.properties文件引起的。我正在从Tomcat中的lib目录加载application.properties,并且没有针对部署的war文件正确格式化。