-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
I am using jasperreports4.5.0 with zk6.0.2...I am getting this exception...
HTTP Status 410 - Failed to load /view/z_xgq/t_258/6li/0/C:/workspace/.pdf Cause: APPDEFAULT -------------------------------------------------------------------------------- type Status report message Failed to load /view/z_xgq/t_258/6li/0/C:/workspace/.pdf Cause: APPDEFAULT description The requested resource (Failed to load /view/z_xgq/t_258/6li/0/C://workspace/.pdf Cause: APPDEFAULT ) is no longer available, and no forwarding address is known. -------------------------------------------------------------------------------- Apache Tomcat/6.0.35
And My Code is...
@Command public void showReport() { List<CustomBean> customList = new ArrayList<CustomBean>(); customList.add(new CustomBean("Delhi", 1, "Hariom", "GHaziabd")); customList.add(new CustomBean("Delhi1", 2, "Hariom", "GHaziabd")); customList.add(new CustomBean("Delhi2", 3, "Hariom", "GHaziabd")); customList.add(new CustomBean("Delhi3", 4, "Hariom", "GHaziabd")); customList.add(new CustomBean("Delhi4", 5, "Hariom", "GHaziabd")); customList.add(new CustomBean("Delhi5", 6, "Hariom", "GHaziabd")); customList.add(new CustomBean("Delhi6", 7, "Hariom", "GHaziabd")); String path = Sessions.getCurrent().getWebApp().getRealPath("/core/report"); Window win = (Window) Executions.createComponents("/core/report/report.zul", null, null); Jasperreport report = (Jasperreport) win.getFellow("report"); report.setType("pdf"); report.setSrc(path + "/AMANDATEST.jasper"); report.setDatasource(new DataSource(customList)); }
I am not able to Resolve this.
Any one know how can i resolve it
Hi sjoshi,
It is hard to know the exact problem. Possible need to check the jasper file path.
Hi vincentjian,
It is same as i am getting from RealPath. Same code working fine with Another Project but not with main project even i copy paste al the libs
I found the issue in my Build path i am using the
itext-2.1.4.jar
That was the cause of above exception i updated with
itext-2.1.7.jar
and my code worked fine.
Asked: 2012-10-17 11:51:12 +0800
Seen: 194 times
Last updated: Oct 18 '12