2
回答
C3p0Plugin类中的start方法报错
利用AWS快速构建适用于生产的无服务器应用程序,免费试用12个月>>>   
Exception in thread "main" java.lang.NoSuchMethodError: com.mchange.v2.c3p0.impl.C3P0Defaults.dataSourceName()Ljava/lang/String;
    at com.mchange.v2.c3p0.impl.PoolBackedDataSourceBase.<init>(PoolBackedDataSourceBase.java:54)
    at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.<init>(AbstractPoolBackedDataSource.java:74)
    at com.mchange.v2.c3p0.AbstractComboPooledDataSource.<init>(AbstractComboPooledDataSource.java:142)
    at com.mchange.v2.c3p0.AbstractComboPooledDataSource.<init>(AbstractComboPooledDataSource.java:138)
    at com.mchange.v2.c3p0.ComboPooledDataSource.<init>(ComboPooledDataSource.java:47)
    at com.jfinal.plugin.c3p0.C3p0Plugin.start(C3p0Plugin.java:150)
    at com.demo.GeneratorDemo.GeneratorDemo.getDataSource(GeneratorDemo.java:23)
    at com.demo.GeneratorDemo.GeneratorDemo.main(GeneratorDemo.java:39)



下面试start()方法的一部分内容

public boolean start() {
 if(this.isStarted) { return true;  } else {
    //在实例化这个的时候报错
 this.dataSource = new ComboPooledDataSource();  this.dataSource.setJdbcUrl(this.jdbcUrl);
 this.dataSource.setUser(this.user);
 this.dataSource.setPassword(this.password);
...   }
我看了ComboPooledDataSource的构造方法什么也没有为什么会保存  球大神解答
public ComboPooledDataSource() {
}

举报
旧人yu
发帖于1年前 2回/158阅
顶部