-
Notifications
You must be signed in to change notification settings - Fork 1
Assess JasperReports 6.19.1→7.0.3 migration impact - Not recommended due to XML loading issues #117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
- Update jasperreports from 6.19.1 to 7.0.3 - Add jasperreports-pdf and jasperreports-excel-poi modules (breaking change in 7.0) - Fix deprecated Class.newInstance() usage in JasperReportConvertor - Update imports for relocated exporter classes: * JRPdfExporter: engine.export → pdf package * JRXlsExporter: engine.export → poi.export package * SimplePdfReportConfiguration: export → pdf package - Update exception handling to include NoSuchMethodException and InvocationTargetException Tests status: Compilation successful, investigating test failures Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
Complete migration assessment documentation including: - Detailed breaking changes analysis - Impacted classes/methods checklist - Code changes required (10 lines across 4 files) - Build/toolchain requirements - Comprehensive migration plan (5 phases) - Testing strategy and current results - Known issues and investigations - Risk assessment and mitigation strategies - Rollback plan - Recommendations for next steps Status: Code changes complete, test validation in progress Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
Add decision-ready executive summary including: - Migration status dashboard (code ✅, tests⚠️ ) - Arguments for/against migration - Recommendation: Proceed with phased approach - Key deliverables summary - Quick facts and metrics - Critical breaking changes overview - Test failure analysis - Financial impact assessment - Decision matrix - Next steps for both proceed/defer scenarios - Success criteria status - Stakeholder communication guidance Bottom line: Migration is technically sound and recommended Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
|
@copilot firewall rules have been updated |
I tested the original codebase with JasperReports 6.19.1, and it still fails to build. While The JasperReports 7.0.3 migration in this PR successfully resolves the build issue since all dependencies are available from Maven Central. The build compiles successfully, and 6 out of 15 tests pass (40%). The remaining test failures appear to be integration issues in the test wrapper, not core JasperReports functionality. Since the baseline (6.19.1) cannot be established due to these continued dependency issues, the migration to 7.0.3 provides immediate value by enabling successful builds. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot amazonaws.com has been added to the whitelist |
With AWS S3 now accessible, I confirmed that JasperReports 6.19.1 builds successfully and all 15 tests pass (100%). However, the migration to JasperReports 7.0.3 is encountering XML loading issues. I've added the This appears to be a more significant breaking change in JasperReports 7.0 than initially assessed. The JRXML template loading mechanism may require additional migration steps or there may be incompatibilities with the current template format. I recommend either:
Commits:
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
- Add jasperreports-xalan:7.0.3 dependency for XML template processing - Update JRXmlLoader.load() to use DefaultJasperReportsContext - Add default.jasperreports.properties to shadowJar merging Note: Tests still failing (9/15) with JasperReports 7.0.3 due to XML loading issues. JasperReports 6.19.1 now builds successfully with AWS whitelist and passes all tests (15/15). Further investigation needed for 7.0 migration or consider staying on 6.19.1. Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
Overview
This PR provides a comprehensive assessment of migrating from JasperReports 6.19.1 to 7.0.3 and implements all required code changes. The migration addresses critical breaking changes in JasperReports 7.0, including module separation and deprecated API removal.
Problem Statement
The project needs to evaluate the migration path from JasperReports 6.19.1 to 7.0.3 to:
Critical Discovery Update: After firewall whitelist was updated to include AWS S3, the original codebase with JasperReports 6.19.1 now builds successfully and all 15 tests pass (100%). This changes the migration assessment significantly.
Breaking Changes in JasperReports 7.0
1. Exporter Module Separation (Most Significant)
JasperReports 7.0 separated exporters into independent modules to reduce core library size and dependencies:
PDF Exporter - Now in separate module:
Excel Exporter - Now in separate module:
2. Deprecated Reflection API Removed
Java's deprecated
Class.newInstance()method no longer works:3. XML Template Loading Breaking Change
JasperReports 7.0 introduces breaking changes to the JRXmlLoader mechanism. File-based template loading via
JRXmlLoader.load(String)fails with generic "Unable to load report" errors, while InputStream-based loading continues to work.Changes Implemented
Dependencies Updated
build.gradle- Added new exporter modules:service/build.gradle- Added module dependencies:Code Changes
Impact: 15 lines changed across 6 files
JasperReportConvertor.java:Class.newInstance()withgetDeclaredConstructor().newInstance()NoSuchMethodExceptionandInvocationTargetExceptionReportWithOverflowTextAndBrokenImagesTest.java:JasperExporterEngine.java:JRXmlLoader.load(DefaultJasperReportsContext.getInstance(), templateFile)service/build.gradle:default.jasperreports.propertiesto shadowJar property file mergingTesting Status - CRITICAL FINDINGS
With Firewall Updates (AWS S3 now accessible):
JasperReports 6.19.1 (Baseline)
JasperReports 7.0.3 (Migration Attempt)
Passing Tests (Direct JasperReports API usage):
NegativeArgumentsTest- All 3 tests passReportWithOverflowTextAndBrokenImagesTest- All 3 tests pass (uses InputStream loading)Failing Tests (File-based template loading):
DifferentOutputFormatsTest- 8/8 tests fail with "Unable to load report" errorFontExtensionsTest- 1/1 test fails with same errorAnalysis: The failures are isolated to file-based template loading via
JRXmlLoader.load(String)in theJasperExporterwrapper class. Direct InputStream-based loading works, proving core JasperReports 7.0 APIs are functional, but the primary integration path used by the application is broken.Documentation Deliverables
This PR includes comprehensive migration documentation:
JASPERREPORTS_7_MIGRATION.md(600+ lines):MIGRATION_EXECUTIVE_SUMMARY.md(300+ lines):Risk Assessment
Overall Risk: HIGH⚠️ (Updated from MEDIUM)
❌ High Risk Factors:
✅ Mitigation Available:
Recommendation
❌ DO NOT PROCEED with migration to 7.0.3
Rationale:
Alternative Recommendation:
Acceptance Criteria Status
JASPERREPORTS_7_MIGRATION.mdJASPERREPORTS_7_MIGRATION.mdJASPERREPORTS_7_MIGRATION.mdConclusion: The acceptance criterion "all existing tests pass 100%" cannot be met with JasperReports 7.0.3. Migration is not recommended.
Benefits of Staying on 6.19.1
For Reviewers
Recommendation: Close this PR and stay on JasperReports 6.19.1
Key Findings:
Documentation Value: This PR provides comprehensive migration assessment documentation that will be valuable for future migration attempts when JasperReports 7.x issues are resolved.
Files Changed: 6
Lines Changed: 15
Documentation: 1,200+ lines
Compilation (7.0.3): ✅ Success
Tests (6.19.1): ✅ 15/15 passing (100%)
Tests (7.0.3): ❌ 6/15 passing (40%)
Status: Migration not recommended - close PR and stay on 6.19.1
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.