Oracle Nashorn scripts not loading in zap 2.11.1

439 views
Skip to first unread message

SimsHere

unread,
Nov 28, 2022, 3:26:24 AM11/28/22
to OWASP ZAP User Group
Hi Team,

When I start ZAP 2.11.1, I get the message that the scripts which run on Oracle Nashorn Script Engine could not be added.

On investigating I found that Oracle Nashorn is not supported from Java 11. What is the solution for this issue ?

Can I use java 10 or lesser versions? or is there a better solution?

Thanks,
Kamalpreet

Simon Bennetts

unread,
Nov 28, 2022, 4:26:58 AM11/28/22
to OWASP ZAP User Group
Hi Kamalpreet,

Use the GraalVM JavaScript engine which we include by default in ZAP.
FYI Nashorn is still available in Java 11 but it is deprecated.

Cheers,

Simon

Kamalpreet Kaur

unread,
Nov 28, 2022, 7:15:11 AM11/28/22
to zaprox...@googlegroups.com
Thanks Simon. Can we use the GraalVM engines for the same scripts?

When I am trying to use the httpSender scripts for API scanning (Alert_on_Unexpected_Content_Types.js) and use "EMCAscript: Graal.js" script engine to execute them, I am getting the following error in console:

java.lang.IllegalStateException: Multi threaded access requested by thread Thread[ZAP-ActiveScanner-1,3,main] but is not allowed for language(s) js.

The error gets fixed when I choose "EMCAScript: Oracle Nashorn"

Thanks,
Kamalpreet

--
You received this message because you are subscribed to the Google Groups "OWASP ZAP User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zaproxy-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zaproxy-users/66e673ce-d53f-4607-b16e-f0a4eb54b268n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages