Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 311551 - IllegalArgumentException if image path contains %
Summary: IllegalArgumentException if image path contains %
Status: RESOLVED WORKSFORME
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: 2.2.1   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 2.6.0   Edit
Assignee: JingwenShen CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-04 10:02 EDT by hgk CLA
Modified: 2010-05-05 23:25 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description hgk CLA 2010-05-04 10:02:15 EDT
Windows 7, JDK .16, Birt2.2.1.1

My report design has images
Ex:
<image id="1178">
...
<property name="source">file</property>
<expression name="uri">params["Level4"]</expression>
</image>

If I specify a path for the param that contains %
C:\javaPackages\temp\test%a_33_0.png

I get 
java.lang.IllegalArgumentException
at sun.net.www.ParseUtil.decode(ParseUtil.java:189)
at sun.net.http://www.protocol.file.Handler.ope...andler.java:65)
at sun.net.http://www.protocol.file.Handler.ope...andler.java:55)
at java.net.URL.openConnection(URL.java:945)
at java.net.URL.openStream(URL.java:1009)
at com.lowagie.text.Image.getInstance(Image.java:391)
at org.eclipse.birt.report.engine.emitter.pdf.PDFPage.drawImage(PDFPage.java:382)
at
org.eclipse.birt.report.engine.layout.emitter.AbstractPage.drawImage(AbstractPage.java:79)
at
org.eclipse.birt.report.engine.layout.emitter.PageDeviceRender.drawImage(PageDeviceRender.java:635)

Looks like this is a jdk bug. 
Bug ID: 6522294 If URI scheme is file and URL is not UTF-8 encoded, the ParseUtil.decode throws an Exception

Do you have a workaround in the newer Birt version? What is your suggested workaround for Birt2.2.1.1?
Comment 1 JingwenShen CLA 2010-05-05 23:25:01 EDT
This problem has been fixed on Birt2.3.1.
You can update your BIRT version.

Thanks,
Jingwen