代码:
public static void main(String[] args) {
C3p0Plugin c3p0Plugin = new C3p0Plugin("jdbc:oracle:thin:@192.168.101.10:1521:oratm","imp_zyk", "11111111");
c3p0Plugin.setDriverClass("oracle.jdbc.driver.OracleDriver");
c3p0Plugin.setMaxPoolSize(64);
c3p0Plugin.setMinPoolSize(16);
c3p0Plugin.start();
ActiveRecordPlugin arp = new ActiveRecordPlugin(c3p0Plugin);
arp.setDialect(new OracleDialect());
arp.setContainerFactory(new CaseInsensitiveContainerFactory());
arp.addMapping("userinformation", userinformation.class);
arp.start();
userinformation.dao.set("id", "8");
userinformation.dao.set("USERNAME", "2");
userinformation.dao.set("CARDNO","3");
userinformation.dao.set("CARDADDRESS","4");
userinformation.dao.set("PHOTOURL1", "5");
userinformation.dao.set("PHOTOURL2","6");
userinformation.dao.set("PHOTOURL3","7");
userinformation.dao.set("PHOTOBASE1","8");
userinformation.dao.set("PHOTOBASE2", "9");
userinformation.dao.set("PHOTOBASE3","10");
userinformation.dao.set("TBORDERNO","11");
//
//
Boolean b = userinformation.dao.save();
System.out.println(b);
}
异常
Exception in thread "main" com.jfinal.plugin.activerecord.ActiveRecordException: java.sql.SQLException: An SQLException was provoked by the following failure: java.lang.ArrayIndexOutOfBoundsException: 11
at com.jfinal.plugin.activerecord.Model.save(Model.java:324)
at DataBase.zwlutil.main(zwlutil.java:67)
Caused by: java.sql.SQLException: An SQLException was provoked by the following failure: java.lang.ArrayIndexOutOfBoundsException: 11
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:118)
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:77)
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:74)
at com.mchange.v2.c3p0.impl.NewPooledConnection.handleThrowable(NewPooledConnection.java:505)
at com.mchange.v2.c3p0.impl.NewProxyConnection.prepareStatement(NewProxyConnection.java:584)
at com.jfinal.plugin.activerecord.Model.save(Model.java:314)
... 1 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 11
at oracle.jdbc.driver.OracleSql.computeBasicInfo(OracleSql.java:950)
at oracle.jdbc.driver.OracleSql.getSqlKind(OracleSql.java:623)
at oracle.jdbc.driver.OraclePreparedStatement.<init>(OraclePreparedStatement.java:1212)
at oracle.jdbc.driver.T4CPreparedStatement.<init>(T4CPreparedStatement.java:28)
at oracle.jdbc.driver.T4CDriverExtension.allocatePreparedStatement(T4CDriverExtension.java:68)
at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:3140)
at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:3042)
at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:6022)
at com.mchange.v2.c3p0.impl.NewProxyConnection.prepareStatement(NewProxyConnection.java:567)
... 2 more