gpt4 book ai didi

java - hibernate-tools maven 依赖导致扫描注释超时

转载 作者:行者123 更新时间:2023-12-01 12:30:27 25 4
gpt4 key购买 nike

在 Windows 上,当我运行 jetty mvn:run 时,我收到如下超时错误。我发现超时时内存消耗约为 170 MB。

然而,相同的 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 o.e.j.m.p.JettyWebAppContext@1161acd{/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
o.e.j.m.p.JettyWebAppContext@1161acd{/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 ServerConnector@
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 中对 hibernate 工具进行特殊配置吗?

最佳答案

这解决了它

mvn jetty:run -Dorg.eclipse.jetty.annotations.maxWait=120

关于java - hibernate-tools maven 依赖导致扫描注释超时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25957881/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com