No license was found. An appropriate license file db2jcc_license_*.jar

No license was found. An appropriate license file db2jcc_license_*.jar

Scroll Down

No license was found. An appropriate license file db2jcc_license_*.jar

今天启动一个17年的老项目,突然报错

com.ibm.db2.jcc.b.SqlException: [ibm][db2][jcc][10333][11649] No license was found. An appropriate license file db2jcc_license_*.jar must be provided in the CLASSPATH setting.
	at com.ibm.db2.jcc.b.u.d(u.java:561)
	at com.ibm.db2.jcc.b.v.a(v.java:342)
	at com.ibm.db2.jcc.b.v.<init>(v.java:414)
	at com.ibm.db2.jcc.c.b.<init>(b.java:258)
	at com.ibm.db2.jcc.DB2Driver.connect(DB2Driver.java:163)
	at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:175)
	at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:220)
	at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:206)
	at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:203)
	at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1138)
	at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1125)
	at com.mchange.v2.resourcepool.BasicResourcePool.access$700(BasicResourcePool.java:44)
	at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1870)
	at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)
[ERROR] 2020-03-20 11:13:46,706 method:com.mchange.v2.log.slf4j.Slf4jMLog$Slf4jMLogger$ErrorLogger.log(Slf4jMLog.java:231)
com.mchange.v2.resourcepool.BasicResourcePool@912747d -- Unexpectedly broken!!!
com.mchange.v2.resourcepool.ResourcePoolException: Unexpected Break Stack Trace!
	at com.mchange.v2.resourcepool.BasicResourcePool.unexpectedBreak(BasicResourcePool.java:974)
	at com.mchange.v2.resourcepool.BasicResourcePool.access$1000(BasicResourcePool.java:44)
	at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1927)
	at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)

应该是db2的驱动出现了问题,突然想起,昨天更新了公司的maven,可能有依赖冲突,然后注释了
image.png
启动成功!