StreamResource and MalformedURLException

Hi,
I’m using Vaadin 6.7.4 and GateIn 3.2.0 with JBoss AS6

I’m trying to use StreamResource to download an excel file, here is the code:

		StreamResource streamResource = new StreamResource(streamSource, "report", myApplication);
		streamResource.setCacheTime(5000); // no cache (<=0) does not
											// work with IE8
		streamResource.setMIMEType("application/x-msexcel");
		getWindow().open(streamResource, "_top");

First, I was using
GenericPortlet
class to create my vaadin portlet, and the code above used to work pretty well: by clicking the link, the file was downloaded as this URL was called : [quote]
http://localhost:8080/myapp/APP/1/report.xls
[/quote] (as explained in
Book of vaadin
)

But I had to change the portlet class with
ApplicationPortlet2
, and now, as soon as I click on the link to download the file, I get this error message:

and I noticed that the url (right after clicking) become

with a blank page

I can’t figure out how to deal with this exception. Does somebody have any explanation/fix to this error?

Thank you.
psl