Closed mcicolella closed 7 years ago
Hi @mcicolella.
it is necessary to call to setWebhook with an empty url to ensure that no webhook is running. Otherwise, if a webhook was configured before, getUpdates method will fail.
Maybe you changed something in the pom file that caused a missing library?
Hi @rubenlagus thanks for your reply!
My code is available at https://github.com/mcicolella/freedomotic/tree/telegram/plugins/devices/telegram-bot
Hi @mcicolella , maybe you should try updating your TelegramBots version. You are still using 2.1 in your repo. Maybe your issue has been resolved already? Cheers
Hi @rubenlagus
I updated the TelegramBots version but the issue hasn't been resolved. Now the exception is referred to another class
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/apache/http/conn/ssl/NoopHostnameVerifier
at org.telegram.telegrambots.bots.AbsSender.
Hi @mcicolella ,
could you please check your maven dependency setup for the project? Looks like there is a version conflict for the Apache HttpClient
. TelegramBots uses version 4.5.2 so if you have a lower version polled by your parent POM or another Dependency it might cause such problems.
Cheers
Hi @Mit0x2 , your tip fixed the problem. Thanks to all
Hi @mcicolella , glad I could help. Please make sure to close your issue once its fixed. Cheers
Hi all, I'm using your echo sample but I have a problem. I set maven parameters in my pom.xml and changed to "false" the boolean var "useWebHook" in BuildVars.java. It compiles without errors but at runtime the following exception is raised java.lang.NoClassDefFoundError: org/apache/http/conn/ssl/NoopHostnameVerifier at org.telegram.telegrambots.TelegramBotsApi.setWebhook(TelegramBotsApi.java:98) at org.telegram.telegrambots.TelegramBotsApi.setWebhook(TelegramBotsApi.java:152) at org.telegram.telegrambots.TelegramBotsApi.registerBot(TelegramBotsApi.java:129)
Thanks