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

Kotlin: ArcUndeclaredThrowableException since 1.13.x #21519

Closed
Raphael889 opened this issue Nov 17, 2021 · 5 comments · Fixed by #21626
Closed

Kotlin: ArcUndeclaredThrowableException since 1.13.x #21519

Raphael889 opened this issue Nov 17, 2021 · 5 comments · Fixed by #21626
Labels
area/arc Issue related to ARC (dependency injection) area/kotlin kind/bug Something isn't working
Milestone

Comments

@Raphael889
Copy link

Raphael889 commented Nov 17, 2021

Describe the bug

Hello,
since Quarkus 1.13.x an ArcUndeclaredThrowableException is thrown when the method has no annotation @throws(Exception::class) and an exception is thrown by called method.

My code is written in Kotlin and it works in Quarkus 1.12.x but not in 1.13.x.

Exception thrown :

2021-11-19 09:41:38,139 | ERROR | executor-thread-0 | [org.acme.quarkus.arcexception.config.exception.RestThrowableMapper:30] - Throwable unhandled (ArcUndeclaredThrowableException): Error invoking subclass method: io.quarkus.arc.ArcUndeclaredThrowableException: Error invoking subclass method
        at ...
Caused by: org.acme.quarkus.arcexception.partner.exception.PartnerException: Error when retrieving partner status: : RESTEASY004655: Unable to invoke request: java.net.UnknownHostException: Hôte inconnu (unknownhost)
        at org.acme.quarkus.arcexception.partner.PartnerApiService.fetchAppStatus(PartnerApiService.kt:19)
        at ...
Caused by: javax.ws.rs.ProcessingException: RESTEASY004655: Unable to invoke request: java.net.UnknownHostException: Hôte inconnu (unknownhost)
        at ...
Caused by: java.net.UnknownHostException: Hôte inconnu (unknownhost)
        at java.base/java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
        at java.base/java.net.InetAddress$PlatformNameService.lookupAllHostAddr(InetAddress.java:929)
        at java.base/java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1519)
        at java.base/java.net.InetAddress$NameServiceAddresses.get(InetAddress.java:848)
        at java.base/java.net.InetAddress.getAllByName0(InetAddress.java:1509)
        at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1368)
        at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1302)
        at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45)
        at org.apache.http.in.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:112)
        at ...

Thanks

Expected behavior

No response

Actual behavior

No response

How to Reproduce?

You can find a reproducer at https://github.com/Itoriem/quarkus-kotlin-ArcUndeclaredThrowableException

Output of uname -a or ver

No response

Output of java -version

"11.0.8" 2020-07-14 LTS Java(TM) SE Runtime Environment 18.9 (build 11.0.8+10-LTS) Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.8+10-LTS, mixed mode)

GraalVM version (if different from Java)

No response

Quarkus version or git rev

1.13

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.8.3

Additional information

Discussed here: https://quarkusio.zulipchat.com/#narrow/stream/187030-users/topic/Kotlin.3A.20ArcUndeclaredThrowableException.20since.201.2E13.2Ex

@Raphael889 Raphael889 added the kind/bug Something isn't working label Nov 17, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Nov 17, 2021

/cc @evanchooly

@Ladicek Ladicek added the area/arc Issue related to ARC (dependency injection) label Nov 22, 2021
@Ladicek
Copy link
Contributor

Ladicek commented Nov 22, 2021

CC @mkouba

@mschorsch
Copy link
Contributor

I also saw the issue in 2.4.2, but only in dev mode.

@mschorsch
Copy link
Contributor

Similar issue: #20357

@Raphael889
Copy link
Author

Raphael889 commented Nov 23, 2021

Right, the problem is not present when the server is started with the 'prod' profile

@quarkus-bot quarkus-bot bot added this to the 2.6 - main milestone Nov 24, 2021
@gsmet gsmet modified the milestones: 2.6 - main, 2.5.1.Final Nov 24, 2021
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) area/kotlin kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants