如何解决因数据库用户被锁tomcat报错的c3p0 pool问题

发布时间:2021-12-02 11:03:10 作者:柒染
来源:亿速云 阅读:209

如何解决因数据库用户被锁tomcat报错的c3p0 pool问题,针对这个问题,这篇文章详细介绍了相对应的分析和解答,希望可以帮助更多想解决这个问题的小伙伴找到更简单易行的方法。

C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Users\comsys\AppData\Local\Microsoft\WindowsApps;;.
        java.specification.name=Java Platform API Specification
        java.class.version=50.0
        sun.management.compiler=HotSpot 64-Bit Tiered Compilers
        os.version=6.2
        org.apache.catalina.startup.ContextConfig.jarsToSkip=
        user.home=C:\Users\comsys
        catalina.useNaming=true
        user.timezone=Asia/Shanghai
        java.awt.printerjob=sun.awt.windows.WPrinterJob
        file.encoding=GBK
        java.specification.version=1.6
        catalina.home=D:\view\SDCenter_v4.0(R)_20151009\SDCenter4.0
        java.class.path=D:\view\SDCenter_v4.0(R)_20151009\SDCenter4.0\bin\bootstrap.jar;D:\view\SDCenter_v4.0(R)_20151009\SDCenter4.0\bin\tomcat-juli.jar
        user.name=comsys
        java.naming.factory.initial=org.apache.naming.java.javaURLContextFactory
        package.definition=sun.,java.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.
        java.vm.specification.version=1.0
        sun.java.command=org.apache.catalina.startup.Bootstrap start
        java.home=C:\Program Files\Java\jre6
        sun.arch.data.model=64
        user.language=zh
        java.specification.vendor=Sun Microsystems Inc.
        awt.toolkit=sun.awt.windows.WToolkit
        java.vm.info=mixed mode
        java.version=1.6.0_45
        java.ext.dirs=C:\Program Files\Java\jre6\lib\ext;C:\Windows\Sun\Java\lib\ext
        sun.boot.class.path=C:\Program Files\Java\jre6\lib\resources.jar;C:\Program Files\Java\jre6\lib\rt.jar;C:\Program Files\Java\jre6\lib\sunrsasign.jar;C:\Program Files\Java\jre6\lib\jsse.jar;C:\Program Files\Java\jre6\lib\jce.jar;C:\Program Files\Java\jre6\lib\charsets.jar;C:\Program Files\Java\jre6\lib\modules\jdk.boot.jar;C:\Program Files\Java\jre6\classes
        server.loader=
        java.vendor=Sun Microsystems Inc.
        catalina.base=D:\view\SDCenter_v4.0(R)_20151009\SDCenter4.0
        file.separator=\
        java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi
        common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar
        sun.io.unicode.encoding=UnicodeLittle
        sun.cpu.endian=little
        package.access=sun.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.
        sun.desktop=windows
        sun.cpu.isalist=amd64}
 WARN [Thread-3] [org.apache.commons.httpclient.HttpMethodBase] (HttpMethodBase.java:682) - Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended.
 INFO [localhost-startStop-1] [com.mchange.v2.log.MLog] (MLog.java:80) - MLog clients using log4j logging.
 INFO [localhost-startStop-1] [com.mchange.v2.c3p0.C3P0Registry] (C3P0Registry.java:204) - Initializing c3p0-0.9.1 [built 16-January-2007 14:46:42; debug? true; trace: 10]
 INFO [localhost-startStop-1] [com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource] (AbstractPoolBackedDataSource.java:462) - Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> 1hge2cu9o1tsl8ijbmx9tf|5fb271f1, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> oracle.jdbc.driver.OracleDriver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 1hge2cu9o1tsl8ijbmx9tf|5fb271f1, idleConnectionTestPeriod -> 60, initialPoolSize -> 3, jdbcUrl -> jdbc:oracle:thin:@127.0.0.1:1521:ORCL, lastAcquisitionFailureDefaultUser -> null, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 60, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 15, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 3, numHelperThreads -> 3, numThreadsAwaitingCheckoutDefaultUser -> 0, preferredTestQuery -> null, properties -> {user=******, password=******}, propertyCycle -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false ]

问题原因:
由于tomcat连接oracle数据库,用户被锁定,导致报错。

解决方法:
进入oracle数据库,将用户解锁 
alter user user_name account unlock;
重启tomcat后,恢复正常

关于如何解决因数据库用户被锁tomcat报错的c3p0 pool问题问题的解答就分享到这里了,希望以上内容可以对大家有一定的帮助,如果你还有很多疑惑没有解开,可以关注亿速云行业资讯频道了解更多相关知识。

推荐阅读:
  1. Cisco网络中的因DHCP冲突无法获取IP
  2. 开源组件:(1)DBCP和C3P0

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

数据库 tomcat

上一篇:php中三个等于号是什么意思

下一篇:tk.Mybatis插入数据获取Id怎么实现

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》