georg.schmiditdesign.de Posted January 7, 2015 Share Posted January 7, 2015 In the past, I had been using file names for PNG files (e.g. my-file.png) in the Jaspersoft Studio 5.6.1 and JasperReports Server 5.6.1.With Jaspersoft Studio 6.0.0 and JasperReports Server 6.0.0, I have no problems using the files in the Studio, but after publishing, I get following error message after loading the report:Repository file resource /reports/MyReports/my-file.png could not be loaded.After removing the dash, everything works fine. Any help is highly appreciated! Link to comment Share on other sites More sharing options...
ernestoo Posted January 7, 2015 Share Posted January 7, 2015 I wonder if by chance it's triggering any security rules - is there a stack trace in jasperserver.log after you try this? Link to comment Share on other sites More sharing options...
georg.schmiditdesign.de Posted January 7, 2015 Author Share Posted January 7, 2015 This is the stack trace: 2015-01-07 15:48:34,201 ERROR errorPage_jsp,http-apr-8081-exec-8:294 - JSException: 2015-01-07 15:48:52,402 ERROR AsyncJasperPrintAccessor,pool-6-thread-2:299 - Error during report execution net.sf.jasperreports.engine.JRRuntimeException: net.sf.jasperreports.engine.JRException: Error opening input stream from URL : my-file.png at net.sf.jasperreports.repo.DefaultRepositoryService.getInputStream(DefaultRepositoryService.java:117) at net.sf.jasperreports.repo.InputStreamPersistenceService.load(InputStreamPersistenceService.java:48) at net.sf.jasperreports.repo.DefaultRepositoryService.getResource(DefaultRepositoryService.java:155) at net.sf.jasperreports.repo.RepositoryUtil.findInputStream(RepositoryUtil.java:176) at net.sf.jasperreports.repo.RepositoryUtil.getBytesFromLocation(RepositoryUtil.java:192) at net.sf.jasperreports.engine.RenderableUtil.getRenderable(RenderableUtil.java:121) at net.sf.jasperreports.engine.fill.JRFillImage.evaluateImage(JRFillImage.java:536) at net.sf.jasperreports.engine.fill.JRFillImage.evaluate(JRFillImage.java:472) at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:259) at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:455) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillTitle(JRVerticalFiller.java:320) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:256) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:124) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:540) at net.sf.jasperreports.engine.fill.BaseFillHandle$ReportFill.run(BaseFillHandle.java:120) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$SynchronousExecutor.execute(EngineServiceImpl.java:882) at net.sf.jasperreports.engine.fill.BaseFillHandle.startFill(BaseFillHandle.java:165) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$AsynchronousReportFiller.fillReport(EngineServiceImpl.java:838) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.fillReport(EngineServiceImpl.java:1727) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$ReportFill.runWithDataSource(EngineServiceImpl.java:1082) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$ReportFill.runReport(EngineServiceImpl.java:1011) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$ReportRunnable.run(EngineServiceImpl.java:904) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) Caused by: net.sf.jasperreports.engine.JRException: Error opening input stream from URL : my-file.png at net.sf.jasperreports.engine.util.JRLoader.getInputStream(JRLoader.java:303) at net.sf.jasperreports.repo.DefaultRepositoryService.getInputStream(DefaultRepositoryService.java:100) ... 24 more Caused by: java.io.IOException: Repository file resource /reports/MyReports/MyReport_files/my-file.png could not be loaded at com.jaspersoft.jasperserver.api.engine.jasperreports.util.repo.RepositoryConnection.getInputStream(RepositoryConnection.java:103) at java.net.URL.openStream(URL.java:1037) at net.sf.jasperreports.engine.util.JRLoader.getInputStream(JRLoader.java:299) ... 25 more Link to comment Share on other sites More sharing options...
ernestoo Posted January 8, 2015 Share Posted January 8, 2015 Very weird...I did the same thing and it worked for me Link to comment Share on other sites More sharing options...
noliver Posted January 26, 2015 Share Posted January 26, 2015 Having the same behavior, on both MacOS and CentOS boxes. Link to comment Share on other sites More sharing options...
ddelange Posted June 4, 2015 Share Posted June 4, 2015 I have a similar problem: any dash(or hyphen?) in a filename is replaced with -002d when stored in the jasperserver repository.this is part of an export example:|-- Labels | |-- kl-002dlabels.properties.data | |-- kl-002dlabels.properties.xml | |-- kl-002dlabels_en.properties.data | |-- kl-002dlabels_en.properties.xml | |-- kl-002dlabels_nl.properties.data | `-- kl-002dlabels_nl.properties.xml The actual name in the kl-002dlabels.properties.xml is: kl-labels_nl.propertiesThe bundle name in the jasper report is kl-labels.Everything works fine, but I do not understand why these filenames are like this.Furthermore, are there any 'special' characters' that will cause similar replacements. Kind regardsddelange Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now