Erro abaixo:
javax.servlet.ServletException: org.hibernate.exception.DataException: Bad value for type timestamp/date/time: {1}
javax.faces.webapp.FacesServlet.service(FacesServlet.java:606)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
root cause
javax.persistence.PersistenceException: org.hibernate.exception.DataException: Bad value for type timestamp/date/time: {1}
org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1377)
org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1300)
org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:266)
org.hibernate.ejb.criteria.CriteriaQueryCompiler$3.getResultList(CriteriaQueryCompiler.java:254)
br.com.caelum.livraria.dao.DAO.listaTodos(DAO.java:59)
br.com.caelum.livraria.bean.LivroBean.getLivros(LivroBean.java:39)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
javax.el.BeanELResolver.getValue(BeanELResolver.java:97)
com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
org.apache.el.parser.AstValue.getValue(AstValue.java:169)
org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:184)
com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)
javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194)
javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:182)
javax.faces.component.UIData.getValue(UIData.java:730)
javax.faces.component.UIData.getDataModel(UIData.java:1795)
javax.faces.component.UIData.setRowIndexWithoutRowStatePreserved(UIData.java:483)
javax.faces.component.UIData.setRowIndex(UIData.java:472)
com.sun.faces.renderkit.html_basic.TableRenderer.encodeBegin(TableRenderer.java:82)
javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:820)
javax.faces.component.UIData.encodeBegin(UIData.java:1117)
javax.faces.component.UIComponent.encodeAll(UIComponent.java:1777)
javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782)
javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782)
com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:437)
com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:124)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
Código manageBean
@Entity public class Livro {
@Id
@GeneratedValue
private Integer id;
private String titulo;
private String isbn;
private double preco;
@Temporal(TemporalType.DATE)
private Calendar dataLancamento = Calendar.getInstance();
JSF
<fieldset>
<legend>Dados do Livro</legend>
<h:panelGrid columns="2">
<h:outputLabel value="Titulo:" for="titulo" />
<h:inputText id="titulo" value="#{livroBean.livro.titulo}" />
<h:outputLabel value="ISBN:" for="isbn" />
<h:inputText id="isbn" value="#{livroBean.livro.isbn}" />
<h:outputLabel value="Preço:" for="preco" />
<h:inputText id="preco" value="#{livroBean.livro.preco}" />
<h:outputLabel value="Data de Lançamento:" for="dataLancamento" />
<h:inputText id="dataLancamento"
value="#{livroBean.livro.dataLancamento.time}">
<f:convertDateTime pattern="dd/MM/yyyy" timeZone="America/Sao_Paulo" />
</h:inputText>
</h:panelGrid>
</fieldset>
DataTable
<h:dataTable id="tabelaLivros" value="#{livroBean.livros}" var="livro">
<h:column>
<f:facet name="header">Título</f:facet>
<h:outputText value="#{livro.titulo}" />
</h:column>
<h:column>
<f:facet name="header">ISBN</f:facet>
<h:outputText value="#{livro.isbn}" />
</h:column>
<h:column>
<f:facet name="header">Preço</f:facet>
<h:outputText value="#{livro.preco}" />
</h:column>
<h:column>
<f:facet name="header">Data</f:facet>
<h:outputText value="#{livro.dataLancamento.time}" >
<f:convertDateTime pattern="dd/MM/yyyy" timeZone="America/Sao_Paulo" />
</h:outputText>
</h:column>
</h:dataTable>