<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">To all,<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">I am currently running &nbsp;an &nbsp;IdP version 2.3.6 on&nbsp; RHEL and VMware under JBOSS 5.&nbsp; I have one scripted attribute that is working well and I am attempting to create a new one with some errors.&nbsp; The attribute definition is as follows<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">&lt;resolver:AttributeDefinition xsi:type=&quot;Script&quot; xmlns=&quot;urn:mace:shibboleth:2.0:resolver:ad&quot; id=&quot;softwareStoreAffiliation&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:resolver=&quot;urn:mace:shibboleth:2.0:resolver&quot;&gt;&lt;!-- Dependency
 that provides the source attribute. --&gt;&lt;resolver:Dependency ref=&quot;myLDAP&quot; /&gt;&lt;resolver:Dependency ref=&quot;activeStudent&quot; /&gt;&lt;resolver:Dependency ref=&quot;eduPersonAffiliation&quot; /&gt;&lt;!-- SAML 1 and 2 encoders for the attribute. --&gt;&lt;resolver:AttributeEncoder xsi:type=&quot;SAML2String&quot;
 xmlns=&quot;urn:mace:shibboleth:2.0:attribute:encoder&quot; name=&quot;urn:oid:1.2.840.113556.1.4.261&quot; friendlyName=&quot;eduPersonAffiliation&quot; /&gt;&lt;!-- The script, wrapped in a CDATA section so that special XML characters don't need to be removed --&gt;&lt;Script&gt;importPackage(Packages.edu.internet2.middleware.shibboleth.common.attribute.provider);<o:p></o:p></p>
<p class="MsoNormal">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Create attribute to be returned from definition&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<o:p></o:p></p>
<p class="MsoNormal">softwareStoreAffiliation = new BasicAttribute(&quot;softwareStoreAffiliation&quot;);&nbsp;
<o:p></o:p></p>
<p class="MsoNormal">softwareStoreAffiliation = eduPersonAffiliation.clone();&nbsp;&nbsp;&nbsp; <o:p>
</o:p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Determine if user is an active student&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<o:p></o:p></p>
<p class="MsoNormal">if ( (activeStudent.getValues().isEmpty()) || !(activeStudent.getValues().contains(&quot;ACTIVE&quot;)&nbsp; ){&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<o:p></o:p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; softwareStoreAffiliation.getValues().remove(&quot;student&quot;);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<o:p></o:p></p>
<p class="MsoNormal">} &lt;/Script&gt;&lt;/resolver:AttributeDefinition&gt;<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">The error that I see in the idp-process log is<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">13:56:39.191 - DEBUG [edu.internet2.middleware.shibboleth.common.attribute.resolver.provider.ShibbolethAttributeResolver:336] - Resolved attribute activeStudent containing 0 values<o:p></o:p></p>
<p class="MsoNormal">13:56:39.191 - DEBUG [edu.internet2.middleware.shibboleth.common.attribute.resolver.provider.ShibbolethAttributeResolver:336] - Resolved attribute eduPersonAffiliation containing 4 values<o:p></o:p></p>
<p class="MsoNormal">13:56:39.199 - ERROR [edu.internet2.middleware.shibboleth.common.attribute.resolver.provider.attributeDefinition.ScriptedAttributeDefinition:135] - ScriptletAttributeDefinition softwareStoreAffiliation unable to execute script<o:p></o:p></p>
<p class="MsoNormal">com.sun.phobos.script.util.ExtendedScriptException: org.mozilla.javascript.EvaluatorException: missing ) after condition (&lt;Unknown source&gt;#6) in &lt;Unknown source&gt; at line number 6<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">I just starting learning java and javascript and do not have a lot of experience so please bear with me.<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">TIA,<br>
Lee Brewer<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</body>
</html>