gpt4 book ai didi

java - log4j 中的异常深度

转载 作者:塔克拉玛干 更新时间:2023-11-03 04:57:18 31 4
gpt4 key购买 nike

我在 Myfaces 2 应用程序中遇到实例化异常。但是通过 log4j 打印的异常正在切断堆栈跟踪的其余部分。这是我看到的:

javax.faces.FacesException: java.lang.InstantiationException at org.apache.myfaces.config.ManagedBeanBuilder.buildManagedBean(ManagedBeanBuilder.java:240) at org.apache.myfaces.el.unified.resolver.ManagedBeanResolver.createManagedBean(ManagedBeanResolver.java:303) at org.apache.myfaces.el.unified.resolver.ManagedBeanResolver.getValue(ManagedBeanResolver.java:266) at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54) at org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:142) at org.apache.myfaces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:65) at org.apache.myfaces.el.convert.VariableResolverToELResolver.getValue(VariableResolverToELResolver.java:116) at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54) at org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:142) at org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:61) at org.apache.el.parser.AstValue.getValue(AstValue.java:107) at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186) at org.apache.myfaces.view.facelets.el.TagValueExpression.getValue(TagValueExpression.java:85) at javax.faces.component._DeltaStateHelper.eval(_DeltaStateHelper.java:243) at javax.faces.component.UIOutput.getValue(UIOutput.java:71) at javax.faces.component.UIInput.getValue(UIInput.java:143) at javax.faces.component.UISelectBoolean.getValue(UISelectBoolean.java:148) at org.apache.myfaces.shared_impl.renderkit.RendererUtils.getObjectValue(RendererUtils.java:238) at org.apache.myfaces.shared_impl.renderkit.RendererUtils.getBooleanValue(RendererUtils.java:193) at org.apache.myfaces.shared_impl.renderkit.html.HtmlCheckboxRendererBase.encodeEnd(HtmlCheckboxRendererBase.java:79) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:519) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:626) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:622) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:622) at org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.renderView(FaceletViewDeclarationLanguage.java:1320) at org.apache.myfaces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:263) at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:59) at org.apache.myfaces.tomahawk.application.ResourceViewHandlerWrapper.renderView(ResourceViewHandlerWrapper.java:93) at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:85) at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:239) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:191) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:349) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.InstantiationException at sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(InstantiationExceptionConstructorAccessorImpl.java:30) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at java.lang.Class.newInstance0(Class.java:355) at java.lang.Class.newInstance(Class.java:308) at org.apache.myfaces.config.annotation.TomcatAnnotationLifecycleProvider.newInstance(TomcatAnnotationLifecycleProvider.java:49) at org.apache.myfaces.config.ManagedBeanBuilder.buildManagedBean(ManagedBeanBuilder.java:162) ... 48 more

我找不到更改配置的位置,所以我可以看到“... 48 more”。有什么想法吗?

最佳答案

你不能。堆栈跟踪的截断是 JVM 的一个特性,而不是 log4j。

它实际上只是丢弃了已经呈现给您的信息。... 48 more“Caused by”消息之前的 48 帧 的简写。因此,在您的情况下,省略的 48 帧是:

    org.apache.myfaces.el.unified.resolver.ManagedBeanResolver.createManagedBean(ManagedBeanResolver.java:303) at
org.apache.myfaces.el.unified.resolver.ManagedBeanResolver.getValue(ManagedBeanResolver.java:266) at
javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54) at
org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:142) at
org.apache.myfaces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:65) at
org.apache.myfaces.el.convert.VariableResolverToELResolver.getValue(VariableResolverToELResolver.java:116) at
javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54) at
org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:142) at
org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:61) at
org.apache.el.parser.AstValue.getValue(AstValue.java:107) at
org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186) at
org.apache.myfaces.view.facelets.el.TagValueExpression.getValue(TagValueExpression.java:85) at
javax.faces.component._DeltaStateHelper.eval(_DeltaStateHelper.java:243) at
javax.faces.component.UIOutput.getValue(UIOutput.java:71) at
javax.faces.component.UIInput.getValue(UIInput.java:143) at
javax.faces.component.UISelectBoolean.getValue(UISelectBoolean.java:148) at
org.apache.myfaces.shared_impl.renderkit.RendererUtils.getObjectValue(RendererUtils.java:238) at
org.apache.myfaces.shared_impl.renderkit.RendererUtils.getBooleanValue(RendererUtils.java:193) at
org.apache.myfaces.shared_impl.renderkit.html.HtmlCheckboxRendererBase.encodeEnd(HtmlCheckboxRendererBase.java:79) at
javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:519) at
javax.faces.component.UIComponent.encodeAll(UIComponent.java:626) at
javax.faces.component.UIComponent.encodeAll(UIComponent.java:622) at
javax.faces.component.UIComponent.encodeAll(UIComponent.java:622) at
org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.renderView(FaceletViewDeclarationLanguage.java:1320) at
org.apache.myfaces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:263) at
javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:59) at
org.apache.myfaces.tomahawk.application.ResourceViewHandlerWrapper.renderView(ResourceViewHandlerWrapper.java:93) at
org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:85) at
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:239) at
javax.faces.webapp.FacesServlet.service(FacesServlet.java:191) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at
org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:349) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190) at
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291) at
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769) at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698) at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891) at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690) at
java.lang.Thread.run(Thread.java:619)

关于java - log4j 中的异常深度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4546601/

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