-
Notifications
You must be signed in to change notification settings - Fork 66
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
java.lang.NoClassDefFoundError: kotlin/KotlinNothingValueException #89
Comments
Hi @piyusht007, this obviously resembles the problem stated in #88. The cause of this problem most likely is the kotlinx-serialization library which Lingua uses as a dependency for (de)serializing the language models. According to their issue tracker, that library has too many bugs. In the long term, I will switch to another json serialization library, probably Jackson. Thanks for your code sample, now I can try to reproduce the problem on my machine and fix it, perhaps even with keeping kotlinx-serialization. Can you please tell me which JDK (vendor and version) you are using? This might be essential for reproducing the problem. Thanks. |
Hi @pemistahl , Following is the JDK version:
|
Hi @piyusht007 , I also encountered the same problem. After I changed the maven dependency, it worked
|
@ahnqirage This is weird because the release notes for Kotlin 1.4 say that it is not necessary anymore to set the dependency for the Kotlin standard library explicitly. I have not been able so far to reproduce the problem on my machine. I will update all dependencies for the next Lingua release including the Kotlin compiler. I hope that the problem will be solved then. I will need some more time for it though. Please stay tuned. |
I'm working with springboot. |
I think you are right but it's not the user's deliberate fault. The explicitly set Kotlin version in Spring Boot seems to overwrite the implicit Kotlin 1.4 dependency. But the user is not able to know about this because the error message is so unspecific. I will simply add the explicit dependency to Kotlin 1.4 again in the next Lingua release. This should fix it once and for all. Thanks for your help @ahnqirage. Without you, I would not have found the cause so quickly. |
I hope that I've fixed this now. |
Hi,
I am trying to use Lingua inside a plain Java maven project and using following maven dependency for that:
Code Sample:
While running I am getting following exception:
The text was updated successfully, but these errors were encountered: