Exception in thread “Task-Thread-for-com.mchange.v2.async.ThreadPerTaskAsynchronousRunner@39117085” java.lang.NoClassDefFoundError: Could not initialize class net.sf.log4jdbc.sql.jdbcapi.DriverSpy
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:171)
at com.mchange.v2.c3p0.DriverManagerDataSource.ensureDriverLoaded(DriverManagerDataSource.java:100)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:132)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
at com.mchange.v2.resourcepool.BasicResourcePool.access
800
(
B
a
s
i
c
R
e
s
o
u
r
c
e
P
o
o
l
.
j
a
v
a
:
32
)
a
t
c
o
m
.
m
c
h
a
n
g
e
.
v
2.
r
e
s
o
u
r
c
e
p
o
o
l
.
B
a
s
i
c
R
e
s
o
u
r
c
e
P
o
o
l
800(BasicResourcePool.java:32) at com.mchange.v2.resourcepool.BasicResourcePool
800(BasicResourcePool.java:32)atcom.mchange.v2.resourcepool.BasicResourcePoolAcquireTask.run(BasicResourcePool.java:1810)
at com.mchange.v2.async.ThreadPerTaskAsynchronousRunner$TaskThread.run(ThreadPerTaskAsynchronousRunner.java:255)
系统缺少或者log4j文件名字出错
确认src目录下有文件log4jdbc.log4j2.properties,
且文件中配置了
log4jdbc.drivers=com.thunisoft.ArteryBase.Driver,com.sybase.jdbc3.jdbc.SybDriver
log4jdbc.spylogdelegator.name=net.sf.log4jdbc.log.slf4j.Slf4jSpyLogDelegator