EvaluableScript throwing ScriptException

Kirk Turner-Rustin ktrustin at owu.edu
Mon Aug 1 15:11:00 EDT 2016


Greetings, all:

IdP 3.1.1; OpenJDK 1.8; Tomcat 7.0

We have two Shibboleth IdP instances running under OpenJDK 1.8, one for 
testing and the other for production. Today when I try to reload the 
AttributeResolver service on the production host, I get this exception 
in the idp-process.log associated with a scripted attribute:

2016-08-01 14:32:24,388 - ERROR [net.shibboleth.idp.profile.impl.ReloadServiceConfiguration:132] - Profile Action ReloadServiceConfiguration: Error reloading service configuration for 'shibboleth.AttributeResolverService'
net.shibboleth.utilities.java.support.service.ServiceException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'owuTmsOwnPartData': Cannot create inner bean '(inner bean)#1210061a' of type [net.shibboleth.ext.spring.factory.EvaluableScriptFactoryBean] while setting bean property 'script'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#1210061a': Invocation of init method failed; nested exception is net.shibboleth.utilities.java.support.logic.ConstraintViolationException: No scripting engine associated with scripting language javascript
         at net.shibboleth.ext.spring.service.ReloadableSpringService.doReload(ReloadableSpringService.java:334)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'owuTmsOwnPartData': Cannot create inner bean '(inner bean)#1210061a' of type [net.shibboleth.ext.spring.factory.EvaluableScriptFactoryBean] while setting bean property 'script'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#1210061a': Invocation of init method failed; nested exception is net.shibboleth.utilities.java.support.logic.ConstraintViolationException: No scripting engine associated with scripting language javascript
         at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:313)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#1210061a': Invocation of init method failed; nested exception is net.shibboleth.utilities.java.support.logic.ConstraintViolationException: No scripting engine associated with scripting language javascript
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1566)
Caused by: net.shibboleth.utilities.java.support.logic.ConstraintViolationException: No scripting engine associated with scripting language javascript
         at net.shibboleth.utilities.java.support.logic.Constraint.isNotNull(Constraint.java:227)

So it appears that Shibboleth and perhaps the Tomcat container on our 
production host can't find the scripting engine.

The error does not occur when I reload the AttributeResolver on our test 
Shibboleth instance, which is configured with the same scripted 
attribute, same JDK version, same IdP version, and same container.

The scripted attribute in question is used many times each day, and 
we've gotten no prior complaints about it. Commenting out the scripted 
attribute allows the AttributeResolver to be reloaded.

If I run a small Java program to dump the list of available scripting 
engines, I get the following on both hosts:

     Engine name: Oracle Nashorn
     Version: 1.8.0_101
     Language: ECMAScript
     Engine supports the following extensions:
 	js
     Engine has the following short names:
 	nashorn
 	Nashorn
 	js
 	JS
 	JavaScript
 	javascript
 	ECMAScript
 	ecmascript

So it would seem that the ECMA scripting engine is still available on 
the offending host and should be referable as "javascript". I tried 
explicitly setting the language to "ecmascript" in the scripted 
attribute on the bad host, but got the same exception, this time 
referencing "ecmascript".

Can anyone suggest where else I might look to troubleshoot this?

Many thanks,
Kirk

-- 
   Kirk A. Rustin           | Senior Systems Analyst
   Ohio Wesleyan University | Information Services
   http://www.owu.edu       | http://infoserv.owu.edu


More information about the users mailing list