Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw JsonMappingException when sync block contain tx type like 'NFT ACCEPT OFFER' #325

Closed
wandapen opened this issue Nov 11, 2022 · 2 comments

Comments

@wandapen
Copy link

wandapen commented Nov 11, 2022

version: xrpl4j 2.5.0

att;
When I sync block with tx with this code on block 75603952 and other block contains tx type "NFT ACCEPT OFFER"
example block index: 75603952

mycode:
blockNumber = 75603952

UnsignedInteger index = UnsignedInteger.valueOf(blockNumber);
LedgerResult ledgerResult = xrplClient.ledger(LedgerRequestParams.builder() .ledgerSpecifier(LedgerSpecifier.of(LedgerIndex.of(index))).transactions(true).build());

I receive exception:
JsonMappingException "problem: In direct mode, you must specify either the SellOffer or the BuyOffer."

append more logs:

org.xrpl.xrpl4j.client.JsonRpcClientErrorException: com.fasterxml.jackson.databind.JsonMappingException: Cannot construct instance of org.xrpl.xrpl4j.model.transactions.ImmutableNfTokenAcceptOffer, problem: In direct mode, you must specify either the SellOffer or the BuyOffer.
at [Source: UNKNOWN; byte offset: #UNKNOWN] (through reference chain: org.xrpl.xrpl4j.model.client.ledger.ImmutableLedgerResult$Json["ledger"]->org.xrpl.xrpl4j.model.ledger.ImmutableLedgerHeader$Json["transactions"]->java.util.ArrayList[35])
at org.xrpl.xrpl4j.client.JsonRpcClient.send(JsonRpcClient.java:142)
at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
at feign.DefaultMethodHandler.invoke(DefaultMethodHandler.java:75)
at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:100)
at com.sun.proxy.$Proxy3.send(Unknown Source)
at org.xrpl.xrpl4j.client.JsonRpcClient.send(JsonRpcClient.java:114)
at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
at feign.DefaultMethodHandler.invoke(DefaultMethodHandler.java:75)
at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:100)
at com.sun.proxy.$Proxy3.send(Unknown Source)
at org.xrpl.xrpl4j.client.XrplClient.ledger(XrplClient.java:736)
at SendXrp.getBlock(SendXrp.java:281)
at SendXrp.main(SendXrp.java:52)
Caused by: com.fasterxml.jackson.databind.JsonMappingException: Cannot construct instance of org.xrpl.xrpl4j.model.transactions.ImmutableNfTokenAcceptOffer, problem: In direct mode, you must specify either the SellOffer or the BuyOffer.
at [Source: UNKNOWN; byte offset: #UNKNOWN] (through reference chain: org.xrpl.xrpl4j.model.client.ledger.ImmutableLedgerResult$Json["ledger"]->org.xrpl.xrpl4j.model.ledger.ImmutableLedgerHeader$Json["transactions"]->java.util.ArrayList[35])
at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:392)
at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:363)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer._deserializeFromArray(CollectionDeserializer.java:371)
at

@nkramer44
Copy link
Collaborator

This should be fixed once #326 is merged and released.

@nkramer44
Copy link
Collaborator

Hi @wandapen, this should be fixed in the v2.5.1 release. Please feel free to re-open this issue if you continue to see this error after upgrading.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants