Jetty annotations

193 views
Skip to first unread message

Paul Kavanagh

unread,
Feb 24, 2016, 7:05:58 PM2/24/16
to scalatra-user
I have a small Scalatra app that I built on a development machine which works there.

I have moved it to another system and built it again. That seemed to work but...

I am getting a timeout after about six minutes caused by Jetty scanning annotations.
And after that the server is running but does not respond to my routes. So apparently the annotations are needed.

How can I extend the timeout for Jetty annotations? something like...
-Dorg.eclipse.jetty.annotations.maxWait=500
But where? And why is it so long? I don't even know what they do or if they are supposed to be used.



[info] starting server ...
[success] Total time: 29 s, completed Feb 24, 2016 6:27:34 PM
> 2016-02-24 18:27:35.736:INFO::main: Logging initialized @683ms
2016-02-24 18:27:35.736:INFO:oejr.Runner:main: Runner
2016-02-24 18:27:35.939:INFO:oejs.Server:main: jetty-9.2.1.v20140609
2016-02-24 18:33:32.442:WARN:oejw.WebAppContext:main: Failed startup of context o.e.j.w.WebAppContext@45c8e616{/,file:/C:/code/scala/web/datamon/target/webapp/,STARTING}{file:/C:/code/scala/web/datamon/target/webapp/}
java.lang.Exception: Timeout scanning annotations
        at org.eclipse.jetty.annotations.AnnotationConfiguration.scanForAnnotations(AnnotationConfiguration.java:571)
        at org.eclipse.jetty.annotations.AnnotationConfiguration.configure(AnnotationConfiguration.java:441)
        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:744)
        at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:497)
        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:60)
        at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:154)
        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:60)
        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.server.Server.start(Server.java:357)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:60)
        at org.eclipse.jetty.server.Server.doStart(Server.java:324)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at org.eclipse.jetty.runner.Runner.run(Runner.java:509)
        at org.eclipse.jetty.runner.Runner.main(Runner.java:557)
2016-02-24 18:33:32.458:WARN:oejsh.RequestLogHandler:main: !RequestLog
2016-02-24 18:33:32.583:INFO:oejs.ServerConnector:main: Started ServerConnector@e320068{HTTP/1.1}{0.0.0.0:8080}
2016-02-24 18:33:32.583:INFO:oejs.Server:main: Started @357546ms
Reply all
Reply to author
Forward
0 new messages