[R] Error with RJDBC when trying dbUnloadDriver()

2014-09-12 Thread julian . bothe
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]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Error with RJDBC when trying dbUnloadDriver()

2014-09-12 Thread Simon Urbanek
Julian,

On Sep 12, 2014, at 6:03 AM, julian.bo...@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

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.