每当我启动Jenkins时都会出现异常

时间:2018-04-25 09:38:11

标签: java jenkins jetty

每当我运行此命令java -jar jenkins.war --ajp13Port=-1 --httpPort=8080时,它都会抛出

首先,Jenkins以守护进程模式启动,重启过程,然后我尝试手动启动但遇到同样的错误。

我甚至尝试使用较旧版本的Jenkins,但也遇到了同样的错误。

Jenkins版本 - 2.107.2

Running from: /Applications/Jenkins/jenkins.war
webroot: $user.home/.jenkins
Apr 25, 2018 2:54:55 PM Main deleteWinstoneTempContents
WARNING: Failed to delete the temporary Winstone file /var/folders/60/r656jt5d01s0g2qtqdlycjbr0000gq/T/winstone/jenkins.war
Apr 25, 2018 2:54:55 PM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: Logging initialized @429ms
Apr 25, 2018 2:54:55 PM winstone.Logger logInternal
INFO: Beginning extraction from war file
Apr 25, 2018 2:54:56 PM org.eclipse.jetty.util.log.JavaUtilLog warn
WARNING: Empty contextPath
Apr 25, 2018 2:54:56 PM winstone.Logger logInternal
INFO: Winstone shutdown successfully
java.lang.NoSuchMethodError: org.eclipse.jetty.server.handler.HandlerWrapper.updateBean(Ljava/lang/Object;Ljava/lang/Object;Z)V
    at org.eclipse.jetty.server.handler.HandlerWrapper.setHandler(HandlerWrapper.java:95)
    at org.eclipse.jetty.servlet.ServletContextHandler.doSetHandler(ServletContextHandler.java:188)
    at org.eclipse.jetty.servlet.ServletContextHandler.relinkHandlers(ServletContextHandler.java:210)
    at org.eclipse.jetty.servlet.ServletContextHandler.<init>(ServletContextHandler.java:171)
    at org.eclipse.jetty.webapp.WebAppContext.<init>(WebAppContext.java:289)
    at org.eclipse.jetty.webapp.WebAppContext.<init>(WebAppContext.java:221)
    at winstone.HostConfiguration$1.<init>(HostConfiguration.java:155)
    at winstone.HostConfiguration.create(HostConfiguration.java:155)
    at winstone.HostConfiguration.<init>(HostConfiguration.java:81)
    at winstone.HostGroup.initHost(HostGroup.java:66)
    at winstone.HostGroup.<init>(HostGroup.java:45)
    at winstone.Launcher.<init>(Launcher.java:145)
    at winstone.Launcher.main(Launcher.java:354)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at Main._main(Main.java:312)
    at Main.main(Main.java:136)

1 个答案:

答案 0 :(得分:0)

检查依赖关系树或通过解压缩打开战争并查看特定方法是否可用。

当从它构建war文件时,它可能是一个错误的jar。