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

Arc - Method used by Yasson not implemented #1656

Closed
masini opened this issue Mar 23, 2019 · 6 comments · Fixed by #2769
Closed

Arc - Method used by Yasson not implemented #1656

masini opened this issue Mar 23, 2019 · 6 comments · Fixed by #2769
Labels
area/arc Issue related to ARC (dependency injection) triage/upstream Used for issues which are caused by issues in upstream projects/dependency
Milestone

Comments

@masini
Copy link
Contributor

masini commented Mar 23, 2019

Adding a @JsonbTypeSerializer or other annotations that lookup for a Bean, this Exception is thrown:

Caused by: java.lang.UnsupportedOperationException
	at io.quarkus.arc.BeanManagerImpl.createAnnotatedType(BeanManagerImpl.java:211)
	at org.eclipse.yasson.internal.components.BeanManagerInstanceCreator.lambda$getOrCreateComponent$0(BeanManagerInstanceCreator.java:68)
	at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1705)
	at org.eclipse.yasson.internal.components.BeanManagerInstanceCreator.getOrCreateComponent(BeanManagerInstanceCreator.java:67)
	at org.eclipse.yasson.internal.ComponentMatcher.introspectSerializerBinding(ComponentMatcher.java:292)
	at org.eclipse.yasson.internal.AnnotationIntrospector.getSerializerBinding(AnnotationIntrospector.java:299)
	at org.eclipse.yasson.internal.AnnotationIntrospector.introspectCustomization(AnnotationIntrospector.java:694)
	at org.eclipse.yasson.internal.MappingContext$ParseClassModelFunction.apply(MappingContext.java:54)
	at org.eclipse.yasson.internal.MappingContext$ParseClassModelFunction.apply(MappingContext.java:37)
	at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1705)
	at org.eclipse.yasson.internal.MappingContext.getOrCreateClassModel(MappingContext.java:107)
	at org.eclipse.yasson.internal.Marshaller.marshall(Marshaller.java:73)
	at org.eclipse.yasson.internal.JsonBinding.toJson(JsonBinding.java:98)
	at org.jboss.resteasy.plugins.providers.jsonb.JsonBindingProvider.writeTo(JsonBindingProvider.java:133)
	... 60 more

Is documented that createAnnotatedType is not supported but JSONB RI uses it as well (I think is older than Quarkus itself).

@gsmet gsmet added the area/arc Issue related to ARC (dependency injection) label Mar 23, 2019
@gsmet
Copy link
Member

gsmet commented Mar 23, 2019

@mkouba any chance we could implement that method?

@mkouba
Copy link
Contributor

mkouba commented Mar 25, 2019

We don't plan to fully support Annotated abstraction layer, the only exception is injection point metadata for @Dependent beans. Also InjectionTarget API is not supported ATM. Ideally, Yasson should provide some SPI so that we can use ArC API. In this particular case, it should be quite straightforward.

@gsmet
Copy link
Member

gsmet commented Mar 25, 2019

@mkouba Well, they do use the CDI SPI for that. Not sure they will want to include a separate one.

What's the plan for this, then? The use case is fairly common IMHO.

@mkouba
Copy link
Contributor

mkouba commented Mar 25, 2019

Not sure they will want to include a separate one.

Well, it doesn't have to be a separate one but a more general one so that it would be possible to use any DI framework.

What's the plan for this, then? The use case is fairly common IMHO.

We don't have a plan yet. So far our strategy was not to support all "traditional" APIs (for example portable extensions) but provide an alternative way to do the same stuff.

@mkouba
Copy link
Contributor

mkouba commented Apr 12, 2019

For the record - I've created eclipse-ee4j/yasson#260.

@gsmet gsmet added the triage/upstream Used for issues which are caused by issues in upstream projects/dependency label Apr 29, 2019
@Edubits
Copy link

Edubits commented Jun 8, 2019

FYI: Yasson 1.0.4 is available in Maven central containing the fix for eclipse-ee4j/yasson#260.

mkouba added a commit to mkouba/quarkus that referenced this issue Jun 10, 2019
- upgrade Yasson to 1.0.4
- resolves quarkusio#1656
mkouba added a commit to mkouba/quarkus that referenced this issue Jun 10, 2019
- upgrade Yasson to 1.0.4
- resolves quarkusio#1656
mkouba added a commit to mkouba/quarkus that referenced this issue Jun 10, 2019
- upgrade Yasson to 1.0.4
- resolves quarkusio#1656
mswiderski pushed a commit to mswiderski/quarkus that referenced this issue Jun 13, 2019
- upgrade Yasson to 1.0.4
- resolves quarkusio#1656
@gsmet gsmet added this to the 0.17.0 milestone Jun 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/arc Issue related to ARC (dependency injection) triage/upstream Used for issues which are caused by issues in upstream projects/dependency
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants