scripted attribute classpath
Liam Hoekenga
liamr at umich.edu
Mon Apr 7 14:16:37 EDT 2014
Looks like this works...
sys.path.append('/usr/local/shibboleth-idp/lib/novl-ldap.jar')
...but I did assume that all of the jars in WEB-INF/lib would be in my
classpath. Ah well.
Liam
On Mon, Apr 7, 2014 at 1:57 PM, Liam Hoekenga <liamr at umich.edu> 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 groupMembers.py"). 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(PyScriptEngine.java:202)
> ~[jython-2.7b1.jar:na]
> at org.python.jsr223.PyScriptEngine.eval(PyScriptEngine.java:42)
> ~[jython-2.7b1.jar:na]
> at org.python.jsr223.PyScriptEngine.access$300(PyScriptEngine.java:20)
> ~[jython-2.7b1.jar:na]
> at
> org.python.jsr223.PyScriptEngine$PyCompiledScript.eval(PyScriptEngine.java:231)
> ~[jython-2.7b1.jar:na]
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://shibboleth.net/pipermail/users/attachments/20140407/720c2b76/attachment.html
More information about the users
mailing list