scripted attribute classpath

Liam Hoekenga liamr at
Mon Apr 7 14:16:37 EDT 2014

Looks like this works...

...but I did assume that all of the jars in WEB-INF/lib would be in my
classpath.  Ah well.


On Mon, Apr 7, 2014 at 1:57 PM, Liam Hoekenga <liamr at> wrote:

> I need to do a conditional LDAP query (to populate an attribute only for a
> specific SP).
> So, I wrote a jython script.  Novell has a jar that contains classes aimed
> at allowing LDAP queries from ECMA (rhino), which I've adjusted for jython).
> It works when I run it by hand (e.g. "jython").  I have to
> add the jar to my classpath, but afterwards, it works great.
> I updated the script with the attribute generating bits, and I added the
> jar to the shibboleth lib directory and recreated the war file.  I had
> assumed that anything in idp.war's WEB-INF/lib got added to the classpath
> (that certainly seemed to be true for the various jsr223 script engines,
> and jdbc connectors), but I get an error when the script tries to execute.
> Any Suggestions?
> Liam
> ---------------
> 13:39:42.048 - ERROR
> [edu.internet2.middleware.shibboleth.common.attribute.resolver.provider.attributeDefinition.ScriptedAttributeDefinition:135]
> - ScriptletAttributeDefinition panoptoGroupMembership unable to execute
> script
> javax.script.ScriptException: ImportError: No module named novell in
> <script> at line number 7
> at
> org.python.jsr223.PyScriptEngine.scriptException(
> ~[jython-2.7b1.jar:na]
>  at org.python.jsr223.PyScriptEngine.eval(
> ~[jython-2.7b1.jar:na]
> at org.python.jsr223.PyScriptEngine.access$300(
> ~[jython-2.7b1.jar:na]
>  at
> org.python.jsr223.PyScriptEngine$PyCompiledScript.eval(
> ~[jython-2.7b1.jar:na]
-------------- next part --------------
An HTML attachment was scrubbed...

More information about the users mailing list