Closed Aless55 closed 2 years ago
@mukulljangid this seems to be the same issue as the SO filed last week.
@sappenin Since I didn't receive an answer on SO and couldn't find one by myself (my time at the moment is a little limited) I decided to open an issue here in the hope that someone with experience might A) be faster in seeing the problem or B) already know the problem.
Ok, great - thanks for clarifying- better (for us at least) to triage here in GitHub anyway. Thanks!
Our theory is that you maybe have a different objectmapper in the class path (probably coming from spring). Might be worth double checking how you're wiring up the xrpl4j classes.
Yeah I am using spring boot. I setup the dependencies like this:
repositories {
maven { url "https://jitpack.io" }
}
dependencies {
....
implementation 'com.github.xrplf.xrpl4j:xrpl4j-client:nft-support-SNAPSHOT'
implementation 'com.github.xrplf.xrpl4j:xrpl4j-model:nft-support-SNAPSHOT'
implementation 'com.github.xrplf.xrpl4j:xrpl4j-address-codec:nft-support-SNAPSHOT'
implementation 'com.github.xrplf.xrpl4j:xrpl4j-binary-codec:nft-support-SNAPSHOT'
implementation 'com.github.xrplf.xrpl4j:xrpl4j-keypairs:nft-support-SNAPSHOT'
implementation 'com.github.xrplf.xrpl4j:xrpl4j-crypto-bouncycastle:nft-support-SNAPSHOT'
implementation 'com.github.xrplf.xrpl4j:xrpl4j-crypto-core:nft-support-SNAPSHOT'
}
Afterwards the classes are imported like:
import org.xrpl.xrpl4j.crypto.signing.SingleKeySignatureService;
The issue was fixed in the NFT Support PR (https://github.com/XRPLF/xrpl4j/pull/178) by commits fd115ee and ab3d709
@mukulljangid I pulled the newest code, the above error is gone. Now I am getting:
java.lang.NumberFormatException: For input string: "R" under radix 16
But I saw that you already pushed another version, so I will try that one then.
Edit: still the same error
Just an update, I tried the mj/ branch with the NfTokenUri.ofPlainText() method but still got an error on the signing line:
java.lang.NumberFormatException: For input string: "Q" under radix 16
at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67) ~[na:na]
at java.base/java.lang.Integer.parseInt(Integer.java:668) ~[na:na]
at java.base/java.math.BigInteger.<init>(BigInteger.java:536) ~[na:na]
at org.xrpl.xrpl4j.codec.addresses.UnsignedByte.of(UnsignedByte.java:65) ~[xrpl4j-address-codec-mj~json-nft-tests-SNAPSHOT.jar:na]
at org.xrpl.xrpl4j.codec.addresses.ByteUtils.parse(ByteUtils.java:70) ~[xrpl4j-address-codec-mj~json-nft-tests-SNAPSHOT.jar:na]
at org.xrpl.xrpl4j.codec.addresses.UnsignedByteArray.fromHex(UnsignedByteArray.java:85) ~[xrpl4j-address-codec-mj~json-nft-tests-SNAPSHOT.jar:na]
@mukulljangid I had another unrelated error in my code which resulted in getting the public key in a wrong format. Your branch fixes the issues as expected. Thank you for your work.
This issue was fixed here (https://github.com/XRPLF/xrpl4j/pull/225)
Hello everyone, I run into a problem while trying to mint a NFT. I am using spring boot with gradle as well as jitpack.io to include the nft-support branch dependency. I used the faucet functionality on the XRPL site to get some accounts to use in my example. While signing the transaction a
java.lang.NumberFormatException
happens. The Stacktrace is added after my code. Note: If I try to use thesend XRP
tutorial code everything works fine.I tried adding and removing some of the build() functions as well as changing their respective values without success. I would really appreciate any hints on how to resolve this problem.