It's all about the answers!

Ask a question

Why are we getting nullPointer errors when hovering over specific RRC artifact type?


Michael Walker (99215201157) | asked Feb 21 '14, 1:35 p.m.
Customer is on RRC 4.0.2, backend DB2 v9.7 db

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


permanent link
Mike Jaworski (1.4k6) | answered Feb 21 '14, 3:10 p.m.
JAZZ DEVELOPER
 Hi Michael,

It looks a lot like you are running into the issue defined by the RM defect Error 500 when hovering on an artifact that has a list attribute and a value has been deleted of the list. (74475). Can you confirm that the artifact type of the artifact which exhibits this failure (Software Requirement) references an enumerated attribute? Maybe a bit more of a reach, but could you confirm that the enumerated attribute might have been edited at some point in time so that some of the enum values were deleted? 

This defect is fixed in RRC 4.0.3, so I would recommend an upgrade to that release in order to resolve this issue.

Hope this helps!
Mike Jaworski
Michael Walker selected this answer as the correct answer

Comments
Michael Walker commented Feb 21 '14, 4:37 p.m.

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?


Mike Jaworski commented Feb 21 '14, 5:24 p.m.
JAZZ DEVELOPER

Michael,


Unfortunately I can't think of an easy way to work around this problem, unless you wanted to remove that enumerated attribute from the affected artifact type. By doing this, you should be bale to avoid the 500 error, but you run the risk of losing the data which this enum attribute references ... (Note: I THINK you should be able to remove this attribute from the artifact type and then add it back at a later time without losing the data, but I'm not 100% positive)

If this issue is bad enough for you to open a PMR through Rational Support, there is a diagnostic tool which might be able to help you out. The tool is called "ScanForInvalidAttributeReferences" and it should be able to scan your project and log the artifacts which are affected by this deleted enum value. If the problem is not very wide-spread, then there are some steps that could be taken to correct these affected artifacts through this tool. All the same, my best suggestion would still be the upgrade to (at least) 4.0.3. 


Mike Shkolnik commented Feb 21 '14, 6:08 p.m.

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.


Michael Walker commented Feb 23 '14, 11:00 p.m.

Thanks for the advice. I'll have them look for the artifacts referencing the removed enumeration values and update them.


Mike Shkolnik commented Feb 24 '14, 12:23 p.m.

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



permanent link
LUIZ DE ALMEIDA (23016192) | answered Aug 27 '14, 9:49 p.m.
Hi Michael,

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
Mike Jaworski commented Aug 28 '14, 8:46 a.m.
JAZZ DEVELOPER

 Hi Luiz,


The ScanForInvalidAttributeReferences tool is not a native part of the application. This tool is maintained by Rational Support, so you will need to open a PMR through Support in order to access this tool. Once you are granted access to the tool, there is a readme file within the deliverable which should (hopefully) clearly describe how to use the tool.

Hope this helps,
Mike

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.