gpt4 book ai didi

tomcat - Log4J 在 war 部署时抛出一个 stackoverflow 错误

转载 作者:行者123 更新时间:2023-11-28 21:48:12 27 4
gpt4 key购买 nike

我们最近将我的应用移至多模块 Maven 架构,现在它会在 Tomcat 中部署时抛出 stackoverflow 错误。

堆栈跟踪包含在下面:

GRAVE: Error waiting for multi-thread deployment of WAR files to complete
java.util.concurrent.ExecutionException: java.lang.StackOverflowError
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
at java.util.concurrent.FutureTask.get(FutureTask.java:83)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:757)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:477)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1393)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:318)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:401)
at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:346)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1140)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:800)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.StackOverflowError
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
at java.lang.StringBuffer.append(StringBuffer.java:224)
at org.apache.log4j.helpers.OptionConverter.getSystemProperty(OptionConverter.java:105)
at org.apache.log4j.helpers.OptionConverter.substVars(OptionConverter.java:417)
at org.apache.log4j.helpers.OptionConverter.substVars(OptionConverter.java:429)
at org.apache.log4j.helpers.OptionConverter.substVars(OptionConverter.java:429)
at org.apache.log4j.helpers.OptionConverter.substVars(OptionConverter.java:429)
at org.apache.log4j.helpers.OptionConverter.substVars(OptionConverter.java:429)
at org.apache.log4j.helpers.OptionConverter.substVars(OptionConverter.java:429)
at org.apache.log4j.helpers.OptionConverter.substVars(OptionConverter.java:429)
at org.apache.log4j.helpers.OptionConverter.substVars(OptionConverter.java:429)
at org.apache.log4j.helpers.OptionConverter.substVars(OptionConverter.java:429)
at org.apache.log4j.helpers.OptionConverter.substVars(OptionConverter.java:429)
at org.apache.log4j.helpers.OptionConverter.substVars(OptionConverter.java:429)
at org.apache.log4j.helpers.OptionConverter.substVars(OptionConverter.java:429)
at org.apache.log4j.helpers.OptionConverter.substVars(OptionConverter.java:429)
at org.apache.log4j.helpers.OptionConverter.substVars(OptionConverter.java:429)
at org.apache.log4j.helpers.OptionConverter.substVars(OptionConverter.java:429)
at org.apache.log4j.helpers.OptionConverter.substVars(OptionConverter.java:429)
at org.apache.log4j.helpers.OptionConverter.substVars(OptionConverter.java:429)
at org.apache.log4j.helpers.OptionConverter.substVars(OptionConverter.java:429)

谁能告诉我如何解决这个问题?

最佳答案

您在配置中使用系统属性,该属性的值为 ${name},即 -Dname=${name}

当 Log4j 尝试扩展 ${name} 的值时,它会得到 ${name} -> 循环。

如果很难判断是哪个变量导致了问题,请在 OptionConverter.java:105 中设置断点或使用 -Dlog4j.debug=true 启用调试

>

关于tomcat - Log4J 在 war 部署时抛出一个 stackoverflow 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12892657/

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