Re: [R] problem with rJAVA

2018-03-20 Thread Jeff Newmiller
Are you familiar with the sessionInfo function? 
-- 
Sent from my phone. Please excuse my brevity.

On March 20, 2018 6:27:23 PM PDT, "Sorkin, John"  
wrote:
>I have installed rJava into my Windows 10 (64-bit) R instillation using
>the Tools > Install Packages command of my RStudion IDE. When I issued
>the R command in my R code
>
>library(rJava)  I received the following error:
>
>
> library(rJava)
>Error: package or namespace load failed for �rJava� in get(Info[i, 1],
>envir = env):
>lazy-load database 'C:/Users/John
>Sorkin/Documents/R/win-library/3.4/rJava/R/rJava.rdb' is corrupt
>In addition: Warning message:
>In get(Info[i, 1], envir = env) : internal error -3 in R_decompress1
>
>
>I hope someone can tell me what I need to do to get RJava work in my
>version of R. I tried to re-install RJava and the problem persisted.
>
>
>Thank you
>
>John
>
>
>John David Sorkin M.D., Ph.D.
>Professor of Medicine
>Chief, Biostatistics and Informatics
>University of Maryland School of Medicine Division of Gerontology and
>Geriatric Medicine
>Baltimore VA Medical Center
>10 North Greene Street
>GRECC (BT/18/GR)
>Baltimore, MD 21201-1524
>(Phone) 410-605-7119
>(Fax) 410-605-7913 (Please call phone number above prior to faxing)
>
>
>   [[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] Problem with rJava

2016-01-14 Thread ProfJCNash
Your post does not have the requested session information that will tell
us your computing environment, nor the version of R.

However, I'm experiencing at least a related problem, as this morning I
updated R (in Linux Mind Rafaela 17.2, so I get an operating system
notice to update via the package manager). Afterwards I ran
update.packages() but could not get rJava to carry out the update,
though other packages did complete. Possibly there is some mismatch
between rJava and R 3.2.3 and/or gcj. I'm a bit surprised this hasn't
surfaced before, as I'm a "slow updater" and 3.2.3 is over a month old now.

Below is the output from the update -- AFTER I ran "R CMD javareconf" as
root -- along with the session information, which shows Ubuntu rather
than the derivative Linux Mint.

Cheers, JN

> update.packages()
rJava :
 Version 0.9-6 installed in /usr/lib/R/site-library
 Version 0.9-8 available at https://rweb.crmda.ku.edu/cran
Update (y/N/c)?  y
trying URL 'https://rweb.crmda.ku.edu/cran/src/contrib/rJava_0.9-8.tar.gz'
Content type 'application/x-gzip' length 656615 bytes (641 KB)
==
downloaded 641 KB

* installing *source* package ‘rJava’ ...
** package ‘rJava’ successfully unpacked and MD5 sums checked
checking for gcc... gcc -std=gnu99
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc -std=gnu99 accepts -g... yes
checking for gcc -std=gnu99 option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -std=gnu99 -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for string.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking whether time.h and sys/time.h may both be included... yes
configure: checking whether gcc -std=gnu99 supports static inline...
yes
checking whether setjmp.h is POSIX.1 compatible... yes
checking whether sigsetjmp is declared... yes
checking whether siglongjmp is declared... yes
checking Java support in R... present:
interpreter : '/usr/lib/jvm/default-java/jre/bin/java'
archiver: '/usr/bin/jar'
compiler: '/usr/bin/javac'
header prep.: '/usr/bin/javah'
cpp flags   : ''
java libs   : '-L/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server
-ljvm'
configure: error: One or more Java configuration variables are not set.
Make sure R is configured with full Java support (including JDK). Run
R CMD javareconf
as root to add Java support to R.

If you don't have root privileges, run
R CMD javareconf -e
to set all Java-related variables and then install rJava.

ERROR: configuration failed for package ‘rJava’
* removing ‘/usr/lib/R/site-library/rJava’
* restoring previous ‘/usr/lib/R/site-library/rJava’

The downloaded source packages are in
‘/tmp/RtmpXCs91E/downloaded_packages’
Warning message:
In install.packages(update[instlib == l, "Package"], l, contriburl =
contriburl,  :
  installation of package ‘rJava’ had non-zero exit status
>
> sessionInfo()
R version 3.2.3 (2015-12-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.3 LTS

locale:
 [1] LC_CTYPE=en_CA.UTF-8   LC_NUMERIC=C
 [3] LC_TIME=en_CA.UTF-8LC_COLLATE=en_CA.UTF-8
 [5] LC_MONETARY=en_CA.UTF-8LC_MESSAGES=en_CA.UTF-8
 [7] LC_PAPER=en_CA.UTF-8   LC_NAME=C
 [9] LC_ADDRESS=C   LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base

loaded via a namespace (and not attached):
[1] tools_3.2.3 tcltk_3.2.3
>



On 16-01-14 05:45 PM, AASHISH JAIN wrote:
> Hello,
> 
> I am using an R package called Rknots, which uses rJava (and others like 
> rSymPy, rjson, rJython) and I am getting some error due to rJava. When I run 
> my R code, the execution gets halted with the following error:
> 
> Error in .jcheck() : No running JVM detected. Maybe .jinit() would help. 
> (found this line in rjava.c)
> Calls: computeInvariant ... sympy -> $ -> $ -> hasField -> .jcall -> .jcheck 
> -> .Call (this line comes from Rknots package when the function 
> computeInvariant is called)
> Execution halted
> 
> Note that since I could not install these packages on root level, I installed 
> them local