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 connectionat 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;使用时注意字符串长度,并作非空处理。