OHDSI Home | Forums | Wiki | Github

Error running achilles : ava.lang.NoSuchMethodException: No suitable method for the given parameters

I’m setting up my local development environment, and am getting stuck on this error when running Achilles:

> achilles(connectionDetails, cdmDatabaseSchema="ccaesubset_1", analysisIds, createTable = TRUE, smallcellcount = 0, cdmVersion = "5", runHeel = FALSE, validateSchema = FALSE)
Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl,  :
  java.lang.NoSuchMethodException: No suitable method for the given parameters

I’m running on OS X 10.11.4, using brew to install things, and am able to execute the individual pieces (i.e. I can use createConnectionDetails to attach to my db and run simple queries using querySql; I can run “> renderSql(sql,a=123)” and get the desired output, so I think everything is in place. [ I get the same results using r from the command line, or from within rStudio).

I added a few “writeLines” to the achilles function, and it is erroring out somewhere within loadRenderTranslateSql().

Not sure where to start looking. Any pointers to docs/books to review best practices for developing using r / rstudio?
I’ve heard there can be problems with java version, but followed some threads to get that working, and
have

don.oharaCT@sfo-lt016:~$ java -version
java version "1.8.0_74"
Java(TM) SE Runtime Environment (build 1.8.0_74-b02)
Java HotSpot(TM) 64-Bit Server VM (build 25.74-b02, mixed mode)

Thanks!

Hi Don,

Thanks for already doing so much work in narrowing down the bug! Which doesn’t mean I’m not still clueless as to its nature :wink:

The error message is saying a Java function is called that it doesn’t recognize, probably because the arguments used to call it are wrong. The only thing I can think of are the targetDialect and oracleTempSchema arguments. When I set one of these to be a number instead of a string I get the same message.

In the context of your problem: can you check what type the connectionDetails$dbms is (e.g. type str(connectionDetails) to see its structure). Are you specifying an oracleTempSchema? If so, can you verify it is of type ‘character’?

Otherwise, but this might be more work than you bargained for, you can try debugging. In R Studio, type:

debug(SqlRender::translateSql)
debug(SqlRender::renderSql)

and then run the achilles function as before. R will now stop in those two functions. You can use ‘next’ to go to the next line. Before the call to rJava::J in either function, you can check the arguments going in. All of these should be of type ‘character’.

similar error happened in vscode.

Error in .jcall(“RJavaTools”, “Ljava/lang/Object;”, “invokeMethod”, cl, :
java.lang.NoSuchMethodException: No suitable method for the given parameters

t