Closed eheisman closed 1 year ago
Well, the tests in the package declare themselves to be part of the hec.stats
package, so I suspect something is throwing this off. Fixing this and rebuilding the .jar
did not seem to make a difference.
Not sure wha this has to do with rJava - this is entirely an issue in your JAR files. Check your classpaths - see .jclassPath()
and .jaddClassPath()
. Java only sees what you load, it's not making things up. You can enable debugging in the class loader to see what exactly is loaded from where via .jclassLoader()$setDebug(1L)
.
Thanks for that tip - I was figuring some introspection would help me figure it out. It looks like an old copy of the R package this code wraps was being loaded along with an old .jar
of the problem code.
Note that since rJava 1.0 you can use .jpackage(..., own.loader=TRUE)
which will (possibly) avoid similar issues by making sure your package is using a separate loader so it won't mix with other packages (or versions).
It was definitely a problem with the classpath having an old copy of the .jar
I was interfacing with loaded via an old version of my package. Much appreciate the few moments you took to address this.
I am getting an error when trying to call a function that no method can be found with the signature. I've tried two different ways,
and
Looking at the methods listed out by the
.jmethods
function, it appears that the word "ensemble" is getting dropped from some of the package names on method signatures.The class I am listing methods from has the correct imports, and while a
hec.stats
package exists elsewhere, it shouldn't be available in this environment.I should also note that the
.jnew
function was not working for me on classes in thehec.ensemble.stats
package, but I was able to create them using `new(J("hec.ensemble.stats.[...]")).Something seems to be off with the class loading process. Any suggestions as to what might be causing this?