Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am running Jasper Reports with Apache Ant. When I go to generate a sample report into a pdf I run this:

root@server~$ /home/user/apache-ant-1.8.2/bin/ant pdf
Buildfile: /home/user/jasperreports-4.0.2/demo/samples/table/build.xml


     [java] Exception in thread "main" java.lang.NoClassDefFoundError: TableApp
     [java] Java Result: 1

Total time: 1 second

The problem is, I cannot find where that PDF went to, if the file even converted into a PDF at all, really. I ran the "find" command and no luck. This is a demo report called "Table" in the Jasper Report's demo directory. The build.xml file in the sample reports directory has this:

<target name="pdf" description="Generates a PDF version of the report by converting the .jrprint file.">
    <ant dir="../" target="pdf"/>

That tells me that it should convert this report into PDF and shoot the file to the parent directory. I made a directory called PDF and use absolute path to shoot it there and all that it did was shoot a build.xml file with no data to it...

The PDF is nowhere to be found. What I am missing here?

Thanks for any help, the jasperforge forum isn't responding to my thread. I don't think this is a very complex problem, so hopefully I can get some help... this is my last step with Jasper!

Thanks again.

share|improve this question
It can't locate a necessary Java class. So probably you are missing some required libraries? Or libraries with wrong version number? I won't trust the SUCCESSFUL but the error Java Result: 1. So no PDF created at all. – mailq Aug 7 '11 at 23:14
up vote 0 down vote accepted

Run the report with strace (or ltrace, if you're into that sort of thing) watching the calls to open -- somewhere along there it'll have to open the file for your PDF (assuming it's actuallly writing one, but at least you'll know one way or the other).

share|improve this answer
I got it working, I had to do some fill and javac commands and got it rolling. I have a pdf. Say I have a website that you can access your reports from, do I used shell_exec to run the command line start to generate the reports? – crosstalk42 Aug 7 '11 at 23:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.