开发者社区> 问答> 正文

连接access报错,有人遇到吗??报错

错误信息:

[WARN]-[Thread: main]-[com.alibaba.druid.pool.DruidConnectionHolder.<init>()]: getHoldability unsupported
java.lang.UnsupportedOperationException
at sun.jdbc.odbc.JdbcOdbcConnection.getHoldability(Unknown Source)
at com.alibaba.druid.filter.FilterChainImpl.connection_getHoldability(FilterChainImpl.java:325)
at com.alibaba.druid.filter.FilterAdapter.connection_getHoldability(FilterAdapter.java:861)
at com.alibaba.druid.filter.FilterChainImpl.connection_getHoldability(FilterChainImpl.java:322)
at com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl.getHoldability(ConnectionProxyImpl.java:244)
at com.alibaba.druid.pool.DruidConnectionHolder.<init>(DruidConnectionHolder.java:86)
at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:633)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:934)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:930)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:102)
at com.jfinal.plugin.activerecord.TableBuilder.build(TableBuilder.java:36)
at com.jfinal.plugin.activerecord.ActiveRecordPlugin.start(ActiveRecordPlugin.java:171)
at com.jfinal.core.Config.startPlugins(Config.java:87)
at com.jfinal.core.Config.configJFinal(Config.java:48)
at com.jfinal.core.JFinal.init(JFinal.java:67)
at com.jfinal.core.JFinalFilter.init(JFinalFilter.java:49)
at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:119)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:724)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:706)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:492)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
at org.eclipse.jetty.server.Server.doStart(Server.java:277)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at com.jfinal.server.JettyServer.doStart(JettyServer.java:120)
at com.jfinal.server.JettyServer.start(JettyServer.java:64)
at com.jfinal.core.JFinal.start(JFinal.java:159)

配置代码

DruidPlugin dl = new DruidPlugin("jdbc:odbc:driver={Microsoft Access Driver (*.mdb)};DBQ=D:/1.mdb","", "","sun.jdbc.odbc.JdbcOdbcDriver");
dl.addFilter(new StatFilter());   
me.add(dl);// 配置Druid数据库连接池插件
			
ActiveRecordPlugin arp = new ActiveRecordPlugin("acc",dl); 
me.add(arp);



@JFinal


展开
收起
爱吃鱼的程序员 2020-06-14 15:58:46 796 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    <spanstyle="font-family:'MicrosoftYaHei',Verdana,sans-serif,宋体;font-size:14px;line-height:22px;background-color:#FFFFFF;">“getHoldabilityunsupported”,应该是不支持此类数据库

    2020-06-14 15:59:03
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载