Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0054825 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Retail Modules] Web POS | minor | have not tried | 2024-03-01 12:44 | 2024-03-01 12:52 | |||
Reporter | caristu | View Status | public | |||||
Assigned To | Retail | |||||||
Priority | high | Resolution | fixed | Fixed in Version | RR24Q2 | |||
Status | closed | Fix in branch | Fixed in SCM revision | |||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | approved | |||||||
Review Assigned To | ||||||||
OBNetwork customer | No | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0054825: Error shown in log when no file is defined | |||||||
Description | The fix for 0048582 does not completely fixes the problem Define 3 POS templates without file (to use them as master data) when a login in POS is done after restart tomcat these lines of errors appears in the log 2022-02-11 17:17:04,007 [http-nio-8080-exec-7] ERROR org.openbravo.retail.posterminal.utility.OBPOSPrintTemplateReader - null cannot be read 2022-02-11 17:17:04,007 [http-nio-8080-exec-7] ERROR org.openbravo.retail.posterminal.utility.OBPOSPrintTemplateReader - null cannot be read 2022-02-11 17:17:04,008 [http-nio-8080-exec-7] ERROR org.openbravo.retail.posterminal.utility.OBPOSPrintTemplateReader - null cannot be read | |||||||
Steps To Reproduce | Open backoffice Login as system admin Go to window POS print templates Create a new template: Module : null Name: Test Report: false (not checked) Legacy: false (not checked) Template type: Print ticket Printing template: <output> <ticket> <line> <text align="center" length="42">print ticket example</text> </line> </ticket> </output> Reach login window in POS2 and you will see errors | |||||||
Proposed Solution | With the current check template.getTemplatePath() != null || !template.getTemplatePath().isEmpty() the second condition may throw a NPE when template.getTemplatePath() is null. Replace that condition with a) template.getTemplatePath() != null && !template.getTemplatePath().isEmpty() b) !StringUtils.isBlank(template.getTemplatePath()) | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
||||||||
|
![]() |
|
(0161506) hgbot (developer) 2024-03-01 12:46 |
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1496 [^] |
(0161507) hgbot (developer) 2024-03-01 12:52 |
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1496 [^] |
(0161508) hgbot (developer) 2024-03-01 12:52 |
Directly closing issue as related merge request is already approved. Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^] Changeset: b5f6d93691d77725994f563f8937d7a6e192c097 Author: Carlos Aristu <carlos.aristu@openbravo.com> Date: 01-03-2024 12:50:02 URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/b5f6d93691d77725994f563f8937d7a6e192c097 [^] fixes BUG-54825: fix empty template path condition --- M src/org/openbravo/retail/posterminal/utility/OBPOSPrintTemplateReader.java --- |
![]() |
|||
Date Modified | Username | Field | Change |
2024-03-01 12:44 | caristu | New Issue | |
2024-03-01 12:44 | caristu | Assigned To | => Retail |
2024-03-01 12:44 | caristu | OBNetwork customer | => No |
2024-03-01 12:44 | caristu | Triggers an Emergency Pack | => No |
2024-03-01 12:44 | caristu | Issue generated from | 0048582 |
2024-03-01 12:44 | caristu | Relationship added | related to 0048582 |
2024-03-01 12:46 | hgbot | Merge Request Status | => open |
2024-03-01 12:46 | hgbot | Note Added: 0161506 | |
2024-03-01 12:50 | hgbot | Merge Request Status | open => approved |
2024-03-01 12:52 | hgbot | Resolution | open => fixed |
2024-03-01 12:52 | hgbot | Status | new => closed |
2024-03-01 12:52 | hgbot | Note Added: 0161507 | |
2024-03-01 12:52 | hgbot | Fixed in Version | => RR24Q2 |
2024-03-01 12:52 | hgbot | Note Added: 0161508 |
Copyright © 2000 - 2009 MantisBT Group |