8 Replies Latest reply on May 28, 2014 1:57 PM by James Perkins

    wildfly8 deadlock in ConsoleAppender and PrintStream

    Ja kub Novice

      Please give me idea how should I try to resolve deadlock problem, how should I debug it further.

      Should I use jboss 7.1 final instead of wildfly 8.0 ?

       

      U use wildfly-8.0.0.Final on linux in domain mode, ha profile.

       

      Deadlock is bot with openjdk and with hotspot 1.7.0.55 (I thought that hanging java from openjdk to hotspot would help, but it didn't)

      *  1      /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java
      + 3      /usr/java/latest/bin/java

       

      problem appears with as little as only 2 concurrent requests:

       

      c:\Users\Downloads>"c:\opt\Apache Software Foundation\Apache2.2\bin\ab.exe" -n 2 -c 2 http://hostx:8080/somejsfpage.xhtml?callId=1

      This is ApacheBench, Version 2.3 <$Revision: 655654 $>

      Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/

      Licensed to The Apache Software Foundation, http://www.apache.org/

       

      Benchmarking hostx(be patient)...apr_poll: The timeout specified has expired (70007)

       

      below is part of jstack containing summary:

       

      Found one Java-level deadlock:

      =============================

      "default task-4":

        waiting to lock monitor 0x00007f3df83e2168 (object 0x00000000c59af468, a org.apache.log4j.ConsoleAppender),

        which is held by "default task-3"

      "default task-3":

        waiting to lock monitor 0x00007f3df83e2218 (object 0x00000000c59b2178, a java.io.PrintStream),

        which is held by "default task-4"

       

      and below full jstack of 2 blocked threads:

       

      2014-05-27 15:29:11

      Full thread dump Java HotSpot(TM) 64-Bit Server VM (24.55-b03 mixed mode):

       

      "Attach Listener" daemon prio=10 tid=0x00007f3dd001f000 nid=0x6986 waiting on condition [0x0000000000000000]

         java.lang.Thread.State: RUNNABLE

       

      "default task-4" prio=10 tid=0x00007f3db476e800 nid=0x6971 waiting for monitor entry [0x00007f3dd5a37000]

         java.lang.Thread.State: BLOCKED (on object monitor)

              at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:231)

              - waiting to lock <0x00000000c59af468> (a org.apache.log4j.ConsoleAppender)

              at org.apache.log4j.JBossAppenderHandler.doPublish(JBossAppenderHandler.java:42)

              at org.jboss.logmanager.ExtHandler.publish(ExtHandler.java:79)

              at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:296)

              at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:304)

              at org.jboss.logmanager.Logger.logRaw(Logger.java:721)

              at org.jboss.logmanager.Logger.log(Logger.java:506)

              at org.jboss.stdio.AbstractLoggingWriter.write(AbstractLoggingWriter.java:71)

              - locked <0x00000000c59b21e0> (a java.lang.StringBuilder)

              at org.jboss.stdio.WriterOutputStream.finish(WriterOutputStream.java:143)

              at org.jboss.stdio.WriterOutputStream.flush(WriterOutputStream.java:164)

              - locked <0x00000000c59b2578> (a sun.nio.cs.UTF_8$Decoder)

              at java.io.PrintStream.write(PrintStream.java:482)

              - locked <0x00000000c59b2178> (a java.io.PrintStream)

              at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)

              at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:291)

              at sun.nio.cs.StreamEncoder.flushBuffer(StreamEncoder.java:104)

              - locked <0x00000000c59b2950> (a java.io.OutputStreamWriter)

              at java.io.OutputStreamWriter.flushBuffer(OutputStreamWriter.java:185)

              at java.io.PrintStream.newLine(PrintStream.java:546)

              - locked <0x00000000c59b2178> (a java.io.PrintStream)

              at java.io.PrintStream.println(PrintStream.java:807)

              - locked <0x00000000c59b2178> (a java.io.PrintStream)

              at org.jboss.stdio.StdioContext$DelegatingPrintStream.println(StdioContext.java:474)

              at org.hibernate.engine.jdbc.spi.SqlStatementLogger.logStatement(SqlStatementLogger.java:106)

              at org.hibernate.engine.jdbc.spi.SqlStatementLogger.logStatement(SqlStatementLogger.java:95)

              at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPreparationTemplate.prepareStatement(StatementPreparerImpl.java:180)

              at org.hibernate.engine.jdbc.internal.StatementPreparerImpl.prepareQueryStatement(StatementPreparerImpl.java:159)

              at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1858)

              at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1835)

              at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1815)

              at org.hibernate.loader.Loader.doQuery(Loader.java:899)

              at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:341)

              at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:311)

              at org.hibernate.loader.Loader.loadEntity(Loader.java:2117)

              at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:82)

              at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:72)

              at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3927)

              at org.hibernate.event.internal.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:460)

              at org.hibernate.event.internal.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:429)

              at org.hibernate.event.internal.DefaultLoadEventListener.load(DefaultLoadEventListener.java:206)

              at org.hibernate.event.internal.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:262)

              at org.hibernate.event.internal.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:150)

              at org.hibernate.internal.SessionImpl.fireLoad(SessionImpl.java:1092)

              at org.hibernate.internal.SessionImpl.access$2000(SessionImpl.java:175)

              at org.hibernate.internal.SessionImpl$IdentifierLoadAccessImpl.load(SessionImpl.java:2476)

              at org.hibernate.internal.SessionImpl.get(SessionImpl.java:988)

              at org.hibernate.ejb.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:807)

              at org.hibernate.ejb.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:781)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

              at java.lang.reflect.Method.invoke(Method.java:606)

              at org.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.invoke(ExtendedEntityManagerCreator.java:365)

              at com.sun.proxy.$Proxy77.find(Unknown Source)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

              at java.lang.reflect.Method.invoke(Method.java:606)

              at org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:240)

              at com.sun.proxy.$Proxy77.find(Unknown Source)

              at com.xxx.careline.service.CallServiceImpl.findById(CallServiceImpl.java:68)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

              at java.lang.reflect.Method.invoke(Method.java:606)

              at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318)

              at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:196)

              at com.sun.proxy.$Proxy69.findById(Unknown Source)

              at com.xxx.careline.controller.CarelineBean.loadCall(CarelineBean.java:114)

              at com.xxx.careline.controller.CarelineBean.onEditPageLoad(CarelineBean.java:268)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at com.sun.el.parser.AstValue.invoke(AstValue.java:275)
      at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:304)
      at org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:40)
      at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50)
      at org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:40)
      at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50)
      at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
      at com.sun.faces.facelets.tag.jsf.core.DeclarativeSystemEventListener.processEvent(EventHandler.java:128)
      at javax.faces.component.UIComponent$ComponentSystemEventListenerAdapter.processEvent(UIComponent.java:2563)
      at javax.faces.event.SystemEvent.processListener(SystemEvent.java:108)
      at javax.faces.event.ComponentSystemEvent.processListener(ComponentSystemEvent.java:118)
      at com.sun.faces.application.ApplicationImpl.processListeners(ApplicationImpl.java:2187)
      at com.sun.faces.application.ApplicationImpl.invokeComponentListenersFor(ApplicationImpl.java:2135)
      at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:289)
      at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:247)
      at org.jboss.as.jsf.injection.weld.ForwardingApplication.publishEvent(ForwardingApplication.java:299)
      at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:107)
      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
      at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:647)
      at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
      at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:130)
      at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
      at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:56)
      at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132)
      at org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:147)
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
      at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:56)
      at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132)
      at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85)
      at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61)
      at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
      at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
      at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)
      at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:113)
      at io.undertow.security.handlers.AuthenticationCallHandler.handleRequest(AuthenticationCallHandler.java:52)
      at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45)
      at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:61)
      at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70)
      at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76)
      at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)
      at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
      at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)
      at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)
      at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:240)
      at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:227)
      at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:73)
      at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:146)
      at io.undertow.server.Connectors.executeRootHandler(Connectors.java:168)
      at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:687)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:745)

       

      "default task-3" prio=10 tid=0x00007f3db4085000 nid=0x6970 waiting for monitor entry [0x00007f3dd5936000]

         java.lang.Thread.State: BLOCKED (on object monitor)

      at java.io.PrintStream.write(PrintStream.java:479)
      - waiting to lock <0x00000000c59b2178> (a java.io.PrintStream)
      at org.jboss.stdio.StdioContext$DelegatingPrintStream.write(StdioContext.java:264)
      at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)
      at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:291)
      at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:295)
      at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:141)
      - locked <0x00000000c59b0050> (a java.io.OutputStreamWriter)
      at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229)
      at org.apache.log4j.helpers.QuietWriter.flush(QuietWriter.java:59)
      at org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:324)
      at org.apache.log4j.WriterAppender.append(WriterAppender.java:162)
      at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)
      - locked <0x00000000c59af468> (a org.apache.log4j.ConsoleAppender)
      at org.apache.log4j.JBossAppenderHandler.doPublish(JBossAppenderHandler.java:42)
      at org.jboss.logmanager.ExtHandler.publish(ExtHandler.java:79)
      at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:296)
      at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:304)
      at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:304)
      at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:304)
      at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:304)
      at org.jboss.logmanager.Logger.logRaw(Logger.java:721)

      at org.jboss.logmanager.Logger.log(Logger.java:672)

      at org.jboss.logmanager.Logger.log(Logger.java:684)
      at org.jboss.logging.JBossLogManagerLogger.doLog(JBossLogManagerLogger.java:40)
      at org.jboss.logging.Logger.debug(Logger.java:406)
      at org.hibernate.internal.CoreMessageLogger_$logger.debug(CoreMessageLogger_$logger.java:525)
      at org.hibernate.loader.Loader.loadEntity(Loader.java:2129)
      at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:82)
      at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:72)
      at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3927)
      at org.hibernate.event.internal.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:460)
      at org.hibernate.event.internal.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:429)
      at org.hibernate.event.internal.DefaultLoadEventListener.load(DefaultLoadEventListener.java:206)
      at org.hibernate.event.internal.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:262)
      at org.hibernate.event.internal.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:150)
      at org.hibernate.internal.SessionImpl.fireLoad(SessionImpl.java:1092)
      at org.hibernate.internal.SessionImpl.access$2000(SessionImpl.java:175)
      at org.hibernate.internal.SessionImpl$IdentifierLoadAccessImpl.load(SessionImpl.java:2476)
      at org.hibernate.internal.SessionImpl.get(SessionImpl.java:988)
      at org.hibernate.ejb.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:807)
      at org.hibernate.ejb.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:781)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.invoke(ExtendedEntityManagerCreator.java:365)
      at com.sun.proxy.$Proxy77.find(Unknown Source)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:240)
      at com.sun.proxy.$Proxy77.find(Unknown Source)
      at com.xxx.careline.service.CallServiceImpl.findById(CallServiceImpl.java:68)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318)
      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:196)
      at com.sun.proxy.$Proxy69.findById(Unknown Source)
      at com.xxx.careline.controller.CarelineBean.loadCall(CarelineBean.java:114)
      at com.xxx.careline.controller.CarelineBean.onEditPageLoad(CarelineBean.java:268)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at com.sun.el.parser.AstValue.invoke(AstValue.java:275)
      at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:304)
      at org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:40)
      at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50)
      at org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:40)
      at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50)
      at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
      at com.sun.faces.facelets.tag.jsf.core.DeclarativeSystemEventListener.processEvent(EventHandler.java:128)
      at javax.faces.component.UIComponent$ComponentSystemEventListenerAdapter.processEvent(UIComponent.java:2563)
      at javax.faces.event.SystemEvent.processListener(SystemEvent.java:108)
      at javax.faces.event.ComponentSystemEvent.processListener(ComponentSystemEvent.java:118)
      at com.sun.faces.application.ApplicationImpl.processListeners(ApplicationImpl.java:2187)
      at com.sun.faces.application.ApplicationImpl.invokeComponentListenersFor(ApplicationImpl.java:2135)
      at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:289)
      at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:247)
      at org.jboss.as.jsf.injection.weld.ForwardingApplication.publishEvent(ForwardingApplication.java:299)
      at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:107)
      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
      at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:647)
      at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
      at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:130)
      at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
      at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:56)
      at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132)
      at org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:147)
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
      at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:56)
      at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132)
      at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85)
      at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61)
      at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
      at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
      at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)
      at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:113)
      at io.undertow.security.handlers.AuthenticationCallHandler.handleRequest(AuthenticationCallHandler.java:52)
      at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45)
      at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:61)
      at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70)
      at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76)
      at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)
      at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
      at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)
      at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)
      at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:240)
      at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:227)
      at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:73)
      at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:146)
      at io.undertow.server.Connectors.executeRootHandler(Connectors.java:168)
      at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:687)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:745)

       

      default task-2" prio=10 tid=0x0000000000b18800 nid=0x696f waiting on condition [0x00007f3daf2d7000]

        java.lang.Thread.State: WAITING (parking)

      at sun.misc.Unsafe.park(Native Method)
      - parking to wait for  <0x00000000c52db848> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
      at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
      at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2043)
      at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
      at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1068)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:745)

       

      default task-1" prio=10 tid=0x0000000000b1b800 nid=0x696e waiting on condition [0x00007f3daf1d6000]

        java.lang.Thread.State: WAITING (parking)

      at sun.misc.Unsafe.park(Native Method)
      - parking to wait for  <0x00000000c52db848> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
      at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
      at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2043)
      at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
      at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1068)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:745)

       

      ......

      ........

       

      Found one Java-level deadlock:

      =============================

      "default task-4":

        waiting to lock monitor 0x00007f3df83e2168 (object 0x00000000c59af468, a org.apache.log4j.ConsoleAppender),

        which is held by "default task-3"

      "default task-3":

        waiting to lock monitor 0x00007f3df83e2218 (object 0x00000000c59b2178, a java.io.PrintStream),

        which is held by "default task-4"

       

      Java stack information for the threads listed above:

      ===================================================

      "default task-4":

              at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:231)

              - waiting to lock <0x00000000c59af468> (a org.apache.log4j.ConsoleAppender)

              at org.apache.log4j.JBossAppenderHandler.doPublish(JBossAppenderHandler.java:42)

              at org.jboss.logmanager.ExtHandler.publish(ExtHandler.java:79)

              at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:296)

              at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:304)

              at org.jboss.logmanager.Logger.logRaw(Logger.java:721)

              at org.jboss.logmanager.Logger.log(Logger.java:506)

              at org.jboss.stdio.AbstractLoggingWriter.write(AbstractLoggingWriter.java:71)

              - locked <0x00000000c59b21e0> (a java.lang.StringBuilder)

              at org.jboss.stdio.WriterOutputStream.finish(WriterOutputStream.java:143)

              at org.jboss.stdio.WriterOutputStream.flush(WriterOutputStream.java:164)

              - locked <0x00000000c59b2578> (a sun.nio.cs.UTF_8$Decoder)

              at java.io.PrintStream.write(PrintStream.java:482)

              - locked <0x00000000c59b2178> (a java.io.PrintStream)

              at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)

              at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:291)

              at sun.nio.cs.StreamEncoder.flushBuffer(StreamEncoder.java:104)

              - locked <0x00000000c59b2950> (a java.io.OutputStreamWriter)

              at java.io.OutputStreamWriter.flushBuffer(OutputStreamWriter.java:185)

              at java.io.PrintStream.newLine(PrintStream.java:546)

              - locked <0x00000000c59b2178> (a java.io.PrintStream)

              at java.io.PrintStream.println(PrintStream.java:807)

              - locked <0x00000000c59b2178> (a java.io.PrintStream)

              at org.jboss.stdio.StdioContext$DelegatingPrintStream.println(StdioContext.java:474)

              at org.hibernate.engine.jdbc.spi.SqlStatementLogger.logStatement(SqlStatementLogger.java:106)

              at org.hibernate.engine.jdbc.spi.SqlStatementLogger.logStatement(SqlStatementLogger.java:95)

              at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPreparationTemplate.prepareStatement(StatementPreparerImpl.java:180)

              at org.hibernate.engine.jdbc.internal.StatementPreparerImpl.prepareQueryStatement(StatementPreparerImpl.java:159)

              at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1858)

              at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1835)

              at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1815)

              at org.hibernate.loader.Loader.doQuery(Loader.java:899)

              at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:341)

              at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:311)

              at org.hibernate.loader.Loader.loadEntity(Loader.java:2117)

              at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:82)

              at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:72)

              at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3927)

              at org.hibernate.event.internal.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:460)

              at org.hibernate.event.internal.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:429)

              at org.hibernate.event.internal.DefaultLoadEventListener.load(DefaultLoadEventListener.java:206)

              at org.hibernate.event.internal.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:262)

              at org.hibernate.event.internal.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:150)

              at org.hibernate.internal.SessionImpl.fireLoad(SessionImpl.java:1092)

              at org.hibernate.internal.SessionImpl.access$2000(SessionImpl.java:175)

              at org.hibernate.internal.SessionImpl$IdentifierLoadAccessImpl.load(SessionImpl.java:2476)

              at org.hibernate.internal.SessionImpl.get(SessionImpl.java:988)

              at org.hibernate.ejb.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:807)

              at org.hibernate.ejb.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:781)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

              at java.lang.reflect.Method.invoke(Method.java:606)

              at org.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.invoke(ExtendedEntityManagerCreator.java:365)

              at com.sun.proxy.$Proxy77.find(Unknown Source)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

              at java.lang.reflect.Method.invoke(Method.java:606)

              at org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:240)

              at com.sun.proxy.$Proxy77.find(Unknown Source)

              at com.xxx.careline.service.CallServiceImpl.findById(CallServiceImpl.java:68)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

              at java.lang.reflect.Method.invoke(Method.java:606)

              at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318)

              at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:196)

              at com.sun.proxy.$Proxy69.findById(Unknown Source)

              at com.xxx.careline.controller.CarelineBean.loadCall(CarelineBean.java:114)

              at com.xxx.careline.controller.CarelineBean.onEditPageLoad(CarelineBean.java:268)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

              at java.lang.reflect.Method.invoke(Method.java:606)

              at com.sun.el.parser.AstValue.invoke(AstValue.java:275)

              at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:304)

              at org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:40)

              at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50)

              at org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:40)

              at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50)

              at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)

              at com.sun.faces.facelets.tag.jsf.core.DeclarativeSystemEventListener.processEvent(EventHandler.java:128)

              at javax.faces.component.UIComponent$ComponentSystemEventListenerAdapter.processEvent(UIComponent.java:2563)

              at javax.faces.event.SystemEvent.processListener(SystemEvent.java:108)

              at javax.faces.event.ComponentSystemEvent.processListener(ComponentSystemEvent.java:118)

              at com.sun.faces.application.ApplicationImpl.processListeners(ApplicationImpl.java:2187)

              at com.sun.faces.application.ApplicationImpl.invokeComponentListenersFor(ApplicationImpl.java:2135)

              at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:289)

              at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:247)

              at org.jboss.as.jsf.injection.weld.ForwardingApplication.publishEvent(ForwardingApplication.java:299)

              at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:107)

              at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)

              at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)

              at javax.faces.webapp.FacesServlet.service(FacesServlet.java:647)

              at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)

              at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:130)

              at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)

              at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)

              at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:56)

              at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132)

              at org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:147)

              at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)

              at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:56)

              at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132)

              at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85)

              at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61)

              at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)

              at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)

              at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)

              at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:113)

              at io.undertow.security.handlers.AuthenticationCallHandler.handleRequest(AuthenticationCallHandler.java:52)

              at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45)

              at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:61)

              at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70)

              at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76)

              at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)

              at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)

              at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)

              at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)

              at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:240)

              at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:227)

              at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:73)

              at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:146)

              at io.undertow.server.Connectors.executeRootHandler(Connectors.java:168)

              at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:687)

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

              at java.lang.Thread.run(Thread.java:745)

      "default task-3":

              at java.io.PrintStream.write(PrintStream.java:479)

              - waiting to lock <0x00000000c59b2178> (a java.io.PrintStream)

              at org.jboss.stdio.StdioContext$DelegatingPrintStream.write(StdioContext.java:264)

              at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)

              at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:291)

              at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:295)

              at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:141)

              - locked <0x00000000c59b0050> (a java.io.OutputStreamWriter)

              at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229)

              at org.apache.log4j.helpers.QuietWriter.flush(QuietWriter.java:59)

              at org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:324)

              at org.apache.log4j.WriterAppender.append(WriterAppender.java:162)

              at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)

              - locked <0x00000000c59af468> (a org.apache.log4j.ConsoleAppender)

              at org.apache.log4j.JBossAppenderHandler.doPublish(JBossAppenderHandler.java:42)

              at org.jboss.logmanager.ExtHandler.publish(ExtHandler.java:79)

              at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:296)

              at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:304)

              at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:304)

              at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:304)

              at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:304)

              at org.jboss.logmanager.Logger.logRaw(Logger.java:721)

              at org.jboss.logmanager.Logger.log(Logger.java:672)

              at org.jboss.logmanager.Logger.log(Logger.java:684)

              at org.jboss.logging.JBossLogManagerLogger.doLog(JBossLogManagerLogger.java:40)

              at org.jboss.logging.Logger.debug(Logger.java:406)

              at org.hibernate.internal.CoreMessageLogger_$logger.debug(CoreMessageLogger_$logger.java:525)

              at org.hibernate.loader.Loader.loadEntity(Loader.java:2129)

              at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:82)

              at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:72)

              at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3927)

              at org.hibernate.event.internal.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:460)

              at org.hibernate.event.internal.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:429)

              at org.hibernate.event.internal.DefaultLoadEventListener.load(DefaultLoadEventListener.java:206)

              at org.hibernate.event.internal.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:262)

              at org.hibernate.event.internal.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:150)

              at org.hibernate.internal.SessionImpl.fireLoad(SessionImpl.java:1092)

              at org.hibernate.internal.SessionImpl.access$2000(SessionImpl.java:175)

              at org.hibernate.internal.SessionImpl$IdentifierLoadAccessImpl.load(SessionImpl.java:2476)

              at org.hibernate.internal.SessionImpl.get(SessionImpl.java:988)

              at org.hibernate.ejb.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:807)

              at org.hibernate.ejb.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:781)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

              at java.lang.reflect.Method.invoke(Method.java:606)

              at org.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.invoke(ExtendedEntityManagerCreator.java:365)

              at com.sun.proxy.$Proxy77.find(Unknown Source)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

              at java.lang.reflect.Method.invoke(Method.java:606)

              at org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:240)

              at com.sun.proxy.$Proxy77.find(Unknown Source)

              at com.xxx.careline.service.CallServiceImpl.findById(CallServiceImpl.java:68)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

              at java.lang.reflect.Method.invoke(Method.java:606)

              at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318)

              at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:196)

              at com.sun.proxy.$Proxy69.findById(Unknown Source)

              at com.xxx.careline.controller.CarelineBean.loadCall(CarelineBean.java:114)

              at com.xxx.careline.controller.CarelineBean.onEditPageLoad(CarelineBean.java:268)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

              at java.lang.reflect.Method.invoke(Method.java:606)

              at com.sun.el.parser.AstValue.invoke(AstValue.java:275)

              at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:304)

              at org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:40)

              at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50)

              at org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:40)

              at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50)

              at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)

              at com.sun.faces.facelets.tag.jsf.core.DeclarativeSystemEventListener.processEvent(EventHandler.java:128)

              at javax.faces.component.UIComponent$ComponentSystemEventListenerAdapter.processEvent(UIComponent.java:2563)

              at javax.faces.event.SystemEvent.processListener(SystemEvent.java:108)

              at javax.faces.event.ComponentSystemEvent.processListener(ComponentSystemEvent.java:118)

              at com.sun.faces.application.ApplicationImpl.processListeners(ApplicationImpl.java:2187)

              at com.sun.faces.application.ApplicationImpl.invokeComponentListenersFor(ApplicationImpl.java:2135)

              at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:289)

              at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:247)

              at org.jboss.as.jsf.injection.weld.ForwardingApplication.publishEvent(ForwardingApplication.java:299)

              at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:107)

              at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)

              at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)

              at javax.faces.webapp.FacesServlet.service(FacesServlet.java:647)

              at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)

              at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:130)

              at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)

              at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)

              at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:56)

              at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132)

              at org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:147)

              at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)

              at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:56)

              at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132)

              at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85)

              at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61)

              at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)

              at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)

              at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)

              at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:113)

              at io.undertow.security.handlers.AuthenticationCallHandler.handleRequest(AuthenticationCallHandler.java:52)

              at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45)

              at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:61)

              at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70)

              at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76)

              at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)

              at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)

              at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)

              at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)

              at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:240)

              at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:227)

              at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:73)

              at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:146)

              at io.undertow.server.Connectors.executeRootHandler(Connectors.java:168)

              at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:687)

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

              at java.lang.Thread.run(Thread.java:745)

       

      Found 1 deadlock.

        • 1. Re: wildfly8 deadlock in ConsoleAppender and PrintStream
          James Perkins Master

          Do you have a custom handler configured to use the log4j ConsoleAppender? Or do you possibly have a log4j.xml or log4j.properties configuration file in your deployment?

           

          --

          James R. Perkins

          1 of 1 people found this helpful
          • 2. Re: wildfly8 deadlock in ConsoleAppender and PrintStream
            Ja kub Novice

            James, thx for response.

            I have no custom handler. I have standard log4j.xml similar to below.

            What do you suggest ?

            Tomorrow I will test it against tomcat. Do you bet, that there also will be a deadlock, or it will work ?

             

             

            <?xml version="1.0" encoding="UTF-8"?>

            <!DOCTYPE log4j:configuration PUBLIC "-//APACHE//DTD LOG4J 1.2//EN" "log4j.dtd">

            <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">

             

             

                <appender name="console" class="org.apache.log4j.ConsoleAppender">

                    <param name="Target" value="System.out" />

                    <layout class="org.apache.log4j.PatternLayout">

            <!--             <param name="ConversionPattern" value="%-5p: %c - %m%n" /> -->

                            <param name="ConversionPattern" value="%-5p: %d{ABSOLUTE} [%-20t] %c{2}:%M:%L - %m%n" />

                    </layout>

                </appender>

               

                <logger name="org.springframework.core">

                    <level value="info" />

                </logger>

             

             

            ......

            ........

             

            <root>
               <priority value="debug" />
               <appender-ref ref="console" />

                </root>

               

            </log4j:configuration>

            • 3. Re: wildfly8 deadlock in ConsoleAppender and PrintStream
              Tomaz Cerar Master

              in any case, don't use console appender for anything else but development purposes as it is blocking when it writing to console.

               

              so in short for any non development purpose remove console appender and use only file handlers or even better use async appender which should later delegate to whatever appenders you want as long as it is async.

              • 4. Re: Re: wildfly8 deadlock in ConsoleAppender and PrintStream
                James Perkins Master

                Here's what happens. WildFly, and JBoss AS 7/JBoss EAP 6, capture System.out and System.err and pass them through to a logger. When the ConsoleAppender also tries to write to System.out this stream has been captured so there could definitely be deadlocks. I would personally advise not using a log4j configuration or at least not a ConsoleAppender. By using a log4j configuration file you override what ever has been configured via the logging subsystem. It's okay to do that by all means, but it doesn't generally allow for runtime configuration changes.

                 

                If you must use your own logging configuration with a ConsoleAppender I'd suggest turning off the per-deployment logging and turn off adding dependencies to your deployment. Alternatively you could use a jboss-deployment-structure.xml to exclude the logging subsystem which will disable all logging deployment unit processors. You'll also need to include a log4j jar in your deployment.

                 

                Example jboss-deployment-structure.xml

                <jboss-deployment-structure>
                  <deployment>
                     <!-- exclude the logging subsystem to disable deployment unit processors from running -->
                     <exclude-subsystems>
                        <subsystem name="logging" />
                    </exclude-subsystems>
                  </deployment>
                </jboss-deployment-structure>
                

                 

                --

                James R. Perkins

                • 5. Re: Re: wildfly8 deadlock in ConsoleAppender and PrintStream
                  Ja kub Novice

                  Thx, both exclude logging subsystem, and removing log4j.xml helped.

                  • 6. Re: Re: wildfly8 deadlock in ConsoleAppender and PrintStream
                    James Perkins Master

                    You probably don't want to do that. Assuming at least you're using something other than J.U.L. If you're using log4j, then it's likely log4j won't be configured at all.

                     

                    --

                    James R. Perkins

                    • 7. Re: wildfly8 deadlock in ConsoleAppender and PrintStream
                      Ja kub Novice

                      I am using log4j.

                      In previous post I meant, I first tried excluding logging subsystem - it worked.

                      Then I restored logging subsystem (removed it's exclude from jboss-deployment-structure), and only removed log4j.xml - it also worked, there is no deadlock.

                       

                      As I understand there should be no log4j.xml file in my war, please correct me if I am wrong.

                      BTW, if putting log4j.xml in webapp is not recommended, and instead log4j should be configured globally for whole jboss, how is it possible to separate logs of particular web-apps into separate log files ?

                      • 8. Re: wildfly8 deadlock in ConsoleAppender and PrintStream
                        James Perkins Master

                        Ah, got it. You can definitely use a log4j.xml if you want. You lose the ability to change the logging configuration at runtime though. Also if you choose to use a log4j.xml you should also not use a ConsoleAppender. If you decide you want to use a ConsoleAppender you should exclude the logging subsystem and provide a log4j library in your deployment.

                         

                        Confusion aside, I'd suggest not using a log4j.xml and allow all configuration to be done via the server

                         

                        --

                        James R. Perkins

                        1 of 1 people found this helpful