尝试将 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
这是构建配置:
我在本地机器上运行它没有问题。即使是“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"
}
}