---
title: "为何WebLogic 12c 发生stuck 时无法显示具体的请求路径"
author: "ultrang"
date: "2015-09-29T09:10:39Z"
tags: []
categories: ["Web前端"]
slug: "weblogic-12c-stuck"
draft: false
lastmod: "2015-11-10T09:44:53Z"
id: 2246646
url: "https://ultrang.iteye.com/blog/2246646"
---

最近在分析WebLogic时，发现日志文件中值记录到了stuck，但是没有记录对应的http请求地址信息。这一信息和WebLogic console中的 服务器设置->监控->线程中也可以看到类似信息。 下面给出一个WebLogic 12C的stuck日志样例：
```java
[stuck] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)' has been busy for "38" seconds working on the request "Workmanager: default, Version: 0, Scheduled=true, Started=true, Started time: 38680 ms
", which is more than the configured time (StuckThreadMaxTime) of "10" seconds in "server-failure-trigger". Stack trace:
java.lang.Object.wait(Native Method)
```


再看一个WebLogic 11g 的：

```java
2015-8-7 上午02时10分51秒 CST> <Error> <WebLogicServer> <BEA-000337> <[stuck] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)' has been busy for "606" seconds working on the request "weblogic.servlet.internal.ServletRequestImpl@326a2b9d[
post /web/lcam/finance/services/civilize/initworkreminderfactory?wsdl http/1.0
x-forwarded-for: 10.150.140.75
content-type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.4
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: ""
Content-Length: 409
]", which is more than the configured time (StuckThreadMaxTime) of "600" seconds. Stack trace:
java.util.WeakHashMap.getEntry(WeakHashMap.java:383)
java.util.WeakHashMap.containsKey(WeakHashMap.java:369)
com.bea.core.repackaged.aspectj.lang.reflect.AjTypeSystem.getAjType(AjTypeSystem.java:37)
com.bea.core.repackaged.springframework.aop.aspectj.annotation.AbstractAspectJAdvisorFactory.isAspect(AbstractAspectJAdvisorFactory.j
```


我们可以看到，11g版本中可以看到完整的请求信息。关于如何解决这个问题，到底是不是WLS的bug，我们还需要进行跟进。

2015-10-21更新：此问题Oracle已经在WebLogic 12.1.1版本上提供了补丁，补丁号20818726：Request information is missing in <BEA-00337> stuck thread log on WLS 12c (文档 ID 2045464.1)。由于12.1.1与12.1.2以上版本的补丁工具不同，与oracle沟通后，此补丁目前不适用于12.1.2及12.1.3，官方会稍后给出另外的补丁包。

2015-11-10更新：Oracle工程师提供了最新的基于12.1.2版本的补丁，p20818726_121200_Generic.zip，经测试，目前已经可以正常显示stuck的线程对应的请求信息了。

Ps:本博客将持续更新笔者近年来工作中遇到的各类技术问题及解决方案，欢迎采用关注、收藏、私信、回复等方式进行互动交流。