Dear all,

I was trying my first jasperreport. But I am facing problem. I tried this both in Windows 7 and XP virtual OS. I tried with both Internet Explorer and Chrome browsers. But I could not find a solution.

As instructed in the tutorial I have given the following address in the web page. But I am getting the Internal Server Error message and no report is run.

http://127.0.0.1:8080/formspider/jasperreportsservlet?rep_name=employeesOfDepartments&destination=display&dep_id=20

As instructed, I created a directory c:\reports\ and placed in it the file employeesOfDepartments.jasper which was downloaded from your site.

My web.xml has the following parameter set:

<context-param> <param-name>fileDirectory</param-name> <param-value>c:\reports\</param-value> </context-param>*

My tomcat log file shows the java.io.FileNotFoundException:

` Dec 23, 2013 1:00:57 PM org.apache.catalina.core.StandardWrapperValve invoke

SEVERE: Servlet.service() for servlet JasperReportsServlet threw exception

java.io.FileNotFoundException: @c:\reports\@employeesOfDepartments.jasper (The filename, directory name, or volume label syntax is incorrect)

at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at co.gerger.bdf.view.JasperReportsServlet.doGet(JasperReportsServlet.java:79)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

Your kind solution is highly appreciated. Kindly treat this little urgent.

George.

asked 23 Dec '13, 04:44

grajan777's gravatar image

grajan777
1011234
accept rate: 10%

What version of Jasper report are you using?

(23 Dec '13, 05:00) Yalim Gerger ♦♦

version 4.6. I have downloaded the compiled file from your site only and did not even open it or re-compiled it.

George.

(23 Dec '13, 05:05) grajan777

Hi all,

The issue is now solved. The mistake was enclosing the directory name within the delimiter @ symbol. The web.xml had this directory name enclosed within @ symbol and I used the same format. This was a mistake.

Therefore the parameter

<param-value>@c:\reports\@</param-value>

was replace with

<param-value>c:\reports\</param-value>

and everything is OK now.

Thanks and regards.

George.

link

answered 23 Dec '13, 13:07

grajan777's gravatar image

grajan777
1011234
accept rate: 10%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×7

Asked: 23 Dec '13, 04:44

Seen: 2,101 times

Last updated: 23 Dec '13, 13:07


© Copyright Gerger 2017