atlassian-jira.log showing WARN on iterator tag, Value is null!

We are running JIRA 5.0.3. on Windows Server 2008 R2. Recently, while observing our log file, I noticed that a seemingly "innocuous" warning was happening, shall we say, "every so often":

2012-05-04 07:14:43,550 http-443-1 WARN aaa1111 [removed] [removed] 1.1.1.1
/browse/RMSES-419 [webwork.view.taglib.IteratorTag] Value is null! Returning an empty set.

Doesn't seem that frightening, I s'pose, until you find out it's been logged 15,845 times, no 15,857 times since May 23 of this year.

As an indicator of the success of our JIRA system, it faithfully logs every view of an issue. That's a positive. However, it's a menace and needs to be purged and I'd prefer to fix it than turn the error reporting down to ignore it.

I believe the relevant file is viewissue.jsp, and we do have a customization to this file:

<!-- Table to display ImageNow linking data (not meant for human consumption) -->
<ww:property value="issue">
<ww:property value="./long('id')">
<div id="issuetype-id" style="display: none;"><ww:property value="/issueObject/issueType/string('id')"/></div>
<div id="issueproject-id" style="display: none;"><ww:property value="project/string('id')"/></div>
<table style="display: none;" id="imagenow">
<tr><th valign="top">Issue Key</th><td><ww:property value="/issueObject/key" /></td></tr>
<tr><th valign="top">Department:</th>
<td>
<ww:iterator value="/fieldScreenRenderTabs" status="'status'">
 <ww:iterator value="./fieldScreenRenderLayoutItems">
  <ww:property value="./orderableField">
   <%-- If changing this, see if http://confluence.atlassian.com/display/JIRACOM/Displaying+Custom+Fields+with+no+value needs updating --%>
   <ww:if test="./value(/issueObject) != null && ./customFieldType/descriptor/viewTemplateExists != false"><%-- don't display custom fields with no values --%>
    <ww:property value="/customFieldHtml(../fieldLayoutItem,., /issueObject)" escape="false" />
   </ww:if>
  </ww:property>
 </ww:iterator>
</ww:iterator>
</td>
</tr>
<tr><th valign="top">Component/s:</th>
<td>
<ww:iterator value="/components" status="'componentsStatus'">
 <ww:property value="./string('name')"/><br/>
</ww:iterator>
</td></tr>
<tr><th valign="top">Reporter:</th><td><ww:property value="/issueObject/reporter" /></td></tr>
<tr><th valign="top">Subject</th><td><ww:property value="/issueObject/summary" /></td></tr>
<tr><th valign="top">Created:</th><td><ww:property value="/outlookDate/format(timestamp('created'))"/></td></tr>
<tr><th valign="top">Updated:</th><td><ww:property value="/outlookDate/format(timestamp('updated'))"/></td></tr>
</table>
</ww:property>
</ww:property>

I have also uploaded the actual file: viewissue.jsp.txt

This is the thing: If I remove that part I've put above, which is the customization to the file, I still see the error. There's only one more iterator tag involved:

<div class="issue-body">
    <ww:property value="infoWebPanels">
        <ww:if test=".">
            <ww:iterator value=".">
                <ww:property value="renderHeadlessPanel(.)" escape="false"/>
            </ww:iterator>
        </ww:if>
    </ww:property>
</div>

And I don't notice any problems there either. Is it possible this is involving another file that sits being /browse/ISSUE-#? How do you figure out where it's coming from? How do I resolve this type of error without just turning down error reporting?

1 answer

the warning comes from a null object being passed to the ww iterator.

However your ww:if test="." is not guarding like you would expect. The above ww:propery tag is assuming that you have an object on the stack that has a getInfoWebPanels() method. Is that true.

I always use ./infoWebPanels so its more explcit.

While it should work try changing the test to be ". == null"

Ok, let me VPN in and give that a shot.

Is this the line you were referencing?

<div class="issue-body">
    <ww:property value="./infoWebPanels">
        <ww:if test=".">
            <ww:iterator value=".">
                <ww:property value="renderHeadlessPanel(.)" escape="false"/>
            </ww:iterator>
        </ww:if>
    </ww:property>
</div>

Alright, I tried this and it didn't work, I'm still getting the error. I apologize; I'm not very fluent in JSP and muddle more than anything at this point. I've got to be staring right at it, but I don't necessarily know what I'm looking at.

Is there a DEBUG level I can turn on for a class in the log? Maybe for webwork.view.taglib.IteratorTag?

<div class="issue-body">
    <ww:property value="infoWebPanels">
        <ww:if test=". == null">
            <ww:iterator value=".">
                <ww:property value="renderHeadlessPanel(.)" escape="false"/>
            </ww:iterator>
        </ww:if>
    </ww:property>
</div>

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,510 views 15 20
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you