I am installing Shibboleth IDP on a CentOS 7 server. I installed JDK 15.0.2 and Tomcat 9.0.44
Java version is:
java version "15.0.2" 2021-01-19
Java(TM) SE Runtime Environment (build 15.0.2+7-27)
Java HotSpot(TM) 64-Bit Server VM (build 15.0.2+7-27, mixed mode, sharing)
I compiled Shibboleth war and deployed it to Tomcat. However, on trying to start the application, I get this error in Tomcat log:
2021-03-16 13:02:41.218 [ WARN] : net.shibboleth.ext.spring.context.DelimiterAwareApplicationContext: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shibboleth.ProtocolLookupFunction' defined in file [/opt/shibboleth-idp/system/conf/audit-system.xml]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [net.shibboleth.idp.profile.context.navigate.ScriptedContextLookupFunction]: Factory method 'inlineScript' threw exception; nested exception is net.shibboleth.utilities.java.support.logic.ConstraintViolationException: No scripting engine associated with scripting language JavaScript
2021-03-16 13:02:41.240 [ERROR] : org.springframework.web.context.ContextLoader: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shibboleth.ProtocolLookupFunction' defined in file [/opt/shibboleth-idp/system/conf/audit-system.xml]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [net.shibboleth.idp.profile.context.navigate.ScriptedContextLookupFunction]: Factory method 'inlineScript' threw exception; nested exception is net.shibboleth.utilities.java.support.logic.ConstraintViolationException: No scripting engine associated with scripting language JavaScript
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:656)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:636)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557)
If I understand correctly, there should be a script engine in the JRE to execute JavaScript. Does it need to be enabled? How?