1

When I upgrade DBI from 0.5.1 to 0.6, whenever I call dbReadTable:

mv = dbReadTable(conn, "MOVIES")
driver = JDBC("oracle.jdbc.OracleDriver", classPath = class_path)n
conn = dbConnect(driver, 
           myhost, 
           username, password)

It will generate an error such as:

Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘dbGetQuery’ for signature ‘"character", "missing"’
Traceback:

1. dbReadTable(conn, SQL("MOVIES"))
2. dbReadTable(conn, SQL("MOVIES"))
3. .local(conn, name, ...)
4. dbGetQuery(paste0("SELECT * FROM ", sql_name))
5. (function (classes, fdef, mtable) 
 . {
 .     methods <- .findInheritedMethods(classes, fdef, mtable)
 .     if (length(methods) == 1L) 
 .         return(methods[[1L]])
 .     else if (length(methods) == 0L) {
 .         cnames <- paste0("\"", vapply(classes, as.character, 
 .             ""), "\"", collapse = ", ")
 .         stop(gettextf("unable to find an inherited method for function %s for signature %s", 
 .             sQuote(fdef@generic), sQuote(cnames)), domain = NA)
 .     }
 .     else stop("Internal error in finding inherited methods; didn't return a unique method", 
 .         domain = NA)
 . })(list("character", structure("missing", package = "methods")), 
 .     structure(function (conn, statement, ...) 
 .     standardGeneric("dbGetQuery"), generic = structure("dbGetQuery", package = "DBI"), package = "DBI", group = list(), valueClass = character(0), signature = c("conn", 
 .     "statement"), default = `\001NULL\001`, skeleton = (function (conn, 
 .         statement, ...) 
 .     stop("invalid call in method dispatch to 'dbGetQuery' (no default method)", 
 .         domain = NA))(conn, statement, ...), class = structure("standardGeneric", package = "methods")), 
 .     <environment>)
6. stop(gettextf("unable to find an inherited method for function %s for signature %s", 
 .     sQuote(fdef@generic), sQuote(cnames)), domain = NA)

Everything is fine for dbGetQuery. What happens?

1 Answer 1

1

This appears to be a problem in the DBI package that will be fixed soon. DBI 0.6-1 and later should not have this problem anymore. Would you mind filing an issue at https://github.com/rstats-db/DBI/issues?

Sign up to request clarification or add additional context in comments.

3 Comments

I just submitted an issue. Thanks for your information.
@Zhiya: DBI 0.6-1 is on CRAN now, it might take a few days for Windows and OS X binaries to build. Okay to close your question as "not reproducible"? This will add a label on top of that.
Yeah sure. I do not know how to close my question though. Can you do that for me? Thanks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.