-
Notifications
You must be signed in to change notification settings - Fork 71
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
[BUG] DocumentTemplate results in Exception running jnosql in Tomee 9.1.0 #400
Comments
@tlappe did you try adding the "openejb.additional.include" https://github.com/otaviojava/tomee-jnosql-sample/blob/main/pom.xml#L44L46 |
I've updated this repository, and I got this exception: org.eclipse.jnosql.mapping.document.DefaultDocumentTemplate has no explicit no-arg constructor! A public or protected constructor without args is required! So, we need to return all beans to have a no-arg constructor. |
@otaviojava, I'm just curious... is this requirement a default one of the CDI? I'm asking about it because we didn't face this problem when we worked on the sample codes https://github.com/JNOSQL/demos-se/tree/main/mongodb and https://github.com/JNOSQL/demo-ee/tree/main/liberty-mongodb... I've just figured out that another DocumentTemplate implementation (e.g: https://github.com/eclipse/jnosql-databases/blob/42881b7d97b6e3be73c4d53ebf788af102c259e2/jnosql-couchbase/src/main/java/org/eclipse/jnosql/databases/couchbase/mapping/DefaultCouchbaseTemplate.java#L70C1-L71C6) has a no-arg constructor... then we should add to all CDI beans a no-arg constructor in order to avoid this issue... |
@otaviojava, I'm gonna work on it! |
@dearrudam, it works on CDI Weld by Red Hat. |
@dearrudam, we need to check any inject bean that does not provide a no-arg constructor and return it to the original. |
@dearrudam I took this one here: eclipse/jnosql-databases#231 |
@dearrudam @tlappe https://github.com/otaviojava/tomee-jnosql-sample/ Please, let me know what you think. Ps:: Max, what do you think about moving this sample to the demo-ee one? |
@otaviojava I liked this idea! I've used this project to test locally the changes of the PR #402... I'll move it to there at demo-ee samples!! |
@tlappe, thank you, it is fixed, and we will release version 1.0.1 ASAP. |
@otaviojava will you release a SNAPSHOT version? |
@dearrudam it is already as 1.0.1-SNAPSHOT! |
Which JNoSQL project the issue refers to?
JNoSQL (Core)
Bug description
I'm trying to upgrade my application from 0.0.6 to 1.0.0 and to use @Inject to get a DocumentTemplate instead of using a Repository. I don't know if I'm doing something wrong or there is a problem in jnosql's code. It always ends in an exception starting my app in tomee 9.1.0. So I create a clean new project in Eclipse to understand what's going on.
Deploying the app to Tomee 9.1.0 results in:
JNoSQL Version
1.0.0
Steps To Reproduce
Expected Results
No exception and DocumentTemplate injected.
Code example, screenshot, or link to a repository
Starting a new project with
src/main/webapp/META-INF/microprofile-config.properties
The text was updated successfully, but these errors were encountered: