Error `It's not possible to automatically add a synthetic no-args constructor to an unproxyable bean class.`
See original GitHub issueDescribe the bug
Using a @RequestScoped Service fails, if it extends a abstract service and uses constructor injection to redirect a Repository Bean proxy into the super constructor.
It works, if I use attribute injection via @Inject
.
Kotlin, Gradle, AllOpen-Plugin
Expected behavior
A working application.
Actual behavior
[error]: Build step io.quarkus.arc.deployment.ArcProcessor#generateResources threw an exception: javax.enterprise.inject.spi.DeploymentException: It's not possible to automatically add a synthetic no-args constructor to an unproxyable bean class. You need to manually add a non-private no-args constructor to org.quarkus.error.reproducer.service.FruitAService in order to fulfill the requirements for normal scoped/intercepted/decorated beans.
How to Reproduce?
./gradlew quarkusDev
Output of uname -a
or ver
5.15.12-zen1-1-zen
Output of java -version
openjdk version “17.0.1” 2021-10-19 OpenJDK Runtime Environment (build 17.0.1+12) OpenJDK 64-Bit Server VM (build 17.0.1+12, mixed mode)
GraalVM version (if different from Java)
N/A
Quarkus version or git rev
2.6.1
Build tool (ie. output of mvnw --version
or gradlew --version
)
Gradle 7.3.3
Additional information
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (5 by maintainers)
Top GitHub Comments
The automagical creation of a no-arg constructor is only single-level meaning is there is an [abstract] super class that doesn’t have no-args constructor, it will fail.
Good hint. I think this bug ticket should be closed. But maybe the kotlin guides should hint for the kotlin plugins, if someone uses generics and abstract classes.
Here is the new issue ticket: https://github.com/quarkusio/quarkus/issues/22689