私はJSFを使用してアプリケーションを開発しています。このアプリケーションはjasperReportを使用してレポートを生成し、アプリケーションはうまく動作し、レポート(pdf形式)私は、私は、アプリケーションを再実行する必要があり、それは動作しませんでした私のアプリケーションを引き続き使用しようとし、ユーザーにレポートを表示し、するjasperReportを使用してレポートを表示した後のGlassfishのシャットダウン
JasperViewer.viewReport(jasperPrint);
を使用するときに私のディスクは、問題があります!コンソールで
エラーは次のとおりです。
Completed shutdown of Log manager service
マイコード:
public void fillReport() throws ParseException, groovyjarjarcommonscli.ParseException {
try {
// - Connexion à la base
Driver monDriver = new com.mysql.jdbc.Driver();
DriverManager.registerDriver(monDriver);
connection = (Connection) DriverManager.getConnection("jdbc:mysql://localhost:3306/Mybase", "root", "root");
// - Chargement et compilation du rapport
JasperDesign jasperDesign = JRXmlLoader.load("C:/Documents and Settings/report2.jrxml");
JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);
Map parameterMap = new HashMap();
parameterMap.put("DateFrom", formatingDateTime(date1));
parameterMap.put("DateTo", formatingDateTime(date2));
parameterMap.put("SQL", Createquery());
// // - Execution du rapport
JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameterMap, connection);
JasperViewer.viewReport(jasperPrint);
JasperExportManager.exportReportToPdfFile(jasperPrint,"C:/Documents and Settings/report2.pdf");
} catch (JRException e) {
e.printStackTrace();
} catch (SQLException e) {
e.printStackTrace();
} finally {
try {
connection.close();
}
私はこの問題を解決するために何をすべき?
シモンズ:私はstackflowで同じ問題が、ありません解決策を発見した(私はレポートを表示することが些細なので、私はJasperViewer.viewReport(jasperPrint)を削除したくない)
Jasper Report Generates a PDF and then Glassfish crashes/shutsdown