We're updating the issue view to help you get more done. 

NullPointerException when trying to access non-existing project

Description

Apparently, any tries to access to non-existing project through an invalid slug causes NullPointerException.

To reproduce :

  1. Click "Projects" at the menu

  2. Click one of the Projects

  3. Click one of the version of the projects

  4. write some invalid things as a project slug on the url

Here is the error trace:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 14:12:24,103 ERROR [org.zanata.exception.handler.AbstractExceptionHandler] (http-0.0.0.0:8080-4) exception happened in view: /iteration/view.xhtml: java.lang.NullPointerException at org.zanata.action.MergeTransAction.setSourceProjectSlug(MergeTransAction.java:115) [classes:] at org.zanata.action.MergeTransAction.setTargetProjectSlug(MergeTransAction.java:106) [classes:] at org.zanata.action.MergeTransAction$Proxy$_$$_WeldClientProxy.setTargetProjectSlug(MergeTransAction$Proxy$_$$_WeldClientProxy.java) [classes:] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_65] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_65] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_65] at java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_65] at javax.el.BeanELResolver.setValue(BeanELResolver.java:383) [jboss-el-api_2.2_spec-1.0.4.Final-redhat-1.jar:1.0.4.Final-redhat-1] at com.sun.faces.el.DemuxCompositeELResolver._setValue(DemuxCompositeELResolver.java:255) [jsf-impl-2.1.28.SP9-redhat-1.jar:2.1.28.SP9-redhat-1] at com.sun.faces.el.DemuxCompositeELResolver.setValue(DemuxCompositeELResolver.java:281) [jsf-impl-2.1.28.SP9-redhat-1.jar:2.1.28.SP9-redhat-1] at org.apache.el.parser.AstValue.setValue(AstValue.java:199) [jbossweb-7.5.15.Final-redhat-1.jar:7.5.15.Final-redhat-1] at org.apache.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:257) [jbossweb-7.5.15.Final-redhat-1.jar:7.5.15.Final-redhat-1] at org.jboss.weld.el.WeldValueExpression.setValue(WeldValueExpression.java:64) [weld-core-1.1.33.Final-redhat-1.jar:1.1.33.Final-redhat-1] at com.sun.faces.facelets.el.TagValueExpression.setValue(TagValueExpression.java:131) [jsf-impl-2.1.28.SP9-redhat-1.jar:2.1.28.SP9-redhat-1] at javax.faces.component.UIInput.updateModel(UIInput.java:822) [jboss-jsf-api_2.1_spec-2.1.28.SP1-redhat-1.jar:2.1.28.SP1-redhat-1] at javax.faces.component.UIViewParameter.updateModel(UIViewParameter.java:288) [jboss-jsf-api_2.1_spec-2.1.28.SP1-redhat-1.jar:2.1.28.SP1-redhat-1] at javax.faces.component.UIInput.processUpdates(UIInput.java:739) [jboss-jsf-api_2.1_spec-2.1.28.SP1-redhat-1.jar:2.1.28.SP1-redhat-1] at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1244) [jboss-jsf-api_2.1_spec-2.1.28.SP1-redhat-1.jar:2.1.28.SP1-redhat-1] at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1244) [jboss-jsf-api_2.1_spec-2.1.28.SP1-redhat-1.jar:2.1.28.SP1-redhat-1] at javax.faces.component.UIViewRoot.processUpdates(UIViewRoot.java:1223) [jboss-jsf-api_2.1_spec-2.1.28.SP1-redhat-1.jar:2.1.28.SP1-redhat-1] at com.sun.faces.lifecycle.UpdateModelValuesPhase.execute(UpdateModelValuesPhase.java:78) [jsf-impl-2.1.28.SP9-redhat-1.jar:2.1.28.SP9-redhat-1] at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [jsf-impl-2.1.28.SP9-redhat-1.jar:2.1.28.SP9-redhat-1] at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) [jsf-impl-2.1.28.SP9-redhat-1.jar:2.1.28.SP9-redhat-1] at org.apache.deltaspike.jsf.impl.listener.request.DeltaSpikeLifecycleWrapper.execute(DeltaSpikeLifecycleWrapper.java:89) [deltaspike-jsf-module-impl-1.5.4.jar:1.5.4] at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593) [jboss-jsf-api_2.1_spec-2.1.28.SP1-redhat-1.jar:2.1.28.SP1-redhat-1] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.5.15.Final-redhat-1.jar:7.5.15.Final-redhat-1] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.15.Final-redhat-1.jar:7.5.15.Final-redhat-1] at org.ocpsoft.rewrite.servlet.RewriteFilter.doFilter(RewriteFilter.java:226) [rewrite-servlet-3.0.0.Alpha10.jar:3.0.0.Alpha10] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.5.15.Final-redhat-1.jar:7.5.15.Final-redhat-1] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.15.Final-redhat-1.jar:7.5.15.Final-redhat-1] at org.zanata.servlet.DuplicateParamFilter.doFilter(DuplicateParamFilter.java:66) [classes:] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.5.15.Final-redhat-1.jar:7.5.15.Final-redhat-1] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.15.Final-redhat-1.jar:7.5.15.Final-redhat-1] at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:832) [jbossweb-7.5.15.Final-redhat-1.jar:7.5.15.Final-redhat-1] at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:620) [jbossweb-7.5.15.Final-redhat-1.jar:7.5.15.Final-redhat-1] at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:553) [jbossweb-7.5.15.Final-redhat-1.jar:7.5.15.Final-redhat-1] at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:482) [jbossweb-7.5.15.Final-redhat-1.jar:7.5.15.Final-redhat-1] at org.ocpsoft.rewrite.servlet.impl.HttpRewriteResultHandler.handleResult(HttpRewriteResultHandler.java:42) [rewrite-servlet-3.0.0.Alpha10.jar:3.0.0.Alpha10] at org.ocpsoft.rewrite.servlet.RewriteFilter.rewrite(RewriteFilter.java:297) [rewrite-servlet-3.0.0.Alpha10.jar:3.0.0.Alpha10] at org.ocpsoft.rewrite.servlet.RewriteFilter.doFilter(RewriteFilter.java:198) [rewrite-servlet-3.0.0.Alpha10.jar:3.0.0.Alpha10] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.5.15.Final-redhat-1.jar:7.5.15.Final-redhat-1] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.15.Final-redhat-1.jar:7.5.15.Final-redhat-1] at org.zanata.servlet.DuplicateParamFilter.doFilter(DuplicateParamFilter.java:66) [classes:] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.5.15.Final-redhat-1.jar:7.5.15.Final-redhat-1] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.15.Final-redhat-1.jar:7.5.15.Final-redhat-1] at org.zanata.servlet.JavaMelodyFilter.doFilter(JavaMelodyFilter.java:65) [classes:] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.5.15.Final-redhat-1.jar:7.5.15.Final-redhat-1] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.15.Final-redhat-1.jar:7.5.15.Final-redhat-1] at org.zanata.servlet.CacheControlFilter.doFilter(CacheControlFilter.java:36) [classes:] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.5.15.Final-redhat-1.jar:7.5.15.Final-redhat-1] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.15.Final-redhat-1.jar:7.5.15.Final-redhat-1] at org.zanata.servlet.MDCInsertingServletFilter.doFilter(MDCInsertingServletFilter.java:76) [classes:] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.5.15.Final-redhat-1.jar:7.5.15.Final-redhat-1] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.15.Final-redhat-1.jar:7.5.15.Final-redhat-1] at org.zanata.servlet.RequestLoggingFilter.doFilter(RequestLoggingFilter.java:88) [classes:] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.5.15.Final-redhat-1.jar:7.5.15.Final-redhat-1] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.15.Final-redhat-1.jar:7.5.15.Final-redhat-1] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231) [jbossweb-7.5.15.Final-redhat-1.jar:7.5.15.Final-redhat-1] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.5.15.Final-redhat-1.jar:7.5.15.Final-redhat-1] at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.5.7.Final-redhat-3.jar:7.5.7.Final-redhat-3] at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.5.7.Final-redhat-3.jar:7.5.7.Final-redhat-3] at org.jboss.security.negotiation.NegotiationAuthenticator$WrapperValve.invoke(NegotiationAuthenticator.java:492) [jboss-negotiation-common-2.3.11.Final-redhat-1.jar:2.3.11.Final-redhat-1] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:420) [jbossweb-7.5.15.Final-redhat-1.jar:7.5.15.Final-redhat-1] at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.5.7.Final-redhat-3.jar:7.5.7.Final-redhat-3] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:150) [jbossweb-7.5.15.Final-redhat-1.jar:7.5.15.Final-redhat-1] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.5.15.Final-redhat-1.jar:7.5.15.Final-redhat-1] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.5.15.Final-redhat-1.jar:7.5.15.Final-redhat-1] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344) [jbossweb-7.5.15.Final-redhat-1.jar:7.5.15.Final-redhat-1] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:854) [jbossweb-7.5.15.Final-redhat-1.jar:7.5.15.Final-redhat-1] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654) [jbossweb-7.5.15.Final-redhat-1.jar:7.5.15.Final-redhat-1] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:926) [jbossweb-7.5.15.Final-redhat-1.jar:7.5.15.Final-redhat-1] at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_65]

Environment

None

Status

Assignee

ArmE

Reporter

ArmE

Sprint

None

Fix versions

Priority

unspecified