8 Replies Latest reply: Dec 19, 2011 7:15 PM by 846061 RSS

    stuck thread in adf application with weblogic

      hi every body

      I am working in JDev and weblogic 10.3.4
      when I deploy my Application in my production weblogic
      after some time (it does not constant it is variable) I got warnning on the server
      when I check the server I got some stuck thread
      any idea or notes how can I know what is the reason of these stuck threads?
      is there any objects have thread unsafe issue, resource contention or race condition in ADF?

        • 1. Re: stuck thread in adf application with weblogic
          Timo Hahn
          When you open the wls console you should be able to dig down to the stack of threads. In there you look for the threads which are marked stuck.Analyze their stack traces to get a hint where in your app the problem starts. If you see a class from your app this would be a candidate for further investigation.

          • 2. Re: stuck thread in adf application with weblogic
            In previous versions of weblogic, I had similar problems, and for information on where the problem could be performing a dump of the threads:

            Weblogic Console : Home >Summary of Servers ><AdminServer>, Moitoring ->Threads and execute Dump Thread Stack

            Inside the dump, you can search the threads with th stuck state.

            • 3. Re: stuck thread in adf application with weblogic
              actully I do that guys
              but what I get does not have any related to my application
              even those http request does not request the same page
              this is the stuck thread when I dump

              "[STUCK] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'" id=61 idx=0xe8 tid=13369 prio=1 alive, waiting, native_blocked, daemon

              -- Waiting for notification on: oracle/adfinternal/controller/util/RequestLock@0x88e06b58[fat lock]

              at jrockit/vm/Threads.waitForNotifySignal(JLjava/lang/Object;)Z(Native Method)

              at jrockit/vm/Locks.wait(Locks.java:1973)[inlined]

              at java/lang/Object.wait(Object.java:485)[inlined]

              at oracle/adfinternal/controller/util/RequestLock.lock(RequestLock.java:42)[inlined]

              at oracle/adfinternal/controller/state/RootViewPortContextImpl.lockViewPortRequestLock(RootViewPortContextImpl.java:604)[optimized]

              ^-- Lock released while waiting: oracle/adfinternal/controller/util/RequestLock@0x88e06b58[fat lock]

              at oracle/adfinternal/controller/state/ControllerState.initializeRequest(ControllerState.java:833)[inlined]

              at oracle/adfinternal/controller/state/ControllerState.initializeRequest(ControllerState.java:754)[inlined]

              at oracle/adfinternal/controller/application/AdfcConfigurator.beginRequest(AdfcConfigurator.java:50)[optimized]

              at org/apache/myfaces/trinidadinternal/config/GlobalConfiguratorImpl._startConfiguratorServiceRequest(GlobalConfiguratorImpl.java:562)[inlined]

              at org/apache/myfaces/trinidadinternal/config/GlobalConfiguratorImpl.beginRequest(GlobalConfiguratorImpl.java:212)[optimized]

              at org/apache/myfaces/trinidadinternal/webapp/TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:155)[optimized]

              at org/apache/myfaces/trinidad/webapp/TrinidadFilter.doFilter(TrinidadFilter.java:92)[optimized]

              at weblogic/servlet/internal/FilterChainImpl.doFilter(FilterChainImpl.java:56)[optimized]

              at oracle/adf/library/webapp/LibraryFilter.doFilter(LibraryFilter.java:175)[optimized]

              at weblogic/servlet/internal/FilterChainImpl.doFilter(FilterChainImpl.java:56)[optimized]

              at oracle/security/jps/ee/http/JpsAbsFilter$1.run(JpsAbsFilter.java:111)[optimized]

              at jrockit/vm/AccessController.doPrivileged(AccessController.java:254)[inlined]

              at oracle/security/jps/util/JpsSubject.doAsPrivileged(JpsSubject.java:313)[inlined]

              at oracle/security/jps/ee/util/JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)[inlined]

              at oracle/security/jps/ee/http/JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)[inlined]

              at oracle/security/jps/ee/http/JpsAbsFilter.doFilter(JpsAbsFilter.java:161)[optimized]

              at oracle/security/jps/ee/http/JpsFilter.doFilter(JpsFilter.java:71)[optimized]

              at weblogic/servlet/internal/FilterChainImpl.doFilter(FilterChainImpl.java:56)[optimized]

              at oracle/dms/servlet/DMSServletFilter.doFilter(DMSServletFilter.java:136)[optimized]

              at weblogic/servlet/internal/FilterChainImpl.doFilter(FilterChainImpl.java:56)[optimized]

              at weblogic/servlet/internal/RequestEventsFilter.doFilter(RequestEventsFilter.java:27)[optimized]

              at weblogic/servlet/internal/FilterChainImpl.doFilter(FilterChainImpl.java:56)[inlined]

              at weblogic/servlet/internal/WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)[inlined]

              at weblogic/servlet/internal/WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)[optimized]

              at weblogic/security/acl/internal/AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)[optimized]

              at weblogic/security/service/SecurityManager.runAs(SecurityManager.java:120)[inlined]

              at weblogic/servlet/internal/WebAppServletContext.securedExecute(WebAppServletContext.java:2277)[inlined]

              at weblogic/servlet/internal/WebAppServletContext.execute(WebAppServletContext.java:2183)[optimized]

              at weblogic/servlet/internal/ServletRequestImpl.run(ServletRequestImpl.java:1454)[optimized]

              at weblogic/work/ExecuteThread.execute(ExecuteThread.java:207)[optimized]

              at weblogic/work/ExecuteThread.run(ExecuteThread.java:176)

              at jrockit/vm/RNI.c2java(IIIII)V(Native Method)

              -- end of trace

              any another ideas?

              • 4. Re: stuck thread in adf application with weblogic
                Timo Hahn
                Well that's only half of the picture...
                Normally you should see more then one stack thread.
                Anything in the server logs?
                Have you set the log level to a finer grain?

                Then without knowledge of the app it's hard to give advise.

                • 5. Re: stuck thread in adf application with weblogic
                  I have something like this code in my page

                  public String cmdRegisterSubject() throws SQLException {

                  oracle.jbo.domain.Number pBrno;
                  Number pSubno;

                  pSubno = (Number)ADFUtil.resolveExpression("#{row.SubNo}");
                  pBrno = (Number)ADFUtil.resolveExpression("#{row.BranchNo}");

                  try {
                  OperationBinding method =

                  Map paramsMap = method.getParamsMap();
                  paramsMap.put("pSubno", pSubno);
                  paramsMap.put("pBranchno", pBrno);

                  String result = (String)method.execute();

                  method = ADFUtil.getOperationBinding("Commit");


                  ADFUtil.MsgBox("<html><b>" + result + "</html>",

                  } catch (Exception ex) {

                  return null;
                  is this code may need any synchronization to become safe?
                  actually no deterministic pages make stuck threads

                  nothing wrong on the server log (I mean error log)
                  • 6. Re: stuck thread in adf application with weblogic
                    Nick Haralabidis
                    A long running operation, such as possibly the View object query execution in your code, could produce stuck threads. This is not necessarily a problem, it is mostly a piece of information provided by WebLogic indicating that your application logic executes some piece of code that takes longer than expected. In these cases WebLogic considers those threads running the specific application code as 'stuck'. There is a configuration option in WebLogic called Stuck Thread Max Time (in Servers > Configuration > Tuning) that allows you to configure the time (in seconds) after which a thread is considered 'stuck'. Setting this number to a higher setting will avoid considering some of the threads as 'stuck'.

                    Note that there is also the possibility to create separate work managers in WebLogic and execute (in most cases) your long running application logic in them. Take a look at this post for some additional information on this: http://jdeveloperfaq.blogspot.com/2011/05/faq-34-using-weblogic-work-managers-to.html

                    Hope it helps,

                    • 7. Re: stuck thread in adf application with weblogic
                      I know stuck thread it does not mean problem
                      but I think it must after some time the thread must stop been stuck

                      my stuck thread does not do that
                      and actually I look the oracle database and not seeing connection do that (I mean take that large time)

                      • 8. Re: stuck thread in adf application with weblogic
                        HI alaadiaa,

                        I am also facing the same issue.

                        Re: Weblogic server + stuck threads

                        were you able to find the root cause?i suspect if it has something to do with the library