解决Caused by: java.lang.NoSuchMethodException: com.mchange.v2.c3p0.cfg.C3P0Config.<init>()的总结

引起:spring的dao层注入dataSource出现c3p0初始化异常.

bug示图:

源码图:

解决:

在填写property属性时,我就纳闷alt+/用不了了,完了之后运行发现初始化出错,然后一看,是因为class引入的类有问题

引入错误的类:com.mchange.v2.c3p0.cfg.C3P0Config

正确的类:com.mchange.v2.c3p0.ComboPooledDataSource

时间: 2024-12-26 06:30:12

解决Caused by: java.lang.NoSuchMethodException: com.mchange.v2.c3p0.cfg.C3P0Config.<init>()的总结的相关文章

Caused by: java.lang.ClassNotFoundException: com.mchange.v2.c3p0.ComboPooledDataSource

1.错误描述 usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming ] { -help | start | stop } 2014-7-12 0:51:11 org.apache.catalina.core.AprLifecycleListener init 信息: Loaded APR based Apache Tomcat Native library 1.1.29 using

Caused by: java.lang.ClassNotFoundException: com.mchange.v2.ser.Indirector

启动tomcat报如下错误: Caused by: java.lang.NoClassDefFoundError: com/mchange/v2/ser/Indirector at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2398) at java.lang.Class.getConstructor0(C

Caused by java lang ClassNotFoundException com mchange v2

1.错误描述 usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming ] { -help | start | stop } 2014-7-12 0:59:34 org.apache.catalina.core.AprLifecycleListener init 信息: Loaded APR based Apache Tomcat Native library 1.1.29 using

java.lang.NoClassDefFoundError: com/mchange/v2/ser/Indirector

在使用Spring框架是报错:java.lang.NoClassDefFoundError: com/mchange/v2/ser/Indirector java.lang.NoClassDefFoundError: com/mchange/v2/ser/Indirector at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2

Caused by: java.lang.NoSuchMethodException:

10-26 16:13:34.047 27343-27343/com.zaizai.safty E/AndroidRuntime: FATAL EXCEPTION: main 10-26 16:13:34.047 27343-27343/com.zaizai.safty E/AndroidRuntime: Process: com.zaizai.safty, PID: 27343 10-26 16:13:34.047 27343-27343/com.zaizai.safty E/AndroidR

Caused by: java.lang.NoSuchMethodException: &lt;init&gt; [class android.content.Context, interface androi

报错提示代码: Caused by: java.lang.NoSuchMethodException: <init> [class android.content.Context, interface android.util.AttributeSet] 1.报错原因: 在自定义view时,没有重写含有(Context context,AttributeSet attrs)的构造器 解决办法: 重新对于构造器,例如: public ControlKeyboardLinearLayout(Con

Caused by: java.lang.NoSuchMethodException: &amp;lt;init&amp;gt; [class android.content.Context, interface android

?? 在写自己定义的view时,有时会报下面错误: Caused by: java.lang.NoSuchMethodException: <init> [class android.content.Context, interface android.util.AttributeSet] <view android:id="@id/viewpage_container" android:layout_width="fill_parent" and

Caused by: java.lang.NoSuchMethodException: &lt;init&gt; [class android.content.Context, interface android

 在写自定义的view时,有时会报以下错误: Caused by: java.lang.NoSuchMethodException: <init> [class android.content.Context, interface android.util.AttributeSet] <view android:id="@id/viewpage_container" android:layout_width="fill_parent" andr

【JAVA错误笔记】 - c3p0问题java.lang.NoClassDefFoundError:com.mchange.v2.ser.Indirector

错误描述:java.lang.NoClassDefFoundError:com.mchange.v2.ser.Indirector 原因分析: 这是c3p0的一个错误信息,我们在下载 c3p0时候,zip压缩包中,有三个jar,其中一个 c3p0-x.x.x.jar,还有一个  mchange.......jar的文件, 该错误原因就是缺少该jar;至于 该jar包的作用就是,一,解决上面的问题,二:本身作用,见,,,jar解压后的源码. 解决方案: mchange-commons-java-版