错误笔记

本文探讨了在操作数据库过程中遇到的连接池资源不足问题及其解决方案,并分析了字符串操作时出现的异常情况。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >


1,操作数据库时连接使用完未放回到连接池。

<Error> <HTTP> <BEA-101020> <[ServletContext@1095785628[app:cpicgxwx module:cpicgxwx.war path:/cpicgxwx spec-version:2.5]] Servlet failed with Exception

org.hibernate.exception.GenericJDBCException: Could not open connection
        at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:54)
        at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125)
        at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110)
        at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:304)
        at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.getConnection(LogicalConnectionImpl.java:169)
        Truncated. see log file for complete stacktrace
Caused By: weblogic.jdbc.extensions.PoolLimitSQLException: weblogic.common.resourcepool.ResourceLimitException: No resources currently available in pool gxwx to allocate to applications, please increase the size of the pool and retry..
        at weblogic.jdbc.common.internal.JDBCUtil.wrapAndThrowResourceException(JDBCUtil.java:252)
        at weblogic.jdbc.pool.Driver.connect(Driver.java:161)
        at weblogic.jdbc.jts.Driver.getNonTxConnection(Driver.java:651)
        at weblogic.jdbc.jts.Driver.connect(Driver.java:127)
        at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:364)

        Truncated. see log file for complete stacktrace

解决:

        检查程序在每次使用完连接是否放回了,可以重启一下看看是否运行正常。

        设置里同时连接个数太小,看看设置 ,增加同时连接个数。

2,

    decodewxticket:null
java.lang.StringIndexOutOfBoundsException: String index out of range: 17
        at java.lang.String.substring(String.java:1934)
        at com.aptech.util.DeEnCode.isValidTicket(DeEnCode.java:22)
        at ywhb.VerifyNetSaleEmpServlet.doPost(VerifyNetSaleEmpServlet.java:55)
        at ywhb.VerifyNetSaleEmpServlet.doGet(VerifyNetSaleEmpServlet.java:35)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)

在操作字符串时使用str.substring(2,17)报错

str为null;使用时注意字符串长度,并作非空处理。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值