Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Converting Jrxml to pdf

 
Amol More
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like a classpath issue, but without seeing the full error message we can't really guess what the problem might be.
 
Amol More
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


My Biuild file
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can't tell from your reply whether you have verified that the class file is in that directory or not.
 
Amol More
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which class file should be there in that directory
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The one that the error message says is missing.
 
Amol More
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic