question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[ClientAPI]ReaderBuilder.loadConf() not working

See original GitHub issue

Describe the bug Cannot create new reader while using loadConf method in reader builder chain.

To Reproduce Steps to reproduce the behavior:

  1. Create PulsarClient
  2. client.newReader().topic(tp).startMessageId(start).loadConf(readerConf).create()

Expected behavior Create a reader with both settings specified using methods as well as loadConf.

Screenshots

java.lang.RuntimeException: Failed to load config into existing configuration data
.....
Caused by: org.apache.pulsar.shade.com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `org.apache.pulsar.client.api.MessageId` (no Creators, like default construct, exist): abstract types either need to be mapped to concrete types, have custom deserializer, or contain additional type information
 at [Source: (String)"{"cryptoFailureAction":"FAIL","topicName":"topic-0","readCompacted":false,"startMessageId":{"ledgerId":-1,"entryId":-1,"partitionIndex":-1},"receiverQueueSize":1000}"; line: 1, column: 92] (through reference chain: org.apache.pulsar.client.impl.conf.ReaderConfigurationData["startMessageId"])
	at org.apache.pulsar.shade.com.fasterxml.jackson.databind.exc.InvalidDefinitionException.from(InvalidDefinitionException.java:67) ~[pulsar-client-all-2.4.0-c509f86ba.jar:2.4.0-c509f86ba]

Desktop (please complete the following information):

  • OS: MacOS

Additional context This may caused by ReaderConfigurationData contains a startMessageId of MessageId field that cannot be constructed. As abstract types either need to be mapped to concrete types, have custom deserializer, or contain additional type information implies.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
ambition119commented, May 24, 2019

Put startMessageId before loadConf in the builder chain could reproduce it.

thanks, I can try solve.

0reactions
ambition119commented, May 27, 2019

It was revised on Friday and will be submitted PR today, then you can have a look, thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

2012836 – SRIOV-CNI failed to load netconf: LoadConf()
Bug 2012836 - SRIOV-CNI failed to load netconf: LoadConf(): the VF 0000:1a:09.6 does not have a interface name or a dpdk driver.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found