i have no idea why i receive that error. any hint, suggestion, or anything else that could help me, i would really appreciete it. i provide error message and report class in case someone need it to figure out or solve my problem. thank you
org.netbeans.ExitSecurityException: Illegal attempt to exit early at org.netbeans.TopSecurityManager.checkExitImpl(TopSecurityManager.java:217) at org.netbeans.TopSecurityManager$PrivilegedCheck.run(TopSecurityManager.java:697) at java.security.AccessController.doPrivileged(Native Method) at org.netbeans.TopSecurityManager$PrivilegedCheck.check(TopSecurityManager.java:722) at org.netbeans.TopSecurityManager$PrivilegedCheck.checkExit(TopSecurityManager.java:710) at org.netbeans.TopSecurityManager.checkExit(TopSecurityManager.java:157) at java.lang.Runtime.exit(Runtime.java:105) at java.lang.System.exit(System.java:960) at net.sf.jasperreports.view.JasperViewer.exitForm(JasperViewer.java:238) at net.sf.jasperreports.view.JasperViewer$1.windowClosing(JasperViewer.java:202) at java.awt.AWTEventMulticaster.windowClosing(AWTEventMulticaster.java:349) at java.awt.window.processWindowEvent(window.java:2045) at javax.swing.JFrame.processWindowEvent(JFrame.java:296) at java.awt.window.processEvent(window.java:2003) at java.awt.Component.dispatchEventImpl(Component.java:4861) at java.awt.Container.dispatchEventImpl(Container.java:2287) at java.awt.window.dispatchEventImpl(window.java:2713) at java.awt.Component.dispatchEvent(Component.java:4687) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:707) at java.awt.EventQueue.access$000(EventQueue.java:101) at java.awt.EventQueue$3.run(EventQueue.java:666) at java.awt.EventQueue$3.run(EventQueue.java:664) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87) at java.awt.EventQueue$4.run(EventQueue.java:680) at java.awt.EventQueue$4.run(EventQueue.java:678) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:677) at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:148) [catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105) at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
this is my code :
public final class Rpt_Category {
private CategoryPresenter categoryPresenter = new CategoryPresenter();
public Rpt_Category(){
build();
}
private void build(){
StyleBuilder boldStyle = stl.style().bold();
StyleBuilder boldCenteredStyle = stl.style(boldStyle).setHorizontalAlignment(HorizontalAlignment.CENTER);
StyleBuilder columnTitleStyle = stl.style(boldCenteredStyle)
.setBorder(stl.pen1Point())
.setBackgroundColor(Color.LIGHT_GRAY);
try {
report()
.setColumnTitleStyle(columnTitleStyle)
.highlightDetailEvenRows()
.columns(
col.column("CategoryId", "categoryId", type.stringType()),
col.column("CategoryName", "categoryName", type.stringType()),
col.column("Information", "information", type.stringType())
)
.title(cmp.text("Getting started").setStyle(boldCenteredStyle))
.pageFooter(cmp.pageXofY().setStyle(boldCenteredStyle))
.setDataSource(createDataSource())
.show();
}
catch (DRException e) {
e.printStackTrace();
}
}
private JRDataSource createDataSource() {
Session session = HibernateUtilities.getSessionFactory().openSession();
List dataList = categoryPresenter.findAll(session, 0, 500);
session =(Session) session.close();
return new JRBeanCollectionDataSource(dataList);
}
}
and this is how i call the report :
Rpt_Category rpt_Category = new Rpt_Category();
This post has been edited by cassiopeia: 08 February 2012 - 05:02 AM

New Topic/Question
Reply



MultiQuote



|