rubenlagus / TelegramBots

Java library to create bots using Telegram Bots API
https://telegram.me/JavaBotsApi
MIT License
4.77k stars 1.22k forks source link

Exception on initial connection #367

Closed wasnertobias closed 6 years ago

wasnertobias commented 6 years ago

Sadly I am not able to reproduce that Exception, but it happenend when I first sent a gif to my newly setup bot (not my only one) and then tried to start the bot. I am using the TelegramLongPollingBot-API.

Exception in thread "PrivatePingBot Telegram Connection" java.lang.NoSuchMethodError: com.fasterxml.jackson.core.JsonGenerator.writeStartObject(Ljava/lang/Object;)V at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:151) at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:292) at com.fasterxml.jackson.databind.ObjectMapper._configAndWriteValue(ObjectMapper.java:3681) at com.fasterxml.jackson.databind.ObjectMapper.writeValueAsString(ObjectMapper.java:3057) at org.telegram.telegrambots.updatesreceivers.DefaultBotSession$ReaderThread.getUpdatesFromServer(DefaultBotSession.java:242) at org.telegram.telegrambots.updatesreceivers.DefaultBotSession$ReaderThread.run(DefaultBotSession.java:187)

It is somehow not bound to the certain bot (token/name). Any guesses?

Update: This seems to happen for me only when adding a certain dependency:

io.parallec parallec-core 0.10.6
rubenlagus commented 6 years ago

Can't know, maybe that dependency is adding something that conflict with the API?

Mattue commented 6 years ago

I can say I have the same issue after adding dropbox dependency.

<dependency>
    <groupId>com.dropbox.core</groupId>
    <artifactId>dropbox-core-sdk</artifactId>
    <version>3.0.6</version>
</dependency>
rubenlagus commented 6 years ago

@Mattue and @wasnertobias Any news regarding the conflicts?

wasnertobias commented 6 years ago

Not for me.