Jetty注解超时原因 [英] Jetty Annotation Timeout Reason

查看:32
本文介绍了Jetty注解超时原因的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用 maven jetty 插件运行我的网络应用程序.但是在启动一段时间后,它给出了错误:

I am tying to run my web application with maven jetty plugin. But after some time at startup, it gives the error:

[INFO] Web defaults = org/eclipse/jetty/webapp/webdefault.xml
[INFO] Web overrides =  none
2014-08-10 17:39:45.840:INFO:oejs.Server:main: jetty-9.2.2.v20140723
2014-08-10 17:40:54.961:WARN:oejw.WebAppContext:main: Failed startup of context o.e.j.m.p.JettyWebAppContext@1e2c8{/asd,file:/C:/dev/project/hope/target/asd-1.0/,STARTING}{C:\dev\project\hope\target\asd-1.0.war}
java.lang.Exception: Timeout scanning annotations
    at org.eclipse.jetty.annotations.AnnotationConfiguration.scanForAnnotations(AnnotationConfiguration.java:570)
    at org.eclipse.jetty.annotations.AnnotationConfiguration.configure(AnnotationConfiguration.java:440)
    at org.eclipse.jetty.webapp.WebAppContext.configure(WebAppContext.java:471)
    at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1329)
    at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741)
    at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:497)
    at org.eclipse.jetty.maven.plugin.JettyWebAppContext.doStart(JettyWebAppContext.java:365)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
    at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)

我正在使用带有注释的 spring mvc,我认为它有问题.

I am using spring mvc with annotations and I think there is a problem about it.

当我尝试通过 eclipse jetty 插件运行它时,它成功启动,但是使用 maven 插件时,它给出了错误.

When I try to run it over eclipse jetty plugin, it starts succesfully, but with maven plugin, it gives the error.

有什么想法吗?

推荐答案

我遇到了同样的错误并要修复它,您应该在启动脚本 (start.ini) 中添加以下内容:

I've got the same error and to fix it, you should add to your start script (start.ini) the following:

-Dorg.eclipse.jetty.annotations.maxWait=120

120 用于两分钟的注释扫描,以防您需要更高的值,只需将其设置为合适的值即可.

120 is for two minutes of annotation scanning in case that you need a higher value, just set it to the propper one.

这篇关于Jetty注解超时原因的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆