[MAGNOLIA-8080] Magnolia will not start when module version in descriptor could not be parsed Created: 03/May/21 Updated: 04/Jul/22 Resolved: 01/Feb/22 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | None |
| Affects Version/s: | 6.2.7 |
| Fix Version/s: | 6.2.17 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | zzz_Philipp Güttler | Assignee: | Dai Ha |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | VN-Maintenance | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | 0.5d | ||
| Original Estimate: | Not Specified | ||
| Template: | |
| Acceptance criteria: |
Empty
|
| Task DoD: |
[X]*
Doc/release notes changes? Comment present?
[X]*
Downstream builds green?
[X]*
Solution information and context easily available?
[X]*
Tests
[X]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
| Bug DoR: |
[X]*
Steps to reproduce, expected, and actual results filled
[X]*
Affected version filled
|
| Date of First Response: | |
| Epic Link: | Support |
| Sprint: | DevX 1, DevX 2 |
| Story Points: | 3 |
| Team: |
| Description |
| Comments |
| Comment by Roman Kovařík [ 07/Jan/22 ] |
|
Could you add steps to reproduce?
|
| Comment by zzz_Philipp Güttler [ 12/Jan/22 ] |
|
Yes, it is a missing build step (maven resource filtering) on a ci server or when working locally with an IDE mostly, which skips the replacement of those placeholders. As you pointed out, the version always should be set to a known version format. Anyhow, Magnolia does load module descriptors successfully, by setting the version to null when reading a non-parseable version in one of its modules: LightModuleDefinitionReader.java:165 Map2Bean fails for field version. But after the initialization, Magnolia throws this NPE and stops working, because of the logging statement is assuming a non-null version - which is a breach of contract. I tested this again with Magnolia 6.2.15 and got the reported behavior only for YAML module descriptors. XML descriptors tend to log an error message pointing to the non-parseable version nicely. |