Closed codingmikesh closed 5 years ago
Hello, i am facing the same issue, can you help @agmoyano ?
Hi, it seems it cannot find the path to jasper reports project..
It's where the untarred jasperreports-x.x.x-project.tar.gz should be.
The error says that it cannot find the definition of net.sf.jasperreports.engine.JREmptyDataSource, and that's defined in jasperreports project.
Hope it helps
Thanks for the prompt response @agmoyano, was very helpfull.
In my case i did not was using the the entire jasperreport_project package, instead i was using only the jasperreport jar.
The node-jasper look for all dependences placed in lib and dist folder inside of jasperreport_project main directory, and if one of those is missing, it will trigger the error.
Problem solved, i think thes issue can be closed.
Great!
Hi, how can i see structure project . i get same issue
Hi @najaroen, could you please elaborate a little more?.. what do you mean exactly with structure project?
Do you mean the Jasper report project tar.gz file?
@agmoyano yes
@najaroen here you can download Jasper Reports project.
https://sourceforge.net/projects/jasperreports/files/jasperreports/JasperReports%206.11.0/
Remember to download the one named like this "jasperreports-x.x.x-project.tar.gz" or "jasperreports-x.x.x-project.zip"
Once you decompress it, point the path to it.
Hope it helps!
Hello @agmoyano, i have a simple question, it may be silly, this package only works on linux dist?
Hi, i have this same problem and don't know resolve, need helpfull step by step please, have in to the proyect nodejs the proyect /lib/jasperreports-6.15.0/lib and dist but dont start proyect, sorry for the english
Hi, I get an error on using this script :
var express = require('express'), app = express(), jasper = require('node-jasper')({ path: 'reports', reports: { hw: { jasper: 'vehicles.jasper', jrxml: 'vehicles.jrxml', conn: 'in_memory_json' } } }); app.get('/pdf', function(req, res, next) { //beware of the datatype of your parameter. var report = { report: 'hw', data:{}, dataset: _data }; var pdf = jasper.pdf(report); res.set({ 'Content-type': 'application/pdf', 'Content-Length': pdf.length }); res.send(pdf); });
H:\jasper\node_modules\node-jasper\node_modules\java\lib\nodeJavaBridge.js:227 var clazz = java.findClassSync(name); // TODO: change to Class.forName when classloader issue is resolved. ^ Error: Could not create class net.sf.jasperreports.engine.JREmptyDataSource java.lang.NoClassDefFoundError: net/sf/jasperreports/engine/JREmptyDataSource Caused by: java.lang.ClassNotFoundException: net.sf.jasperreports.engine.JREmptyDataSource at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
What can I do ? Thanks