java.net.MalformedURLException:无协议:

|| 我将birt-2_6_1与tomcat 7以及eclipse IDE结合使用来生成报告。我已经完成了生成图表的编码,并将它们保存在tem位置为png格式。但是,当我将这些图像导出到可下载的pdf文件中时,既没有以pdf格式也没有以excel格式将这些图像显示为下载的文件。是否抛出此异常:
java.net.MalformedURLException: no protocol: /Softwares/new_tomcat/tomcat7/temp/jfreechart-299441806335424490.png
    at java.net.URL.<init>(URL.java:567)
    at java.net.URL.<init>(URL.java:464)
    at java.net.URL.<init>(URL.java:413)
    at org.eclipse.birt.report.engine.emitter.ImageReader.readImage(ImageReader.java:179)
    at org.eclipse.birt.report.engine.emitter.ImageReader.read(ImageReader.java:80)
    at org.eclipse.birt.report.engine.nLayout.area.impl.ImageAreaLayout.initialize(ImageAreaLayout.java:83)
    at org.eclipse.birt.report.engine.nLayout.area.impl.ImageAreaLayout.layout(ImageAreaLayout.java:72)
    at org.eclipse.birt.report.engine.nLayout.LayoutEngine.startContent(LayoutEngine.java:488)
    at org.eclipse.birt.report.engine.emitter.ContentEmitterAdapter.startImage(ContentEmitterAdapter.java:174)
    at org.eclipse.birt.report.engine.emitter.CompositeContentEmitter.startImage(CompositeContentEmitter.java:274)
    at org.eclipse.birt.report.engine.emitter.ContentEmitterUtil.startContent(ContentEmitterUtil.java:74)
    at org.eclipse.birt.report.engine.layout.html.buffer.HTMLPageBuffer.startContent(HTMLPageBuffer.java:116)
    at org.eclipse.birt.report.engine.layout.html.buffer.TableBreakBuffer.startContent(TableBreakBuffer.java:287)
    at org.eclipse.birt.report.engine.layout.html.HTMLLeafItemLM.start(HTMLLeafItemLM.java:67)
    at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:139)
    at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70)
    at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:90)
    at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:99)
    at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:180)
    at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:77)
    at com.i10n.fleet.util.ReportExporter.**exportReport(ReportExporter.java:98**)
    at com.i10n.fleet.web.controllers.ExportReportOperations.**ExportVehicleReport(ExportReportOperations.java:596)**
    at com.i10n.fleet.web.controllers.ExportReportOperations.**generateVehicleReport(ExportReportOperations.java:497)**
    at com.i10n.fleet.web.controllers.ExportReportsController.**processRequest(ExportReportsController.java:131)**
    at com.i10n.fleet.web.controllers.ExportReportsController.**handleRequestInternal(ExportReportsController.java:71)**
    at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
    at com.i10n.fleet.web.controllers.CascadedFormController.handleRequest(CascadedFormController.java:47)
    at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:859)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:793)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476)
    at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:441)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:306)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:108)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:558)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:379)
    at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:282)
    at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:357)
    at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1687)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:619)
以上所有我用于此任务的粗体字母文件。但它在此行显示错误:
vehicleReportTask.run();
其中
vehicleReportTask
RunAndRenderTask
,它保存png图像以在报告中显示。这就是我存储到任务中的方式:
vehicleReportTask.setParameterValue(\"image\", imgPath + filename);
从很长时间以来,它都会给出相同的错误,因此,如果有人可以帮助我解决此问题,那么对我确实有很大帮助。如有需要,请随时提出。 我可以向您发送需要的电子邮件ID:vikramfartyal@gmail.com     
已邀请:
“ 5”表示缺乏协议,例如“ 7”中的“ 6”。 尝试通过将协议前缀添加到
imgPath
来传递
file:///Softwares/new_tomcat/tomcat7/temp/jfreechart-299441806335424490.png
这样的URL。     

要回复问题请先登录注册