Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0054825
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSminorhave not tried2024-03-01 12:442024-03-01 12:52
ReportercaristuView Statuspublic 
Assigned ToRetail 
PriorityhighResolutionfixedFixed in VersionRR24Q2
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0054825: Error shown in log when no file is defined

DescriptionThe 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 ReproduceOpen 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 SolutionWith 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())
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0048582 closedsntgreale [Print templates as masterdata] error shown in log when no file is defined 

-  Notes
(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
---

- Issue History
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 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 Note Added: 0161506
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
Powered by Mantis Bugtracker