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?
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"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.