michaelkalish / STA

State Trace
1 stars 5 forks source link

Getting error in staMRFIT, object is not a Java object reference (jobjRef/jarrayRef) #6

Open johannes-titz opened 3 years ago

johannes-titz commented 3 years ago

Running example from your guide:

source("staCMRsetup.R")
delay = read.table("Data files/delay.dat")
vnames = c("B1","B2","B3","B4")
E = list(c(1:4),c(5:8),c(5,1),c(6,2),c(7,3),c(8,4))
out = staMRFIT(delay, partial=E, nsample=10000)

gives:

Error in .jevalArray(output$pars[[isample]], simplify = T) : object is not a Java object reference (jobjRef/jarrayRef). Called from: .jevalArray(output$pars[[isample]], simplify = T)

I tried to debug and it seems that in staMRFIT.R the output list has no value "pars" (line 42)

z[,,isample] = .jevalArray(output$pars[[isample]],simplify=T)

output object consists of $p, $fits, $datafit, but not $pars. The output list is created via jMRfits, where I also cannot see a pars value in the returned list.

Am I doing something wrong?

michaelkalish commented 3 years ago

It’s all working for me still – did you get an error in staCMRsetup? If that runs ok then the rest should work.

From: johannes-titz @.> Reply-To: michaelkalish/STA @.> Date: Monday, August 30, 2021 at 9:07 AM To: michaelkalish/STA @.> Cc: Subscribed @.> Subject: [michaelkalish/STA] Getting error in staMRFIT, object is not a Java object reference (jobjRef/jarrayRef) (#6)

Running example from your guide:

source("staCMRsetup.R")

delay = read.table("Data files/delay.dat")

vnames = c("B1","B2","B3","B4")

E = list(c(1:4),c(5:8),c(5,1),c(6,2),c(7,3),c(8,4))

out = staMRFIT(delay, partial=E, nsample=10000)

gives:

Error in .jevalArray(output$pars[[isample]], simplify = T) : object is not a Java object reference (jobjRef/jarrayRef). Called from: .jevalArray(output$pars[[isample]], simplify = T)

I tried to debug and it seems that in staMRFIT.R the output list has no value "pars" (line 42)

z[,,isample] = .jevalArray(output$pars[[isample]],simplify=T)

output object consists of $p, $fits, $datafit, but not $pars. The output list is created via jMRfits, where I also cannot see a pars value in the returned list.

Am I doing something wrong?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/michaelkalish/STA/issues/6, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABYWFSX7XJ3DGWUJCZR7LJDT7N7ATANCNFSM5DB2YTZA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

johannes-titz commented 3 years ago

staCMRsetup does not give an error and everything else in the guide works until this point. Is the return value of jMRfits correct?

 return(list(p = sol$getP(), fits = sol$getFits(),datafit = sol$getDataFit()))

I do not see a pars value in this list, which is supposedly needed by staMRFIT. Other functions (e.g. jCMRfitsx) return a pars value. Can you run in debug mode and check the call of jMRfits in staMRFIT?

benedikt-gailer commented 2 years ago

I am encountering the very same issue.

out <- staMRFIT(delay, partial=E, nsample = 10000)

gives

Error in .jevalArray(output$pars[[isample]], simplify = T) : object is not a Java object reference (jobjRef/jarrayRef).

My JRE executable is jre-8u341-windows-x64 instead of the recommended (in your tutorial) jre-8u241-windows-x64.exe if that makes any difference.

Is there any source, where I can download jre-8u241-windows-x64.exe?

My R version is 4.1.3 (64 bit).

Thanks in advance.

michaelkalish commented 2 years ago

I’m afraid I cannot recover this error. I too am using jre-8u341-windows-x64 and R 4.1.3 (64 bit). Have you linked to the latest runtime library? You should get something like this:

source("staCMRsetup.R") STACMR program library Version 26.03.2020 Utility programs for use with the book: Dunn, J. C. & Kalish, M. L. (2018). State-Trace Analysis. Springer.

Loading required package: magic Loading required package: abind Loading required package: ggplot2 Loading required package: RColorBrewer Loading required package: rJava STACMR linked to java library fxMR-0.3.44.jar

From: benedikt-gailer @.> Date: Wednesday, September 21, 2022 at 12:10 PM To: michaelkalish/STA @.> Cc: Michael Lee Kalish @.>, Comment @.> Subject: Re: [michaelkalish/STA] Getting error in staMRFIT, object is not a Java object reference (jobjRef/jarrayRef) (#6)

I am encountering the very same issue.

out <- staMRFIT(delay, partial=E, nsample = 10000)

gives

Error in .jevalArray(output$pars[[isample]], simplify = T) : object is not a Java object reference (jobjRef/jarrayRef).

My JRE executable is jre-8u341-windows-x64 instead of the recommended (in your tutorial) jre-8u241-windows-x64.exe if that makes any difference.

Is there any source, where I can download jre-8u241-windows-x64.exe?

My R version is 4.1.3 (64 bit).

Thanks in advance.

— Reply to this email directly, view it on GitHubhttps://github.com/michaelkalish/STA/issues/6#issuecomment-1253925642, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABYWFSS2SDS23F5BHEQTEH3V7MXPRANCNFSM5DB2YTZA. You are receiving this because you commented.Message ID: @.***>

benedikt-gailer commented 2 years ago

Yes, R returns exactly what you have sugested upon running

source("staCMRsetup.R")

I’m afraid I cannot recover this error. I too am using jre-8u341-windows-x64 and R 4.1.3 (64 bit). Have you linked to the latest runtime library? You should get something like this: source("staCMRsetup.R") STACMR program library Version 26.03.2020 Utility programs for use with the book: Dunn, J. C. & Kalish, M. L. (2018). State-Trace Analysis. Springer. Loading required package: magic Loading required package: abind Loading required package: ggplot2 Loading required package: RColorBrewer Loading required package: rJava STACMR linked to java library fxMR-0.3.44.jar From: benedikt-gailer @.> Date: Wednesday, September 21, 2022 at 12:10 PM To: michaelkalish/STA @.> Cc: Michael Lee Kalish @.>, Comment @.> Subject: Re: [michaelkalish/STA] Getting error in staMRFIT, object is not a Java object reference (jobjRef/jarrayRef) (#6) I am encountering the very same issue. out <- staMRFIT(delay, partial=E, nsample = 10000) gives Error in .jevalArray(output$pars[[isample]], simplify = T) : object is not a Java object reference (jobjRef/jarrayRef). My JRE executable is jre-8u341-windows-x64 instead of the recommended (in your tutorial) jre-8u241-windows-x64.exe if that makes any difference. Is there any source, where I can download jre-8u241-windows-x64.exe? My R version is 4.1.3 (64 bit). Thanks in advance. — Reply to this email directly, view it on GitHub<#6 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABYWFSS2SDS23F5BHEQTEH3V7MXPRANCNFSM5DB2YTZA. You are receiving this because you commented.Message ID: @.***>

benedikt-gailer commented 1 year ago

After installing Ubuntu 22.04 on a Virtual Box, and installing Rstudio as well as JRE there, I still get the very same error upon executing:

out <- staMRFIT(delay, partial=E, nsample = 10000)

Error in .jevalArray(output$pars[[isample]], simplify = T) : object is not a Java object reference (jobjRef/jarrayRef).

Upon executing:

source("staCMRsetup.R")

I get, as expected:

STACMR program library Version 26.03.2020 Utility programs for use with the book: Dunn, J. C. & Kalish, M. L. (2018). State-Trace Analysis. Springer.

Loading required package: magic Loading required package: abind Loading required package: ggplot2 Loading required package: RColorBrewer Loading required package: rJava STACMR linked to java library fxMR-0.3.44.jar

The problem thus doesn't seem to be tied to any operating system. After that, I went back to windows, and uninstalled all packages from source("staCMRsetup.R"), so that I could identify potential installation problems:

source("staCMRsetup.R")

Everything seemed to work fine, until:

Loading required package: rJava WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/ Installing package into ‘C:/Users/bened/AppData/Local/R/win-library/4.2’ (as ‘lib’ is unspecified) trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/rJava_1.0-6.zip' Content type 'application/zip' length 1245703 bytes (1.2 MB) downloaded 1.2 MB

package ‘rJava’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in C:\Users\bened\AppData\Local\Temp\Rtmp4ANUxH\downloaded_packages STACMR linked to java library fxMR-0.3.44.jar Warning messages: 1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, : there is no package called ‘magic’ 2: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, : there is no package called ‘ggplot2’ 3: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, : there is no package called ‘rJava’

I am guessing that the warning messages from the rJava installation process indicate the root problem. Perhaps the packages are not installed at the correct location.

I also found theese warning messages using Ubuntu.

I hope this helps to get a better understanding the problem.

EDIT: Installing Rtools doesn't make any difference in terms of the warning messages

michaelkalish commented 1 year ago

Thanks for letting us know. We are working on a solution, but don’t have anything yet – just wanted you to know we are looking into it.

Mike

From: benedikt-gailer @.> Date: Thursday, September 29, 2022 at 5:55 AM To: michaelkalish/STA @.> Cc: Michael Lee Kalish @.>, Comment @.> Subject: Re: [michaelkalish/STA] Getting error in staMRFIT, object is not a Java object reference (jobjRef/jarrayRef) (#6)

After installing Ubuntu 22.04 on a Virtual Box, and installing Rstudio as well as JRE there, I still get the very same error upon executing:

out <- staMRFIT(delay, partial=E, nsample = 10000)

Error in .jevalArray(output$pars[[isample]], simplify = T) : object is not a Java object reference (jobjRef/jarrayRef).

Upon executing:

source("staCMRsetup.R")

I get, as expected:

STACMR program library Version 26.03.2020 Utility programs for use with the book: Dunn, J. C. & Kalish, M. L. (2018). State-Trace Analysis. Springer.

Loading required package: magic Loading required package: abind Loading required package: ggplot2 Loading required package: RColorBrewer Loading required package: rJava STACMR linked to java library fxMR-0.3.44.jar

The problem thus doesn't seem to be tied to any operating system. After that, I went back to windows, and uninstalled all packages from source("staCMRsetup.R"), so that I could identify potential installation problems:

source("staCMRsetup.R")

Everything seemed to work fine, until:

Loading required package: rJava WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/ Installing package into ‘C:/Users/bened/AppData/Local/R/win-library/4.2’ (as ‘lib’ is unspecified) trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/rJava_1.0-6.zip' Content type 'application/zip' length 1245703 bytes (1.2 MB) downloaded 1.2 MB

package ‘rJava’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in C:\Users\bened\AppData\Local\Temp\Rtmp4ANUxH\downloaded_packages STACMR linked to java library fxMR-0.3.44.jar Warning messages: 1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, : there is no package called ‘magic’ 2: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, : there is no package called ‘ggplot2’ 3: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, : there is no package called ‘rJava’

I am guessing that the warning messages from the rJava installation process indicate the root problem. Perhaps the packages are not installed at the correct location.

I also found theese warning messages using Ubuntu.

I hope this helps to get a better understanding the problem.

— Reply to this email directly, view it on GitHubhttps://github.com/michaelkalish/STA/issues/6#issuecomment-1262047148, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABYWFSU37D2RH3ZZWA2M6U3WAVRQVANCNFSM5DB2YTZA. You are receiving this because you commented.Message ID: @.***>

michaelkalish commented 1 year ago

If you still receive the error after sourcing the setup, please confirm and I’ll register the bug report.

From: benedikt-gailer @.> Date: Thursday, September 22, 2022 at 10:30 AM To: michaelkalish/STA @.> Cc: Michael Lee Kalish @.>, Comment @.> Subject: Re: [michaelkalish/STA] Getting error in staMRFIT, object is not a Java object reference (jobjRef/jarrayRef) (#6)

Yes, R returns exactly what you have sugested upon running

source("staCMRsetup.R")

I’m afraid I cannot recover this error. I too am using jre-8u341-windows-x64 and R 4.1.3 (64 bit). Have you linked to the latest runtime library? You should get something like this: source("staCMRsetup.R") STACMR program library Version 26.03.2020 Utility programs for use with the book: Dunn, J. C. & Kalish, M. L. (2018). State-Trace Analysis. Springer. Loading required package: magic Loading required package: abind Loading required package: ggplot2 Loading required package: RColorBrewer Loading required package: rJava STACMR linked to java library fxMR-0.3.44.jar From: benedikt-gailer @.> Date: Wednesday, September 21, 2022 at 12:10 PM To: michaelkalish/STA @.> Cc: Michael Lee Kalish @.>, Comment @.> Subject: Re: [michaelkalish/STA] Getting error in staMRFIT, object is not a Java object reference (jobjRef/jarrayRef) (#6https://github.com/michaelkalish/STA/issues/6) I am encountering the very same issue. out <- staMRFIT(delay, partial=E, nsample = 10000) gives Error in .jevalArray(output$pars[[isample]], simplify = T) : object is not a Java object reference (jobjRef/jarrayRef). My JRE executable is jre-8u341-windows-x64 instead of the recommended (in your tutorial) jre-8u241-windows-x64.exe if that makes any difference. Is there any source, where I can download jre-8u241-windows-x64.exe? My R version is 4.1.3 (64 bit). Thanks in advance. — Reply to this email directly, view it on GitHub<#6 (comment)https://github.com/michaelkalish/STA/issues/6#issuecomment-1253925642>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABYWFSS2SDS23F5BHEQTEH3V7MXPRANCNFSM5DB2YTZA. You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHubhttps://github.com/michaelkalish/STA/issues/6#issuecomment-1255112156, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABYWFSRXGMCZSM2QXXI5GP3V7RUQLANCNFSM5DB2YTZA. You are receiving this because you commented.Message ID: @.***>

benedikt-gailer commented 1 year ago

I have previously uninstalled all R packages, and installed the necessary ones again. I still got the same error. Thank you for looking into this.

michaelkalish commented 1 year ago

We can’t reproduce the error on any of our systems. Can you please remind me if you are working on Windows or Linux?

From: benedikt-gailer @.> Date: Thursday, October 13, 2022 at 2:33 PM To: michaelkalish/STA @.> Cc: Michael Lee Kalish @.>, Comment @.> Subject: Re: [michaelkalish/STA] Getting error in staMRFIT, object is not a Java object reference (jobjRef/jarrayRef) (#6)

I have previously uninstalled all R packages, and installed the necessary ones again. I still got the same error. Thank you for looking into this.

— Reply to this email directly, view it on GitHubhttps://github.com/michaelkalish/STA/issues/6#issuecomment-1278022666, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABYWFSV4VC5JES3PEA7OYITWDBIXPANCNFSM5DB2YTZA. You are receiving this because you commented.Message ID: @.***>

benedikt-gailer commented 1 year ago

I have encountered the error both on windows 10 as well as under Ubuntu 22.04 through a virtual box.

We can’t reproduce the error on any of our systems. Can you please remind me if you are working on Windows or Linux?

From: benedikt-gailer @.> Date: Thursday, October 13, 2022 at 2:33 PM To: michaelkalish/STA @.> Cc: Michael Lee Kalish @.>, Comment @.> Subject: Re: [michaelkalish/STA] Getting error in staMRFIT, object is not a Java object reference (jobjRef/jarrayRef) (#6)

I have previously uninstalled all R packages, and installed the necessary ones again. I still got the same error. Thank you for looking into this.

michaelkalish commented 1 year ago

We are just not able to produce this result. I’m continuing to work on it but since I unfortunately can’t produce the error yet progress is very slow in fixing it.

From: benedikt-gailer @.> Date: Tuesday, October 18, 2022 at 11:01 AM To: michaelkalish/STA @.> Cc: Michael Lee Kalish @.>, Comment @.> Subject: Re: [michaelkalish/STA] Getting error in staMRFIT, object is not a Java object reference (jobjRef/jarrayRef) (#6)

I have encountered the error both on windows 10 as well as under Ubuntu 22.04 through a virtual box.

We can’t reproduce the error on any of our systems. Can you please remind me if you are working on Windows or Linux?

From: benedikt-gailer @.> Date: Thursday, October 13, 2022 at 2:33 PM To: michaelkalish/STA @.> Cc: Michael Lee Kalish @.>, Comment @.> Subject: Re: [michaelkalish/STA] Getting error in staMRFIT, object is not a Java object reference (jobjRef/jarrayRef) (#6https://github.com/michaelkalish/STA/issues/6)

I have previously uninstalled all R packages, and installed the necessary ones again. I still got the same error. Thank you for looking into this.

— Reply to this email directly, view it on GitHubhttps://github.com/michaelkalish/STA/issues/6#issuecomment-1282535941, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABYWFSWEYSSYVJKQSY2KDNLWD23TNANCNFSM5DB2YTZA. You are receiving this because you commented.Message ID: @.***>