Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to Quarkus 3.0 #333

Open
apupier opened this issue May 10, 2023 · 3 comments · May be fixed by #338
Open

Migrate to Quarkus 3.0 #333

apupier opened this issue May 10, 2023 · 3 comments · May be fixed by #338
Assignees

Comments

@apupier
Copy link
Member

apupier commented May 10, 2023

@apupier apupier self-assigned this May 10, 2023
apupier added a commit to apupier/compas-cim-mapping that referenced this issue May 26, 2023
the main change is migrating from JavaEE to JakartaEE.

- update Quarkus bom from io.quarkus:quarkus-universe-bom to
io.quarkus.platform:quarkus-bom as it was deprecated since Quarkus 2.1
https://github.com/quarkusio/quarkus/wiki/Migration-Guide-2.1#quarkus-universe-bom-is-deprecated
(and it is required to use the Quarkus migration tool)
- launched quarkus `quarkus update --stream=3.0` as mentioned in
https://github.com/quarkusio/quarkus/wiki/Migration-Guide-3.0#automatic-update-tool
which dealt with a fair part of the migration. Then it remained few
little tasks.
- Updated quarkus.index-dependency for jaxb from
org.jboss.spec.javax.xml.bind:jboss-jaxb-api_2.3_spec to
`jakarta.xml.bind:jakarta.xml.bind-api`

fix com-pas#333

current test failure:
```
[ERROR] org.lfenergy.compas.cim.mapping.rest.v1.CompasCimMappingResourceTest.mapCimToScl_WhenCalled_ThenCorrectMessageIsRetrieved
Time elapsed: 1.465 s  <<< FAILURE!
org.opentest4j.AssertionFailedError: expected: not <null>
	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:152)
	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
	at org.junit.jupiter.api.AssertNotNull.failNull(AssertNotNull.java:49)
	at org.junit.jupiter.api.AssertNotNull.assertNotNull(AssertNotNull.java:35)
	at org.junit.jupiter.api.AssertNotNull.assertNotNull(AssertNotNull.java:30)
	at org.junit.jupiter.api.Assertions.assertNotNull(Assertions.java:301)
	at org.lfenergy.compas.cim.mapping.rest.v1.CompasCimMappingResourceTest.mapCimToScl_WhenCalled_ThenCorrectMessageIsRetrieved(CompasCimMappingResourceTest.java:70)
```
suspect logs:
```
2023-05-26 16:28:42,577 WARN  [io.qua.dep.ste.ReflectiveHierarchyStep]
(build-26) Unable to properly register the hierarchy of the following
classes for reflection as they are not in the Jandex index:
	- javax.xml.bind.JAXBElement (source: SmallRyeOpenApiProcessor >
org.lfenergy.compas.cim.mapping.rest.v1.model.MapResponse)
	- javax.xml.namespace.QName (source: SmallRyeOpenApiProcessor >
org.lfenergy.compas.cim.mapping.rest.v1.model.MapResponse)
Consider adding them to the index either by creating a Jandex index for
your dependency via the Maven plugin, an empty META-INF/beans.xml or
quarkus.index-dependency properties.
2023-05-26 16:28:42,895 WARN  [io.qua.arc.pro.BeanArchives] (build-20)
Failed to index javax.xml.bind.JAXBElement: Class does not exist in
ClassLoader QuarkusClassLoader:Deployment Class Loader: TEST@4c579b5b
```
even if before migration there is similar (but not exactly the same)
warning:
```
[WARNING] [io.quarkus.deployment.steps.ReflectiveHierarchyStep] Unable
to properly register the hierarchy of the following classes for
reflection as they are not in the Jandex index:
	- javax.xml.namespace.QName (source: SmallRyeOpenApiProcessor >
org.lfenergy.compas.cim.mapping.rest.v1.model.MapResponse)
Consider adding them to the index either by creating a Jandex index for
your dependency via the Maven plugin, an empty META-INF/beans.xml or
quarkus.index-dependency properties.
```

Signed-off-by: Aurélien Pupier <[email protected]>
@apupier apupier linked a pull request May 26, 2023 that will close this issue
apupier added a commit to apupier/compas-cim-mapping that referenced this issue May 26, 2023
the main change is migrating from JavaEE to JakartaEE.

- update Quarkus bom from io.quarkus:quarkus-universe-bom to
io.quarkus.platform:quarkus-bom as it was deprecated since Quarkus 2.1
https://github.com/quarkusio/quarkus/wiki/Migration-Guide-2.1#quarkus-universe-bom-is-deprecated
(and it is required to use the Quarkus migration tool)
- launched quarkus `quarkus update --stream=3.0` as mentioned in
https://github.com/quarkusio/quarkus/wiki/Migration-Guide-3.0#automatic-update-tool
which dealt with a fair part of the migration. Then it remained few
little tasks.
- Updated quarkus.index-dependency for jaxb from
org.jboss.spec.javax.xml.bind:jboss-jaxb-api_2.3_spec to
`jakarta.xml.bind:jakarta.xml.bind-api`

fix com-pas#333

TO UPDATE THE version of compas.core when a release is available or use
the ${project.version} ?

Signed-off-by: Aurélien Pupier <[email protected]>
@pascalwilbrink
Copy link
Member

I took a look into why the Cim Mapping was failing.
Turns out that the Cim-mapping has a dependency on RDF4J for reading RDF (?) data.
This is still using javax. Once this has been updated to Jakarta, we can safely upgrade Cim Mapping to Quarkus 3.
There is an active issue in the RDF4J repo:

eclipse-rdf4j/rdf4j#4603

part of their Milestone 5:

https://github.com/eclipse-rdf4j/rdf4j/milestone/80

@Sander3003
Copy link
Member

eclipse-rdf4j/rdf4j#4604

@Sander3003
Copy link
Member

Sander3003 commented Jul 18, 2024

Currently the open PRs from @apupier in both repos present challenges that prevent us from merging and creating new releases.

For compas-cim-mapping there is a build error here: https://github.com/com-pas/compas-cim-mapping/actions/runs/6405355292/job/17394667679?pr=338

And for the compas-scl-validator we have Sonarcloud complaining about the logging approach here: SonarCloud - compas-scl-validator #206 – Upgrade to Quarkus 3.0

13 okt 2023 "We cannot update the Cim Mapping to Quarkus 3. Cim Mapping is depending on RDF4J, which is still using Javax, instead of jakarta. There is an issue in their repository. More info is in the issue on GH"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

3 participants