Poppy 2023 R2 - Upgrade to Java 17 (FOLIO-3783)

[EDGOAIPMH-101] Update to Java 17 edge-oai-pmh Created: 16/Jun/23  Updated: 13/Oct/23  Resolved: 08/Sep/23

Status: Closed
Project: edge-oai-pmh
Components: None
Affects versions: None
Fix versions: 2.7.0
Parent: Poppy 2023 R2 - Upgrade to Java 17

Type: Task Priority: TBD
Reporter: Oleksii Petrenko Assignee: Dmytro Bykov
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Attachments: PNG File FH_fs0900000_Inventory.png     Text File error_trace.txt     PNG File image-1.png     PNG File image-2023-08-28-16-42-39-693.png     PNG File image-2023-08-28-16-43-00-506.png     PNG File image-2023-08-28-16-49-45-409.png     PNG File image-2023-08-28-16-51-17-013.png     PNG File image-2023-08-28-19-15-00-888.png     PNG File image-2023-08-31-14-45-33-911.png     PNG File image.png     PNG File srs_verb=ListIds&metadataPrefix=marc21 SRS+Inventory.png     PNG File srs_verb=ListIds&metadataPrefix=marc21.png     PNG File srs_verb=ListIds&metadataPrefix=marc21_withholdings.png     PNG File srs_verb=ListRecords&metadataPrefix=marc21-1.png     PNG File srs_verb=ListRecords&metadataPrefix=marc21.png     PNG File srs_verb=ListRecords&metadataPrefix=marc21_withholdings SRS+Inventory.png     PNG File srs_verb=ListRecords&metadataPrefix=marc21_withholdings.png    
Issue links:
Defines
defines UXPROD-3900 Firebird - Poppy R2 2023 Enhancement... Closed
Gantt End to Start
has to be done after MODOAIPMH-525 Update to Java 17 mod-oai-pmh Closed
Sprint: Firebird - Sprint 173
Story Points: 2
Development Team: Firebird
Release: Poppy (R2 2023)
Epic Link: Poppy 2023 R2 - Upgrade to Java 17
RCA Group: TBD

 Description   

Purpose/Overview:
Update the module to Java 17 and identify issues.
https://folio-org.atlassian.net/wiki/display/TC/JDK+17+and+Java+17

Acceptance criteria:

  • Identify issues related to Java 17 update
  • The module compiles without errors


 Comments   
Comment by Dmytro Bykov [ 28/Aug/23 ]

During the compilation under Java 11, the project triggers the warning(below) at the stage of java classes generation by the  org.folio.raml-module-builder
but the process finishes with success.

Migration of the project to Java 17 with the following changes applied https://github.com/folio-org/edge-oai-pmh/pull/99/files 
causes the issue at the place mentioned previously.


The total error stack trace is attached.

The root cause of such an issue is that the file-generation process goes through the 
org.raml.jaxrs.generator.v10.types.V10GTypeXml, which is bound to 
org.raml.jaxrs.generator.builders.JAXBHelper

but the same Java file-generation flow in the https://github.com/folio-org/mod-data-export project works successfully under Java 17 because it passes org.raml.jaxrs.generator.v10.types.V10GTypeJson but not V10GTypeXml

The suggestion regarding further steps in the Java 17 migration flow scope is needed.

FYI Viachaslau Khandramai 

Thanks.

Comment by Dmytro Bykov [ 28/Aug/23 ]

Processing raml schemas, the raml-module builder dealing with two kinds of objectType: JSON_OBJECT_TYPE and XML_OBJECT_TYPE.

Both of them are bound to different types of generators: V10GTypeJson and V10GTypeXml.

 

org.raml.jaxrs.generator.builders.JAXBHelper is involved in file generation flow by V10GTypeXml, and currently ruins encapsulation of Java internals.
The error stack trace is attached.

Comment by Dmytro Bykov [ 31/Aug/23 ]

Karate - tests result

Comment by Yauheniya Kryshtafovich [ 08/Sep/23 ]

Hi, Magda Zacharska and Dmytro Bykov the smoke verification was done on Snapshot:
1. Start harvesting with verb=ListRecords&metadataPrefix=marc21
SRS

2. Start harvesting with verb=ListRecords&metadataPrefix=marc21_withholdings
SRS,  SRS+Inventory

3. Start harvesting with verb=ListIdentifiers&metadataPrefix=marc21 and with verb=ListIdentifiers&metadataPrefix=marc21_withholdings
SRS,  SRS+Inventory

4. Full harvesting was done on Sprint testing env (tenant fs09000000) for Inventory: marc21 and marc21_withholdings:

Generated at Thu Feb 08 23:30:43 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.