2014-09-21 72 views
0

在Windows上,當我運行jetty mvn:run時出現如下的超時錯誤。 本次超時,我發現內存消耗是170 MB。hibernate-tools maven依賴項導致超時掃描註釋

但是同樣的pom.xml配置在mac和ubuntu中沒有超時運行。

mvn jetty:run 

2014-09-21 14:50:25.510:INFO:oejs.Server:main: jetty-9.1.1.v20140108 
2014-09-21 14:52:50.493:INFO:oeja.AnnotationConfiguration:main: Scanned 1 contai 
ner path jars, 90 WEB-INF/lib jars, 1 WEB-INF/classes dirs in 143202ms for conte 
xt [email protected]{/MY_PROJECT,file:/C:/MY_PC/src/MY_PROJECT 
/src/main/webapp/,STARTING}{file:/C:/MY_PC/src/MY_PROJECT/src/main/webapp/} 
2014-09-21 14:52:50.495:WARN:oejw.WebAppContext:main: Failed startup of context 
[email protected]{/MY_PROJECT,file:/C:/MY_PC/src/MY_PROJECT/sr 
c/main/webapp/,STARTING}{file:/C:/MY_PC/src/MY_PROJECT/src/main/webapp/} 
java.lang.Exception: Timeout scanning annotations 
     at org.eclipse.jetty.annotations.AnnotationConfiguration.scanForAnnotati 
ons(AnnotationConfiguration.java:560) 
     at org.eclipse.jetty.annotations.AnnotationConfiguration.configure(Annot 
ationConfiguration.java:441) 
     at org.eclipse.jetty.webapp.WebAppContext.configure(WebAppContext.java:4 
66) 
     at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.jav 
a:1342) 
     at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandle 
r.java:743) 
     at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:492 
) 
     at org.eclipse.jetty.maven.plugin.JettyWebAppContext.doStart(JettyWebApp 
Context.java:282) 
     at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLife 
Cycle.java:69) 
     at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLi 
feCycle.java:117) 
     at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(Container 
LifeCycle.java:99) 
     at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHand 
ler.java:60) 
     at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(Con 
textHandlerCollection.java:154) 
     at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLife 
Cycle.java:69) 
     at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLi 
feCycle.java:117) 
     at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(Container 
LifeCycle.java:99) 
     at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHand 
ler.java:60) 
     at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLife 
Cycle.java:69) 
     at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLi 
feCycle.java:117) 
     at org.eclipse.jetty.server.Server.start(Server.java:355) 
     at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(Container 
LifeCycle.java:99) 
     at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHand 
ler.java:60) 
     at org.eclipse.jetty.server.Server.doStart(Server.java:324) 
     at org.eclipse.jetty.maven.plugin.JettyServer.doStart(JettyServer.java:6 
8) 
     at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLife 
Cycle.java:69) 
     at org.eclipse.jetty.maven.plugin.AbstractJettyMojo.startJetty(AbstractJ 
ettyMojo.java:564) 
     at org.eclipse.jetty.maven.plugin.AbstractJettyMojo.execute(AbstractJett 
yMojo.java:360) 
     at org.eclipse.jetty.maven.plugin.JettyRunMojo.execute(JettyRunMojo.java 
:168) 
     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default 
BuildPluginManager.java:132) 
     at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor 
.java:208) 
     at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor 
.java:153) 
     at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor 
.java:145) 
     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje 
ct(LifecycleModuleBuilder.java:116) 
     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje 
ct(LifecycleModuleBuilder.java:80) 
     at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThre 
adedBuilder.build(SingleThreadedBuilder.java:51) 
     at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl 
eStarter.java:120) 
     at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347) 
     at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154) 
     at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582) 
     at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214) 
     at org.apache.maven.cli.MavenCli.main(MavenCli.java:158) 
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. 
java:57) 
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces 
sorImpl.java:43) 
     at java.lang.reflect.Method.invoke(Method.java:606) 
     at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun 
cher.java:289) 
     at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav 
a:229) 
     at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La 
uncher.java:415) 
     at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java: 
356) 
2014-09-21 14:52:50.617:WARN:oejsh.RequestLogHandler:main: !RequestLog 
2014-09-21 14:52:50.758:INFO:oejs.ServerConnector:main: Started [email protected] 
a2c21a{HTTP/1.1}{0.0.0.0:8585} 

當我刪除下面從pom.xml的依賴,但是它運行正常..

  <dependency> 
      <groupId>org.hibernate</groupId> 
      <artifactId>hibernate-tools</artifactId> 
      <version>4.3.1.CR1</version> 
     </dependency> 

我們是否需要在Maven的休眠工具特殊配置?

回答

1

這個固定

命令mvn碼頭:運行-Dorg.eclipse.jetty.annotations.maxWait = 120

+0

爲什麼某些小項目,花更多的時間和更大的一個不帶-D仍然有效?碼頭在那裏試圖做什麼? – 2016-04-27 14:57:57