julian.bothe at elitepartner.de
2014-Sep-12 10:03 UTC
[R] Error with RJDBC when trying dbUnloadDriver()
Hello everyone, Hello Simon, I am starting to use RJDBC. When trying to unload the driver, I get an Error message - even when not connecting to any database. This issue has been reported before in 2011 (https://stat.ethz.ch/pipermail/r-sig-db/2011q4/001103.html ), and it was said that it's possibly a bug. But it seems that it's still there. Any hints? ----------- library("RJDBC") Postgres_drv <- JDBC(driverClass = 'org.postgresql.Driver', classPath'PATH/TO/JAR/postgresql-9.3-1102.jdbc4.jar') dbUnloadDriver(Postgres_drv) #Error in .valueClassTest(standardGeneric("dbUnloadDriver"), "logical", : # invalid value from generic function 'dbUnloadDriver', class "NULL", expected "logical" -------------- All the best Julian [[alternative HTML version deleted]]
Julian, On Sep 12, 2014, at 6:03 AM, julian.bothe at elitepartner.de wrote:> Hello everyone, Hello Simon, > > I am starting to use RJDBC. When trying to unload the driver, I get an Error message ? even when not connecting to any database. > This issue has been reported before in 2011 (https://stat.ethz.ch/pipermail/r-sig-db/2011q4/001103.html ), and it was said that it?s possibly a bug. But it seems that it?s still there. > > Any hints?This issue has been never raised with me or the RJDBC issue tracker (it's beyond me why people don't ask the package maintainers). In principle, it's bug that it returns NULL instead of FALSE (now fixed), but note that dbUnloadDriver() is will always fail with JDBC, because Java has no provision to unload classes. This is legal, since dbUnloadDriver() is declared as optional. Cheers, Simon> > ----------- > library("RJDBC") > Postgres_drv <- JDBC(driverClass = 'org.postgresql.Driver', > classPath= ?PATH/TO/JAR/postgresql-9.3-1102.jdbc4.jar') > dbUnloadDriver(Postgres_drv) > > #Error in .valueClassTest(standardGeneric("dbUnloadDriver"), "logical", : > # invalid value from generic function ?dbUnloadDriver?, class ?NULL?, expected ?logical? > -------------- > All the best > Julian