Error with quantrix.openModel()

4.63K viewsScripting
0

I have tried to open a model with
quantrix.openModel(model_file_full_path_name)

I get the following error:
Error running script: Access denied
(java.lang.RuntimePermission setContextClassLoader)

The file name seems to be OK (I can reference the file with Java.io.file methods)

Is there something I am missing?

Thanks

0

Thanks, Ben, for the prompt response.
I use 4.0.58 in Mac OSX.
I have done a modification to default.policy in com.subx.scripting.core_4.0.0.060246.jar in order to do some experiments with QDK from scripts. If I enable createClassLoader and getClassLoader I get the error: Access denied (java.lang.RuntimePermission setContextClassLoader). If I enable setContextClassLoader, openModel() loads the model, but then I get an unrecoverable error.

0

Follow-up to this:

There is a rather complex bug surrounding the openModel() method. I believe it is causing both your error and the one I am seeing on my machine. We will be looking into fixing it, and once we do hopefully everything will work.

0

Hi Luca,

I actually get a different error when trying to use openModel() – something I will have to look into – but I cannot reproduce the one you are seeing. A few questions:

-What operating system are you running (type and version)?
-Which version of Quantrix are you using?
-Does this happen for all model files, or only some?
-Does the location of the target model make any difference? Is the one you’re trying to open in some unusual place other than your desktop or documents folder?

Thanks,
Ben

Latest Questions