2001 JI Open Discussion Posted August 14, 2006 Share Posted August 14, 2006 By: Eduardo S. - edusantilli jasperreport example 2002-03-15 03:55I need a simple example about how can i use jasperreport. Someone can help me??? thanks... Eduardo S. By: Teodor Danciu - teodord RE: jasperreport example 2002-03-15 05:50 Hi, Download the entire project from sourceforge.net and you'll find samples inside that will help you create you own reports. Good luck! Teodor By: Eduardo S. - edusantilli RE: jasperreport example 2002-03-15 06:26ok...but nothing is compiling..... appears one exception saying: Exception in thread "main" java.lang.NoClassDefFoundError: org/xml/sax/ErrorHan ler at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:493) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:1 1) at java.net.URLClassLoader.defineClass(URLClassLoader.java:248) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:299) at java.lang.ClassLoader.loadClass(ClassLoader.java:255) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315) at dori.jasper.engine.JasperManager.compileReport(JasperManager.java:86 ) at JasperReport.main(JasperReport.java:7) By: Sangeeta Narang - snarang RE: jasperreport example 2002-06-27 12:47I am a newbie to this site. I started with the report generation examples under demo/samples. The first prog. I used was ChartApp. It runs for run option only with the existing files, other options throw an exception. I have a couple of questions. - What is the sequence of options/arguments I should use for the program. - What kind of file is the file used as filename. Is it already created by the user in some particular format. - What kind of files are '.jasper', '.jrprint', '.jrpxml' and for what purpose they are used. - Can I use the report generator from a jsp file on say click of a button (I think yes, just supply the task option and file name to the program). Any help is appreciated. Thanks Sang By: Sangeeta Narang - snarang RE1: jasperreport example 2002-06-27 13:07Hi, Another set of question : - how can we connect the report generator to a oracle or any other database with say a jdbc conenctivity and then that query will generate the report. - how to include graphs in the report. These graphs may be generated by a graphical tool say the one you are using with jasperreport(jfreechart). Thanks in advance for the help. Sang By: Teodor Danciu - teodord RE: RE1: jasperreport example 2002-06-28 00:09 Hi, JasperReports is a library. It is not a standalone application. It only offers reporting functionality to other Java applications. The samples provided are simple Java applications that show how to use the JasperReports library. There is a sample application for every main feature of the library including charts, subreports and even a Web application using JSP. What error have you encountered when running the samples? Have you checked the "how.to.txt" files provided in the project tree? I suggest you read the source code of those sample applications and you'll learn to use the library. The .jasper file is the compiled report design (serialized object). The .jrprint file is the generated report (serialized object). The .jrpxml file is the generated report in XML format. I know the documentation is scarce, but it should be read at least once. Thank you, Teodor By: Sangeeta Narang - snarang RE3: jasperreport example 2002-06-28 16:54One more question if I use the build.xml to compile and run the sample programs they work fine but if I use Command line java ChartApp -Tcompile -FChartReport.xml It throws an exception org.xml.sax.SAXException: System property org.xml.sax.driver not specified where to specify this systemProperty when using from commandline or compile the report using xml file from a jsp page. Thanks Sang By: Teodor Danciu - teodord RE: RE3: jasperreport example 2002-06-30 23:51 Hi, Here's an answer for you: http://sourceforge.net/forum/message.php?msg_id=1514571 Good luck! Teodor By: Sangeeta Narang - snarang RE2: jasperreport example 2002-06-28 16:33Thanks. I am facing one more problem. I loaded the latest xerces.jar which I was using for my application and then started to compile xml file to '.jasper' file, but got the following exception. The xerces loaded at your site gives problems with initializing the servlets. org.xml.sax.SAXNotSupportedException: Feature: http://xml.org/sax/features/validation at org.xml.sax.helpers.ParserAdapter.setFeature(ParserAdapter.java:198) at dori.jasper.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:320) at dori.jasper.engine.xml.JRXmlLoader.load(JRXmlLoader.java:286) at dori.jasper.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:49) at _0002fletter_0002ejspletter_jsp_3._jspService(_0002fletter_0002ejspletter_jsp_3.java:86) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.java:130) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:282) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405) at org.apache.tomcat.core.Handler.service(Handler.java:287) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501) at java.lang.Thread.run(Thread.java:484) NESTED BY : dori.jasper.engine.JRException: Feature: http://xml.org/sax/features/validation at dori.jasper.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:496) at dori.jasper.engine.xml.JRXmlLoader.load(JRXmlLoader.java:286) at dori.jasper.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:49) at _0002fletter_0002ejspletter_jsp_3._jspService(_0002fletter_0002ejspletter_jsp_3.java:86) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.java:130) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:282) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:4 29) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405) at org.apache.tomcat.core.Handler.service(Handler.java:287) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler. java:213) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501) at java.lang.Thread.run(Thread.java:484) By: Teodor Danciu - teodord RE: RE2: jasperreport example 2002-07-01 03:03 Hi, Apparently, your XML parser does not support the validation feature. Make sure you are really using xerces as parser. What is the value that you supply to the "org.xml.sax.driver" system property? I hope this helps. Teodor Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now