question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error in streaming dynamic resource - p:graphicImage

See original GitHub issue

1) Environment

  • PrimeFaces version: 6.2
  • Application server + version: GlassFish 4.1
  • Affected browsers: Firefox, Chrome

2) Expected behavior

Correctly display all system images.

3) Actual behavior

When I capture a “StreamedContent” the error is displayed in the server logs.

4) Steps to reproduce

Navigate through any screen with the image component.

5) Sample XHTML

<p:graphicImage value="#{gerPagDocImageBean.renderizaImagem}" rendered="#{loginBean.empresa.exibeLogoEmpresa}" width="150" cache="false" />

6) Sample bean

public StreamedContent getRenderizaImagem() throws IOException { FacesContext context = FacesContext.getCurrentInstance(); if (context.getCurrentPhaseId() == PhaseId.RENDER_RESPONSE || this.bytesImagem == null) { return new DefaultStreamedContent(); } InputStream is = new ByteArrayInputStream(this.bytesImagem); DefaultStreamedContent dsc = new DefaultStreamedContent(is); this.bytesImagem = null; return dsc; }

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
tandraschkocommented, Jul 12, 2019

The exception seems unrelated

0reactions
tandraschkocommented, Jul 13, 2019

Not a bug and not related to StreamedContent. Also see: https://issues.apache.org/jira/browse/MYFACES-3736

Read more comments on GitHub >

github_iconTop Results From Across the Web

jsf - p:graphicImage with StreamedContent throws "Error in ...
The problem is when i try to show it on the screen with StreamedContent i get Error in streaming dynamic resource. imageBean: BufferedImage ......
Read more >
p:graphicImage -> Error in streaming dynamic resource
Hi all, I´m trying to get a picture from my hard disk as stream. My test is currently static and I want to...
Read more >
How to use dynamic p:graphicImage with StreamedContent?
I try to use a dynamic p:graphicImage with a StreamedContent object but ... see that the img src attribute is causing a 404...
Read more >
Creating dynamic image streaming programmatically - O'Reilly
The following is an example that renders a PrimeFaces logo that is read with the resource streaming mechanism. <p:graphicImage value="#{dynaImageController.
Read more >
Problemas Renderizar imagem (Error in streaming dynamic ...
Problemas Renderizar imagem (Error in streaming dynamic resource.) 4569 views ... h:graphicImage no lugar de p:graphicImage pra mostrar a imagem. Porém,
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found