B4J Question JTelegrambot Lib Error receiving a document

behnam_tr

Active Member
Licensed User
Regards.
photo receiving error solved on v.025 thanks

but When receiving a document with a telegram bot (with the jTelegrambot version 0.25 library)
i get this error



class io.fouad.jtb.core.beans.Document

JTelegrambot Error receiving a document:
com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "file_unique_id" (class io.fouad.jtb.core.beans.Document), not marked as ignorable (5 known properties: "file_size", "mime_type", "file_id", "thumb", "file_name"])
at [Source: (String)"{"ok":true,"result":[{"update_id":684933865,
"message":{"message_id":1587,"from":{"id":105526931,"is_bot":false,"first_name":"Padina System","username":"padina_system","language_code":"fa"},"chat":{"id":105526931,"first_name":"Padina System","username":"padina_system","type":"private"},"date":1578427883,"document":{"file_name":"photo_2019-07-31_22-44-19.jpg","mime_type":"image/jpeg","thumb":{"file_id":"AAQEAANhCQACH6GhUF0AAd4kbGCE_34OthsABAEAB20AA8IOAAIWBA","file_unique_id":"AQADfg62GwAEwg4AAg""[truncated 151 chars]; line: 2, column: 565] (through reference chain: io.fouad.jtb.core.beans.TelegramResult["result"]->java.lang.Object[][0]->io.fouad.jtb.core.beans.Update["message"]->io.fouad.jtb.core.beans.Message["document"]->io.fouad.jtb.core.beans.Document["file_unique_id"])
na System","username":"padina_system","language_code":"fa"},"chat":{"id":105526931,"first_name":"Padina System","username":"padina_system","type":"private"},"date":1578427883,"document":{"file_name":"photo_2019-07-31_22-44-19.jpg","mime_type":"image/jpeg","thumb":{"file_id":"AAQEAANhCQACH6GhUF0AAd4kbGCE_34OthsABAEAB20AA8IOAAIWBA","file_unique_id":"AQADfg62GwAEwg4AAg""[truncated 151 chars]; line: 2, column: 565] (through reference chain: io.fouad.jtb.core.beans.TelegramResult["result"]->java.lang.Object[][0]->io.fouad.jtb.core.beans.Update["message"]->io.fouad.jtb.core.beans.Message["document"]->io.fouad.jtb.core.beans.Document["file_unique_id"])
 

DonManfred

Expert
Licensed User
try it with v0.26
At least for Document
 
Upvote 0
Top