Closed akshayamaldhure closed 8 months ago
For this issue, I tried some Google search and came across this answer https://stackoverflow.com/a/26288190. So I thought of opening this question here in this forum.
Hi @akshayamaldhure, thanks for asking the question.
I've never heard of this type of issues. With the given information so far, I don't think this SDK can be the cause of the issue. So, we may not be able to help you out for this question. If you observe a behavior difference (or misbehavior if you call it so) only when running your code as part of a uber jar file, please consider asking for help to the project maintainers with minimum repro steps.
Hope you'll figure the cause out soon!
@seratch I believe you right, because what I get during the debug process is not an exception
but an error
(NoClassDefFoundError
), which is not supposed to caught using the try-catch block with an Exception e
declaration. Sorry about confusion. I'll get to the bottom of this. Thank you for the quick response.
I compiled my bot listener service as a fat JAR using this Gradle plugin https://github.com/johnrengelman/shadow. Below is the fat JAR task config in my
build.gradle
file.The code to return a relevant message to the
return context.client().chatPostMessage(...)
call is a simple try-catch block that works well if I do not run my service through a JAR, but through a Gradlerun
task configuration.Reproducible in:
The Slack SDK version
Java Runtime version
OS info