Replies: 4 comments 1 reply
-
Based on voting results of the last Oxalis Technical Meeting March 30, it could be considered not to migrate the whole project to be able to compile with JDK 17, but instead only to support it running on JDK 17, at least as an intermediate step before final migration. This can be achieved with much lower efforts, and even done by users of the Oxalis themselves:
This can be solved by starting Oxalis with additional VM argument Above changes can be done without modifying any line in Oxalis project, e.g. by importing oxalis-commons, oxalis-api, oxalis-outbound and oxalis-as4 to a a new project and adding next dependencies to add required javax.* implementations and overwrite Guice version:
This was successfully tested with AS4 sending with both BDXL and BusDox lookup. Testing inbound server modifications for receiving testing are pending. BTW, some unit tests from oxalis-commons/oxalis-outbound under JDK 17 where lookup is done, fail with error "Unable to verify document signature.": "javax.xml.crypto.MarshalException: It is forbidden to use algorithm http://www.w3.org/2000/09/xmldsig#rsa-sha1 when secure validation is enabled". This happens because in JDK 17 by default a strict security is activated which forbids SHA1 based signature algorithms, still used in many SMP implementations - see JDK17/conf/security/java.security file:
Instead of modifying this file by removing from there
unit tests can be fixed by adding One more notice - at least locally, when there are many DNS lookup servers configured, SMP lookup time can be very big (16 seconds!), because internally dnsjava can query each of them one by one until gets response. This can be debugged by calling |
Beta Was this translation helpful? Give feedback.
-
Done successful testing of above mentioned dependencies with Oxalis AS4 server side. Tests by BTW, these dependencies can be integrated into Oxalis similar to CXF support of Java 9 and further via profiles, see example: Additionally, some heavy transitive dependencies like jacorb-omgapi and jboss-rmi-api_1.0_spec from cxf modules can be to exclude to reduce size of standalone jar or war packaging. |
Beta Was this translation helpful? Give feedback.
-
Both Oxalis and Oxalis-AS4 projects are updated in the branch feature/java-17 with latest changes from master and new version 6.0.0-SNAPSHOT Github actions were updated to build both projects with maven on java 17 and publish maven artifacts to OSS Sonatype snapshot repository, also as generate Docker images (at the moment limited only to amd64 to speed up the building process) with version latest-17. Links:
Again, at the moment I see no problems to release the same maven artifacts for both java 8 and java 17 (except distribution package) and just 2 sets of Docker images - based on Java 8 and Java 17 - per each architecture - that is why old Dockerfile based on java-8 is kept in the repos, just one more Dockerfile-Java-17 was added. |
Beta Was this translation helpful? Give feedback.
-
Is there any updates/plans for when version 6.0.0 (Oxalis with java17) will be released? |
Beta Was this translation helpful? Give feedback.
-
On an Oxalis Community Technical Dialog Meeting November 24, 2021 it was discussed whether Oxalis can/should switch/support Java 17.
At the moment Oxalis works on Java 8, and is not expected to work on Java 11 because of big clenaup, done in JEP 320:
https://www.oracle.com/java/technologies/javase/11-relnote-issues.html#JDK-8190378
Fast research shows:
To support Java 17, the process could consider:
As a very early proof of concept, draft migration was tried for vefa-peppol project with next change notes:
-- jaxb2-maven-plugin from 1.6 to 2.5.0,
-- target from 2.1 to 3.0,
-- namespace in *.xjb from xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" to xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb" and jaxb:version="2.0" to jaxb:version="3.0"
In OpenJDK 17 it is enabled by default: https://bugs.openjdk.java.net/browse/JDK-8259801
As vefa-peppol depends on DIFI libraries, similar draft migration was done on /efm-certvalidator (successfully) and /efm-commons-libs (paused, stucked on stubs generation for WSDL at commons-busdox, where tricky Maven goals are defined ( wsimport1 and wsimport2) - but it looks possible to fix.
In general, for now it looks doable to have a single version of Oxalis, able to run starting from Java 8 up to at least Java 17: keep compilation level on java 8, but make changes in the code and dependencies.
Theoretically, it could be possible to keep javax.xml.bind package and use it as dependency, one of the worries is in potential differences in interfaces, specific for some JDK implementations, and in libraries used to compile JAXB stubs. But in this case less changes are required in external libraries.
One of questions to clarify - whether DIFI is going to modify no.difi.commons.commons-XXX libraries (used in Oxalis) or is able to accept, review and test pull requests to make changes there. Alternative - migrate them to OxalisCommunity repository if it was missed by accident :)
Beta Was this translation helpful? Give feedback.
All reactions