When I try to use c3p0
to test a mysql
database connection, Eclipse shows the following error:
caused by:java.lang.NoClassDefFoundError:com/mchange/v2/ser/indirector,
I googled and was unable to find an answer.
Could anyone help me? I am a java rookie, thanks!
First, make sure that your project is properly loading mchange-commons-java
, where the stuff you are com.mchange.v2.ser.*
lives. It is a transitive dependency of c3p0.
Hopefully you are using c3p0-0.9.5
. Try changing the c3p0 config param contextClassLoaderSource to library
to avoid some ClassLoader confusions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With