Using Nashorn with OpenJDK 17 and IdP 4.3.1
Vlad Mencl
vladimir.mencl at reannz.co.nz
Tue Feb 20 19:19:10 UTC 2024
Hi,
In preparation for IdPv5 upgrade, I started exploring the changes involved.
I understand IdPv5 requires Java 17 (also supported by IdP 4.3.1), so I
thought I'd first upgrade to Java 17 and keep everything else the same.
Java 17 does not include Nashorn, so I installed the IdP plugin
providing it, net.shibboleth.idp.plugin.nashorn
This is where I got stuck.
I have the plugin installed and dist/plugin-webapp/WEB-INF/lib (as well
as idp.war) include the 5x asm-* jars, nashorn-core-15.3.jar plus the
two plugin jars, but when loading my attribute-resolver.xml (which
contains some scripted attribute definitions), I get the same result as
when attempting to run on OpenJDK 17 without the plugin: attribute
resolver fails to load with:
net.shibboleth.utilities.java.support.logic.ConstraintViolationException:
No scripting engine associated with scripting language javascript
Is there something I'm missing to get the Nashorn ScriptEngine
discovered by Java?
My environment is:
IdP 4.3.1 (same behaviour even for a fresh clean install)
Ubuntu 20.04
openjdk 17.0.9 2023-10-17
tomcat9 9.0.31-1ubuntu0.4
Many thanks in advance for any pointers.
Cheers,
Vlad
--
Vladimir Mencl
Lead Software Engineer
Research & Education
Advanced Network NZ Ltd
E vladimir.mencl at reannz.co.nz
www.reannz.co.nz
More information about the users
mailing list