It's all about the answers!

Ask a question

Null pointer exception seen when u try to start a review process


Manjiri Kamat (5132225) | asked Feb 04 '13, 3:09 a.m.
edited Feb 04 '13, 3:15 a.m.
On RAM 7511 when we do the step 11 we get a NPE. I have added the process details in the comment.

The logs are
[02/04/13 08:00:02 GMT] CRRAM0001E  251332986 ERROR web pagecode.error.Error                  - 156FE100-E54B-2492-ECA8-D0C24C94EDAD - URL: https://usaxram022ccxra.ccmp.ibm.lab/cloud/enterprise/ram/assetDetail/assetReview.faces - javax.faces.FacesException: #{pc_AssetReview.doStartReview}: java.lang.NullPointerException
        at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:118)
        at javax.faces.component.UICommand.broadcast(UICommand.java:387)
        at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:458)
        at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:763)
        at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
        at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
        at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1657)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1597)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:131)
        at com.ibm.ram.repository.web.security.RAMServletFilter.doFilter(RAMServletFilter.java:529)
        at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
        at com.ibm.ram.repository.web.filters.CSRFSecurityFilter.doFilter(CSRFSecurityFilter.java:66)
        at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
        at com.ibm.ram.repository.web.filters.JavascriptSecurityFilter.doFilter(JavascriptSecurityFilter.java:29)
        at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
        at com.ibm.ram.repository.web.filters.GZipFilter.doFilter(GZipFilter.java:45)
        at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
        at com.ibm.ram.repository.web.filters.GZipFilter.doFilter(GZipFilter.java:45)
        at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
        at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:934)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:502)
        at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:181)
        at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3944)
        at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)
        at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:931)
        at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1592)
        at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
        at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
        at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
        at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
        at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
        at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
        at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
        at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
        at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
        at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1646)
Caused by: javax.faces.el.EvaluationException: java.lang.NullPointerException
        at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:108)
        at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
        ... 44 more
Caused by: java.lang.NullPointerException
        at com.ibm.ram.repository.review.Utilities.addUsersOfRelationship(Utilities.java:205)
        at com.ibm.ram.repository.review.Utilities.addReviewers(Utilities.java:169)
        at com.ibm.ram.repository.review.ramdefault.RAMDefaultReviewProcess.notifyStateChange(RAMDefaultReviewProcess.java:756)
        at com.ibm.ram.repository.review.ReviewManager.notifyStateChange(ReviewManager.java:629)
        at com.ibm.ram.repository.review.ReviewManager.primChangeState(ReviewManager.java:438)
        at com.ibm.ram.repository.review.ReviewManager.processStateChange(ReviewManager.java:888)
        at com.ibm.ram.repository.review.ReviewManager.processStateChange(ReviewManager.java:692)
        at com.ibm.ram.repository.review.ReviewManager.processStateChange(ReviewManager.java:666)
        at pagecode.assetDetail.AssetReview.doStartReview(AssetReview.java:1880)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:611)
        at org.apache.el.parser.AstValue.invoke(AstValue.java:159)
        at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
        at org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:67)
        at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:94)
        ... 45 more

Could you tell me how we can resolve this issue?

Comments
Manjiri Kamat commented Feb 04 '13, 3:16 a.m. | edited Feb 04 '13, 3:17 a.m.

On RAM 7.2 we used the following steps to do a review process.
1. Log into RAM as RAM Admin.
2. Navigate to RAM Asset page and click Submit an asset
3.Key in the required field and select developer community Version field should be updated with the appropriate entry.
4. Click the More options. It opens the upload function
5. Select basic method. Then specify the location of the file. File gets selected from the specified location which you selected from Browse option.
6.Click Save button All the selections works fine.
7.Observe the state of asset. Asset in Draft state
8. Submit for approval and then click Apply. Asset state update to Review
"10. From the left bar, select Review.
11. On Review page, click Actions->Start Review
12. Perform the asset review. Click Actions->Claim Review.
13. To accept changes, click Accept on Review page.
14. Navigate to the asset page. Click Review to the Evaluate Review page. Click Accept to approve the asset. " Verify that the asset is now in Approved state.


Rajat Singh commented Feb 04 '13, 3:26 a.m.

What is the WAS server version in use? 


Manjiri Kamat commented Feb 04 '13, 3:32 a.m.

We are using WAS 7.0.0.25.

One answer



permanent link
Rich Kulp (3.6k38) | answered Feb 04 '13, 11:35 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
This looks like one of the reviewers for this asset doesn't exist. The code has a bug in it that it doesn't verify that the reviewer recorded in the review process is a valid user. It could of been a user that no longer exists or has had their userid changed.

I don't know how to fix the problem. The reviewer needs to be removed but I don't think the review manager or repo admin will be able to get the asset's review configuration to remove the bad reviewer.


Comments
Manjiri Kamat commented Feb 05 '13, 12:12 a.m.

Hi Rich,

We have three user groups defined for this community ,out of which one has been given the Information Reviewer role and has three users in it.
These users do exist in RAM(checked db details),but still i get the NPE.

I checked the code i saw that it tried to fetch some root users there.
What are these root users?



Rich Kulp commented Feb 05 '13, 10:48 a.m.
FORUM MODERATOR / JAZZ DEVELOPER

It wasn't usergroups giving the problem. It was users. It was a specific user assigned as an explicit reviewer in the review process of that asset. Usergroups are handled on a different line of code and so they were not causing the problem.

The bug is it doesn't handle a user being assigned explicitly as a reviewer in the review process but that user no longer in the database.


Manjiri Kamat commented Feb 06 '13, 5:14 a.m.

Hi Rich,

I noticed that the user count in the individual reviewer section is shown as 1,but there is no valid name against it,it is blank.
I believe this could be causing the issue.I tried to remove it but that does not work,the page is just reloaded.

Can you tell me how i can remove /update this invalid entry?


Rich Kulp commented Feb 06 '13, 10:23 a.m.
FORUM MODERATOR / JAZZ DEVELOPER

Unfortunately I don't have an answer. That data is obsolete in the database and the code does not know how to handle it. There is no way to access it to remove it.


Manjiri Kamat commented Feb 08 '13, 12:08 a.m.

Hi Rich,

We fixed the issue by recreating the review process all over again.

Thanks.

Your answer


Register or to post your answer.