Making jasper report as jar
hi to all,
In my application i've make a jar file using netbeans ide. The jar file contains images, classes, .jrxml, and .jasper file when i run the jar file the report will not come.i don't know why.. and i've used the code given below
JasperDesign jasperDesign=JRXmlLoader.load(new File("Report/estimation.jrxml"));
JasperReport jasperReport=JasperCompileManager.compileReport(jasperDesign);
JasperPrint jasperPrint=JasperFillManager.fillReport(jasperReport, parameters,con);
JasperViewer.viewReport(jasperPrint);The project is completed, the report is working in the netbeans but not when i run jar file..
I've searched the forum but i couldn't find to my requirements. I want to know to how to make the jar file that the report should also work..
Help needed plz.. I should deliver the project in a couple of days...
plz....
Thanks in advance...
can anyone plz help me..or Did i post in the wrong forum means plz tell me the wright forum..
Plz help needed...
Thanks in Advance...
Similar Messages
-
Error in Jasper Report Generation
Hi,
I generated Jasper Report.
Jar File Used:
1)classes12
2)commons-beanutils-1.5
3)commons-collections-2.1
4)commons-digester-1.7
5)commons-logging-1.0.2
6)jasperreports-1.2.1
7)org.eclipse.jdt.core.manipulation_1.0.0.v20060605-1400
8)org.eclipse.jdt.core_3.2.0.v_671
Jdk Used
JDK 1.5
Java File:
import java.util.HashMap;
import net.sf.jasperreports.engine.JREmptyDataSource;
import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JasperCompileManager;
import net.sf.jasperreports.engine.JasperExportManager;
import net.sf.jasperreports.engine.JasperFillManager;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.engine.JasperReport;
public class LineDisplay {
public static void main(String[] args) {
JasperReport jasperReport;
JasperPrint jasperPrint;
try {
jasperReport = JasperCompileManager.compileReport("F:\\SampleProject\\Jasperreport\\WEB-INF\\src\\com\\zylog\\Sample.jrxml");
jasperPrint = JasperFillManager.fillReport(jasperReport, new HashMap(), new JREmptyDataSource());
JasperExportManager.exportReportToPdfFile(jasperPrint, "c:\\firstReport.pdf");
} catch (JRException e) {
e.printStackTrace();
I succesfully generated Jasper Report.But My client faced the following Exception as,
java.io.FileNotFoundException: F:\MBSWorkspace\JasperReport\Sample_1252478220359_232342.class (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at net.sf.jasperreports.engine.util.JRLoader.loadBytes(JRLoader.java:272)
at net.sf.jasperreports.engine.design.JRAbstractClassCompiler.compileUnits(JRAbstractClassCompiler.java:73)
at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:190)
at net.sf.jasperreports.engine.design.JRDefaultCompiler.compileReport(JRDefaultCompiler.java:131)
at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:211)
at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:144)
at com.zylog.jasper.Sample.main(Sample.java:18)
NESTED BY :My Client Used JDK 1.6..
I dont know why he got a such problem..Help anyone to solve it..Deepa_05 wrote:
What do you mean?They mean that every time something doesn't work for you, you just post it here and act all helpless, rather than try and solve it yourself. Do you not have any idea what the error might be telling you? -
Jasper report problem in stretch fields
Hi All
i am making report in ireport and jasper report, by design and code.
The height of the fields is not limited , that mean i can put in it a large sentence or a small one. So i use the property "Stretch with overflow" (or textField.setStretchWithOverflow(true); in code )
the problem that i face is : the report i got is work fine but some tall sentences are splited in more than a page and the problem here that i don't know why it splited when there is a plenty of blank space in the page, when the other sentences is using this blank.
in the end i am hope that i explain the problem well... so help me please in this issue.
BEST REGARDSSo i tried the same in Java.As a stand alone java code? or as a code in your webapp? Please make sure the required jar files are in your web-inf\lib
-
Open Jasper Report in new page using servlet
Guys,
Looks very simple but i am having problem making this process work. I am using 11.1.1.4
This is my use case:
- From a employee page, user clicks on a menu item to open report for current employee. I need to pass appropriate report parameters to servlet and open report into new page.
I can successfully call servlet using commandmenuitem and set request parameters and call servlet from backing bean.... but that doesn't open report in a new page.... any way i can do this?
Another option i tried was that using gomenuitem and setting target=blank but in that case i need to pass the parameter using servlet url which i like to avoid.(in case i need to pass many parameters in future) (also values will be set on page so i need to generate url when then click the menuitem...... so there are some hoops and loops i need to go through) I don't know a way to pass the request parameter using backing bean to servlet... i don't think it is possible.
Those are the two approaches i tried.
If you have any better approach...I would appreciate if you can let me know. (i have searched on internet for two days now.... for the solution)
-R
Edited by: polo on Dec 13, 2011 7:22 AMHi,
Hope following will useful
http://sameh-nassar.blogspot.com/2009/10/using-jasper-reports-with-jdeveloper.html
http://www.gebs.ro/blog/oracle/jasper-reports-in-adf/ -
Jasper report on HTML when one image loaded from database and for the other
How to generate jasper report on HTML when one image loaded from database and for the other we give a image path
My code
ByteArrayOutputStream baos = new ByteArrayOutputStream();
exporter = new JRHtmlExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, print);
exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, baos);
exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, strImageInputDirectory);
exporter.setParameter(JRHtmlExporterParameter.IMAGES_DIR_NAME, strImageOutputPath == null ? "." : strImageOutputPath);
exporter.setParameter(JRHtmlExporterParameter.IS_OUTPUT_IMAGES_TO_DIR, Boolean.TRUE);
exporter.setParameter(JRHtmlExporterParameter.IS_USING_IMAGES_TO_ALIGN, Boolean.FALSE);
exporter.setParameter(JRHtmlExporterParameter.IS_WHITE_PAGE_BACKGROUND, Boolean.FALSE);
exporter.exportReport();
byte[] bdata = ((ByteArrayOutputStream) baos).toByteArray();
Can any one help pls
Message was edited by:
ameet.auhey sorry for posting it in this forum.
but do u have sample code for making it work.. since i am able to do it on PDF format(image from Database and another stored in the webserver) using
byte image[] =(byte[]) outData.get("image");
ByteArrayInputStream img = new ByteArrayInputStream(image);
hmimg.put("P_PARAMV3", img);
print = JasperFillManager.fillReport(reportFileName, hmimg, jrxmlds);
bdata= JasperExportManager.exportReportToPdf(print); -
Jasper report with Struts2 and hibernate.
Hey all!
I'm new to Struts2, Hibernate and jasper report. I want to make a report using those tools. Can anybody pls help me by providing a step by step process for it?
I'm using eclipse Ganymede IDE. And want to view report on page with two search criteria as start date to end date and an option choosing.
Can any body pls response me for this?Yes you can, you'll need to create a new library in JDeveloper with the Jasper reports JARs.
See: Re: JasperReport with Jdeveloper -
Jasper Reports in Linux vs Jasper Reports in Windows
Dear Sirs...
an application is developed using jdeveloper 10.1.2 (struts with UIX technology) and used Jasper report to generated PDF and HTML reports programmatically (no XML files for reports tamplates are used).
in jdeveloper PDF reports are generated without problem,
i create a WAR file and deploy it to oracle application server R2 under windows, it works just fine.
that same WAR file is deployed into linux (again oracle application server R2), this time an exception occurs,
i only selected two jar files (jasperreports.jar and itext.jar) to be included into the war file.
now can any one explain to me why it runs perfectly fine in windows AS and not linux AS???? aren't both of them use the same java virtual machine????
any advice please???
best regardssorry i forget to post the error in linux, the log contains the following:
net.sf.jasperreports.engine.JRException: Error
compiling report java source files :
/home/oracle/OraHome/j2ee/home/EasyJasperDesign_1192848437309_635467.java
best regards -
Hi
When I try to open the jasper report on browser ,It displays
the report but not clear.The image does not display on the client.
below is my code ,please help me......
MY Code:
/*3 Preview in HTML format */
File imagedir=null;
JRHtmlExporter exp = new JRHtmlExporter();
StringBuffer sbuf = new StringBuffer();
exp.setParameter(JRHtmlExporterParameter.JASPER_PRINT, print);
exp.setParameter(JRHtmlExporterParameter.OUTPUT_STRING_BUFFER, sbuf);
exp.setParameter(JRHtmlExporterParameter.IMAGES_DIR,imagedir);
exp.exportReport();
out.print(sbuf.toString());
Thanks
By satheshAlright there is a dedicated ImageServlet(provided in jasper reporting framework) which is used to Link Static image content along with your HTML report content.
and here is how you have to do it is ??
is by setting few parameters for JRExporter Object and making use of image servlet provided under jasper libraries.
ImageServlet configurations in web.xml:
<servlet>
<servlet-name>ImageServlet</servlet-name>
<servlet-class>
net.sf.jasperreports.j2ee.servlets.ImageServlet
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ImageServlet</servlet-name>
<url-pattern>/imageServlet</url-pattern>
</servlet-mapping>Html Exporter code..
JRExporter exporter = null;
JasperPrint jasperPrint = null;
Connection conn = null;
String sourceFile = ReportService.getReportSourceFile(request);
Map map = ReportService.getParameterMap(sourceFile,request);
String contentType = ReportService.getContentType(sourceFile,request);
if(contentType.startsWith("text/html")){
PrintWriter printWriter = response.getWriter();
try{
/* Fetching Connection from a Connection Pool VIA a service*/
conn = DbUtils.getConnection();
/* Creating a JasperPrint Object*/
jasperPrint = JasperFillManager.fillReport(sourceFile,map,conn);
exporter = new JRHtmlExporter();
request.getSession().setAttribute(ImageServlet.DEFAULT_JASPER_PRINT_SESSION_ATTRIBUTE, jasperPrint);
/* printWriter here is a reference for response.getWriter() */
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_WRITER,printWriter);
// gonna set url pattern given for Image servlet with a reponse parameter <url-pattern>/imageServlet</url-pattern>
exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI,"imageServlet?image=");
response.setContentType(contentType);
/* Would write the HTML content to ServletStream Provided */
exporter.exportReport();
}catch(Exception exp){
exp.printStackTrace();
}finally{
try{
if(conn != null && !conn.isClosed())
conn.close();
}catch(Exception ep){
ep.printStackTrace();
}finally{
conn = null;
sourceFile = null;
map = null;
}For any other issues with report format and others try to go through my post.However, you might have to edit your customized settings in terms of image rendering problems or to some customized implementations.
http://forum.java.sun.com/thread.jspa?threadID=5203324&messageID=9811077
Hope that might help :)
REGARDS,
RaHuL -
How can i call a jasper report from a java Application
Hi,
i am chiranjit , currently i working in a web based ERP project, in this project as a report building tool we are using JasperReport wih eclipse plugin . in eclipse report's are generating very well but i am unable to call that report from a java application because i have no idea about the How to call a Jasper Report from a Java Application . so please send me the necessary class names, jar files names and programe code as early as possible.
ChiranjitAhh, kind of a duplicate thread:
http://forums.java.sun.com/thread.jspa?threadID=631642
@OP. You could have clarified your original post and the relationship of your question to java. You did not need a new thread.
� {� -
Error in running Jasper Reports for more than 100 users in stress test
I have created a web application with Jasper reports. during the stress test, we were able to run the same report simultaneously for 100 concurrent users, after that we get the following error. I hope there is no problem in my code (correct me if i am wrong)
We use Web Sphere
The error we get is as follows:
java.io.FileNotFoundException: /apps/HewittProjects/installedApps/TBIA/workforce_CUR.ear/workforceServer4.16.4.war/reports/timesheet_mgr2.jasper (Too many open files)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:106)
at com.wily.introscope.agent.probe.io.ManagedFileInputStream.(ManagedFileInputStream.java:89)
at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:85)
at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:64)
at com.workforcesoftware.servlets.ReportServlet2.getCompiledReport(ReportServlet2.java:712)
at com.workforcesoftware.servlets.ReportServlet2.doPost(ReportServlet2.java:423)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.ServicingServletState.service(StrictLifecycleServlet.java:333)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:61)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1009)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:529)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:208)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:134)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:321)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:120)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:250)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:652)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:448)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:937)
NESTED BY :
net.sf.jasperreports.engine.JRException: Error loading object from file : /apps/HewittProjects/installedApps/TBIA/workforce_CUR.ear/workforceServer4.16.4.war/reports/timesheet_mgr2.jasper
at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:92)
at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:64)
at com.workforcesoftware.servlets.ReportServlet2.getCompiledReport(ReportServlet2.java:712)
at com.workforcesoftware.servlets.ReportServlet2.doPost(ReportServlet2.java:423)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.ServicingServletState.service(StrictLifecycleServlet.java:333)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:61)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1009)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:529)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:208)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:134)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:321)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:120)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:250)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:652)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:448)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:937)
if this really cannot find the file, then how could it run successfully for 100 users?
Have anyone experienced this problem?
Thanks for your help.ummm seems odd to have 100 users making a report.. that can be the limitation of your application..
-
I have tried to implement jasper report but getting exceptions at run time
I have tried to implement jasper report but getting exceptions at run time and I couldn't get the reason of these exceptions. please give me idea to solve this problem.
I am using following jar files for this :
commons-beanutils-1.6.1.jar
commons-digester-1.7.jar
commons-logging.jar
jasperreports-1.2.0.jar
code is as follows:-
(1) xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jasperReport
PUBLIC "-//JasperReports//DTD Report Design//EN"
"http://jasperreports.sourceforge.net/dtds/jasperreport.dtd">
<jasperReport name="Simple_Report">
<detail>
<band height="20">
<staticText>
<reportElement x="180" y="0" width="200" height="20"/>
<text><![CDATA[Hello World!]]></text>
</staticText>
</band>
</detail>
</jasperReport>
(2.) java file
import net.sf.jasperreports.engine.*;
import net.sf.jasperreports.engine.xml.*;
import org.xml.sax.*;
import org.apache.commons.digester.Digester;
import org.apache.commons.digester.RuleSetBase;
import java.util.*;
public class JasperReportsIntro
public static void main(String[] args)
JasperReport jasperReport;
JasperPrint jasperPrint;
try
jasperReport = JasperCompileManager.compileReport(
"jasperreports_demo.jrxml");
jasperPrint = JasperFillManager.fillReport(
jasperReport, new HashMap(), new JREmptyDataSource());
// JasperExportManager.exportReportToPdfFile(
// jasperPrint, "jasperReports/simple_report.pdf");
catch (JRException e)
e.printStackTrace();
I am getting exceptions like:
net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:
/home/navneet/Simple_Report_1143636234024_954843.java:4: package net.sf.jasperreports.engine does not exist
import net.sf.jasperreports.engine.*;
^
/home/navneet/Simple_Report_1143636234024_954843.java:5: package net.sf.jasperreports.engine.fill does not exist
import net.sf.jasperreports.engine.fill.*;
^
/home/navneet/Simple_Report_1143636234024_954843.java:18: cannot find symbol
symbol: class JREvaluator
public class Simple_Report_1143636234024_954843 extends JREvaluator
^
/home/navneet/Simple_Report_1143636234024_954843.java:25: cannot find symbol
symbol : class JRFillParameter
location: class Simple_Report_1143636234024_954843
private JRFillParameter parameter_REPORT_RESOURCE_BUNDLE = null;
^
/home/navneet/Simple_Report_1143636234024_954843.java:26: cannot find symbol
symbol : class JRFillParameter
location: class Simple_Report_1143636234024_954843
private JRFillParameter parameter_REPORT_CONNECTION = null;
^
/home/navneet/Simple_Report_1143636234024_954843.java:27: cannot find symbol
symbol : class JRFillParameter
location: class Simple_Report_1143636234024_954843
private JRFillParameter parameter_REPORT_PARAMETERS_MAP = null;
^
/home/navneet/Simple_Report_1143636234024_954843.java:28: cannot find symbol
symbol : class JRFillParameter
location: class Simple_Report_1143636234024_954843
private JRFillParameter parameter_IS_IGNORE_PAGINATION = null;
^
/home/navneet/Simple_Report_1143636234024_954843.java:29: cannot find symbol
symbol : class JRFillParameter
location: class Simple_Report_1143636234024_954843
private JRFillParameter parameter_REPORT_CLASS_LOADER = null;
^
/home/navneet/Simple_Report_1143636234024_954843.java:30: cannot find symbol
symbol : class JRFillParameter
location: class Simple_Report_1143636234024_954843
private JRFillParameter parameter_REPORT_VIRTUALIZER = null;
^
/home/navneet/Simple_Report_1143636234024_954843.java:31: cannot find symbol
symbol : class JRFillParameter
location: class Simple_Report_1143636234024_954843
private JRFillParameter parameter_REPORT_LOCALE = null;
^
/home/navneet/Simple_Report_1143636234024_954843.java:32: cannot find symbol
symbol : class JRFillParameter
location: class Simple_Report_1143636234024_954843
private JRFillParameter parameter_REPORT_DATA_SOURCE = null;
^
/home/navneet/Simple_Report_1143636234024_954843.java:33: cannot find symbol
symbol : class JRFillParameter
location: class Simple_Report_1143636234024_954843
private JRFillParameter parameter_REPORT_SCRIPTLET = null;
^
/home/navneet/Simple_Report_1143636234024_954843.java:34: cannot find symbol
symbol : class JRFillParameter
location: class Simple_Report_1143636234024_954843
private JRFillParameter parameter_REPORT_MAX_COUNT = null;
^
/home/navneet/Simple_Report_1143636234024_954843.java:35: cannot find symbol
symbol : class JRFillVariable
location: class Simple_Report_1143636234024_954843
private JRFillVariable variable_PAGE_NUMBER = null;
^
/home/navneet/Simple_Report_1143636234024_954843.java:36: cannot find symbol
symbol : class JRFillVariable
location: class Simple_Report_1143636234024_954843
private JRFillVariable variable_COLUMN_NUMBER = null;
^
/home/navneet/Simple_Report_1143636234024_954843.java:37: cannot find symbol
symbol : class JRFillVariable
location: class Simple_Report_1143636234024_954843
private JRFillVariable variable_REPORT_COUNT = null;
^
/home/navneet/Simple_Report_1143636234024_954843.java:38: cannot find symbol
symbol : class JRFillVariable
location: class Simple_Report_1143636234024_954843
private JRFillVariable variable_PAGE_COUNT = null;
^
/home/navneet/Simple_Report_1143636234024_954843.java:39: cannot find symbol
symbol : class JRFillVariable
location: class Simple_Report_1143636234024_954843
private JRFillVariable variable_COLUMN_COUNT = null;
^
/home/navneet/Simple_Report_1143636234024_954843.java:62: cannot find symbol
symbol : class JRFillParameter
location: class Simple_Report_1143636234024_954843
parameter_REPORT_RESOURCE_BUNDLE = (JRFillParameter)pm.get("REPORT_RESOURCE_BUNDLE");
^
/home/navneet/Simple_Report_1143636234024_954843.java:63: cannot find symbol
symbol : class JRFillParameter
location: class Simple_Report_1143636234024_954843
parameter_REPORT_CONNECTION = (JRFillParameter)pm.get("REPORT_CONNECTION");
^
/home/navneet/Simple_Report_1143636234024_954843.java:64: cannot find symbol
symbol : class JRFillParameter
location: class Simple_Report_1143636234024_954843
parameter_REPORT_PARAMETERS_MAP = (JRFillParameter)pm.get("REPORT_PARAMETERS_MAP");
^
/home/navneet/Simple_Report_1143636234024_954843.java:65: cannot find symbol
symbol : class JRFillParameter
location: class Simple_Report_1143636234024_954843
parameter_IS_IGNORE_PAGINATION = (JRFillParameter)pm.get("IS_IGNORE_PAGINATION");
^
/home/navneet/Simple_Report_1143636234024_954843.java:66: cannot find symbol
symbol : class JRFillParameter
location: class Simple_Report_1143636234024_954843
parameter_REPORT_CLASS_LOADER = (JRFillParameter)pm.get("REPORT_CLASS_LOADER");
^
/home/navneet/Simple_Report_1143636234024_954843.java:67: cannot find symbol
symbol : class JRFillParameter
location: class Simple_Report_1143636234024_954843
parameter_REPORT_VIRTUALIZER = (JRFillParameter)pm.get("REPORT_VIRTUALIZER");
^
/home/navneet/Simple_Report_1143636234024_954843.java:68: cannot find symbol
symbol : class JRFillParameter
location: class Simple_Report_1143636234024_954843
parameter_REPORT_LOCALE = (JRFillParameter)pm.get("REPORT_LOCALE");
^
/home/navneet/Simple_Report_1143636234024_954843.java:69: cannot find symbol
symbol : class JRFillParameter
location: class Simple_Report_1143636234024_954843
parameter_REPORT_DATA_SOURCE = (JRFillParameter)pm.get("REPORT_DATA_SOURCE");
^
/home/navneet/Simple_Report_1143636234024_954843.java:70: cannot find symbol
symbol : class JRFillParameter
location: class Simple_Report_1143636234024_954843
parameter_REPORT_SCRIPTLET = (JRFillParameter)pm.get("REPORT_SCRIPTLET");
^
/home/navneet/Simple_Report_1143636234024_954843.java:71: cannot find symbol
symbol : class JRFillParameter
location: class Simple_Report_1143636234024_954843
parameter_REPORT_MAX_COUNT = (JRFillParameter)pm.get("REPORT_MAX_COUNT");
^
/home/navneet/Simple_Report_1143636234024_954843.java:88: cannot find symbol
symbol : class JRFillVariable
location: class Simple_Report_1143636234024_954843
variable_PAGE_NUMBER = (JRFillVariable)vm.get("PAGE_NUMBER");
^
/home/navneet/Simple_Report_1143636234024_954843.java:89: cannot find symbol
symbol : class JRFillVariable
location: class Simple_Report_1143636234024_954843
variable_COLUMN_NUMBER = (JRFillVariable)vm.get("COLUMN_NUMBER");
^
/home/navneet/Simple_Report_1143636234024_954843.java:90: cannot find symbol
symbol : class JRFillVariable
location: class Simple_Report_1143636234024_954843
variable_REPORT_COUNT = (JRFillVariable)vm.get("REPORT_COUNT");
^
/home/navneet/Simple_Report_1143636234024_954843.java:91: cannot find symbol
symbol : class JRFillVariable
location: class Simple_Report_1143636234024_954843
variable_PAGE_COUNT = (JRFillVariable)vm.get("PAGE_COUNT");
^
/home/navneet/Simple_Report_1143636234024_954843.java:92: cannot find symbol
symbol : class JRFillVariable
location: class Simple_Report_1143636234024_954843
variable_COLUMN_COUNT = (JRFillVariable)vm.get("COLUMN_COUNT");
^
33 errors
at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:193)
at net.sf.jasperreports.engine.design.JRDefaultCompiler.compileReport(JRDefaultCompiler.java:131)
at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:211)
at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:144)
at com.appnetix.app.portal.financials.reports.RoyaltyReportAction.execute(RoyaltyReportAction.java:68)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at com.appnetix.app.control.web.AppnetixRequestProcessor.process(AppnetixRequestProcessor.java:149)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at com.appnetix.app.control.web.AppnetixControllerServlet.doPost(AppnetixControllerServlet.java:262)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:595)You have no permission to create a report. You have to create a permisson-entry into your server.policy. Then it would be work.
-
Date problem with jasper reports
I need to pass the date values as a parameter to the jasper reports and process it in the report, how can achieve it please give me a brief explanation, i need the date value for processing a sql statement in the jasper report please help me a sample code
from=first date value;
to=second date value;
//i need to pass the date as the parameter how can i achieve it
HashMap hm = new HashMap();
hm.put("fromdate", from);
hm.put("todate", to);
JasperPrint jasperPrint;
jasperPrint = JasperFillManager.fillReport("W:/ReportWorks/Estimation Reports/Dailyreport ItemWise.jasper",hm, con);
JasperViewer.viewReport(jasperPrint,false);HI All
I am working on Jasper report Project and when i am filling the report through
JasperFillManager.fillreport(String sourceFileName,Map parameters,Connection conn)
I am getting following exception:(I have included common-collections 3.2.jar in my classpath)
java.lang.NoClassDefFoundError: org/apache/commons/collections/ReferenceMap
at net.sf.jasperreports.engine.design.JRAbstractJavaCompiler.<clinit>(JRAbstractJavaCompiler.java:58)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at java.lang.Class.newInstance0(Class.java:350)
at java.lang.Class.newInstance(Class.java:303)
at net.sf.jasperreports.engine.JasperCompileManager.getCompiler(JasperCompileManager.java:489)
at net.sf.jasperreports.engine.JasperCompileManager.loadEvaluator(JasperCompileManager.java:243)
at net.sf.jasperreports.engine.fill.JRFillDataset.createCalculator(JRFillDataset.java:411)
at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:418)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:77)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:59)
at net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:147)
at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:57)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:402)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:234)
Please Suggest ;Thanks in advance -
hi evrybody... i'm having a problem while using Jasper Reports. I'm trying to Export a jrxml file generated by JasperAssistant plug-in in eclipse. but all i'm having is an exception. the following is my code and the said exception:
CODE:
public class DataSourceApp
private static final String TASK_HTML = "html";
private static final String TASK_XLS = "xls";
private static final String TASK_CSV = "csv";
private static final String TASK_RUN = "run";
public static void main(String[] args)
String fileName = null;
String taskName = null;
taskName = "html";
fileName = "path\\DataSourceReport.jasper";
try
long start = System.currentTimeMillis();
if (TASK_HTML.equals(taskName))
JasperPrint jPrint = new JasperPrint();
HashMap parameters = new HashMap();
Connection con = null;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:BOM_DSN","","");
jPrint = JasperFillManager.fillReport("path\\DataSourceReport.jrxml", parameters, con);
JasperExportManager.exportReportToHtmlFile(fileName);
System.err.println("HTML creation time : " + (System.currentTimeMillis() - start));
System.exit(0);
catch (JRException e)
e.printStackTrace();
System.exit(1);
catch (Exception e)
e.printStackTrace();
System.exit(1);
EXCEPTION:
java.io.StreamCorruptedException: invalid stream header
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:737)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:253)
at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:84)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:161)
at datasource.DataSourceApp.main(DataSourceApp.java:184)
NESTED BY :
java.io.StreamCorruptedException: invalid stream header
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:737)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:253)
at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:84)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:161)
at datasource.DataSourceApp.main(DataSourceApp.java:184)
NESTED BY :
net.sf.jasperreports.engine.JRException: Error loading object from file : C:\Eclipse\eclipse\workspace\test\BOM_Package\DataSourceReport.jrxml
at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:89)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:161)
at datasource.DataSourceApp.main(DataSourceApp.java:184)
Caused by: java.io.StreamCorruptedException: invalid stream header
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:737)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:253)
at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:84)
... 2 more
hope you can help me asap.. thanks!
--jomsHI All
I am working on Jasper report Project and when i am filling the report through
JasperFillManager.fillreport(String sourceFileName,Map parameters,Connection conn)
I am getting following exception:(I have included common-collections 3.2.jar in my classpath)
java.lang.NoClassDefFoundError: org/apache/commons/collections/ReferenceMap
at net.sf.jasperreports.engine.design.JRAbstractJavaCompiler.<clinit>(JRAbstractJavaCompiler.java:58)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at java.lang.Class.newInstance0(Class.java:350)
at java.lang.Class.newInstance(Class.java:303)
at net.sf.jasperreports.engine.JasperCompileManager.getCompiler(JasperCompileManager.java:489)
at net.sf.jasperreports.engine.JasperCompileManager.loadEvaluator(JasperCompileManager.java:243)
at net.sf.jasperreports.engine.fill.JRFillDataset.createCalculator(JRFillDataset.java:411)
at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:418)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:77)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:59)
at net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:147)
at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:57)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:402)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:234)
Please Suggest ;Thanks in advance -
Hi! all,
Myself developing a jasperReport in BEA workspace studio 1.1 and always getting the below mentioned exception, though i have run the same code in NetBeans successfully with the same jar file.
Even i have added weblogic.jar, wllog4j.jar, classes12.jar, commons-beanutils-1.8.0.jar, commons-collections-2.1.1.jar, commons-digester-1.7.jar, commons-javaflow-20060411.jar, commons-logging-1.0.4.jar, iText-2.1.7.jar, jasperreports-3.7.1.jar, jasperreports.jar, jasper-jdt-6.0.13.jar, jasper-compiler-jdt.jar, jasper-compiler.jar, jasper-runtime.jar, jasperreports-3.5.1.jar, jasperreports-2.0.5.jar in the WEB-INF/lib directory as well as build path. please help me.Thanks in advance.
==============================================================
Exception in thread "Main Thread" java.lang.NoClassDefFoundError: weblogic/logging/WLLogRecord : weblogic/logging/LogEntry
at java.lang.ClassLoader.findBootstrapClass(Native Method)
at java.lang.ClassLoader.findBootstrapClass0(ClassLoader.java:891)
at java.lang.ClassLoader.loadClass(ClassLoader.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at weblogic.logging.commons.LogFactoryImpl.getInstance(LogFactoryImpl.java:21)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:370)
at org.apache.commons.digester.Digester.<init>(Digester.java:304)
at net.sf.jasperreports.engine.xml.JRXmlDigester.<init>(JRXmlDigester.java:62)
at net.sf.jasperreports.engine.xml.JRXmlDigesterFactory.createDigester(JRXmlDigesterFactory.java:980)
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:203)
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:168)
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:152)
at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:150)
at com.generateJasperReport.test.GasperReportNew.main(GasperReportNew.java:38)
==============================================================================
My Code is..........................
============================
package com.generateJasperReport.test;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.util.HashMap;
import java.util.Map;
//import weblogic.logging.LogEntry;
import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JRResultSetDataSource;
import net.sf.jasperreports.engine.JasperCompileManager;
import net.sf.jasperreports.engine.JasperExportManager;
import net.sf.jasperreports.engine.JasperFillManager;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.engine.JasperReport;
import net.sf.jasperreports.view.JasperViewer;
public class GenerateJasperReport {
static JRResultSetDataSource jrds = null;
static ResultSet rs = null;
public static Connection connectDB() {
Connection jdbcConnection = null;
try {
Class.forName("oracle.jdbc.driver.OracleDriver");
jdbcConnection = DriverManager.getConnection(
"jdbc:oracle:thin:@192.161.5.35:1521:abc",
"xyz", "pqr");
} catch (Exception ex) {
String connectMsg = "Could not connect to the database: "
+ ex.getMessage() + " " + ex.getLocalizedMessage();
System.out.println(connectMsg);
return jdbcConnection;
public static void main(String[] args) throws JRException {
Connection con = connectDB();
JasperReport jasperReport=null;
System.out.println("666666666666666666");
String reportSource = "E:\\Pintu\\Project\\Bea Project\\workspace\\GenerateJasperReport\\src\\com\\generateJasperReport\\jrxmlFile\\JasperReportGeneration.jrxml";
String reportDest = "E:\\Pintu\\Project\\Bea Project\\workspace\\GenerateJasperReport\\src\\com\\generateJasperReport\\output\\JasperReportGeneration.pdf";
System.out.println("555555555555555");
Map <String,String>parammap = new HashMap<String,String>();
parammap.put("ReportTitle", "PDF JasperReport");
System.out.println("444444444444444");
try {
try{
jasperReport = JasperCompileManager
.compileReport(reportSource);
}catch(JRException e){e.printStackTrace();}
System.out.println("ssssssssssssss");
JasperPrint jasperPrint = JasperFillManager.fillReport(
jasperReport, parammap, con);
System.out.println("vvvvvvvvvvvvvvv");
JasperExportManager.exportReportToPdfFile(jasperPrint, reportDest);
System.out.println("kkkkkkkkkkkkkkkkkkk");
JasperViewer.viewReport(jasperPrint);
System.out.println("gfrfrrrertfewrw");
} catch (Exception ex) {
ex.printStackTrace();
===========================================================Thanks for the information. It makes so much more sense to do the configuration from within PFR instead of WLS but the engineer insisted I could just do everything from within the WLS config wizard. I'm very relieved that someone has had success with this.
Am I supposed to do the configuration wizard in WLS before doing the Configure Classic Interface from PFR?
Since we're only going to be using the PC for the developer, I wasn't sure how much of the Web Logic Server needed to be configured.
The Oracle engineer said to choose 'Oracle Ent. Mgr' and 'Oracle Classic 11g' from the WLS Config Wizard which I did - but now I have a choice on the 'Optional Configuration' page to choose 'Administration Server', 'Managed Servers', 'Deployments and Services' and 'RDMBS Security Store'. I'm not sure if I'm supposed to choose any of these. I want to be able to talk to the Solaris server that is going to be my application server via WLS and I'm not sure if I need any of these.
In your environment, are you developing 11g forms on a PC but hosting on another platform? I have a Windows 7 64 bit machine but was told I had to set up a 32bit XP VM on my Win7 machine to use Forms and Reports for development. -
Jasper Reports Integration - JNDI datasources
Hello
I wish to use Jasper Reports to create a few reports with Bar Charts which I send to users via emails from APEX.
The system versions I am running is:-
Product Build: 4.1.1.00.23
CORE 11.2.0.1.0 Production
NLSRTL Version 11.2.0.1.0 - Production
Oracle Database 11g Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
TNS for 64-bit Windows: Version 11.2.0.1.0 - Production
I been installing Jasper Report following http://www.opal-consulting.de/apex/f?p=20090928:4
In following the instructions I got as far as Tomcat installation point 7 where the JNDI datasourcse is defined.
I the installations file \conf\Catalina\localhost\JasperReportsIntegration.xml should of been created. In case it has not
Have I misunderstood the instructions?
Thanks, PeteHi Pete,
Yes, you should install iReport to design your reports.
I'm not completely sure about what you mean with "the format of the classpath". I guess you refer to the "classpath" tab in Tools > Options (?).
A default installation of iReport does not allow you to create datasources of type Oracle JDBC driver. The JasperReportsIntegration kit includes a lib folder that contains two .jar files (ojdbc14.jar and orai18n.jar). Copy these two files to the following location: C:\Program Files\Jaspersoft\iReport-4.6.0\ireport\modules\ext. Then in iReport, go to Options > Tools and hit the classpath button. Click the button "Add JAR" and select the two .jar files from above. These steps make it possible to create a new datasource of type Oracle JDBC driver. I hope this answers your question. If not, provide more information and I'll get back to you...
Don't mind the JasperReports Server by the way. The JasperReportsIntegration kit includes all the files you need to install and configure JasperReports.
Goodbye,
Nick
Maybe you are looking for
-
How to use Satellite M500-ST5401 for mobil calls using Bluetooth
Team, I would like to know more details about bluetooth connectivity of a laptop to the bluetooth compatible mobile phones.My Model is Toshiba Satellite M500-ST5401. What i like to get to know is,I am having a mobile phone Sony Ericsson and it has bl
-
Powershell Edit GPO deploy Printer
Hi Guys, I tried to make Powershell script with GUI to add printers to print server. I would like that my super user just write new printer name and IP adresse in textbox and script suppose to add printer to printer server, create new ADGroupe to eac
-
Hi, I have written a program which is sending a data to client and gets an acknowledgement from client. The data is received by client and when the acknowledgement string is sent by the client; at server side its received as null. please help.
-
How do I print a copy fo my icloud calendar
How do I print my icloud calendar?
-
Every time I open the desktop/screensaver pane in system preferences it freezes. Does anyone know how I can fix this?