Issue to execute JNoSQL with Helidon version MP 2.4.1
See original GitHub issueEnvironment Details
- Helidon Version: 2.4.1
- Helidon SE or Helidon MP: Helidon MP
- JDK version: Java 11 or Java 17
- OS: Linux
- Docker version (if applicable):
Problem Description
I have an issue executing JNoSQL with Helidon version 2.4.1 or higher.
I created a project from either Microprofiler Starter or Maven Architypes and then add these dependencies:
<dependency>
<groupId>org.eclipse.jnosql.mapping</groupId>
<artifactId>mapping-document</artifactId>
<version>${jakarta.nosql.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jnosql.communication</groupId>
<artifactId>mongodb-driver</artifactId>
<version>${jakarta.nosql.version}</version>
</dependency>
I expected to work such as in the previous version, 1.4, however, it stopped working.
I have those projects where both run with extension and only one works, however, both are using the same extension event: ProcessAnnotatedType
Issue Analytics
- State:
- Created a year ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Issue to execute JNoSQL with Helidon version MP 2.4.1 · Issue ...
I have an issue executing JNoSQL with Helidon version 2.4.1 or higher. ... I expected to work such as in the previous version,...
Read more >Components - Helidon
A set of reactive, non-blocking libraries. explore. Helidon MP. Microprofile implementation.
Read more >Helidon 2.4.0 released! - Medium
This release is an LTS (Long Term Support). Helidon 2.4.0 is now fully compatible with Java 17 and it's newest features!
Read more >JDK 17 Coming Out! - The Stackd Podcast - Libsyn
Writing JSF pages in Java (https://github.com/jakartaee/faces/issues/1581) ... MP 5.0 https://microprofile.io/2021/12/07/microprofile-5-0-release/ (Josh).
Read more >Error while trying to read files from Helidon MP - Stack Overflow
1 Answer 1 ... Since you are using the Helidon BOM (aka. Bill-of-Material), you shouldn't be declaring explicit versions for sub-modules ( helidon...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@otaviojava Some more information on why adding the Jackson dependency helps…
As you have no doubt noticed, Helidon’s OpenAPI support layers on some SmallRye OpenAPI components. Although SmallRye defaults to using Jackson, it also permits callers to provide their own
AnnotationScannerExtension
to do parsing however they want, using whatever libraries they want. Helidon does just that.Your use case has revealed a place in SmallRye’s code that uses Jackson even if the caller provides the extension.
I have opened https://github.com/smallrye/smallrye-open-api/issues/1161 about this.
As you’ve done, adding Jackson yourself to the dependencies sidesteps this problem for your Helidon app.
When the project is built, the
mapping-document-1.0.0-b4.jar
that ends up intarget/libs
appears to come from a different project than https://github.com/eclipse/jnosql/blob/1.0.0-b4/mapping/mapping-document/pom.xml.The
mapping-document-1.0.0-b4.jar
that is intarget/libs
comes from this project: https://github.com/eclipse-ee4j/nosql/blob/1.0.0-b4/api/mapping/mapping-document/pom.xml#L27This
jakarta.nosql.mapping:mapping-document
artifact does not contain a class namedorg.eclipse.jnosql.mapping.document.spi.DocumentExtension
. In fact it does not contain any portable extensions: https://github.com/eclipse-ee4j/nosql/tree/1.0.0-b4/api/mapping/mapping-document/src/main/java/jakarta/nosql/mapping/documentThe root cause appears to be that there are two jar files that end up having the same name that contain entirely different things.
If for some reason you need both of these identically-named jars that are from different projects, you can change your usage of the
maven-dependency-plugin
’scopy-dependencies
goal to ensure that one of these jar files gets named differently when it ends up intarget/libs
. You can see how Helidon defines thiscopy-libs
execution here.A quick solution to illustrate what I’m talking about: if you pass
-Dmdep.prependGroupId=true
to your Maven build, you’ll see new dependencies intarget/libs
. Please note this is not a full solution, since theClass-Path
header in thetarget/products.jar
will not be adjusted accordingly, but it at least should show you a path forward.