I have design report with ireport, if that report i run in netbeans its ok,
but while i move to drive c: got error like this
"error displaying report page. see the console for details"
if i try in command prompt get message
java.lang.NullPointerException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at net.sf.jasperreports.engine.util.JRClassLoader.loadClassForRealName(J
RClassLoader.java:161)
at net.sf.jasperreports.engine.util.JRClassLoader.loadClassForName(JRCla
ssLoader.java:119)
at net.sf.jasperreports.engine.export.ExporterFilterFactoryUtil.getFilte
rFactory(ExporterFilterFactoryUtil.java:56)
at net.sf.jasperreports.engine.JRAbstractExporter.createFilter(JRAbstrac
tExporter.java:1071)
at net.sf.jasperreports.engine.export.JRGraphics2DExporter.exportReport(
JRGraphics2DExporter.java:121)
at net.sf.jasperreports.view.JRViewer.paintPage(JRViewer.java:1993)
at net.sf.jasperreports.view.JRViewer$PageRenderer.paintComponent(JRView
er.java:2134)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JViewport.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JLayeredPane.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paintToOffscreen(Unknown Source)
at javax.swing.BufferStrategyPaintManager.paint(Unknown Source)
at javax.swing.RepaintManager.paint(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at java.awt.GraphicsCallback$PaintCallback.run(Unknown Source)
at sun.awt.SunGraphicsCallback.runOneComponent(Unknown Source)
at sun.awt.SunGraphicsCallback.runComponents(Unknown Source)
at java.awt.Container.paint(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.seqPaintDirtyRegions(Unknown Source)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknow
n Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
2009-05-19 15:48:03,359 [AWT-EventQueue-0] INFO org.hibernate.impl.SessionFacto
ryImpl closing
2009-05-19 15:48:03,359 [AWT-EventQueue-0] INFO org.hibernate.connection.Driver
ManagerConnectionProvider cleaning up connection pool: jdbc:mysql://localhost/a1
2s
this my code
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import mst.common.CommonUtility;
import mst.hrd.hibernate.properties.HibernateConnection;
import net.sf.jasperreports.engine.*;
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
import net.sf.jasperreports.engine.query.JRHibernateQueryExecuterFactory;
import net.sf.jasperreports.view.*;
import org.hibernate.HibernateException;
import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.Transaction;
/**
*
* @author user
*/
public class RptVacancy extends javax.swing.JPanel {
private static final String TASK_VIEW = "view";
private String taskName = "view";
private final String stdReportFileName = new String(CommonUtility.setPathReport() + "listApplicant.jasper");
private String reportFileName;
private Transaction tx;
/** Creates new form HRptVacancy */
public RptVacancy() {
initComponents();
}
// Hibernate Result Set Holder.
List bowlerInfo = null;
public void typeReport() {
try {
if (TASK_VIEW.equals(taskName)) {
startOperation();
Query query = HibernateConnection.session.createQuery("from Vacancy");
bowlerInfo = query.list();
// Fill the parameters
HashMap parameters = new HashMap();
parameters.put("titleReport", "List");
JasperPrint print = JasperFillManager.fillReport(reportFileName, parameters, new JRBeanCollectionDataSource(bowlerInfo));
JasperViewer.viewReport(print, false);
// Close the Hibernate Session.
HibernateConnection.closeSession();
}
} catch (Exception e) {
e.printStackTrace();
}
}
protected void startOperation() throws HibernateException {
HibernateConnection.getOpenSession();
tx = HibernateConnection.session.beginTransaction();
}
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
reportFileName=stdReportFileName;
typeReport();
}
thanks