jfinal 加入sqllite如何配置?

郭恩洲_OSC博客 发布于 2013/07/30 16:46
阅读 1K+
收藏 0

sqllite配置启动报错,麻烦给看一下@jfinal

sqllite 数据源配置:

C3p0Plugin c3p0Plugin = new C3p0Plugin("jdbc:sqlite:"+dbPath+File.separator+"core.db","","");

c3p0Plugin.setDriverClass("org.sqlite.JDBC");
me.add(c3p0Plugin);

ActiveRecordPlugin arp = new ActiveRecordPlugin(c3p0Plugin);
arp.setDialect(new Sqlite3Dialect());
arp.setShowSql(true);
me.add(arp);

报错信息:

[DEBUG]-[Thread: com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2]-[com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run()]: An exception occurred while acquiring a poolable resource. Will retry.
java.sql.SQLException: NYI
at org.sqlite.Conn.getTransactionIsolation(Conn.java:77)
at com.mchange.v2.c3p0.impl.NewPooledConnection.<init>(NewPooledConnection.java:107)


加载中
0
郭恩洲_OSC博客
郭恩洲_OSC博客
这个问题很难?
0
wendal
wendal

NYI 的意思是 "not yet implemented."


看来代码里面调用了sqlite驱动未实现的东西

0
JFinal
JFinal
将 DataSource 传给 ActiveRecordPlugin 试试,不要使用 C3p0Plugin,可能是 sqlite 不支持
JFinal
JFinal
回复 @mrguo : 通过 JDBC API 创建的,google 一下 jdbc 建立连接的代码
郭恩洲_OSC博客
郭恩洲_OSC博客
嗯 谢谢波波 怎么创建 DataSource
返回顶部
顶部