Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

scriptlet class not found while running jasper from eclipse

 
ahmad khawaja
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey guys,
i have a scriptlet class called "com.tdsecurities.overage.report.DailyReportScriptlet"

when i try to use it in my report on a field i get the following exception

java.lang.ClassNotFoundException: com.tdsecurities.overage.report.DailyReportScriptlet
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at dori.jasper.engine.util.JRClassLoader.loadClassForName(JRClassLoader.java:115)
at dori.jasper.engine.fill.JRBaseFiller.loadScriptlet(JRBaseFiller.java:573)
at dori.jasper.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:314)
at dori.jasper.engine.fill.JRVerticalFiller.<init>..........


ALL my classes compile but some thing happens at run time due to which it cant find it . I am using sunshine plugin for eclipse 3.0 .I have tried combinations of setting class paths like putting.jasper file in bin directory , setting system class path to eclipse bin,copying .jasper and scriptlet class in same directory etc ...but doesnt seem to help. I know its some thing to do with eclipse setting of run time class path but cant figure out any help will be appreicated.
thanks
ahmad
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64835
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since this is most likely an Eclipse setup issue, I'll move this along to the IDE's forum where the Eclipse-savvy hang out.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34401
346
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ahmad,
Is the jar in your java jar dependencies list for the web project? This is used at runtime, while the build path is used at compile time.
 
ahmad khawaja
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey Jeane ,
Thanks for te timely response.

Which jar are you referring to ? The jar that contains jasper files or jar that has scriptless class. I am not running a web application.aFor simplicity I even dont make a jar file . i compile classes and then just try to run the jasper (without running web server). I am not sure which class path eclipse uses at run time? Is it different than build path? ...Let me give u brief summary
1..I compile source code from project\src directory to project\bin
2..I have xml file which gets converted to jasper
3..I refer to the classes which i compiled in step 1 in jasper and get exception
I have tried putting jasper and compiled classe in same directory.
I have also tried setting system class path to project\bin.

Moreover what is run time class path of eclipse and how can i set it
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34401
346
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ahmad,
Sorry, I saw DailyReportScriptlet and assumed it had something to do with web project.

I was referring to the java containing DailyReportScriptlet. My comment only applies to web projects. Are you using a simple java project?
 
ahmad khawaja
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. I am trying to view the report through the standalone application. (In fact once i get the jasper file generated by sunshinereports plug in , and when i try to convert it into html i get this exception).
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by ahmad khawaja:
Yes. I am trying to view the report through the standalone application. (In fact once i get the jasper file generated by sunshinereports plug in , and when i try to convert it into html i get this exception).


Does the exception occur when you compile the report xml, or when you execute the already compiled report? If the former, how do you compile?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic