1

Issue WIth ZK+Jasper Report

asked 2012-10-17 11:51:12 +0800

sjoshi gravatar image sjoshi flag of India
3493 1 8
http://zkframeworkhint.bl...

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.

delete flag offensive retag edit

4 Replies

Sort by ยป oldest newest

answered 2012-10-17 15:12:58 +0800

sjoshi gravatar image sjoshi flag of India
3493 1 8
http://zkframeworkhint.bl...

Any one know how can i resolve it

link publish delete flag offensive edit

answered 2012-10-18 02:30:46 +0800

vincentjian gravatar image vincentjian
2245 6

Hi sjoshi,

It is hard to know the exact problem. Possible need to check the jasper file path.

link publish delete flag offensive edit

answered 2012-10-18 02:39:54 +0800

sjoshi gravatar image sjoshi flag of India
3493 1 8
http://zkframeworkhint.bl...

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

link publish delete flag offensive edit

answered 2012-10-18 06:21:42 +0800

sjoshi gravatar image sjoshi flag of India
3493 1 8
http://zkframeworkhint.bl...

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.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2012-10-17 11:51:12 +0800

Seen: 194 times

Last updated: Oct 18 '12

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More