SQLite JDBC 驱动没有实现 [英] not implemented by SQLite JDBC driver

查看:33
本文介绍了SQLite JDBC 驱动没有实现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用 sqlitejdbc-v056.jar.然后我将此查询添加到我的 .cfm 页面

I have successfully created a ColdFusion datasource to a SQLite database using the sqlitejdbc-v056.jar. Then I added this query to my .cfm page

<cfquery name="qry" datasource="Spiceworks">
SELECT
id AS Ticket_Number,
summary AS Summary,
status AS Status,
created_at AS Created_At,
assigned_to AS Assigned_to

FROM tickets
WHERE status = 'open' AND assigned_to IS NULL
ORDER BY Created_At DESC   
</cfquery>

当我在 IE 和 Firefox 中浏览到我的 .cfm 页面时,我收到错误消息:

When I browse to my .cfm page in IE and Firefox, I get the error:

SQLite JDBC 驱动没有实现

not implemented by SQLite JDBC driver

错误发生在 C:/Inetpub/wwwroot/intra/SmartTV/UnassignedTickets/Tickets.cfm: line 204

The error occurred in C:/Inetpub/wwwroot/intra/SmartTV/UnassignedTickets/Tickets.cfm: line 204

202 :
203:
204:
205:选择
206:身份证,

202 :
203 :
204 :
205 : SELECT
206 : id,

SQL SELECT id、summary、status、created_at、assigned_to FROM门票 WHERE status = 'open' AND assignment_to IS NULL ORDER BYcreated_at DESC DATASOURCE Spiceworks 资源:

SQL SELECT id, summary, status, created_at, assigned_to FROM tickets WHERE status = 'open' AND assigned_to IS NULL ORDER BY created_at DESC DATASOURCE Spiceworks Resources:

Check the ColdFusion documentation to verify that you are using the correct syntax.
Search the Knowledge Base to find a solution to your problem.

堆栈跟踪

at cfTickets2ecfm1617356019.runPage(C:/Inetpub/wwwroot/intra/SmartTV/UnassignedTickets/Tickets.cfm:204) at cfTickets2ecfm1617356019.runPage(C:/Inetpub/wwwroot/intra/SmartTV/UnassignedTickets/Tickets.cfm:204) java.sql.SQLException: not implemented by SQLite JDBC driver
    at org.sqlite.jdbc3.JDBC3Statement.unused(JDBC3Statement.java:397)
    at org.sqlite.jdbc3.JDBC3Statement.execute(JDBC3Statement.java:414)
    at coldfusion.server.j2ee.sql.JRunStatement.execute(JRunStatement.java:359)
    at coldfusion.sql.Executive.executeQuery(Executive.java:1442)
    at coldfusion.sql.Executive.executeQuery(Executive.java:1201)
    at coldfusion.sql.Executive.executeQuery(Executive.java:1131)
    at coldfusion.sql.SqlImpl.execute(SqlImpl.java:406)
    at coldfusion.tagext.sql.QueryTag.executeQuery(QueryTag.java:1056)
    at coldfusion.tagext.sql.QueryTag.doEndTag(QueryTag.java:685)
    at cfTickets2ecfm1617356019.runPage(C:InetpubwwwrootintraSmartTVUnassignedTicketsTickets.cfm:204)
    at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:244)
    at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:444)
    at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
    at coldfusion.filter.IpFilter.invoke(IpFilter.java:64)
    at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:428)
    at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
    at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
    at coldfusion.filter.PathFilter.invoke(PathFilter.java:112)
    at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:94)
    at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
    at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
    at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
    at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
    at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
    at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62)
    at coldfusion.CfmServlet.service(CfmServlet.java:219)
    at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
    at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)java.sql.SQLException: not implemented by SQLite JDBC driver
    at org.sqlite.jdbc3.JDBC3Statement.unused(JDBC3Statement.java:397)
    at org.sqlite.jdbc3.JDBC3Statement.execute(JDBC3Statement.java:414)
    at coldfusion.server.j2ee.sql.JRunStatement.execute(JRunStatement.java:359)
    at coldfusion.sql.Executive.executeQuery(Executive.java:1442)
    at coldfusion.sql.Executive.executeQuery(Executive.java:1201)
    at coldfusion.sql.Executive.executeQuery(Executive.java:1131)
    at coldfusion.sql.SqlImpl.execute(SqlImpl.java:406)
    at coldfusion.tagext.sql.QueryTag.executeQuery(QueryTag.java:1056)
    at coldfusion.tagext.sql.QueryTag.doEndTag(QueryTag.java:685)
    at cfTickets2ecfm1617356019.runPage(C:InetpubwwwrootintraSmartTVUnassignedTicketsTickets.cfm:204)
    at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:244)
    at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:444)
    at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
    at coldfusion.filter.IpFilter.invoke(IpFilter.java:64)
    at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:428)
    at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
    at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
    at coldfusion.filter.PathFilter.invoke(PathFilter.java:112)
    at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:94)
    at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
    at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
    at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
    at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
    at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
    at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62)
    at coldfusion.CfmServlet.service(CfmServlet.java:219)
    at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
    at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)

更新:

我的 .jar 文件位于 C:ColdFusion10cfusionlibC:ColdFusion10cfusionwwwrootWEB-INFlib 下.在 ColdFusion 数据源中:

I have my .jar file under C:ColdFusion10cfusionlib and C:ColdFusion10cfusionwwwrootWEB-INFlib. In ColdFusion Datasources:

  • CF 数据源名称:Spiceworks
  • JDBC URL:jdbc:sqlite:spiceworksC$Program FilesSpiceworksdbspiceworks_prod.db
  • 驱动类:org.sqlite.JDBC
  • 驱动名称:sqlite-jdbc-3.7.15-M1.jar
  • 用户名:<user>
  • 密码:<密码>

按照评论中的建议,我尝试了更简单的语句:

As suggested in the comments, I tried simpler statements:

  • SELECT * FROM ticket
  • SELECT id、summary、status、assigned_to FROM ticket

...和不同的驱动版本

  • sqllite-jdbc4-3.8.2-SNAPSHOT.jar
  • sqlite-jdbc-3.7.15-M1.jar

但仍然出现同样的错误.

but still got the same error.

推荐答案

我认为原始错误与它所说的完全一样.数据源调用了您正在使用的驱动程序未实现的方法.特别是 org.sqlite.jdbc3.JDBC3Statementexecute(..) 方法.此驱动程序的源代码 表明该方法不执行任何操作.它只是抛出您看到的错误消息.

I think the original error means exactly what it says. The datasource invoked a method that is not implemented by the driver you are using. Specifically the execute(..) method of org.sqlite.jdbc3.JDBC3Statement. The source for this driver shows that method does nothing. It simply throws the error message you are seeing.

但是,我认为您的类路径中有另一个版本的 SQLite 驱动程序 jar.sqlitejdbc-v056.jar您发布的 不会导致该错误,因为它甚至不包含 JDBC3Statement 类.可能发生的情况是 CF 正在加载另一个其他版本的驱动程序(即在您的类路径中).

However I think you have another version of the SQLite driver jar in your class path. The sqlitejdbc-v056.jar you posted could not cause that error because it does not even contain a JDBC3Statement class. What is probably happening is that CF is loading another other version of the driver (that is in your class path) instead.

在我的测试中,sqlitejdbc-v056.jar 在 CF10 上运行良好.在再次添加该 jar 之前,请确保您已从 CF 类路径中删除了 所有 版本的 SQLLite jar,然后重新启动 CF.否则,CF 仍会自动加载它们,您将继续收到该错误消息.

In my tests, the sqlitejdbc-v056.jar worked fine with CF10. Before adding that jar again, make sure you have removed all versions of the SQLLite jar from your CF class path, and restart CF. Otherwise, CF will still load them automatically and you will continue to get that error message.

为确保您已删除 所有 jar,请在重新启动后尝试创建主类的实例.如果下面的行抛出找不到类"错误,您就知道已成功将它们全部删除.完成后,继续重新安装 sqlitejdbc-v056.jar.

To ensure you have removed all of the jars, after restarting, try and create an instance of the main class. If the line below throws a "Class not found" error, you know have successfully removed them all. Once you have done that, go ahead an reinstall the sqlitejdbc-v056.jar.

<cfset obj = createObject("java", "org.sqlite.JDBC")>
If you see this text, you still have a version of the jar in your class path.

这对我有用:

  1. 创建空数据库C:/temp/sqlite/products.db
  2. 下载sqlitejdbc-v056.jarC:ColdFusion10cfusionwwwrootWEB-INFlib
  3. 重启CF
  4. 创建其他"DSN
  5. DSN 设置
    • DS 名称:SQLite
    • JDBC URL:jdbc:sqlite:C:/temp/sqlite/products.db
    • 驱动类:org.sqlite.JDBC

这篇关于SQLite JDBC 驱动没有实现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆