Archi Forum

Archi Plug-ins => jArchi => Topic started by: wnad on January 25, 2024, 13:57:31 PM

Title: pb script with archi 5.2
Post by: wnad on January 25, 2024, 13:57:31 PM
My script was ok for archi 4.9.3 but with archi 5.2 i have this pb
INFO - Syncing " Applications " relationships from CSV with model...
javax.script.ScriptException: java.lang.NullPointerException: Cannot convert null value 'null'(language: Java) to Java type 'boolean'.
    at com.oracle.truffle.host.HostEngineException.nullPointer(HostEngineException.java:57)
    at com.oracle.truffle.host.HostInteropErrors.nullCoercion(HostInteropErrors.java:56)
    at com.oracle.truffle.host.HostToTypeNode.convertImpl(HostToTypeNode.java:192)
    at com.oracle.truffle.host.HostToTypeNode.doCached(HostToTypeNode.java:119)
    at com.oracle.truffle.host.HostToTypeNodeGen.executeAndSpecialize(HostToTypeNodeGen.java:92)


the script is in the post ...how change in 5.2 can explain this pb

thanks for help

Edited by Phil Beauvoir to remove attachment
Title: Re: pb script with archi 5.2
Post by: Phil Beauvoir on January 25, 2024, 14:13:52 PM
Hi @wnad, this public forum is not the best place to discuss problems with this script as it might contain sensitive information. I've removed the attachment from the post.

For this and similar queries it would be best to contact me or @Jean-Baptiste Sarrodie directly by email.
Title: Re: pb script with archi 5.2
Post by: Jean-Baptiste Sarrodie on January 25, 2024, 19:47:59 PM
Hi,

I guess the issue lies in the fact that, by default, recent versions of jArchi use by default a different script engine (GraalVM instead of Nashorn). And even though both are very similar, this can raise some issues like the one you have. Could you retry using Nashorn ES6 (go to Edit > Preferences Script > JavaScript Engine).

Quote from: Phil Beauvoir on January 25, 2024, 14:13:52 PMFor this and similar queries it would be best to contact me or @Jean-Baptiste Sarrodie (https://forum.archimatetool.com/index.php?action=profile;u=6) directly by email.

Yes, that's definitely the best option.

FWIW, this script is based on the CSV synchronization script written some years ago. I've since created an updated version (with some enhancements and some small bugs removed) which is compatible with GraalVM. It should be (almost) a dropin replacement.

Regards,

JB
Title: Re: pb script with archi 5.2
Post by: wnad on March 28, 2024, 11:25:00 AM
Thanks JB your solution is OK