Jump to content

Recommended Posts

Posted

Hi,

I defined a report with studio that includes a google map with some markers in the summary section. When I connect to the web interface of jasperserver (jasperreports-server-cp-6.1.1), I can run my report and I have the map displayed on my screen.

My problem is that when I try to generate a pdf a get an error and a stack trace below. When I put the faulty URL in a browser running on the server, I get again the map on the screen without any problem. Any idea ?

Thanks

Lionel

2015-11-27 08:54:54,890 ERROR errorPage_jsp,http-nio-8080-exec-3:583 - stack trace of exception that redirected to errorPage.jspjava.lang.RuntimeException: net.sf.jasperreports.engine.JRRuntimeException: net.sf.jasperreports.engine.JRException: Error opening input stream from URL: http://maps.google.com/maps/api/staticmap?center=25.0,45.0&size=556x600&zoom=5&maptype=roadmap&format=png&scale=1&markers=color:0xFF0000%7C24.68773,46.72185&markers=color:0xFF0000%7C21.54238,39.19797&markers=color:0xFF0000%7C19.0,40.0&markers=color:0xFFC800%7C26.43442,50.10326&markers=color:0xFFC800%7C28.3998,36.57151&markers=color:0xFFC800%7C24.46861,39.61417&markers=color:0xFFC800%7C21.42664,39.82563&markers=color:0x00FF00%7C16.88917,42.55111&markers=color:0x00FF00%7C21.27028,40.41583&markers=color:0x00FF00%7C26.27944,50.20833&markers=color:0x00FF00%7C24.08912,38.06374&markers=color:0x00FF00%7C26.32599,43.97497&markers=color:0x00FF00%7C17.49326,44.12766&markers=color:0x00FF00%7C18.3,42.73333&markers=color:0x00FF00%7C18.21639,42.50528&markers=color:0x00FF00%7C20.01288,41.46767&markers=color:0x00FF00%7C18.02896,43.12061&markers=color:0x00FF00%7C17.72285,42.25261&markers=color:0x00FF00%7C18.19974,42.87328&markers=color:0x0000FF%7C26.64389,50.15917&markers=color:0x0000FF%7C20.49173,45.15665&markers=color:0x0000FF%7C27.52188,41.69073&markers=color:0x0000FF%7C27.48055,47.87371&markers=color:0x0000FF%7C16.59601,42.94435&markers=color:0x0000FF%7C18.95353,42.17026&markers=color:0x0000FF%7C27.1,44.13333&markers=color:0x0000FF%7C24.73333,42.91667&markers=color:0x0000FF%7C17.96361,43.60417&markers=color:0x0000FF%7C29.96974,40.20641&markers=color:0x0000FF%7C26.28864,50.11396&markers=color:0x0000FF%7C28.43279,45.97077&markers=color:0x0000FF%7C26.64986,49.95223&markers=color:0x0000FF%7C26.64986,49.95223&sensor=false&language=en.    at net.sf.jasperreports.components.map.MapElementPdfHandler.exportElement(MapElementPdfHandler.java:55)    at net.sf.jasperreports.engine.export.JRPdfExporter.exportGenericElement(JRPdfExporter.java:2892)    at net.sf.jasperreports.engine.export.JRPdfExporter.exportElements(JRPdfExporter.java:1011)    at net.sf.jasperreports.engine.export.JRPdfExporter.exportPage(JRPdfExporter.java:962)    at net.sf.jasperreports.engine.export.JRPdfExporter.exportReportToStream(JRPdfExporter.java:826)    at net.sf.jasperreports.engine.export.JRPdfExporter.exportReport(JRPdfExporter.java:525)    at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.exportToPdf(EngineServiceImpl.java:571)    at com.jaspersoft.jasperserver.war.action.ReportPdfExporter.export(ReportPdfExporter.java:66)    at com.jaspersoft.jasperserver.war.action.AbstractReportExporter.exportBuffered(AbstractReportExporter.java:191)    at com.jaspersoft.jasperserver.war.action.AbstractReportExporter.export(AbstractReportExporter.java:98)    at com.jaspersoft.jasperserver.war.action.ReportExporterAction.export(ReportExporterAction.java:158)    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)...    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)    at java.lang.Thread.run(Thread.java:745)Caused by: net.sf.jasperreports.engine.JRRuntimeException: net.sf.jasperreports.engine.JRException: Error opening input stream from URL: http://maps.google.com/maps/api/staticmap?center=25.0,45.0&size=556x600&zoom=5&maptype=roadmap&format=png&scale=1&markers=color:0xFF0000%7C24.68773,46.72185&markers=color:0xFF0000%7C21.54238,39.19797&markers=color:0xFF0000%7C19.0,40.0&markers=color:0xFFC800%7C26.43442,50.10326&markers=color:0xFFC800%7C28.3998,36.57151&markers=color:0xFFC800%7C24.46861,39.61417&markers=color:0xFFC800%7C21.42664,39.82563&markers=color:0x00FF00%7C16.88917,42.55111&markers=color:0x00FF00%7C21.27028,40.41583&markers=color:0x00FF00%7C26.27944,50.20833&markers=color:0x00FF00%7C24.08912,38.06374&markers=color:0x00FF00%7C26.32599,43.97497&markers=color:0x00FF00%7C17.49326,44.12766&markers=color:0x00FF00%7C18.3,42.73333&markers=color:0x00FF00%7C18.21639,42.50528&markers=color:0x00FF00%7C20.01288,41.46767&markers=color:0x00FF00%7C18.02896,43.12061&markers=color:0x00FF00%7C17.72285,42.25261&markers=color:0x00FF00%7C18.19974,42.87328&markers=color:0x0000FF%7C26.64389,50.15917&markers=color:0x0000FF%7C20.49173,45.15665&markers=color:0x0000FF%7C27.52188,41.69073&markers=color:0x0000FF%7C27.48055,47.87371&markers=color:0x0000FF%7C16.59601,42.94435&markers=color:0x0000FF%7C18.95353,42.17026&markers=color:0x0000FF%7C27.1,44.13333&markers=color:0x0000FF%7C24.73333,42.91667&markers=color:0x0000FF%7C17.96361,43.60417&markers=color:0x0000FF%7C29.96974,40.20641&markers=color:0x0000FF%7C26.28864,50.11396&markers=color:0x0000FF%7C28.43279,45.97077&markers=color:0x0000FF%7C26.64986,49.95223&markers=color:0x0000FF%7C26.64986,49.95223&sensor=false&language=en.    at net.sf.jasperreports.repo.DefaultRepositoryService.getInputStream(DefaultRepositoryService.java:118)    at net.sf.jasperreports.repo.InputStreamPersistenceService.load(InputStreamPersistenceService.java:47)    at net.sf.jasperreports.repo.DefaultRepositoryService.getResource(DefaultRepositoryService.java:159)    at net.sf.jasperreports.repo.RepositoryUtil.findInputStream(RepositoryUtil.java:190)    at net.sf.jasperreports.repo.RepositoryUtil.getBytesFromLocation(RepositoryUtil.java:206)    at net.sf.jasperreports.engine.RenderableUtil.getRenderable(RenderableUtil.java:122)    at net.sf.jasperreports.components.map.MapElementImageProvider.getImage(MapElementImageProvider.java:210)    at net.sf.jasperreports.components.map.MapElementPdfHandler.exportElement(MapElementPdfHandler.java:51)    ... 163 moreCaused by: net.sf.jasperreports.engine.JRException: Error opening input stream from URL: http://maps.google.com/maps/api/staticmap?center=25.0,45.0&size=556x600&zoom=5&maptype=roadmap&format=png&scale=1&markers=color:0xFF0000%7C24.68773,46.72185&markers=color:0xFF0000%7C21.54238,39.19797&markers=color:0xFF0000%7C19.0,40.0&markers=color:0xFFC800%7C26.43442,50.10326&markers=color:0xFFC800%7C28.3998,36.57151&markers=color:0xFFC800%7C24.46861,39.61417&markers=color:0xFFC800%7C21.42664,39.82563&markers=color:0x00FF00%7C16.88917,42.55111&markers=color:0x00FF00%7C21.27028,40.41583&markers=color:0x00FF00%7C26.27944,50.20833&markers=color:0x00FF00%7C24.08912,38.06374&markers=color:0x00FF00%7C26.32599,43.97497&markers=color:0x00FF00%7C17.49326,44.12766&markers=color:0x00FF00%7C18.3,42.73333&markers=color:0x00FF00%7C18.21639,42.50528&markers=color:0x00FF00%7C20.01288,41.46767&markers=color:0x00FF00%7C18.02896,43.12061&markers=color:0x00FF00%7C17.72285,42.25261&markers=color:0x00FF00%7C18.19974,42.87328&markers=color:0x0000FF%7C26.64389,50.15917&markers=color:0x0000FF%7C20.49173,45.15665&markers=color:0x0000FF%7C27.52188,41.69073&markers=color:0x0000FF%7C27.48055,47.87371&markers=color:0x0000FF%7C16.59601,42.94435&markers=color:0x0000FF%7C18.95353,42.17026&markers=color:0x0000FF%7C27.1,44.13333&markers=color:0x0000FF%7C24.73333,42.91667&markers=color:0x0000FF%7C17.96361,43.60417&markers=color:0x0000FF%7C29.96974,40.20641&markers=color:0x0000FF%7C26.28864,50.11396&markers=color:0x0000FF%7C28.43279,45.97077&markers=color:0x0000FF%7C26.64986,49.95223&markers=color:0x0000FF%7C26.64986,49.95223&sensor=false&language=en.    at net.sf.jasperreports.engine.util.JRLoader.getInputStream(JRLoader.java:343)    at net.sf.jasperreports.repo.DefaultRepositoryService.getInputStream(DefaultRepositoryService.java:101)    ... 170 moreCaused by: java.net.ConnectException: Connection timed out    at java.net.PlainSocketImpl.socketConnect(Native Method)    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)    at java.net.Socket.connect(Socket.java:589)    at java.net.Socket.connect(Socket.java:538)    at sun.net.NetworkClient.doConnect(NetworkClient.java:180)    at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)    at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)    at sun.net.www.http.HttpClient.<init>(HttpClient.java:211)    at sun.net.www.http.HttpClient.New(HttpClient.java:308)    at sun.net.www.http.HttpClient.New(HttpClient.java:326)    at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1168)    at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1104)    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:998)    at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:932)    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1512)    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1440)    at java.net.URL.openStream(URL.java:1038)    at net.sf.jasperreports.engine.util.JRLoader.getInputStream(JRLoader.java:339)    ... 171 more

  • 2 years later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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...