Ireport exception
hi all
i make desktop application using java and ireport and then produces jar file on my local machine
then i tested the jar file and it work well and ireport work very nice
but
when i move this jar to other computer the jar work well but when i try to generate report i get the following exception
net.sf.jasperreports.engine.JRException: Error compiling report java source files :
i do not know why please help me
Don't double post. I've removed the thread you started half an hour after this one with the identically same question.
db
Similar Messages
-
IREPORT : Exception: Element type "topPen" must be declared?
i am making a report with IReport plugin it is running in Preview.
when i call this report in JAVA code it give me Exception
Nov 15, 2008 10:45:13 AM org.apache.commons.digester.Digester error
SEVERE: Parse Error at line 43 column 79: Element type "topPen" must be declared.
org.xml.sax.SAXParseException: Element type "topPen" must be declared.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1647)
at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:238)
at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:225)
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:213)
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:167)
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:151)
JAVA code
try {
ConnectDB con = new ConnectDB();
Map parameters = new HashMap();
parameters.put("regNo", "2");
JasperDesign jasperDesign = JRXmlLoader.load("c:/agreement.jrxml");
JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);
JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, con.getConnection());
JasperViewer.viewReport(jasperPrint);
} catch (Exception ex) {
JOptionPane.showMessageDialog(this, ex );
}thanks for reply.
i made report with the help of wizard.
Either your XML is invalid according to its DTD, or the DTD is invalid.
how can i resolve this problem? -
Hi experts,
I need help with the function module "Download", I don't know how to change it to 6.0 because my FM doesn't have filename and I want that appears in pop up format...can anybody guide me, please?
Thanks a lot
regards,
RebecaHi,
filename is mandatory ,once check with you are old system,if its same in old system also check with u r lead.
please find the below code for replaement of download..
Start of Data Declaration for CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
DATA: LV_FILENAME TYPE STRING,
LV_FILENAME1 TYPE STRING,
LV_PATH TYPE STRING,
LV_FULLPATH TYPE STRING.
CONSTANTS: LC_FILETYPE TYPE CHAR10 VALUE 'ASC'.
End of Data Declaration for CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
LV_FILENAME = P_FILE.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
EXPORTING
DEFAULT_FILE_NAME = LV_FILENAME
CHANGING
FILENAME = LV_FILENAME
PATH = LV_PATH
FULLPATH = LV_FULLPATH
EXCEPTIONS
CNTL_ERROR = 1
ERROR_NO_GUI = 2
NOT_SUPPORTED_BY_GUI = 3
others = 4.
CALL METHOD CL_GUI_CFW=>FLUSH
EXCEPTIONS
CNTL_SYSTEM_ERROR = 1
CNTL_ERROR = 2
others = 3.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = LV_FILENAME
FILETYPE = LC_FILETYPE
TABLES
DATA_TAB = IREPORT
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22.
ACT_FILENAME = LV_FULLPATH.
Regards,
Madhu
Edited by: Madhu Babu on Feb 4, 2010 7:59 PM -
How to open my Ireport in new browser tab window
hi
I'm using Jdev v 11.1.2.3.0
Isucced in conneting and calling (ireport) generated report from my adf application in pdf file format
All what I want to do now is to call or open the report in browser tab window
I can call it in the same tab window
using this line code
response.setHeader("Cache-Control", "max-age=0");
or
make attachment download
using this line code
response.setHeader("Content-Disposition", "attachment; filename=\"report.pdf\"");
please help me in this last setp
here is my code to call ireport
after adding nessesary jar files and Datasource in wedlojic
maybe it help others
============
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.sql.Connection;
import java.util.HashMap;
import java.util.Map;
import javax.faces.context.FacesContext;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.servlet.ServletContext;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import javax.sql.DataSource;
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.engine.type.WhenNoDataTypeEnum;
import net.sf.jasperreports.engine.util.JRLoader;
import oracle.adf.model.BindingContext;
import oracle.adf.view.rich.component.rich.input.RichInputText;
import oracle.binding.BindingContainer;
//import oracle.adf.model.binding.DCIteratorBinding;
public class mainNew {
private RichInputText copyFrom;
private RichInputText copyTo;
public mainNew() {
public void setCopyFrom(RichInputText copyFrom) {
this.copyFrom = copyFrom;
public RichInputText getCopyFrom() {
return copyFrom;
public void setCopyTo(RichInputText copyTo) {
this.copyTo = copyTo;
public RichInputText getCopyTo() {
return copyTo;
public String cb3_action() {
String s =(String)copyFrom.getValue();
String d =(String)copyTo.getValue();
// copyTo.setValue(s);
// DCIteratorBinding empIter = (DCIteratorBinding) getBindings().get("Employees1Iterator");
// String empId = empIter.getCurrentRow().getAttribute("DepartmentId").toString();
Map m = new HashMap();
System.out.println(s) ;
System.out.println(d) ;
// m.put("eployeeId", copyFrom.getValue() );
if (s!=null) {
m.put("whr", "Where department_id ="+s); }
if (d!=null) {
m.put("whr", "Where employee_id= "+d);}
if (s != null & d==null)
{ m.put("whr", "Where department_id ="+s);
if (s==null & d!=null) {
m.put("whr", "Where employee_id= "+d);}
if (s!=null & d!=null) {
m.put("whr", "Where department_id ="+s +" and employee_id="+d);}
if (s==null & d==null) {
m.put("whr", "Where 1=2");}
try
// runReport("empRep2.jasper", m);
runReport("empsDyn.jasper", m);
catch (Exception e)
return null;
public BindingContainer getBindings()
return BindingContext.getCurrent().getCurrentBindingsEntry();
public Connection getDataSourceConnection(String dataSourceName)
throws Exception
Context ctx = new InitialContext();
DataSource ds = (DataSource)ctx.lookup(dataSourceName);
return ds.getConnection();
private Connection getConnection() throws Exception
return getDataSourceConnection("hrDS");
public ServletContext getContext()
return (ServletContext)getFacesContext().getExternalContext().getContext();
public HttpServletResponse getResponse()
return (HttpServletResponse)getFacesContext().getExternalContext().getResponse();
public static FacesContext getFacesContext()
return FacesContext.getCurrentInstance();
public void runReport(String repPath, java.util.Map param) throws Exception
Connection conn = null;
try
HttpServletResponse response = getResponse();
ServletOutputStream out = response.getOutputStream();
/// response.setHeader("Cache-Control", "max-age=0"); // opens in same page
response.setHeader("Content-Disposition", "attachment; filename=\"report.pdf\""); // genreat adownload file
// response.setHeader("Content-Disposition", "inline; filename=\"" + "Report.pdf\"");//opens in same page
response.setContentType("application/pdf");
ServletContext context = getContext();
InputStream fs = context.getResourceAsStream("/reports/" + repPath);
JasperReport template = (JasperReport) JRLoader.loadObject(fs);
template.setWhenNoDataType(WhenNoDataTypeEnum.ALL_SECTIONS_NO_DETAIL);
conn = getConnection();
JasperPrint print = JasperFillManager.fillReport(template, param, conn);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
JasperExportManager.exportReportToPdfStream(print, baos);
out.write(baos.toByteArray());
out.flush();
out.close();
FacesContext.getCurrentInstance().responseComplete();
catch (Exception jex)
jex.printStackTrace();
finally
close(conn);
public void close(Connection con)
if (con != null)
try
con.close();
catch (Exception e)
}One solution would be to generate the report via an servlet which you then call with an af:golink with an target frame set to blank.
For a sample how to do this check out http://tompeez.wordpress.com/2011/12/16/jdev11-1-2-1-0-handling-imagesfiles-in-adf-part-3/
Timo -
Trying to call Jasper iReport through portlet & getting error
Hi,
I have written the following code which is linked to a button in my portlet.
package com.ext.portlet.drpdwn.action;
import com.liferay.portal.struts.PortletAction;
import com.liferay.portal.util.Constants;
import javax.portlet.WindowState;
import javax.servlet.jsp.PageContext;
import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
import javax.portlet.PortletConfig;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.HashMap;
import java.util.Map;
import java.sql.*;
import javax.portlet.PortletException;
import net.sf.jasperreports.engine.*;
import net.sf.jasperreports.engine.design.JasperDesign;
import net.sf.jasperreports.engine.xml.JRXmlLoader;
import net.sf.jasperreports.engine.export.*;
public class QualityReportAction extends PortletAction
public void processAction(ActionMapping mapping, ActionForm form,PortletConfig config,ActionRequest req, ActionResponse res)
throws Exception
String typeofreport_val = req.getParameter("types_of_reports").trim();
System.out.println("Report Name is:" +typeofreport_val);
JasperReport jasperReport;
JasperPrint jasperPrint;
JasperDesign jasperDesign;
Connection connection = null;
if ( null == typeofreport_val || "".equals("typeofreport_val"))
setForward(req,"portlet.ext.drpdwn.error");
else
try
Class.forName("org.postgresql.Driver");
String url = "jdbc:postgresql://10.10.33.39:5432/globus_db?user=postgres&password=marines@123";
connection = DriverManager.getConnection(url);
// load JasperDesign from XML and compile it into JasperReport
jasperDesign = JRXmlLoader.load("C:/testRep/CCQR.jrxml");
jasperReport = JasperCompileManager.compileReport(jasperDesign);
// fill JasperPrint using fillReport() method
jasperPrint = JasperFillManager.fillReport(jasperReport,null,connection);
JasperExportManager.exportReportToPdfFile(jasperPrint,"C:/testRep/ccqr.pdf");
catch (SQLException ex)
setForward(req,"portlet.ext.drpdwn.error");
System.out.println("-------------------------------------------");
while (ex != null)
ex.printStackTrace();
ex = ex.getNextException();
System.out.println("-------------------------------------------");
catch(Exception e)
System.out.println("-------------------------------------------");
System.out.println("Exception is --> "+e);
System.out.println("-------------------------------------------");
setForward(req,"portlet.ext.drpdwn.success");
public ActionForward render(ActionMapping mapping,ActionForm form,PortletConfig config, RenderRequest req,RenderResponse res) throws Exception
if (getForward(req) != null && !getForward(req).equals(""))
return mapping.findForward(getForward(req));
else
return
mapping.findForward("portlet.ext.drpdwn.view");
}When I try to run this code I get the following error:
exception javax.servlet.ServletException: Servlet execution threw an exception
com.liferay.filters.secure.SecureFilter.doFilter(SecureFilter.java:144)
com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.doFilter(VirtualHostFilter.java:136)
com.liferay.portal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:126)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
com.liferay.filters.strip.StripFilter.doFilter(StripFilter.java:95)
com.liferay.filters.secure.SecureFilter.doFilter(SecureFilter.java:144)
com.liferay.filters.compression.CompressionFilter.doFilter(CompressionFilter.java:116)
com.liferay.filters.doubleclick.DoubleClickFilter.doFilter(DoubleClickFilter.java:138)
com.liferay.portal.servlet.filters.layoutcache.LayoutCacheFilter.doFilter(LayoutCacheFilter.java:170)
com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.doFilter(AutoLoginFilter.java:106)
com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.doFilter(VirtualHostFilter.java:136)
root cause java.lang.NoClassDefFoundError: net/sf/jasperreports/engine/xml/JRXmlLoader com.ext.portlet.drpdwn.action.QualityReportAction.processAction(QualityReportAction.java:59)I have the following necessary files in my class path:
itext-1.3.1.jar
iReport.jar
commons-logging-1.0.2.jar
commons-javaflow-20060411.jar
commons-digester-1.7.jar
commons-collections-2.1.jar
commons-beanutils-1.7.jar
jasperreports-2.0.2.jar
jdt-compiler-3.1.1.jar
log4j-1.2.15.jar
xercesImpl.jar Please suggest me where I am going wrong.
Thanks & Regards
Saurabh.
Edited by: Saurabh.J on Nov 27, 2007 2:33 PMDisable your anti-virus, install the update, turn you anti-virus back on
-
Exception while generating pdf report using Jasper Report
Hi experts,
I am using Jdeveloper : 11.1.2.0.0
Jaspersoft iReport Designer 4.5.0
Database is Oracle 11g
When i try to generate a pdf report ,a pdf file with empty content is generating.
and exception occuring is
net.sf.jasperreports.engine.JRException: Error executing SQL statement for : TestReport
at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createDatasource(JRJdbcQueryExecuter.java:229)
at net.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource(JRFillDataset.java:731)
at net.sf.jasperreports.engine.fill.JRFillDataset.initDatasource(JRFillDataset.java:629)
at net.sf.jasperreports.engine.fill.JRBaseFiller.setParameters(JRBaseFiller.java:1159)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:802)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:746)
at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:58)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:417)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:247)
at com.empAppln.view.EmployeeRegister.runReport(EmployeeRegister.java:153)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.el.parser.AstValue.invoke(Unknown Source)
at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
at org.apache.myfaces.trinidadinternal.taglib.listener.FileDownloadActionListener.processAction(FileDownloadActionListener.java:124)
at oracle.adfinternal.view.faces.event.rich.FileDownloadActionListener.processAction(FileDownloadActionListener.java:77)
at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88)
at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcast(UIXComponentBase.java:814)
at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:179)
at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:159)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1129)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:353)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:204)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:121)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
Caused by: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:457)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:889)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:476)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:204)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:540)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:217)
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:924)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1261)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1419)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3752)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3806)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1667)
at weblogic.jdbc.wrapper.PreparedStatement.executeQuery(PreparedStatement.java:135)
at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createDatasource(JRJdbcQueryExecuter.java:222)
... 62 more
Where TestReport is the name of the report...
How can i solve this..
Thanks
gtg.from the error what i understud means.com.empAppln.view.*EmployeeRegister*
this table is not exits in db. so throw error like this.
table or view does not exist.and also,
Stop filedownload if file is empty
Edited by: ADF 7 on Jan 26, 2012 11:17 PM -
Change query string in ireport xml file?
greetings all
iam newbie to xml
first i want to add the xml file to a packge named first,how to do that?
second i want to change the query string to be
"select * from report where month= "+textfield.getText()
here's the code:
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Created with iReport - A designer for JasperReports -->
<!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd">
<jasperReport
name="Untitled_report_2"
columnCount="1"
printOrder="Vertical"
orientation="Portrait"
pageWidth="595"
pageHeight="842"
columnWidth="535"
columnSpacing="0"
leftMargin="30"
rightMargin="30"
topMargin="20"
bottomMargin="20"
whenNoDataType="NoPages"
isTitleNewPage="false"
isSummaryNewPage="false">
<property name="ireport.scriptlethandling" value="0" />
<property name="ireport.encoding" value="UTF-8" />
<import value="java.util.*" />
<import value="net.sf.jasperreports.engine.*" />
<import value="net.sf.jasperreports.engine.data.*" />
<queryString><![CDATA[SELECT * FROM report]]></queryString>
<field name="category" class="java.lang.String"/>
<field name="values" class="java.lang.Integer"/>
<field name="series" class="java.lang.String"/>
<background>
<band height="0" isSplitAllowed="true" >
</band>
</background>
<title>
<band height="0" isSplitAllowed="true" >
</band>
</title>
<pageHeader>
<band height="0" isSplitAllowed="true" >
</band>
</pageHeader>
<columnHeader>
<band height="0" isSplitAllowed="true" >
</band>
</columnHeader>
<detail>
<band height="201" isSplitAllowed="true" >
<stackedBar3DChart>
<chart hyperlinkTarget="Self" >
<reportElement
x="32"
y="21"
width="394"
height="144"
key="element-1"/>
<box></box>
<chartLegend textColor="#000000" backgroundColor="#FFFFFF" >
</chartLegend>
</chart>
<categoryDataset>
<dataset >
</dataset>
<categorySeries>
<seriesExpression><![CDATA[$F{series}]]></seriesExpression>
<categoryExpression><![CDATA[$F{category}]]></categoryExpression>
<valueExpression><![CDATA[$F{values}]]></valueExpression>
<itemHyperlink >
</itemHyperlink>
</categorySeries>
</categoryDataset>
<bar3DPlot >
<plot />
<categoryAxisFormat>
<axisFormat >
</axisFormat>
</categoryAxisFormat>
<valueAxisFormat>
<axisFormat >
</axisFormat>
</valueAxisFormat>
</bar3DPlot>
</stackedBar3DChart>
</band>
</detail>
<columnFooter>
<band height="3" isSplitAllowed="true" >
</band>
</columnFooter>
<pageFooter>
<band height="0" isSplitAllowed="true" >
</band>
</pageFooter>
<summary>
<band height="0" isSplitAllowed="true" >
</band>
</summary>
</jasperReport>the xml file
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Created with iReport - A designer for JasperReports -->
<!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd">
<jasperReport
name="test"
columnCount="1"
printOrder="Vertical"
orientation="Portrait"
pageWidth="595"
pageHeight="842"
columnWidth="535"
columnSpacing="0"
leftMargin="30"
rightMargin="30"
topMargin="20"
bottomMargin="20"
whenNoDataType="NoPages"
isTitleNewPage="false"
isSummaryNewPage="false">
<property name="ireport.scriptlethandling" value="0" />
<property name="ireport.encoding" value="UTF-8" />
<import value="java.util.*" />
<import value="net.sf.jasperreports.engine.*" />
<import value="net.sf.jasperreports.engine.data.*" />
<queryString><![CDATA[SELECT * FROM report WHERE category BETWEEN 'week1' AND 'week4']]></queryString>
<field name="category" class="java.lang.String"/>
<field name="values" class="java.lang.Integer"/>
<field name="series" class="java.lang.String"/>
<background>
<band height="0" isSplitAllowed="true" >
</band>
</background>
<title>
<band height="50" isSplitAllowed="true" >
<staticText>
<reportElement
x="158"
y="7"
width="183"
height="37"
key="staticText-1"/>
<box></box>
<textElement>
<font size="14"/>
</textElement>
<text><![CDATA[ Report]]></text>
</staticText>
</band>
</title>
<pageHeader>
<band height="50" isSplitAllowed="true" >
</band>
</pageHeader>
<columnHeader>
<band height="30" isSplitAllowed="true" >
</band>
</columnHeader>
<detail>
<band height="4" isSplitAllowed="true" >
</band>
</detail>
<columnFooter>
<band height="2" isSplitAllowed="true" >
</band>
</columnFooter>
<pageFooter>
<band height="0" isSplitAllowed="true" >
</band>
</pageFooter>
<summary>
<band height="194" isSplitAllowed="true" >
<stackedBar3DChart>
<chart hyperlinkTarget="Self" >
<reportElement
x="49"
y="-6"
width="369"
height="200"
key="element-1"/>
<box></box>
<chartLegend textColor="#000000" backgroundColor="#FFFFFF" >
</chartLegend>
</chart>
<categoryDataset>
<dataset >
</dataset>
<categorySeries>
<seriesExpression><![CDATA[$F{series}]]></seriesExpression>
<categoryExpression><![CDATA[$F{category}]]></categoryExpression>
<valueExpression><![CDATA[$F{values}]]></valueExpression>
<itemHyperlink >
</itemHyperlink>
</categorySeries>
</categoryDataset>
<bar3DPlot >
<plot />
<categoryAxisFormat>
<axisFormat >
</axisFormat>
</categoryAxisFormat>
<valueAxisFormat>
<axisFormat >
</axisFormat>
</valueAxisFormat>
</bar3DPlot>
</stackedBar3DChart>
</band>
</summary>
</jasperReport>the java code:
import java.sql.*;
import net.sf.jasperreports.view.JasperViewer;
import net.sf.jasperreports.engine.xml.JRXmlLoader;
import net.sf.jasperreports.engine.JasperCompileManager;
import net.sf.jasperreports.engine.JasperFillManager;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.engine.design.JasperDesign;
import net.sf.jasperreports.engine.JasperReport;
import java.io.OutputStream;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
class ReportDriver {
public static void createAndShowGUI(){
Object[]obj={"1","2"};
JComboBox combo=new JComboBox(obj);
JFrame frame=new JFrame("Test");
JButton button=new JButton("Show Report");
frame.setLayout(new FlowLayout());
frame.setLocationRelativeTo(null);
frame.add(combo);
frame.add(button);
frame.setSize(150,100);
frame.setVisible(true);
button.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
show_report();
public static void show_report(){
try{
Class.forName("com.mysql.jdbc.Driver");
Connection c = DriverManager.getConnection("jdbc:mysql://localhost/library", "root", "");
}catch(Exception ex) {ex.printStackTrace();}
try{
JasperDesign jasperDesign = JRXmlLoader.load("F:\\Program Files\\Xinox Software\\JCreatorV4\\MyProjects\\chart2\\src\\report.xml");
JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);
Connection c = DriverManager.getConnection("jdbc:mysql://localhost/library", "root", "");
JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, null, c);
JasperViewer.viewReport(jasperPrint);
}catch(Exception ex) {
String connectMsg = "Could not create the report " + ex.getMessage() + " " + ex.getLocalizedMessage();
System.out.println(connectMsg);
public static void main(String[] args) {
createAndShowGUI();
}the problem is i want when the user selects 2 from the combobox and presses the button
the where clause in the xml file is changed to BETWEEN 'week5' AND 'week8',how to do that? -
Problems setting up iReport for SLM development
Hi!
I've been trying to set up Eclipse and iReport so that I can create
some custom reports for SLM, but this has proven difficult. I'll explain
what I've done and where it fails:
1) I've followed all instructions on this page:
'Sentinel Development Environment'
(http://www.novell.com/developer/sent...vironment.html)
I get the following error in step 4 in the section entitled
"Enabling Previewing
Reports That Query The Sentinel Log Manager Event Store"
Exception in thread "main" 05.jan.2011 14:37:12
esecurity.base.error.SentinelErrorCodes <clinit>
INFO: There are 71 defined error codes.
esecurity.base.exceptions.RemoteException:
at
esecurity.db.object.IndexedLogSearchServiceRemoteI mpl.startSearch(Ind
exedLogSearchServiceRemoteImpl.java:54)
at
com.novell.reports.jasper.data.event.EventDataSour ce.nextEvent(EventD
ataSource.java:156)
at
com.novell.reports.jasper.data.event.EventDataSour ce.next(EventDataSo
urce.java:145)
at
com.novell.reports.jasper.data.event.ConnectionChe ck.main(ConnectionC
heck.java:66)
Caused by: esecurity.base.exceptions.RemoteException:
at
esecurity.base.datamodel.method.MethodResult.setEx ception(MethodResul
t.java:55)
at
esecurity.base.ccs.comp.BaseRemoteObjectTask.execu te(BaseRemoteObject
Task.java:120)
at
esecurity.base.ccs.comp.GenericRemoteObjectTask.pr ocessRequest(Generi
cRemoteObjectTask.java:86)
at
esecurity.base.ccs.comp.GenericTask.process(Generi cTask.java:91)
at
esecurity.base.ccs.comp.GenericTask.process(Generi cTask.java:65)
at esecurity.base.ccs.comp.BaseTask.run(BaseTask.java :52)
at
esecurity.base.ccs.comp.threadpool.TaskThreadPool$ RunWrapper.run(Task
ThreadPool.java:89)
at
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Wo rker.run(PooledExec
utor.java:732)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.
java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
esecurity.base.ccs.comp.BaseRemoteObjectTask.execu te(BaseRemoteObject
Task.java:113)
... 7 more
Caused by: java.lang.RuntimeException: No param auditInfo for method id
= _start
Search_,name = startSearch
param=startTime, type=java.util.Date, value=nullparam=limit, type=long,
value=1p
aram=sortFields, type=java.util.List, value=nullparam=searchString,
type=String,
value=sev:[9 TO 9] MAXCOUNT=1param=pageSize, type=integer,
value=10000param=end
Time, type=java.util.Date, value=nullparam=user, type=String,
value=admin
at
esecurity.base.datamodel.method.ObjMethod.getParam (ObjMethod.java:250
at
esecurity.base.datamodel.method.ObjMethod.getDataO bjectValue(ObjMetho
d.java:107)
at
esecurity.db.object.IndexedLogSearchServiceServerS tub._startSearch_(I
ndexedLogSearchServiceServerStub.java:66)
... 12 more
I noticed another thread on this error, but as you can see from the
configuration.xml file I am using the system user so rights shouldn't be
the cause here:
<strategy active="yes" id="sentinel_client"
location="com.esecurity.common.communication.strat egy.jmsstrategy.activemq.ActiveMQStrategyFactory"
name="ActiveMQ">
<jms
brokerURL="ssl://x.x.x.x:61616??wireFormat.maxInactivityDuration=0"
interceptors="compression"
keystore="C:\\Users\\ragsto\\Development\\Sentinel
SDK\\content\\dev\\sdk\\build\\config\\.activemqcl ientkeystore.jks"
keystorePassword="password" password="832f515a51412dec5ec22dfa756693ab"
username="system"/>
</strategy>
I decided test the reports even with this error, but whenever I open a
TemplateReport.jrxml I immediately get the following error:
net.sf.jasperreports.engine.JRRuntimeException:
net.sf.jasperreports.engine.JRException: Class
com.novell.reports.jasper.data.event.LuceneEventQu eryExecutorFactory not
found.
In the DOS window where I started iReport from, I get the following
error:
Can't find the translation for key =
gui.elementpropertiessheet.sheetProperty.re
nderType: using default (Render type)
Can't find the translation for key =
gui.elementpropertiessheet.sheetProperty.re
nderType: using default (Render type)
End event threw exception
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.apache.commons.beanutils.MethodUtils.invokeMet hod(MethodUtils.jav
a:216)
at
org.apache.commons.digester.SetNextRule.end(SetNex tRule.java:216)
at org.apache.commons.digester.Rule.end(Rule.java:230 )
at
org.apache.commons.digester.Digester.endElement(Di gester.java:1130)
at
it.businesslogic.ireport.compiler.xml.SourceTraceD igester.endElement(
SourceTraceDigester.java:159)
at
org.apache.xerces.parsers.AbstractSAXParser.endEle ment(Unknown Source
at
org.apache.xerces.impl.dtd.XMLDTDValidator.endName spaceScope(Unknown
Source)
at
org.apache.xerces.impl.dtd.XMLDTDValidator.handleE ndElement(Unknown S
ource)
at
org.apache.xerces.impl.dtd.XMLDTDValidator.endElem ent(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerI mpl.scanEndElement(
Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerI mpl$FragmentContent
Dispatcher.dispatch(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerI mpl.scanDocument(Un
known Source)
at org.apache.xerces.parsers.XML11Configuration.parse (Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse (Unknown
Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse( Unknown
Source)
at
org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser .parse(Unknown Sour
ce)
at
org.apache.commons.digester.Digester.parse(Digeste r.java:1647)
at
net.sf.jasperreports.engine.xml.JRXmlLoader.loadXM L(JRXmlLoader.java:
239)
at
net.sf.jasperreports.engine.xml.JRXmlLoader.loadXM L(JRXmlLoader.java:
226)
at
it.businesslogic.ireport.IReportCompiler.loadJaspe rDesign(IReportComp
iler.java:2125)
at
it.businesslogic.ireport.DesignVerifyerThread.veri fyDesign(DesignVeri
fyerThread.java:145)
at
it.businesslogic.ireport.DesignVerifyerThread.run( DesignVerifyerThrea
d.java:92)
at java.lang.Thread.run(Unknown Source)
Caused by: net.sf.jasperreports.engine.JRRuntimeException:
net.sf.jasperreports.
engine.JRException: Class
com.novell.reports.jasper.data.event.LuceneEventQu eryE
xecutorFactory not found.
at
net.sf.jasperreports.engine.design.JRDesignDataset .queryLanguageChang
ed(JRDesignDataset.java:914)
at
net.sf.jasperreports.engine.design.JRDesignDataset .setQuery(JRDesignD
ataset.java:448)
at
net.sf.jasperreports.engine.design.JasperDesign.se tQuery(JasperDesign
.java:806)
... 28 more
Caused by: net.sf.jasperreports.engine.JRException: Class
com.novell.reports.jas
per.data.event.LuceneEventQueryExecutorFactory not found.
at
net.sf.jasperreports.engine.util.JRSingletonCache. createInstance(JRSi
ngletonCache.java:98)
at
net.sf.jasperreports.engine.util.JRSingletonCache. getCachedInstance(J
RSingletonCache.java:78)
at
net.sf.jasperreports.engine.util.JRQueryExecuterUt ils.getQueryExecute
rFactory(JRQueryExecuterUtils.java:60)
at
net.sf.jasperreports.engine.design.JRDesignDataset .queryLanguageChang
ed(JRDesignDataset.java:903)
... 30 more
Caused by: java.lang.ClassNotFoundException:
com.novell.reports.jasper.data.even
t.LuceneEventQueryExecutorFactory
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.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at
net.sf.jasperreports.engine.util.JRClassLoader.loa dClassForRealName(J
RClassLoader.java:179)
at
net.sf.jasperreports.engine.util.JRClassLoader.loa dClassForName(JRCla
ssLoader.java:119)
at
net.sf.jasperreports.engine.util.JRSingletonCache. createInstance(JRSi
ngletonCache.java:88)
... 33 more
locationFileName does not exisit
It looks to me like there's a problem with the Lucene connection, but
the connection test works..?
When I try to compile the report, I get the following errors:
The method DatePrepare(String, String, String) is undefined for the
type TemplateReportScriptlet
The method DatePrepare(String, String, String) is undefined for the
type TemplateReportScriptlet
The method getKeyColors() is undefined for the type
TemplateReportScriptlet
The method getKeyColors() is undefined for the type
TemplateReportScriptlet
The method DatePrepare(String, String, String) is undefined for the
type TemplateReportScriptlet
This is similar to another users error, but I wasn't able to solve my
problem by compiling in iReport 3.7.6 - I just get different errors.
Since I am not very familiar with Java, I have no idea on how to
troubleshoot this. Can anyone assist, please?
Ragnar Storstrm
rstorstrom
rstorstrom's Profile: http://forums.novell.com/member.php?userid=5064
View this thread: http://forums.novell.com/showthread.php?t=429304That fixed the problem with the connection check - thank you! But I
still have two problems left:
1) When I create a new report in Eclipse and try to compile it in
iReport I get the following error:
Compiling to file... C:\proj\content\dev\reports\Testing\Test av
rapportlaging\6.1\TemplateReport.jasper ->
C:\proj\content\dev\reports\Testing\Test av
rapportlaging\6.1\TemplateReport.java
net.sf.jasperreports.engine.design.J...va.lang.ClassNotFoundException:*TemplateReportClass
Line:*21,*Column:*36*JRXML*Element:*/jasperReport
Exception*in*thread*"AWT-EventQueue-0"*java.lang.ArrayIndexOutOfBoundsException:*2*>=* 2
****at*java.util.Vector.elementAt(Unknown*Source)
****at*javax.swing.plaf.basic.BasicTabbedPaneUI.ge tTextViewForTab(Unknown*Source)
****at*javax.swing.plaf.basic.BasicTabbedPaneUI.ca lculateTabHeight(Unknown*Source)
****at*javax.swing.plaf.basic.BasicTabbedPaneUI.ca lculateMaxTabHeight(Unknown*Source)
****at*javax.swing.plaf.basic.BasicTabbedPaneUI$Ta bbedPaneLayout.calculateTabRects(Unknown*Source)
****at*javax.swing.plaf.basic.BasicTabbedPaneUI$Ta bbedPaneLayout.calculateLayoutInfo(Unknown*Source)
****at*javax.swing.plaf.basic.BasicTabbedPaneUI$Ta bbedPaneLayout.layoutContainer(Unknown*Source)
****at*java.awt.Container.layout(Unknown*Source)
****at*java.awt.Container.doLayout(Unknown*Source)
****at*java.awt.Container.validateTree(Unknown*Sou rce)
****at*java.awt.Container.validateTree(Unknown*Sou rce)
****at*java.awt.Container.validateTree(Unknown*Sou rce)
****at*java.awt.Container.validateTree(Unknown*Sou rce)
****at*java.awt.Container.validateTree(Unknown*Sou rce)
****at*java.awt.Container.validateTree(Unknown*Sou rce)
****at*java.awt.Container.validateTree(Unknown*Sou rce)
****at*java.awt.Container.validate(Unknown*Source)
****at*javax.swing.RepaintManager.validateInvalidC omponents(Unknown*Source)
****at*javax.swing.SystemEventQueueUtilities$Compo nentWorkRequest.run(Unknown*Source)
****at*java.awt.event.InvocationEvent.dispatch(Unk nown*Source)
****at*java.awt.EventQueue.dispatchEvent(Unknown*S ource)
****at*java.awt.EventDispatchThread.pumpOneEventFo rFilters(Unknown*Source)
****at*java.awt.EventDispatchThread.pumpEventsForF ilter(Unknown*Source)
****at*java.awt.EventDispatchThread.pumpEventsForH ierarchy(Unknown*Source)
****at*java.awt.EventDispatchThread.pumpEvents(Unk nown*Source)
****at*java.awt.EventDispatchThread.pumpEvents(Unk nown*Source)
****at*java.awt.EventDispatchThread.run(Unknown*So urce)
Exception*in*thread*"AWT-EventQueue-0"*java.lang.ArrayIndexOutOfBoundsException:*2*>=* 2
****at*java.util.Vector.elementAt(Unknown*Source)
****at*javax.swing.plaf.basic.BasicTabbedPaneUI.ge tTextViewForTab(Unknown*Source)
****at*javax.swing.plaf.basic.BasicTabbedPaneUI.ca lculateTabHeight(Unknown*Source)
****at*javax.swing.plaf.basic.BasicTabbedPaneUI.ca lculateMaxTabHeight(Unknown*Source)
****at*javax.swing.plaf.basic.BasicTabbedPaneUI$Ta bbedPaneLayout.calculateTabRects(Unknown*Source)
****at*javax.swing.plaf.basic.BasicTabbedPaneUI$Ta bbedPaneLayout.calculateLayoutInfo(Unknown*Source)
****at*javax.swing.plaf.basic.BasicTabbedPaneUI$Ta bbedPaneLayout.layoutContainer(Unknown*Source)
****at*java.awt.Container.layout(Unknown*Source)
****at*java.awt.Container.doLayout(Unknown*Source)
****at*java.awt.Container.validateTree(Unknown*Sou rce)
****at*java.awt.Container.validateTree(Unknown*Sou rce)
****at*java.awt.Container.validateTree(Unknown*Sou rce)
****at*java.awt.Container.validateTree(Unknown*Sou rce)
****at*java.awt.Container.validateTree(Unknown*Sou rce)
****at*java.awt.Container.validateTree(Unknown*Sou rce)
****at*java.awt.Container.validateTree(Unknown*Sou rce)
****at*java.awt.Container.validate(Unknown*Source)
****at*javax.swing.RepaintManager.validateInvalidC omponents(Unknown*Source)
****at*javax.swing.SystemEventQueueUtilities$Compo nentWorkRequest.run(Unknown*Source)
****at*java.awt.event.InvocationEvent.dispatch(Unk nown*Source)
****at*java.awt.EventQueue.dispatchEvent(Unknown*S ource)
****at*java.awt.EventDispatchThread.pumpOneEventFo rFilters(Unknown*Source)
****at*java.awt.EventDispatchThread.pumpEventsForF ilter(Unknown*Source)
****at*java.awt.EventDispatchThread.pumpEventsForH ierarchy(Unknown*Source)
****at*java.awt.EventDispatchThread.pumpEvents(Unk nown*Source)
****at*java.awt.EventDispatchThread.pumpEvents(Unk nown*Source)
****at*java.awt.EventDispatchThread.run(Unknown*So urce)
net.sf.jasperreports.engine.design.JRValidationExc eption:*Report*design*not*valid*:*
*****1.*java.lang.ClassNotFoundException:*Template ReportClass
****at*net.sf.jasperreports.engine.design.JRAbstra ctCompiler.verifyDesign(JRAbstractCompiler.java:26 0)
****at*net.sf.jasperreports.engine.design.JRAbstra ctCompiler.compileReport(JRAbstractCompiler.java:1 44)
****at*it.businesslogic.ireport.IReportCompiler.ru n(IReportCompiler.java:591)
****at*java.lang.Thread.run(Unknown*Source)
In Ant I see the following:
Buildfile: C:\proj\content\dev\reports\Testing\Test av
rapportlaging\6.1\build.xml
_checkrelease:
[echo]
[echo] The current release of this plug-in is version:
[echo] "1" --> (Testing Test av rapportlaging_6.1r1)
[echo] Do you want to increment the release number and create a
new release?
_newrelease:
_init:
[echo] Author information loaded from
C:\proj\content/dev/dev.properties
_typeInit:
scrub:
build-release:
_build-checks:
_init:
[echo] Author information loaded from
C:\proj\content/dev/dev.properties
_typeInit:
build-zip:
[delete] Deleting directory
C:\proj\content\build\Testing_Test-av-rapportlaging_6.1r1
_copy-plugin:
[copy] Copying 1 file to
C:\proj\content\build\Testing_Test-av-rapportlaging_6.1r1\plugin
[copy] Copying 1 file to
C:\proj\content\build\Testing_Test-av-rapportlaging_6.1r1\tmp
[copy] Copying 9 files to
C:\proj\content\build\Testing_Test-av-rapportlaging_6.1r1\plugin
[copy] Copying 6 files to
C:\proj\content\build\Testing_Test-av-rapportlaging_6.1r1\plugin
[copy] Copying 2 files to
C:\proj\content\build\Testing_Test-av-rapportlaging_6.1r1\plugin
[copy] Copying 1 file to
C:\proj\content\build\Testing_Test-av-rapportlaging_6.1r1\plugin
[copy] Copying 1 file to
C:\proj\content\build\Testing_Test-av-rapportlaging_6.1r1\plugin
[move] Moving 1 file to
C:\proj\content\build\Testing_Test-av-rapportlaging_6.1r1\plugin
[javac] Compiling 1 source file to
C:\proj\content\build\Testing_Test-av-rapportlaging_6.1r1\plugin
[javac] C:\proj\content\dev\reports\Testing\Test av
rapportlaging\6.1\TemplateReportScriptlet.java:4: package
it.businesslogic.ireport does not exist
[javac] public class TemplateReportScriptlet extends
it.businesslogic.ireport.IReportScriptlet {
[javac]
^
[javac] C:\proj\content\dev\reports\Testing\Test av
rapportlaging\6.1\TemplateReportScriptlet.java:24: cannot find symbol
[javac] symbol : variable super
[javac] location: class TemplateReportScriptlet
[javac] super.beforeColumnInit();
[javac] ^
[javac] C:\proj\content\dev\reports\Testing\Test av
rapportlaging\6.1\TemplateReportScriptlet.java:30: cannot find symbol
[javac] symbol : variable super
[javac] location: class TemplateReportScriptlet
[javac] super.afterDetailEval();
[javac] ^
[javac] C:\proj\content\dev\reports\Testing\Test av
rapportlaging\6.1\TemplateReportScriptlet.java:36: cannot find symbol
[javac] symbol : variable super
[javac] location: class TemplateReportScriptlet
[javac] super.afterGroupInit(groupName);
[javac] ^
[javac] C:\proj\content\dev\reports\Testing\Test av
rapportlaging\6.1\TemplateReportScriptlet.java:42: cannot find symbol
[javac] symbol : variable super
[javac] location: class TemplateReportScriptlet
[javac] super.afterPageInit();
[javac] ^
[javac] 5 errors
As I recall, I can fix this by adding the right .JAR file to the dev
directory of the report, so it's not a huge problem.
2) When I try to preview a report with an active connection I get the
following error:
net.sf.jasperreports.engine.JRRuntimeException:
net.sf.jasperreports.engine.JRException: Class
com.novell.jasper.data.event.LuceneEventQueryExecu torFactory not found
This is something I haven't found a fix for, unfortunately. Any ideas?
PS:
My apologies for the late reply - I was on holiday last week and was
swamped both before going and once I got back.
Ragnar Storstrm
rstorstrom
rstorstrom's Profile: http://forums.novell.com/member.php?userid=5064
View this thread: http://forums.novell.com/showthread.php?t=429304 -
Troubles with JRE 1.4.2 and iReport (with db2 connection)
Hello everyone. My company is developing a product, and the client is working with JRE 1.4.2 . They (the client) are using db2 Database. We are using iReport to generate the product reports, but we encounter a problem with it - the report will compile and report (in any format) only once - afterwards, iReport will suddenly freeze and will stop to respond.
Trying the same thing with JRE 5.0 worked perfectly, with not troubles at all (but we cannot ask our client to upgrade to JRE 5.0, of course)
Anyone has any idea about how to fix this problem? perhaps there's a patch or something of the sort?
I forgot to mention, there's no error message at all, and if any, it's a javaw.exe application hang.
Any idea's?
Thanks,
Matt.Have you tried this on another machine?Yes ... actually this has happened on a few workstations here ... all of them are Pentium IV based dell workstations running Windows 2000.
What exact version of 1.4.2 did you download?Java(TM) Plug-in: Version 1.4.2_04
Using JRE version 1.4.2_04 Java HotSpot(TM) Client VM
Have you searched the bug database? This one could be related to yours:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4673572
This sounds similar but the difference is its not just the app that feezes up (so that you could do an alt+ctrl+del and kill it)..... the OS freezes up and you can move the mouse around still the system even queu e is not full and eventuall all I hear is the beeping. At this point I've to power cycle.
Is there any way you could post the code or is it too big? Or, have you tried just creating a very small >application or applet that just shows one dialog, and if so, does that show the same problem? (What I'm >trying to get at here is - is it something in your code that is causing this, or something in the JRE, or >perhaps something to do with your machine's configuration/OS?)Unfortunately I cannot post the code ... its company rules and regulations. I've tried creating a very small app and it appears to work ok .... but randomly causes this freeze up. There is no definate pattern (except that it happens when you move around a JDialog or a JInternalFrame) . It could freeze up some time and work perfectly fine at other times. It has actually happened on other applications too (Netbeans, JEdit etc). That's why I suspect this might be a obscure bug in the JRE.
I'll try to find a pattern so that it can be re-produced by everyone.
Thanks for the help. -
How iReport can work in Sun Application Server??
I am success to use the iReport to show out the pdf file in Tomcat which i am using jsp code, but, when I run them in sun application server, it throws out the following exception.
//=====================
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Error compiling report design.
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:830)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:763)
org.apache.jsp.Report_005fJSP.payroll_005frec_005fstaff_jsp._jspService(payroll_005frec_005fstaff_jsp.java:165)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105)
javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:297)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:247)
javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
sun.reflect.GeneratedMethodAccessor70.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:585)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
root cause
net.sf.jasperreports.engine.JRException: Error compiling report design.
net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:231)
net.sf.jasperreports.engine.design.JRDefaultCompiler.compileReport(JRDefaultCompiler.java:131)
net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:127)
net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:86)
org.apache.jsp.Report_005fJSP.payroll_005frec_005fstaff_jsp._jspService(payroll_005frec_005fstaff_jsp.java:106)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105)
javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:297)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:247)
javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
sun.reflect.GeneratedMethodAccessor70.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:585)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
note The full stack trace of the root cause is available in the Sun-Java-System/Application-Server logs.
//==========================
Would someone can tell me why??This is urgent for me!!Here is the log file information I get from the sun application server, when i run my iReport file.
//==================
DetailsTimestamp: 2006-5-28 22:50:02.768
Log Level: INFO
Logger: javax.enterprise.system.stream.out
Name-Value Pairs: _ThreadID=11;
Record Number: 2808
Message ID: exception 3
Complete Message
java.lang.NullPointerException
Diagnostic Causes
Diagnostic Checks
//==================
Do you mean this server.log file message? and can you know why problem with me?? -
IReport data retrieval from MySql database
Hi,
can anyone help me? i am using iReport - jasperreports to design a report using a datasource/ connections.
i designed my report and everything works fine except that the data of the fields in mthe detail band is been retrieved more than once making the reports to have one data printed more than once(as many as possible). In my quey, i even used the "order by" as specified in the iReport manual.
Questions: Is there to fix this so that i can have one data of a field printed only once witout repeatition in the detail band(that is, print one value then the next till the last value then stop)Play with the evaluated and printed when options. Another thing you should do is create a group whose evaluation string is the key from your database. every time this value changes as the records are being evaluated the detail section will be printed.
-
Apex with ireport pl-jrxml2pdf by andreas weiden
Hi,
I've used PL-jrxml2pdf utility developed by Andreas Weiden... I am facing following 2 issues
1) Report runs okay through iReport designer but don't show subreports (except for 1) when I deploy it on APEX... I've hosted a sample on apex.oracle.com here are the credentials for your review and comments
APEX.ORACLE.COM
Workspace: TPARVAIZ1
Username: [email protected]
Password: mucew0
Application 58372 - PL-jrxml2pdf
ID/PW: TEST/TEST
2) seems like the application is not supported via IE 8, can you please confirm
Thanks in advance for your assistancere update:
So you want me to export the PL-jrxml2pdf application that you've updated and upload it to the other environments (where ever I am using it)... can you please confirm
re my requirements:
I want to generate sort of a letter... something like this:
------- start of the letter -----------
dear customer:
Following is your activity report related to Jan 2013 orders
Activity 1: $3
Activity 2: $2
Please contact Mr x @ 123.456.7890 for any questions
------- end of the letter -----------
as you can see the letter is split in 3 sections
Top section with the greeting and an opening statement
followed by a table in the middle section
& closing statement with contact details in the bottom section
Plus, my requirement is to allow users to modify the top and bottom statements... so I put the top and the bottom statements in a table and created an APEX form to let my users customize it.
Thanks -
The statement did not return a result set in ireport
Hi,
I am Building a Report in iReport(Jasper Reports). I called a stored procedure from iReport by passing a parameter in Query Editor. I am getting an exception saying "The statement did not return a result set". When
i use Temp Tables in stored procedure i am getting the exception.
If there is no temptable in Stored procedure there wont be any exception.
This is my Stored procedure
Create PROCEDURE [XUSP_REPORT_SOPRINT] @BNUM VARCHAR(20) AS
BEGIN
DECLARE @FQTY BIGINT
DECLARE @ITNAME VARCHAR(100)
DECLARE @COUNT INT=0
DECLARE @COUNT1 INT=0
CREATE TABLE #BILL_PRINT(
[BNUM] [varchar](20) NOT NULL,
[CNAME] [varchar](30) NOT NULL,
[CNUM] [int] NOT NULL,
[ITNAME] [varchar](100) NOT NULL,
[ITEM#] [int] NOT NULL,
[QTY] [int] NOT NULL DEFAULT 0,
[UNIT] [varchar](5) NOT NULL,
[PRICE] [float] NOT NULL DEFAULT 0,
[BASIC] [float] NOT NULL DEFAULT 0,
[DISCOUNT] [float] NOT NULL DEFAULT 0,
[FRQTY] [int] NOT NULL DEFAULT 0,
[BADDR] [varchar](300) NULL,
[CADDR] [varchar](300) NOT NULL,
[BDATE] [datetime] NULL DEFAULT (sysdatetime()),
[BILLBY] [varchar](50) NOT NULL,
[ROUTE] [varchar](200) NULL,
[AMT] [float] NOT NULL DEFAULT 0,
[VAT] [float] NOT NULL DEFAULT 0,
[VAT AMT] [float] NOT NULL DEFAULT 0,
[AMT_AF_DISC] [float] NOT NULL DEFAULT 0,
[AMT_AF_VAT] [float] NOT NULL DEFAULT 0,
[TOT_DISC] [float] NOT NULL DEFAULT 0,
[ROUND_OFF] [float] NOT NULL DEFAULT 0,
[TOT_VAT] [float] NOT NULL DEFAULT 0,
[AMT_UNDER_VAT] [float] NOT NULL DEFAULT 0,
[NETT] [float] NOT NULL DEFAULT 0,
[TOS] [varchar](30) NULL DEFAULT 0,
[CDISC] [float] NOT NULL DEFAULT 0,
[SDISC] [float] NOT NULL DEFAULT 0
insert into #BILL_PRINT SELECT [BNUM]
,[CNAME]
,[CNUM]
,[ITNAME]
,[ITEM#]
,[QTY]
,[UNIT]
,[PRICE]
,[BASIC]
,[DISCOUNT]
,[FRQTY]
,[BADDR]
,[CADDR]
,[BDATE]
,[BILLBY]
,[ROUTE]
,[AMT]
,[VAT]
,[VAT AMT]
,[AMT_AF_DISC]
,[AMT_AF_VAT]
,[TOT_DISC]
,[ROUND_OFF]
,[TOT_VAT]
,[AMT_UNDER_VAT]
,[NETT]
,[TOS]
,[CDISC]
,[SDISC]
FROM [SALES_DETAILS] WHERE BNUM=@BNUM
CREATE TABLE #ITNAME_0
ITEM VARCHAR(100) NOT NULL,
FREE BIGINT NOT NULL
INSERT INTO #ITNAME_0 SELECT ITNAME,FRQTY FROM SALES_DETAILS WHERE FRQTY<>0 AND BNUM=@BNUM
--SELECT * FROM #ITNAME_0
SET @COUNT=(SELECT COUNT(*) FROM #ITNAME_0)
WHILE @COUNT!=0
BEGIN
SET @FQTY=(SELECT TOP(1) FREE FROM #ITNAME_0)
SET @ITNAME=(SELECT TOP(1) ITEM FROM #ITNAME_0)
SET @COUNT1=(SELECT COUNT(*) FROM #BILL_PRINT WHERE ITNAME=@ITNAME AND BNUM=@BNUM)
IF @COUNT1=2
BEGIN
UPDATE #BILL_PRINT
SET FRQTY+=@FQTY
WHERE ITNAME=@ITNAME AND QTY<>0
DELETE FROM #ITNAME_0 WHERE ITEM=@ITNAME AND FREE=@FQTY
DELETE FROM #BILL_PRINT WHERE ITNAME=@ITNAME AND QTY=0
END
SET @COUNT=@COUNT-1
END
--SELECT *FROM sales_details
SELECT *FROM #BILL_PRINT where bnum=@bnum
DROP TABLE #BILL_PRINT
DROP TABLE #ITNAME_0
END
Please help me out in this.
Thanks,
Shreyas MThis is a forum for Reporting Services (SSRS). If you're using Jasper reports then you should be posting in relevenat forums. I'm not sure there would be enough people with Jasper report experience here to help you out!
Anyways in SSRS when we use Temp tables in procedure it will throw exception in editor but when you save and run it will still work fine. Did you try saving it and executing report? Did the error still persisted?
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My MSDN Page
My Personal Blog
My Facebook Page -
I'm now using iReport to generate a PDF file
but the PDf file Can't Display any Chinese but only English
my code are as below
thanks to any help
// set file name - it is in string reportFile
String rFile = "classic.jasper";
// set or null hash map
HashMap rptHash = null;
// establish the connection - it is already open and called databaseConnection
try {
// Establish Connection
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection reportConnection = DriverManager.getConnection(
"jdbc:odbc:organic");
// connect to Report File
InputStream fs = new FileInputStream("c:\\" + rFile);
JasperReport template = JasperManager.loadReport(fs);
JasperPrint report = null;
String rv =
JasperRunManager.runReportToPdfFile("c:\\" + rFile, rptHash,
reportConnection);
catch (Exception ex) {
}Just noticed this suggested FAQ from a related post.
http://java.sun.com/products/javamail/FAQ.html#sendmpr
I'll have a look at it. -
Cannot connect iReport with Xe
Hi,
I just installed iReport (JasperReport), and I tried to conect it with xe with the wizard, but seems I cannot.
I choosed the driver for oracle database:
Oracle.jdbc.driver.OracleDriver
and other information I offered are right, but when I test it, it will give exceptions like that:
ClassNoFound Error!
Msg: Oracle.jdbc.driver.OracleDriver
Possible not found class: Oracle.jdbc.driver.OracleDriver
Any idea?
Thanks,
Peter.Y.Zhangit's very old post...
the answer is that U have to download JDBC drivers from oracle web site, but I have another problem.
I downloaded ojdbc6.jar and put it to path:
jasperserver-ce-3.7.0\ireport\ireport\libs\ojdbc6.jar
also added path to the classpath, but it still not visible for IReport... any idea?
edit: I'm using client oracle 11R1
Maybe you are looking for
-
How to load rm file into ordAudio column?
Hello everybody, I made many attempts trying to insert aa.mp3(3.63Mb) and bb.rm(3.58Mb) file into ORDSYS.ordAudio column respectively with the same way. the result is: aa.mp3 was inserted successfully, but the bb.rm was not. It showed the error messa
-
How to keep the eyedropper tool from spontaneously changing into color theme tool?
How can I keep the eyedropper tool from changing into the color theme tool? Is there a key command? Its very annoying when I am trying to copy format and it keep changing spontaneously into the color them tool. Using CC and OS 10.9.5 on a Mac Book Pr
-
Sum lost after combine with similar request
Hi experts I've used the 'combine with similar request' option to combine 2 reports that have exactly the same columns. The only difference between them is that they're using different filters. The combine action is done correctly but the The sum ove
-
Before Symbian Anna got released I was over the moon with my N8, I could show off features and how good my phone was, since this update, and the two new updates I would steer people clear of this phone. Problems that I have come across: 1) Battery li
-
Screen shows when ALT key is pressed
Hi, For some reason, photoshop CC has started showing a big ugly ALT next to my cursor when I press the ALT key. I dont want this! It gets in the way. Im not sure how I turned it on, and would LOVE to know how to turn it off. Many thanks! G