Adverts
The cryptic error message "javax.servlet.ServletException: Error testing property 'foo' in bean of type null" may leave you stumped - I know it did me. I managed compound the problem by have a field called foo in both the bean I was setting parameters in and the one I was going to later get resutls from but that's another story. The problem was simply that I was attempting to set a value in container managed bean that I had forgotten to enter the definition for in the faces config file. Hence the bean was never created and so it reports a type of null.
javax.servlet.ServletException: Error testing property 'foo' in bean of type null javax.faces.webapp.FacesServlet.service(FacesServlet.java:209) org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter (MonitorFilter.java:362) root cause javax.faces.el.PropertyNotFoundException: Error testing property 'foo' in bean of type null com.sun.faces.el.PropertyResolverImpl.getType(PropertyResolverImpl.java:342) com.sun.faces.el.impl.ArraySuffix.getType(ArraySuffix.java:240) com.sun.faces.el.impl.ComplexValue.getType(ComplexValue.java:208) com.sun.faces.el.ValueBindingImpl.getType(ValueBindingImpl.java:345) com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getConvertedValue (HtmlBasicInputRenderer.java:111) javax.faces.component.UIInput.getConvertedValue(UIInput.java:713) javax.faces.component.UIInput.validate(UIInput.java:638) javax.faces.component.UIInput.executeValidate(UIInput.java:849) javax.faces.component.UIInput.processValidators(UIInput.java:412) javax.faces.component.UIForm.processValidators(UIForm.java:170) javax.faces.component.UIComponentBase.processValidators (UIComponentBase.java:912) javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:342) com.sun.faces.lifecycle.ProcessValidationsPhase.execute (ProcessValidationsPhase.java:78) com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200) com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90) javax.faces.webapp.FacesServlet.service(FacesServlet.java:197) org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter (MonitorFilter.java:362)