Search This Blog

Wednesday, July 25, 2018

Warning Message cannot validate component with empty value

"BeanValidator W cannot validate component with empty value: xxxComponent" is generated in server console logs coming from javax.faces.validator.BeanValidator class with JSF2.1 for multiple components. 

Error Messages

BeanValidator W cannot validate component with empty value: xxxComponent

Steps to Reproduce

Use any component without binding to bean variable and use the value from FacesContext, RequestParameterMap in bean or phase listener

Root Cause

A third-party product issue with Trinidad. This happens when the Trinidad tag is missing the value attribute. The value attribute binds between the input and the bean.  

Resolution

On binding the component with bean variable, the warning message does not appear in the logs. 

If there are no functionality issues while executing the custom use case then these warning messages can be ignored. Alternatively, the logging can be configured to Severe level such that it is not logged in the server log. Configuring warning message related to JSF2 has been documented in Chordiant_JSF guide, page number-46. Refer the below text snippet: 

Note: To disable JSF 2.0 warnings from displaying at the server startup, add the properties org.apache.myfaces.level = SEVERE and javax.faces.validator.level = SEVERE in the default Java logging.properties file located in JAVA_HOME/jre/lib. 

No comments: