Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

botbuilder-java does not work with springframework 6 (Spring Boot 3) #1521

Open
martinqcz opened this issue Nov 22, 2023 · 0 comments
Open
Labels
bug Indicates an unexpected problem or an unintended behavior. needs-triage The issue has just been created and it has not been reviewed by the team.

Comments

@martinqcz
Copy link

Github issues should be used for bugs and feature requests. Use Stack Overflow for general "how-to" questions.

Version

What package version of the SDK are you using.
4.14.3

Describe the bug

Give a clear and concise description of what the bug is.
When the bot-integration-spring jar is used together with springboot 3 (ie. spring 6.x), BotController is throwing NoSuchMethodError. That is because there HttpStatus enum in spring6 implements HttpStatusCode interface and ResponseEntity constructor requires parameter of type HttpStatusCode.

There is not needed any change in the source code, but the module needs to be compiled against spring6 classes in order to fix this issue.

To Reproduce

Steps to reproduce the behavior:
Try to use the bot-integration-spring dependency with spring boot 3 and reach the BotController incomming endpoint (POST /api/messages)

Expected behavior

Give a clear and concise description of what you expected to happen.

No exception is thrown.

Screenshots

If applicable, add screenshots to help explain your problem.

Caused by: java.lang.NoSuchMethodError: 'void org.springframework.http.ResponseEntity.(org.springframework.http.HttpStatus)'
at com.microsoft.bot.integration.spring.BotController.lambda$incoming$0(BotController.java:94)
at java.base/java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:934)
at java.base/java.util.concurrent.CompletableFuture$UniHandle.tryFire(CompletableFuture.java:911)
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
at java.base/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2147)
at kotlinx.coroutines.future.CompletableFutureCoroutine.onCompleted(Future.kt:57)
at kotlinx.coroutines.AbstractCoroutine.onCompletionInternal(AbstractCoroutine.kt:93)
at kotlinx.coroutines.JobSupport.tryFinalizeSimpleState(JobSupport.kt:294)
at kotlinx.coroutines.JobSupport.tryMakeCompleting(JobSupport.kt:856)
at kotlinx.coroutines.JobSupport.makeCompletingOnce$kotlinx_coroutines_core(JobSupport.kt:828)
at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:100)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)

Additional context

Add any other context about the problem here.

@martinqcz martinqcz added bug Indicates an unexpected problem or an unintended behavior. needs-triage The issue has just been created and it has not been reviewed by the team. labels Nov 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Indicates an unexpected problem or an unintended behavior. needs-triage The issue has just been created and it has not been reviewed by the team.
Projects
None yet
Development

No branches or pull requests

1 participant