Pessoal estou tentando exibir essa imagem BLOB do banco em minha página:
<h:outputText value="Imagem " />
<p:graphicImage value="#{noticiaBean.noticia.imagem.imagemContent}" />
public StreamedContent getImagemContent() throws SystemException, FileNotFoundException{
return new DefaultStreamedContent(new ByteArrayInputStream(arquivo), "image/jpeg");
}
Ao renderizar a página o erro é retornado:
java.lang.IllegalStateException: CDATA tags may not nest
at com.sun.faces.renderkit.html_basic.HtmlResponseWriter.startCDATA(HtmlResponseWriter.java:681)
at javax.faces.context.ResponseWriterWrapper.startCDATA(ResponseWriterWrapper.java:179)
at javax.faces.context.PartialResponseWriter.startError(PartialResponseWriter.java:341)
at org.primefaces.context.PrimePartialResponseWriter.startError(PrimePartialResponseWriter.java:190)
Alguém pode me dar uma luz?