Validation causes nullPointerError

I have a field validation code segment that was working fine in our 5.0 implementation, but when I migrate it to 5.5 sp1 I get a null pointer exception. Can anyone tell me what is wrong with this? Basically I want to ensure the user has answered at least two security questions.

<Validation>

<cond>

<lt>

<length>

<ref>waveset.questions[*].answer</ref>

</length>

<i>2</i>

</lt>

<s>_FM_USER_QUESTION_MSG</s>

</cond>

</Validation>

Thank you,

Jason Burt

Portland State University

[655 byte] By [jasonburt] at [2007-11-26 8:55:13]
# 1

In IdM 5.0, this worked:

<Field>

<Validation>

<cond>

<lt>

<length>

<ref>waveset.questions[*].answer</ref>

</length>

<i>2</i>

</lt>

<s>_FM_USER_QUESTION_MSG</s>

</cond>

</Validation>

<FieldLoop for='name' in='waveset.questions[*].name'>

<Field>

<Field>

<Display class='Label'>

<Property name='text'>

<ref>waveset.questions[$(name)].question</ref>

</Property>

</Display>

</Field>

<Field name='waveset.questions[$(name)].answer'>

<Display class='Text'>

<Property name='secret'>

<Boolean>true</Boolean>

</Property>

</Display>

</Field>

</Field>

</FieldLoop>

</Field>

For some reason, it needs to look like this for IdM 5.5 to work:

<Field>

<FieldLoop for='name' in='waveset.questions[*].name'>

<Field>

<Field>

<Display class='Label'>

<Property name='text'>

<ref>waveset.questions[$(name)].question</ref>

</Property>

</Display>

</Field>

<Field name='waveset.questions[$(name)].answer'>

<Display class='Text'>

<Property name='secret'>

<Boolean>true</Boolean>

</Property>

</Display>

<Validation>

<cond>

<lt>

<length>

<ref>waveset.questions[*].answer</ref>

</length>

<i>2</i>

</lt>

<s>_FM_USER_QUESTION_MSG</s>

</cond>

</Validation>

</Field>

</Field>

</FieldLoop>

</Field>

I was worried that would print the same message multiple times for each field in the loop, but it

doesn't.

jasonburt at 2007-7-6 22:52:29 > top of Java-index,Web & Directory Servers,Directory Servers...