aspose file tools*
The moose likes Other Open Source Projects and the fly likes Converting Jrxml to pdf Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Converting Jrxml to pdf" Watch "Converting Jrxml to pdf" New topic
Author

Converting Jrxml to pdf

Amol More
Greenhorn

Joined: Jan 22, 2010
Posts: 29
Hello everyone

i am trying to use jasper reports with oracle and vb

i have created .jrxml and .jasper files with help of ireport

can anyone please tell me hoe can i convert them to pdf with the help ant

i have tried using the fill command in ant but it shows me error class file not found

please share your ideas as ASAP


Amol More
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42283
    
  64
Sounds like a classpath issue, but without seeing the full error message we can't really guess what the problem might be.


Ping & DNS - my free Android networking tools app
Amol More
Greenhorn

Joined: Jan 22, 2010
Posts: 29
This the error i am getting

E:\jasper_reports\report1>ant fill report1.jrxml
Buildfile: E:\jasper_reports\report1\build.xml

fill:
[java] java.lang.NoClassDefFoundError: JasperApp
[java] Caused by: java.lang.ClassNotFoundException: JasperApp
[java] at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
[java] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
[java] Could not find the main class: JasperApp. Program will exit.
[java] Exception in thread "main"
[java] Java Result: 1

BUILD FAILED
Target "report1.jrxml" does not exist in the project "report1".

Total time: 2 seconds
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Can't see your build file, don't know your classpath, can't really help. In any case, it's a classpath issue.
Amol More
Greenhorn

Joined: Jan 22, 2010
Posts: 29


My Biuild file
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Now post it again, with only the parts relevant to your question. (And why are you using antcall when simple dependencies will do?)
Amol More
Greenhorn

Joined: Jan 22, 2010
Posts: 29
Actually i am new to this ant so i have picked the build file from ant samples
and edited it to as my needs so i didn't delete the extra as i am not that familiar with xml
but i think the problem is with the fill command where it is asking for the class file which i am not using is there anyway where i can generate a pdf without the class file

David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

You're using it indirectly, otherwise you wouldn't be getting an error.

Now post the classpath, since that's relevant, and referenced in the task you just posted.
Amol More
Greenhorn

Joined: Jan 22, 2010
Posts: 29
THESE ARE THE CLASS PATHS THAT I AM USING PLEASE LET ME KNOW IF ANY CHANGES


ANT_HOME=C:\Ant\apache-ant-1.8.0;%ANT_HOME%\bin\ant.bat

JAVA_HOME=C:\jdk1.6.0_18

PATH=c:\jdk1.6.0_18\bin;c:\jdk1.6.0_18\lib;E:\oracle\ora90\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\WIN32APP\INGR\SPLM\bin\;C:\WIN32APP\INGR\SPLM\bin;%ANT_HOME%\bin
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42283
    
  64
All of those are PATHs, not CLASSPATHs. You need to make sure that the classpath (the part that starts with "path id="classpath" in the file) contains the class that's missing. As far as I can tell, the only sensible directory where the class file could be is "../../../build/classes" - is it in there?

Also, please KeepItDown.
Amol More
Greenhorn

Joined: Jan 22, 2010
Posts: 29
yes i have kept both build and lib folder within my project folder

build has
classes and javaflow folders in it

i have also made changes here





Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42283
    
  64
I can't tell from your reply whether you have verified that the class file is in that directory or not.
Amol More
Greenhorn

Joined: Jan 22, 2010
Posts: 29
Which class file should be there in that directory
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42283
    
  64
The one that the error message says is missing.
Amol More
Greenhorn

Joined: Jan 22, 2010
Posts: 29
Which class file should be there in that directory

if you are saying about the class file generated after compiling java file
then i would like to tell you that i don't want to use the java file
since i am trying to use jasper with vb
i have generated jrxml and jasper with ireports

if there is any other class you are telling about please let me know the name of that class file
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42283
    
  64
Which class file should be there in that directory

Do you understand what the error message in your second post means?

since i am trying to use jasper with vb

JasperReports is a Java tool; I see nothing on its web site that indicates the jrxml files can be used from other languages, so you will need to write and execute Java code in order to run the report.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Amol More wrote:then i would like to tell you that i don't want to use the java file

You don't want to use *what* Java file?

If you're not a Java developer this is going to be a very painful process.

What libraries are in the lib directory?

Please TellTheDetails--don't make us ask every single question. ShowSomeEffort, and help us to help you.
Amol More
Greenhorn

Joined: Jan 22, 2010
Posts: 29
dude i am a java developer but right now i need to do use jasper reports with vb


there are many files in the lib folder

i have copied the lib folder from directory
where jasper reports have been installed
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Amol More wrote:right now i need to do use jasper reports with vb

This makes no sense to me: where in the above messages does VB come in to play?! You're running Ant, using Java libraries.
there are many files in the lib folder

Sweet. *Which ones*? How do you expect help resolving a classpath issue if we have zero idea what's on your classpath?! Do you know where the class you're missing can be found?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Converting Jrxml to pdf