<div dir="ltr">I need to do a conditional LDAP query (to populate an attribute only for a specific SP).<div>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).</div>
<div><br></div><div>It works when I run it by hand (e.g. "jython groupMembers.py"). I have to add the jar to my classpath, but afterwards, it works great.</div><div><br></div><div>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.</div>
<div><br></div><div>Any Suggestions?</div><div>Liam</div><div><br></div><div>---------------</div><div><br></div><div><div>13:39:42.048 - ERROR [edu.internet2.middleware.shibboleth.common.attribute.resolver.provider.attributeDefinition.ScriptedAttributeDefinition:135] - ScriptletAttributeDefinition panoptoGroupMembership unable to execute script</div>
<div>javax.script.ScriptException: ImportError: No module named novell in <script> at line number 7</div><div><span class="" style="white-space:pre">        </span>at org.python.jsr223.PyScriptEngine.scriptException(PyScriptEngine.java:202) ~[jython-2.7b1.jar:na]</div>
<div><span class="" style="white-space:pre">        </span>at org.python.jsr223.PyScriptEngine.eval(PyScriptEngine.java:42) ~[jython-2.7b1.jar:na]</div><div><span class="" style="white-space:pre">        </span>at org.python.jsr223.PyScriptEngine.access$300(PyScriptEngine.java:20) ~[jython-2.7b1.jar:na]</div>
<div><span class="" style="white-space:pre">        </span>at org.python.jsr223.PyScriptEngine$PyCompiledScript.eval(PyScriptEngine.java:231) ~[jython-2.7b1.jar:na]</div></div><div><br></div></div>