Why are we getting nullPointer errors when hovering over specific RRC artifact type?
When hovering over artifacts there's one artifact type, Software Requirement, that returns the NullPointer error below in the hover box. Artifact opens fine, just the hover is the issue. Other artifact types, Requirement and Approach Docs, hover correctly so it's confined to this artifact type only.
Any idea how to debug this? Was the artifact type not setup correctly?
Error 500: Internal Server Error
java.lang.NullPointerException (More info found at entry [37fee6c247e79589] in the RM application server log)
Checking the rm.log on the server I see this error several times:
2014-02-21 10:06:07,265 [ http-bio-9449-exec-5] ERROR ng.server.services.requirements.RequirementService - Server Error: Entry [3aff1a13d623cf0c]
java.lang.NullPointerException
at com.ibm.rdm.fronting.server.compact.internal.loader.DataLoader.formatValueFromQuery(DataLoader.java:346)
at com.ibm.rdm.fronting.server.compact.internal.loader.ArtifactDataLoader.loadAttribute(ArtifactDataLoader.java:197)
at com.ibm.rdm.fronting.server.compact.internal.loader.ArtifactDataLoader.loadAttributesFromSparql(ArtifactDataLoader.java:171)
at com.ibm.rdm.fronting.server.compact.internal.loader.ArtifactDataLoader.loadAttributes(ArtifactDataLoader.java:105)
at com.ibm.rdm.fronting.server.compact.internal.loader.ArtifactDataLoader.load(ArtifactDataLoader.java:72)
at com.ibm.rdm.fronting.server.compact.internal.info.ArtifactCompactInfo.loadFullData(ArtifactCompactInfo.java:64)
at com.ibm.rdm.fronting.server.compact.internal.html.HtmlCompactRenderer.processForCompactHtmlRendering(HtmlCompactRenderer.java:87)
at com.ibm.rdm.fronting.server.compact.internal.html.HtmlCompactRenderer.handleGET(HtmlCompactRenderer.java:74)
at com.ibm.rdm.fronting.server.compact.internal.html.HtmlCompactRenderer.handle(HtmlCompactRenderer.java:43)
at com.ibm.rdm.fronting.server.compact.internal.CompactRenderingHandler.handleCompactRenderingRequest(CompactRenderingHandler.java:115)
at com.ibm.rdm.fronting.server.compact.internal.CompactRenderingHandler.doGetInternal(CompactRenderingHandler.java:78)
at com.ibm.rdm.fronting.server.core.internal.RRSRestServiceBase.runInternalMethod(RRSRestServiceBase.java:683)
at com.ibm.rdm.fronting.server.core.internal.RRSRestServiceBase.handleMethod(RRSRestServiceBase.java:611)
at com.ibm.rdm.fronting.server.core.internal.RRSRestServiceBase.doGet(RRSRestServiceBase.java:123)
at com.ibm.rdm.fronting.server.core.internal.RRSRestServiceBase.performService(RRSRestServiceBase.java:330)
at com.ibm.rdm.fronting.server.core.internal.RRSRestServiceBase.service(RRSRestServiceBase.java:214)
at com.ibm.team.jfs.app.servlet.AppContainerServlet.dispatchRequest(AppContainerServlet.java:155)
at com.ibm.team.jfs.app.servlet.AppContainerServlet.service(AppContainerServlet.java:281)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:126)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:76)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.eclipse.equinox.servletbridge.BridgeServlet.service(BridgeServlet.java:120)
at com.ibm.team.repository.server.servletbridge.JazzServlet.service(JazzServlet.java:68)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.ibm.team.repository.server.servletbridge.BridgeFilter.processDelegate(BridgeFilter.java:133)
at com.ibm.team.repository.server.servletbridge.BridgeFilter.doFilter(BridgeFilter.java:154)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:309)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
at java.lang.Thread.run(Thread.java:738)
2014-02-21 10:06:14,472 [ http-bio-9449-exec-9] INFO om.ibm.rdm.fronting.server.util.ProjectAreaService - CRRRS5209W The RM functional user was not found using OAuthHelper.
Accepted answer
Comments
That was it...it references an enumeration that had values deleted at some point.
Do you know if there's a workaround prior to migrating them to a new release?
Michael,
Michael - as you discovered, NPEs are caused by pointers to invalid data - in this case an enumeration selection that no longer exists. Your only option is to change the value of the enumeration to one that does exist (or add a new one and then change the selection).
Any time you are going to remove a selection from an enumeration you should first do a query for any work items using that selection and change them to a valid selection before deleting the invalid one.
Note that version 4.0.3 and 4.0.4 now trap a number of NPEs, so it's possible that upgrading might actually make the error go away. However, you will still have bad data that I recommend fixing.
Thanks for the advice. I'll have them look for the artifacts referencing the removed enumeration values and update them.
What I did to expose bad enumerations is I created a series of queries covering all enumerations (you won't fit them all in one query). I selected "is not" and then checked all the options. Also make sure you add the fields to the display so you can easily spot the bad data (it generally replaces your bad enumeration with something like "something.something.something.number").
One other answer
In one of your answers, you mentioned the "ScanForInvalidAttributeReferences" tool. How can I use it? Is this tool part of RM application?
thank you.
Comments
Hi Luiz,