Home pageFind It!Contact PJAPJA documentation

PJA

 PJA Toolkit forum

This forum is dedicated to PJA Toolkit.
You may read freely the messages it contents. If you want to write a message or answer to a subject, subscribe to it first.

Subjects Recent messages Login Subscribe

Messages of subject Application server shuts down when i close the jasper report window. Please help!!!!..

spathak@calance.com

Member since : Jun 2, 2005
Messages : 3
 Jun 2, 2005 at 11:54 AM
Hi All,
Please help me as its very critical for me. I am using JBOSS 4.0, Oracle 10G and struts for my application.
My Struts action class gets a call on a hit on the jsp page.
Then the action class makes a call to a stateless bean and then makes a call to my
JasperReport java class. Now this JasperReport java class fills the jasper report and shows it in a new window.

It opens up properly but when i close the jasper report window, my server shuts down automatically. The server doesnt throw any error but simply undeploys the beans and shuts down.
My JasperReport code is as follows:

JasperDesign jasperDesign = JasperManager.loadXmlDesign("C:/RFID/ReportsWS/ReportsProj/public_html/BasicReport.xml");
JasperReport jasperReport = JasperManager.compileReport(jasperDesign);
Map parameters = new HashMap();
parameters.put("Title", "Basic JasperReport");
parameters.put("MaxSalary", new Double(25000.00));
Connection conn = this.getConnection();
JasperPrint jasperPrint1 = JasperManager.fillReport(jasperReport,
parameters, conn);
JasperViewer.viewReport(jasperPrint1 );

Server logs is as follows:




14:04:18,158 INFO [PropertyMessageResources] Initializing, config='org.apache.struts.taglib.logic.LocalStrings', returnNull=true
14:04:23,233 INFO [Server] JBoss SHUTDOWN: Undeploying all packages
14:04:23,233 INFO [TomcatDeployer] undeploy, ctxPath=/proximities, warUrl=file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28851proximities.ear-contents/proximities-exp.war/
14:04:23,249 INFO [EJBDeployer] Undeploying: file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28851proximities.ear-contents/proximities.jar-contents/proximities-ejb.jar
14:04:23,592 INFO [EjbModule] Undeployed ItemManageFacade
14:04:23,592 INFO [EjbModule] Undeployed StationServiceFacade
14:04:23,592 INFO [EjbModule] Undeployed OrderRequestFacade
14:04:23,592 INFO [EjbModule] Undeployed ManageVenueFacade
14:04:23,592 INFO [EjbModule] Undeployed ReportFacade
14:04:23,686 INFO [EARDeployer] Undeploying J2EE application, destroy step: file:/C:/jboss/jboss-4.0.1sp1/server/default/deploy/proximities.ear
14:04:23,702 WARN [DeploymentInfo] Could not delete file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28851proximities.ear restart will delete it
14:04:23,702 INFO [TomcatDeployer] undeploy, ctxPath=/web-console, warUrl=file:/C:/jboss/jboss-4.0.1sp1/server/default/deploy/management/web-console.war/
14:04:23,717 INFO [TomcatDeployer] undeploy, ctxPath=/jmx-console, warUrl=file:/C:/jboss/jboss-4.0.1sp1/server/default/deploy/jmx-console.war/
14:04:23,733 INFO [ConnectionFactoryBindingService] Unbound connection factory for resource adapter for ConnectionManager 'jboss.jca:name=ProximitiesDataSource,service=DataSourceBinding from JNDI name 'java:ProximitiesDataSource'
14:04:23,733 INFO [ConnectionFactoryBindingService] Unbound connection factory for resource adapter for ConnectionManager 'jboss.jca:name=IntellionsDataSource,service=DataSourceBinding from JNDI name 'java:IntellionsDataSource'
14:04:23,748 INFO [ConnectionFactoryBindingService] Unbound connection factory for resource adapter for ConnectionManager 'jboss.jca:name=JmsXA,service=ConnectionFactoryBinding from JNDI name 'java:JmsXA'
14:04:23,780 INFO [ConnectionFactoryBindingService] Unbound connection factory for resource adapter for ConnectionManager 'jboss.jca:name=DefaultDS,service=DataSourceBinding from JNDI name 'java:DefaultDS'
14:04:24,966 INFO [HypersonicDatabase] Database standalone closed clean
14:05:31,317 WARN [DeploymentInfo] Could not delete file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28847mail-ra.rar restart will delete it
14:05:31,317 WARN [DeploymentInfo] Could not delete file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28846jms-ra.rar restart will delete it
14:05:31,317 WARN [DeploymentInfo] Could not delete file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28845jboss-xa-jdbc.rar restart will delete it
14:05:31,317 WARN [DeploymentInfo] Could not delete file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28844jboss-local-jdbc.rar restart will delete it
14:05:31,332 INFO [MailService] Mail service 'java:/Mail' removed from JNDI
14:05:31,411 WARN [DeploymentInfo] Could not delete file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28827uuid-key-generator.sar restart will delete it
14:05:31,411 WARN [DeploymentInfo] Could not delete file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28826jfreechart.jar restart will delete it
14:05:31,411 WARN [DeploymentInfo] Could not delete file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28825jcommon.jar restart will delete it
14:05:31,426 WARN [DeploymentInfo] Could not delete file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28824console-mgr-classes.jar restart will delete it
14:05:31,426 INFO [TomcatDeployer] undeploy, ctxPath=/jbossmq-httpil, warUrl=file:/C:/jboss/jboss-4.0.1sp1/server/default/deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/
14:05:31,442 WARN [ServiceController] Ignoring request to stop nonexistent service: null
14:05:31,442 INFO [TomcatDeployer] undeploy, ctxPath=/, warUrl=file:/C:/jboss/jboss-4.0.1sp1/server/default/deploy/jbossweb-tomcat50.sar/ROOT.war/
14:05:31,457 INFO [Http11Protocol] Pausing Coyote HTTP/1.1 on http-0.0.0.0-9090
14:05:32,472 INFO [StandardService] Stopping service jboss.web
14:05:32,472 INFO [StandardHost] Create Host deployer for direct deployment ( non-jmx )
14:05:32,488 INFO [StandardHostDeployer] Removing web application at context path /ws4ee
14:05:32,488 INFO [StandardHostDeployer] Removing web application at context path /invoker
14:05:32,488 INFO [Http11Protocol] Stopping Coyote HTTP/1.1 on http-0.0.0.0-9090
14:05:32,504 INFO [TomcatDeployer] undeploy, ctxPath=/invoker, warUrl=file:/C:/jboss/jboss-4.0.1sp1/server/default/deploy/http-invoker.sar/invoker.war/
14:05:32,519 INFO [TomcatDeployer] undeploy, ctxPath=/ws4ee, warUrl=file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28799jboss-ws4ee-exp.war/
14:05:32,597 WARN [DeploymentInfo] Could not delete file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28823tomcat50-service.jar restart will delete it
14:05:32,597 WARN [DeploymentInfo] Could not delete file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28822tomcat-util.jar restart will delete it
14:05:32,597 WARN [DeploymentInfo] Could not delete file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28821tomcat-jk2.jar restart will delete it
14:05:32,597 WARN [DeploymentInfo] Could not delete file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28820tomcat-http11.jar restart will delete it
14:05:32,597 WARN [DeploymentInfo] Could not delete file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28819tomcat-coyote.jar restart will delete it
14:05:32,613 WARN [DeploymentInfo] Could not delete file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28818servlets-webdav.jar restart will delete it
14:05:32,613 WARN [DeploymentInfo] Could not delete file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28817servlets-invoker.jar restart will delete it
14:05:32,613 WARN [DeploymentInfo] Could not delete file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28816servlets-default.jar restart will delete it
14:05:32,613 WARN [DeploymentInfo] Could not delete file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28815servlets-common.jar restart will delete it
14:05:32,613 WARN [DeploymentInfo] Could not delete file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28814naming-resources.jar restart will delete it
14:05:32,613 WARN [DeploymentInfo] Could not delete file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28813naming-common.jar restart will delete it
14:05:32,613 WARN [DeploymentInfo] Could not delete file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28812jasper-runtime.jar restart will delete it
14:05:32,613 WARN [DeploymentInfo] Could not delete file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28811jasper-compiler.jar restart will delete it
14:05:32,613 WARN [DeploymentInfo] Could not delete file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28810jakarta-regexp-1.3.jar restart will delete it
14:05:32,613 WARN [DeploymentInfo] Could not delete file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28809commons-modeler.jar restart will delete it
14:05:32,613 WARN [DeploymentInfo] Could not delete file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28808commons-logging.jar restart will delete it
14:05:32,629 WARN [DeploymentInfo] Could not delete file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28807commons-el.jar restart will delete it
14:05:32,629 WARN [DeploymentInfo] Could not delete file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28806commons-digester.jar restart will delete it
14:05:32,629 WARN [DeploymentInfo] Could not delete file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28805commons-collections.jar restart will delete it
14:05:32,629 WARN [DeploymentInfo] Could not delete file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28804commons-beanutils.jar restart will delete it
14:05:32,629 WARN [DeploymentInfo] Could not delete file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28803catalina.jar restart will delete it
14:05:32,629 WARN [DeploymentInfo] Could not delete file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28802catalina-optional.jar restart will delete it
14:05:32,629 WARN [DeploymentInfo] Could not delete file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28801catalina-manager.jar restart will delete it
14:05:32,629 WARN [DeploymentInfo] Could not delete file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28800ant.jar restart will delete it
14:05:32,644 WARN [DeploymentInfo] Could not delete file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28798wsdl4j.jar restart will delete it
14:05:32,644 WARN [DeploymentInfo] Could not delete file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28797jboss-ws4ee.jar restart will delete it
14:05:32,644 WARN [DeploymentInfo] Could not delete file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28796commons-logging.jar restart will delete it
14:05:32,644 WARN [DeploymentInfo] Could not delete file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28795commons-discovery.jar restart will delete it
14:05:32,660 WARN [DeploymentInfo] Could not delete file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28794axis-ws4ee.jar restart will delete it
14:05:32,691 WARN [DeploymentInfo] Could not delete file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28790odmg-3.0.jar restart will delete it
14:05:32,691 WARN [DeploymentInfo] Could not delete file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28789jboss-hibernate.jar restart will delete it
14:05:32,691 WARN [DeploymentInfo] Could not delete file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28788hibernate2.jar restart will delete it
14:05:32,691 WARN [DeploymentInfo] Could not delete file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28787cglib-full-2.0.1.jar restart will delete it
14:05:32,691 WARN [DeploymentInfo] Could not delete file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28786trove.jar restart will delete it
14:05:32,707 WARN [DeploymentInfo] Could not delete file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28785jboss-aspect-library.jar restart will delete it
14:05:32,707 WARN [DeploymentInfo] Could not delete file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28784jboss-aop.jar restart will delete it
14:05:32,707 WARN [DeploymentInfo] Could not delete file:/C:/jboss/jboss-4.0.1sp1/server/default/tmp/deploy/tmp28783javassist.jar restart will delete it
Shutting down
14:05:33,253 INFO [Server] Shutdown complete
Shutdown complete
Halting VM
Press any key to continue . . .

When i close the jasper report window, the application server shuts down.
PLEASE HELP ME AS ITS VERY CRITICAL.

Thanks a ton!!!
Sandeep Pathak
Calance Cor.
Gurgaon
India`

vlnmca

Location : India
Member since : Nov 5, 2006
Messages : 1
 Nov 5, 2006 at 9:52 AM
Hi,

I am also facing the same problem, if you solved the program kindly send me the mail.

Regards

vln

spathak@calance.com

Member since : Jun 2, 2005
Messages : 3
 Mar 6, 2007 at 10:26 PM
Hi,
I myself rectified this problem.
Please see the code below:


JasperDesign gratuityReportDesign = JasperManager
.loadXmlDesign ("../server/default/deploy/reports/GratuityConsoleReport.jrxml");
JasperReport gratuityJasperReport = JasperManager
.compileReport (gratuityReportDesign);
// Second, create a map of parameters to pass to the report.
Map parameters = new HashMap ();
parameters.put ("Title", "Gratuity Report");
parameters.put ("FromDate", form.getFromDate ());
parameters.put ("ToDate", form.getToDate ());
parameters
.put ("LOGO",
"../server/default/deploy/reports/logo.jpg");
//Getting an instance of Jasper DAO to process the report

//Get the connection..


jasperPrint = JasperFillManager
.fillReport (gratuityJasperReport,
parameters,
connection);

JRHtmlExporter exporter = new JRHtmlExporter ();

exporter.setParameter (JRExporterParameter.JASPER_PRINT,
jasperPrint);
exporter
.setParameter (JRHtmlExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS,
Boolean.TRUE);

exporter
.setParameter (JRHtmlExporterParameter.IS_USING_IMAGES_TO_ALIGN,
Boolean.FALSE);
exporter.setParameter (JRExporterParameter.OUTPUT_STREAM,
byteArrayOutputStream);
exporter.exportReport ();
reportByteArray = byteArrayOutputStream.toByteArray ();



response.setContentType ("application/excel");
response.setContentLength (formBean
.getReportByteArray ().length);
ouputStream = response.getOutputStream ();
ouputStream
.write (formBean.getReportByteArray (),
0,
formBean.getReportByteArray ().length);
ouputStream.flush ();
ouputStream.close ();

Hope this helps :-)


Home pageFind It!ContactTop

© Copyrights 1997-2014 eTeks - All rights reserved

PJAPJA documentation