关于DB+RECORD操作oracle数据库的问题

sunnyrainsky 发布于 2013/04/13 17:52
阅读 776
收藏 0

@JFinal 你好,想跟你请教个问题:我操作oracle数据库,插入一条记录

Record user = new Record().set("userid", userid).set("favid", favid).set("type", type).set("guid",StringUtils.getGuid());
Db.save("TDATA_FAV","GUID", user);

这个时候报错,com.jfinal.plugin.activerecord.ActiveRecordException: java.sql.SQLException: 不支持的特性
at com.jfinal.plugin.activerecord.Db.save(Db.java:628)
at com.btten.controller.FavoriteController.addFav(FavoriteController.java:41)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.jfinal.core.ActionInvocation.invoke(ActionInvocation.java:55)
at com.jfinal.core.ActionHandler.handle(ActionHandler.java:79)
at com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:72)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.sql.SQLException: 不支持的特性
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
at oracle.jdbc.dbaccess.DBError.throwUnsupportedFeatureSqlException(DBError.java:689)
at oracle.jdbc.driver.OracleConnection.prepareStatement(OracleConnection.java:3456)
at com.mchange.v2.c3p0.impl.NewProxyConnection.prepareStatement(NewProxyConnection.java:155)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.jfinal.plugin.activerecord.SqlReporter.invoke(SqlReporter.java:58)
at $Proxy5.prepareStatement(Unknown Source)
at com.jfinal.plugin.activerecord.Db.save(Db.java:603)
at com.jfinal.plugin.activerecord.Db.save(Db.java:626)
... 20 more
没找到是什么原因?是驱动问题还是什么?急求帮助解决

加载中
1
sunnyrainsky
sunnyrainsky
原来用的是jdbc14驱动,后来换成ojdbc6就正常了
返回顶部
顶部