weblogic stuck线程模拟

login.jsp

<%@ page language="java" import="java.sql.Connection"%>
<%@ page language="java" import="java.sql.DriverManager"%>
<%@ page language="java" import="java.sql.PreparedStatement"%>
<%@ page language="java" import="java.sql.ResultSet"%>
<html>
	<body>

	</body>
	<script language="javascript">

<%!
public class TestUpdate {
    public  void updateDB(String sql){
        Connection con = null;
        PreparedStatement pre = null;
        ResultSet result = null;
        try
        {
            Class.forName("oracle.jdbc.driver.OracleDriver");
            String url = "jdbc:oracle:thin:@10.10.11.128:1521:orcl";
            String user = "S_DEV";
            String password = "S_DEV";
            con = DriverManager.getConnection(url, user, password);
            pre = con.prepareStatement(sql);
            pre.execute(sql);
       }catch (Exception e)
        {
            e.printStackTrace();
        }
        finally
        {
            try
            {
                if (result != null)
                    result.close();
                if (pre != null)
                    pre.close();
                if (con != null)
                    con.close();
            }
            catch (Exception e)
            {
                e.printStackTrace();
            }
        }

    }
}

%>

<%
   TestUpdate testUpdate = new TestUpdate();
   testUpdate.updateDB("select * from test for update ");
   out.println("已经开始运行..........");
%>
	</script>	
</html>

先到数据库上select * from test for update,然后访问jsp, weblogic控制台会告警,后台会报错:

<2017-6-23 下午04时43分23秒 CST> <Error> <WebLogicServer> <BEA-000337> <[STUCK] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)' has been busy for
", which is more than the configured time (StuckThreadMaxTime) of "10" seconds in "server-failure-trigger". Stack trace:
        java.net.SocketInputStream.socketRead0(Native Method)
        java.net.SocketInputStream.read(SocketInputStream.java:152)
        java.net.SocketInputStream.read(SocketInputStream.java:122)
        oracle.net.ns.Packet.receive(Packet.java:300)
        oracle.net.ns.DataPacket.receive(DataPacket.java:106)
        oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:315)
        oracle.net.ns.NetInputStream.read(NetInputStream.java:260)
        oracle.net.ns.NetInputStream.read(NetInputStream.java:185)
        oracle.net.ns.NetInputStream.read(NetInputStream.java:102)
        oracle.jdbc.driver.T4CSocketInputStreamWrapper.readNextPacket(T4CSocketInputStreamWrapper.java:124)
        oracle.jdbc.driver.T4CSocketInputStreamWrapper.read(T4CSocketInputStreamWrapper.java:80)
        oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1137)
        oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:290)
        oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:192)
        oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531)
        oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207)
        oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:884)
        oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1167)
        oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1289)
        oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:1909)
        oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1871)
        oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:318)
        jsp_servlet.__login$TestUpdate.updateDB(__login.java:79)
        jsp_servlet.__login._jspService(__login.java:130)
        weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
        weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:280)
        weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:254)
        weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:136)
        weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:341)
        weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:238)
        weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3363)
        weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3333)
        weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
        weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
        weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
        weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2220)
        weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2146)
        weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2124)
        weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1564)
        weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:254)
        weblogic.work.ExecuteThread.execute(ExecuteThread.java:295)
        weblogic.work.ExecuteThread.run(ExecuteThread.java:254)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值