Jump to content
Changes to the Jaspersoft community edition download ×

Error in PDF with dynamic image


lion_b1

Recommended Posts

Hello,

 

when I run my PDF report in a WebWork web-application

it generates a "Error loading byte data" exception.

The report includes a png image with a chart that will be generated dynamically.

 

The error occurs only on the production server.

When I run the application on my local test-server, the pdf with the image will be generated correctly.

 

When I try the link that generates the pdf

(http://www.myhost.de:80/jsp/statistics/sp/exportSPStatGraph.action;jsessionid=BE64DF7F30DCE3F82366526709D06897?width=515&height=300=

on the production server the png will be displayed in the browser correctly as well.

 

Can this be a timing problem?

(Caused by: java.net.ConnectException: Connection timed out: connect)

 

I tried to change the image tag attribute "lazy" true or false with no success.

 

Any suggestions are highly appreciated.

 

Thanks.

 

Bernhard

 

Here the stack trace:

 

 

 

2007-06-13 04:11:54,359 ERROR JasperReportsResult:Error building report for uri C:Program Filesapache-tomcat-5.5.17webappsROOTJasperReportsspSPStatisticChart.jasper

net.sf.jasperreports.engine.JRException: Error loading byte data : http://www.myhost.de:80/jsp/statistics/sp/exportSPStatGraph.action;jsessionid=BE64DF7F30DCE3F82366526709D06897?width=515&height=300

at net.sf.jasperreports.engine.util.JRLoader.loadBytes(JRLoader.java:349)

at net.sf.jasperreports.engine.JRImageRenderer.getInstance(JRImageRenderer.java:265)

at net.sf.jasperreports.engine.fill.JRFillImage.evaluateImage(JRFillImage.java:467)

at net.sf.jasperreports.engine.fill.JRFillImage.resolveElement(JRFillImage.java:709)

at net.sf.jasperreports.engine.fill.JRFillElement.resolveElement(JRFillElement.java:875)

at net.sf.jasperreports.engine.fill.JRBaseFiller.resolveBoundElements(JRBaseFiller.java:1122)

at net.sf.jasperreports.engine.fill.JRBaseFiller.resolveBoundElements(JRBaseFiller.java:1147)

at net.sf.jasperreports.engine.fill.JRBaseFiller.resolveReportBoundElements(JRBaseFiller.java:1157)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillSummary(JRVerticalFiller.java:873)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportEnd(JRVerticalFiller.java:263)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:120)

at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:767)

at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:690)

at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:89)

at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:601)

at de.telenet.stdappl.views.jasperreports.JasperReportsResult.doExecute(Unknown Source)

at com.opensymphony.webwork.dispatcher.WebWorkResultSupport.execute(WebWorkResultSupport.java:101)

at com.opensymphony.xwork.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:312)

at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:207)

at de.telenet.stdappl.interceptors.AroundInterceptor.intercept(Unknown Source)

at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:189)

at com.opensymphony.xwork.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:137)

at com.opensymphony.xwork.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:81)

at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:189)

at com.opensymphony.xwork.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:115)

at com.opensymphony.xwork.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:81)

at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:189)

at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)

at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:189)

at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)

at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:189)

at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)

at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:189)

at com.opensymphony.webwork.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:171)

at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:189)

at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)

at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:189)

at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)

at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:189)

at com.opensymphony.xwork.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:151)

at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:189)

at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)

at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:189)

at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)

at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:189)

at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)

at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:189)

at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)

at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:189)

at de.telenet.stdappl.interceptors.ExceptionMappingInterceptor.intercept(Unknown Source)

at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:189)

at de.telenet.stdappl.interceptors.AuthenticationInterceptor.intercept(Unknown Source)

at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:189)

at com.opensymphony.xwork.DefaultActionProxy.execute(DefaultActionProxy.java:113)

at com.opensymphony.webwork.dispatcher.DispatcherUtils.serviceAction(DispatcherUtils.java:233)

at com.opensymphony.webwork.dispatcher.ServletDispatcher.service(ServletDispatcher.java:111)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

at org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)

at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)

at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:833)

at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:639)

at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1285)

at java.lang.Thread.run(Thread.java:595)

Caused by: java.net.ConnectException: Connection timed out: connect

at java.net.PlainSocketImpl.socketConnect(Native Method)

at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)

at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)

at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)

at java.net.Socket.connect(Socket.java:516)

at java.net.Socket.connect(Socket.java:466)

at sun.net.NetworkClient.doConnect(NetworkClient.java:157)

at sun.net.www.http.HttpClient.openServer(HttpClient.java:365)

at sun.net.www.http.HttpClient.openServer(HttpClient.java:477)

at sun.net.www.http.HttpClient.<init>(HttpClient.java:214)

at sun.net.www.http.HttpClient.New(HttpClient.java:287)

at sun.net.www.http.HttpClient.New(HttpClient.java:299)

at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:796)

at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:748)

at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:673)

at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:917)

at java.net.URL.openStream(URL.java:1007)

at net.sf.jasperreports.engine.util.JRLoader.loadBytes(JRLoader.java:335)

... 75 more

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hello,

 

I found out the reason for the problem.

The request for the image (http://www.myhost.de:80/jsp/statistics/sp/exportSPStatGraph.action)

needs to be changed to the local server address:

http://localhost:80/jsp/statistics/sp/exportSPStatGraph.action

 

Because a http-proxy is involved in the communications from outside, this proxy was not reachable from the webserver...

 

 

Kind regards,

 

Bernhard

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...