gradle5.0升级后码头未初始化

时间:2019-12-17 20:21:44

标签: gradle gretty

将项目升级到gradle5.0。码头不再启动。 我正在使用org.gretty 3.0.1版本。

在我的build.gradle中:

plugins{
        id 'java'
        id 'eclipse-wtp'
        id 'org.gretty' version '3.0.1'
    }
gretty {
    httpPort = 8096
    contextPath = '/'
    servletContainer = 'jetty9.4'
    consoleLogEnabled=true
    fileLogEnabled=true
    logDir ="${buildDir}/logs"
    integrationTestTask = 'test'

    onStart {
        tasks.explodedWar.finalizedBy()
        tasks.copyServiceConfig.finalizedBy()
    }
}*

错误是:

ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
13:35:25 WARN  Failed startup of context o.a.g.JettyWebAppContext@1d470d0{/,/,file:///C:/work/*****************/**/build/inplaceWebapp/,UNAVAILABLE}
java.lang.NullPointerException: null
        at com.swacorp.tbs.status.InstrumentedFilterContextListener.contextInitialized(InstrumentedFilterContextListener.java:19) ~[na:na]
        at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:957) ~[jetty-server-9.4.14.v20181114.jar:9.4.14.v20181114]
        at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:552) ~[jetty-servlet-9.4.14.v20181114.jar:9.4.14.v20181114]
        at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:922) ~[jetty-server-9.4.14.v20181114.jar:9.4.14.v20181114]
        at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:364) ~[jetty-servlet-9.4.14.v20181114.jar:9.4.14.v20181114]
        at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1497) ~[jetty-webapp-9.4.14.v20181114.jar:9.4.14.v20181114]
        at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1459) ~[jetty-webapp-9.4.14.v20181114.jar:9.4.14.v20181114]
        at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:852) ~[jetty-server-9.4.14.v20181114.jar:9.4.14.v20181114]
        at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:278) ~[jetty-servlet-9.4.14.v20181114.jar:9.4.14.v20181114]
        at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:545) ~[jetty-webapp-9.4.14.v20181114.jar:9.4.14.v20181114]
        at org.akhikhl.gretty.JettyWebAppContext.doStart(JettyWebAppContext.groovy:44) [gretty-runner-jetty94-3.0.1.jar:na]
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) [jetty-util-9.4.14.v20181114.jar:9.4.14.v20181114]
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:138) [jetty-util-9.4.14.v20181114.jar:9.4.14.v20181114]
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117) [jetty-util-9.4.14.v20181114.jar:9.4.14.v20181114]
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113) [jetty-server-9.4.14.v20181114.jar:9.4.14.v20181114]
        at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:168) [jetty-server-9.4.14.v20181114.jar:9.4.14.v20181114]
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) [jetty-util-9.4.14.v20181114.jar:9.4.14.v20181114]
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:138) [jetty-util-9.4.14.v20181114.jar:9.4.14.v20181114]
        at org.eclipse.jetty.server.Server.start(Server.java:415) [jetty-server-9.4.14.v20181114.jar:9.4.14.v20181114]
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:108) [jetty-util-9.4.14.v20181114.jar:9.4.14.v20181114]
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113) [jetty-server-9.4.14.v20181114.jar:9.4.14.v20181114]
        at org.eclipse.jetty.server.Server.doStart(Server.java:382) [jetty-server-9.4.14.v20181114.jar:9.4.14.v20181114]
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) [jetty-util-9.4.14.v20181114.jar:9.4.14.v20181114]
        at org.eclipse.jetty.util.component.LifeCycle$start$0.call(Unknown Source) [jetty-util-9.4.14.v20181114.jar:9.4.14.v20181114]
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47) [groovy-2.5.8.jar:2.5.8]
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:115) [groovy-2.5.8.jar:2.5.8]
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:119) [groovy-2.5.8.jar:2.5.8]
        at org.akhikhl.gretty.JettyServerManager.startServer(JettyServerManager.groovy:48) [gretty-runner-jetty-3.0.1.jar:na]
        at org.akhikhl.gretty.ServerManager$startServer$0.call(Unknown Source) [gretty-runner-3.0.1.jar:na]
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47) [groovy-2.5.8.jar:2.5.8]
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:115) [groovy-2.5.8.jar:2.5.8]
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:127) [groovy-2.5.8.jar:2.5.8]
        at org.akhikhl.gretty.Runner.run(Runner.groovy:122) [gretty-runner-3.0.1.jar:na]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_162]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_162]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_162]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_162]
        at org.codehaus.groovy.runtime.callsite.PlainObjectMetaMethodSite.doInvoke(PlainObjectMetaMethodSite.java:43) [groovy-2.5.8.jar:2.5.8]
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:190) [groovy-2.5.8.jar:2.5.8]
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.call(PogoMetaMethodSite.java:70) [groovy-2.5.8.jar:2.5.8]
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47) [groovy-2.5.8.jar:2.5.8]
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:115) [groovy-2.5.8.jar:2.5.8]
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:119) [groovy-2.5.8.jar:2.5.8]
        at org.akhikhl.gretty.Runner.main(Runner.groovy:49) [gretty-runner-3.0.1.jar:na]

1 个答案:

答案 0 :(得分:0)

没关系。复制任务之一不起作用。