You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to upgrade from Lingua 1.1.1 to 1.2.1, but I get the following exception after the upgrade:
java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError
at java.util.concurrent.ForkJoinTask.reportExecutionException(ForkJoinTask.java:605) ~[?:?]
at java.util.concurrent.ForkJoinTask.get(ForkJoinTask.java:981) ~[?:?]
at com.github.pemistahl.lingua.api.LanguageDetector.computeLanguageConfidenceValues(LanguageDetector.kt:160) ~[?:?]
at com.github.pemistahl.lingua.api.LanguageDetector.detectLanguageOf(LanguageDetector.kt:72) ~[?:?]
at org.redcraft.redcraftchat.detection.services.Lingua.getLanguage(Lingua.java:39) ~[?:?]
at org.redcraft.redcraftchat.detection.DetectionManager.getLanguage(DetectionManager.java:14) ~[?:?]
at org.redcraft.redcraftchat.translate.TranslationManager.getSourceLanguage(TranslationManager.java:84) ~[?:?]
at org.redcraft.redcraftchat.bridge.MinecraftDiscordBridge.broadcastMessage(MinecraftDiscordBridge.java:107) ~[?:?]
at org.redcraft.redcraftchat.bridge.MinecraftDiscordBridge.broadcastMessage(MinecraftDiscordBridge.java:89) ~[?:?]
at org.redcraft.redcraftchat.runnables.MinecraftServerStatusWatcherTask.handleServerStatusChange(MinecraftServerStatusWatcherTask.java:51) ~[?:?]
at org.redcraft.redcraftchat.runnables.MinecraftServerStatusWatcherTask.run(MinecraftServerStatusWatcherTask.java:60) ~[?:?]
at net.md_5.bungee.scheduler.BungeeTask.run(BungeeTask.java:66) ~[server.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:42d9c68:500]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.NoClassDefFoundError
at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) ~[?:?]
at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?]
at java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[?:?]
at java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:564) ~[?:?]
at java.util.concurrent.ForkJoinTask.reportExecutionException(ForkJoinTask.java:604) ~[?:?]
... 14 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.github.pemistahl.lingua.internal.TrainingDataLanguageModel
at com.github.pemistahl.lingua.api.LanguageDetector$Companion.loadLanguageModel(LanguageDetector.kt:531) ~[?:?]
at com.github.pemistahl.lingua.api.LanguageDetector$Companion.loadLanguageModels(LanguageDetector.kt:520) ~[?:?]
at com.github.pemistahl.lingua.api.LanguageDetector$Companion.access$loadLanguageModels(LanguageDetector.kt:501) ~[?:?]
at com.github.pemistahl.lingua.api.LanguageDetector.lookUpNgramProbability-as5wtIs$lingua(LanguageDetector.kt:467) ~[?:?]
at com.github.pemistahl.lingua.api.LanguageDetector.computeSumOfNgramProbabilities$lingua(LanguageDetector.kt:442) ~[?:?]
at com.github.pemistahl.lingua.api.LanguageDetector.computeLanguageProbabilities$lingua(LanguageDetector.kt:429) ~[?:?]
at com.github.pemistahl.lingua.api.LanguageDetector.computeLanguageConfidenceValues$lambda-4$lambda-3(LanguageDetector.kt:142) ~[?:?]
at java.util.concurrent.ForkJoinTask$AdaptedInterruptibleCallable.exec(ForkJoinTask.java:1461) ~[?:?]
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?]
at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?]
at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?]
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?]
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?]
I'm running OpenJDK 17 and I include Lingua in my project using Maven, any idea what could cause this? Lingua 1.1.1 was working fine (except for some memory usage issues that 1.2.x seems to have fixed, but I can't get it to run). I tried mvn clean but nothing changed.
Any ideas?
Thanks!
The text was updated successfully, but these errors were encountered:
pemistahl
changed the title
1.1.1 -> 1.2.1 upgrade issue: java.lang.NoClassDefFoundError: Could not initialize class com.github.pemistahl.lingua.internal.TrainingDataLanguageModel
1.1.1 -> 1.2.1 upgrade issue: java.lang.NoClassDefFoundError
Aug 2, 2022
Hi @lululombard, I think this is the same problem as in #144. Its cause is a bug in the Moshi JSON serialization library which I introduced in Lingua 1.2. I've just fixed it so I think this will resolve your problems, too. I'm going to release Lingua 1.2.2 soon which includes this fix.
Hello!
I'm trying to upgrade from Lingua 1.1.1 to 1.2.1, but I get the following exception after the upgrade:
Here's my implementation of Lingua in my project: https://github.com/redcraft-org/RedCraftChat/blob/feature/first-release/src/main/java/org/redcraft/redcraftchat/detection/services/Lingua.java
And here's my pom.xml (I probably reverted the Lingua version now, but otherwise everything else is the same): https://github.com/redcraft-org/RedCraftChat/blob/feature/first-release/pom.xml
I'm running OpenJDK 17 and I include Lingua in my project using Maven, any idea what could cause this? Lingua 1.1.1 was working fine (except for some memory usage issues that 1.2.x seems to have fixed, but I can't get it to run). I tried
mvn clean
but nothing changed.Any ideas?
Thanks!
The text was updated successfully, but these errors were encountered: