Menu

#4606 [HHQ-4526] Stacktrace generating breadcrumbs for deleted res

Bug
open
None
5
2012-10-09
2011-01-11
No

http://jira.hyperic.com/browse/HHQ-4526
Still working on a reproduction, but ResourceBreadcrumbTag.isParentOfAutoGroup() can throw an NPE leading to a stacktrace when viewing resources.



The specific error is:



javax.servlet.jsp.JspException: java.lang.NullPointerException at org.hyperic.hq.ui.taglib.ResourceBreadcrumbTag.doStartTag(ResourceBreadcrumbTag.java:104)


...


Caused by:


java.lang.NullPointerException at org.hyperic.hq.ui.taglib.ResourceBreadcrumbTag.isParentOfAutoGroup(ResourceBreadcrumbTag.java:364)



That part of the code is:



            ResourceManagerLocal resourceManager = ResourceManagerEJBImpl.getOne();


            Resource parentResource = resourceManager.findResource(parent.getAppdefEntityId());


            Resource parentOfAutoGroupResource = resourceManager.findResource(new AppdefEntityID(group.getResourceId()));


    


            result = parentResource.equals(parentOfAutoGroupResource);



Parent resource is not null, but the call to resourceManager.findResource(parent.getAppdefEntityId()) returns null leading to an NPE when checking equality.

Discussion

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.