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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0050879
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajorhave not tried2022-11-14 11:402022-11-16 08:11
ReportershuehnerView Statuspublic 
Assigned Toshuehner 
PrioritynormalResolutionfixedFixed in VersionPR23Q1
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0050879: junit HiddenUpdateTest fails with jdk19 on oracle

DescriptionThis junit testcase fails when runninging on:
- oracle (only oracle)
- jdk19 or higher

Error is triggered here when checking following table:
org.openbravo.test.dal.HiddenUpdateTest - Checking entity ADSystemInformation

Error message:
An invalid XML character (Unicode: 0xb) was found in the node's character data content.

caused at:
https://gitlab.com/openbravo/product/openbravo/-/blob/master/src/org/openbravo/dal/xml/EntityXMLConverter.java#L462 [^]

by the value ad_system_info.db_checksum

The raw value read from the db_checksum column is identical when running jdk11 (working) and jdk19 (failing).
Error seems to be triggered by the xml-construction inside jdk being stricter on jdk19.

Steps To ReproduceIn environment with:
- oracle (19)
- JDK19

Run the following junit test
ant run.test -Dtest=org.openbravo.test.dal.HiddenUpdateTest
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks feature request 0049432 newTriage Platform Base Support JDK19 

-  Notes
(0143512)
shuehner (administrator)
2022-11-14 11:43
edited on: 2022-11-15 13:00

Base-problem is apparently that our db_checksum value being calculated in ad_db_modified pl-function (defined in prescript-oracle) are not printed characters but some RAW value (16 bytes).
Probably we should have applied rawtohex(RAW) => varchar(32) when creating that function to get 32chars hex-encoded instead.

After discussion ALO/SHU:
- Skip that specific table ad_system_info inside this junit test
- As on oracle the db_checksum does contain invalid (for xml) characters

Discarded:
- Updating formatting of oracle db_checksum (to be hex)
  - checksum calculation + checking is done entirely inside pl-code so unaffected by this topic
  - Effort to change formatting would invalidate existing checksum
  - Overhead to deal with that (customer by customer or with extra migration code) is not worth it (for "just" fixing that specific but otherwise unrelated test-case).

(0143609)
hgbot (developer)
2022-11-15 13:16

Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/761 [^]
(0143669)
hgbot (developer)
2022-11-16 08:09

Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/761 [^]
(0143670)
hgbot (developer)
2022-11-16 08:09

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: b2e38d14b5bd474ebff41e14d75746d37055e516
Author: Stefan Huehner <stefan.huehner@openbravo.com>
Date: 16-11-2022 07:08:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/b2e38d14b5bd474ebff41e14d75746d37055e516 [^]

Fixes ISSUE-50879. Fix HiddenUpdateTest on oracle with JDK19.

ad_system_info.db_checksum on oracle contains raw bytes instead of
printable hexadecimal version of the md5-checksum over the structure.

This junit tests reads the row including the raw bytes which in some
cases are invalid characters when being added to an xml document.
That is now being rejected when using JDK19+ where the xml-parser seems
to be more strict.

Changing the checksum formatting now long time later after introducing
it would invalidate existing value and require extra work on updates.

Instead skip this specific table in the JUnit testcase to avoid
triggering the problem.

---
M src-test/src/org/openbravo/test/dal/HiddenUpdateTest.java
---

- Issue History
Date Modified Username Field Change
2022-11-14 11:40 shuehner New Issue
2022-11-14 11:40 shuehner Assigned To => Triage Platform Base
2022-11-14 11:40 shuehner Modules => Core
2022-11-14 11:40 shuehner Triggers an Emergency Pack => No
2022-11-14 11:43 shuehner Note Added: 0143512
2022-11-14 11:43 shuehner Relationship added blocks 0049432
2022-11-15 13:00 shuehner Note Edited: 0143512 View Revisions
2022-11-15 13:16 hgbot Note Added: 0143609
2022-11-16 08:09 hgbot Resolution open => fixed
2022-11-16 08:09 hgbot Status new => closed
2022-11-16 08:09 hgbot Note Added: 0143669
2022-11-16 08:09 hgbot Fixed in Version => PR23Q1
2022-11-16 08:09 hgbot Note Added: 0143670
2022-11-16 08:11 alostale Assigned To Triage Platform Base => shuehner


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker