<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> </o:p></p>
<p class="MsoNormal">I am currently running an IdP version 2.3.6 on RHEL and VMware under JBOSS 5. I have one scripted attribute that is working well and I am attempting to create a new one with some errors. The attribute definition is as follows<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><resolver:AttributeDefinition xsi:type="Script" xmlns="urn:mace:shibboleth:2.0:resolver:ad" id="softwareStoreAffiliation" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:resolver="urn:mace:shibboleth:2.0:resolver"><!-- Dependency
that provides the source attribute. --><resolver:Dependency ref="myLDAP" /><resolver:Dependency ref="activeStudent" /><resolver:Dependency ref="eduPersonAffiliation" /><!-- SAML 1 and 2 encoders for the attribute. --><resolver:AttributeEncoder xsi:type="SAML2String"
xmlns="urn:mace:shibboleth:2.0:attribute:encoder" name="urn:oid:1.2.840.113556.1.4.261" friendlyName="eduPersonAffiliation" /><!-- The script, wrapped in a CDATA section so that special XML characters don't need to be removed --><Script>importPackage(Packages.edu.internet2.middleware.shibboleth.common.attribute.provider);<o:p></o:p></p>
<p class="MsoNormal"> // Create attribute to be returned from definition
<o:p></o:p></p>
<p class="MsoNormal">softwareStoreAffiliation = new BasicAttribute("softwareStoreAffiliation");
<o:p></o:p></p>
<p class="MsoNormal">softwareStoreAffiliation = eduPersonAffiliation.clone(); <o:p>
</o:p></p>
<p class="MsoNormal"> // Determine if user is an active student
<o:p></o:p></p>
<p class="MsoNormal">if ( (activeStudent.getValues().isEmpty()) || !(activeStudent.getValues().contains("ACTIVE") ){
<o:p></o:p></p>
<p class="MsoNormal"> softwareStoreAffiliation.getValues().remove("student");
<o:p></o:p></p>
<p class="MsoNormal">} </Script></resolver:AttributeDefinition><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </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> </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 (<Unknown source>#6) in <Unknown source> at line number 6<o:p></o:p></p>
<p class="MsoNormal"><o:p> </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> </o:p></p>
<p class="MsoNormal">TIA,<br>
Lee Brewer<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>