[R-sig-Geo] Error with loading rJava for spcosa [SEC=UNCLASSIFIED]
Li Jin
Jin.Li at ga.gov.au
Sun Nov 27 23:45:45 CET 2016
Thank you very much, Roger! The suggestions are very helpful.
Best wishes,
Jin
-----Original Message-----
From: Roger Bivand [mailto:Roger.Bivand at nhh.no]
Sent: Friday, 25 November 2016 7:24 PM
To: Li Jin
Cc: r-sig-geo at r-project.org
Subject: Re: [R-sig-Geo] Error with loading rJava for spcosa [SEC=UNCLASSIFIED]
On Thu, 24 Nov 2016, Li Jin wrote:
> Hi All,
>
> I have been using library(spcosa) in R version 3.2.3 (2015-12-10) and all worked well, until today.
>
> The error was as below when I called:
>> library(spcosa)
> Loading required package: rJava
> Error : .onLoad failed in loadNamespace() for 'rJava', details:
> call: fun(libname, pkgname)
> error: JAVA_HOME cannot be determined from the Registry
> Error: package 'rJava' could not be loaded
>
> Although rJava was installed, I reinstalled it, successfully as:
>> install.packages("rJava")
> --- Please select a CRAN mirror for use in this session --- trying URL
> 'https://cloud.r-project.org/bin/windows/contrib/3.2/rJava_0.9-8.zip'
> Content type 'application/zip' length 765340 bytes (747 KB) downloaded
> 747 KB
>
> package 'rJava' successfully unpacked and MD5 sums checked
>
> The downloaded binary packages are in
>
> C:\Users\u09672\AppData\Local\Temp\1\Rtmp2PslO0\downloaded_packages
>
> But when I called:
>> library(rJava)
> Error in get(Info[i, 1], envir = env) :
> lazy-load database 'C:/LegacyApps/R-3.2.3/library/rJava/R/rJava.rdb'
> is corrupt In addition: Warning messages:
> 1: package 'rJava' was built under R version 3.2.5
> 2: In get(Info[i, 1], envir = env) : internal error -3 in
> R_decompress1
> Error: package or namespace load failed for 'rJava'
>
> When I called:
>> library(spcosa)
> Loading required package: rJava
> Error in get(Info[i, 1], envir = env) :
> lazy-load database 'C:/LegacyApps/R-3.2.3/library/rJava/R/rJava.rdb'
> is corrupt In addition: Warning messages:
> 1: package 'rJava' was built under R version 3.2.5
> 2: In get(Info[i, 1], envir = env) : internal error -3 in
> R_decompress1
> Error: package 'rJava' could not be loaded
>
> Looks like something is wrong with loading "rJava". The only thing has
> been changed is that my PC was refreshed recently.
Three possibilities: you may need rJava built for R 3.2.3 - you are warned about the mis-match; the refreshing of your PC may have taken away something the rJava needed when it loaded; and the rJava Windows binary may be corrupted on your mirror - try a different mirror.
Try replacing R 3.2.3 with the current R 3.3.2, and update all your packages (all Windows binary packages for R < 3.3 were built using an older compiler, all for R >= 3.3 with a newer compiler, and they are not mutually compatible if they include compiled code.
Roger
>
> Any suggestions to how to fix this loading problem? Thanks!
>
>
>> sessionInfo()
> R version 3.2.3 (2015-12-10)
> Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 7 x64
> (build 7601) Service Pack 1
>
> locale:
> [1] LC_COLLATE=English_Australia.1252 LC_CTYPE=English_Australia.1252
> [3] LC_MONETARY=English_Australia.1252 LC_NUMERIC=C [5]
> LC_TIME=English_Australia.1252
>
> attached base packages:
> [1] stats graphics grDevices utils datasets methods base
>
> other attached packages:
> [1] raster_2.5-8 sp_1.2-3
>
> loaded via a namespace (and not attached):
> [1] tools_3.2.3 Rcpp_0.12.7 grid_3.2.3 lattice_0.20-34
>>
>
> Please note this error persists for: R version 3.3.1 (2016-06-21)
>
> Kind regards,
> Jin
>
> Jin Li, PhD | Spatial Modeller / Computational Statistician National
> Earth and Marine Observations | Environmental Geoscience Division
> t: +61 2 6249 9899
>
> Geoscience Australia Disclaimer: This e-mail (and files transmitted with it) is intended only for the person or entity to which it is addressed. If you are not the intended recipient, then you have received this e-mail by mistake and any use, dissemination, forwarding, printing or copying of this e-mail and its file attachments is prohibited. The security of emails transmitted cannot be guaranteed; by forwarding or replying to this email, you acknowledge and accept these risks.
> ----------------------------------------------------------------------
> ---------------------------------------------------
>
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
--
Roger Bivand
Department of Economics, Norwegian School of Economics, Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 91 00
e-mail: Roger.Bivand at nhh.no
http://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
http://depsy.org/person/434412
Geoscience Australia Disclaimer: This e-mail (and files transmitted with it) is intended only for the person or entity to which it is addressed. If you are not the intended recipient, then you have received this e-mail by mistake and any use, dissemination, forwarding, printing or copying of this e-mail and its file attachments is prohibited. The security of emails transmitted cannot be guaranteed; by forwarding or replying to this email, you acknowledge and accept these risks.
More information about the R-sig-Geo
mailing list