HTTP Status 500 - javax.el.PropertyNotWritableException: /livro.xhtml @32,51 value="#{livroBean.autorId}": Property 'autorId' not writable on type br.com.caelum.livraria.bean.LivroBean
type Exception report
message javax.el.PropertyNotWritableException: /livro.xhtml @32,51 value="#{livroBean.autorId}": Property 'autorId' not writable on type br.com.caelum.livraria.bean.LivroBean
description The server encountered an internal error that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: javax.el.PropertyNotWritableException: /livro.xhtml @32,51 value="#{livroBean.autorId}": Property 'autorId' not writable on type br.com.caelum.livraria.bean.LivroBean
javax.faces.webapp.FacesServlet.service(FacesServlet.java:606)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
root cause
javax.faces.component.UpdateModelException: javax.el.PropertyNotWritableException: /livro.xhtml @32,51 value="#{livroBean.autorId}": Property 'autorId' not writable on type br.com.caelum.livraria.bean.LivroBean
javax.faces.component.UIInput.updateModel(UIInput.java:853)
javax.faces.component.UIInput.processUpdates(UIInput.java:735)
javax.faces.component.UIForm.processUpdates(UIForm.java:281)
javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1242)
javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1242)
javax.faces.component.UIViewRoot.processUpdates(UIViewRoot.java:1228)
com.sun.faces.lifecycle.UpdateModelValuesPhase.execute(UpdateModelValuesPhase.java:78)
com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
root cause
javax.el.PropertyNotWritableException: /livro.xhtml @32,51 value="#{livroBean.autorId}": Property 'autorId' not writable on type br.com.caelum.livraria.bean.LivroBean
com.sun.faces.facelets.el.TagValueExpression.setValue(TagValueExpression.java:136)
javax.faces.component.UIInput.updateModel(UIInput.java:818)
javax.faces.component.UIInput.processUpdates(UIInput.java:735)
javax.faces.component.UIForm.processUpdates(UIForm.java:281)
javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1242)
javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1242)
javax.faces.component.UIViewRoot.processUpdates(UIViewRoot.java:1228)
com.sun.faces.lifecycle.UpdateModelValuesPhase.execute(UpdateModelValuesPhase.java:78)
com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
note The full stack trace of the root cause is available in the Apache Tomcat/8.0.26 logs.
Apache Tomcat/8.0.26