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

java-sdk:3.4.0版本CallResponse无法解析solidity的require信息 #836

Open
shanpeng238 opened this issue Oct 24, 2023 · 5 comments
Open
Assignees
Labels
enhancement New feature or request resolved The issue has been resolved v3.x

Comments

@shanpeng238
Copy link

java-sdk:3.4.0
当我调用合约查询功能时,触发了合约里面的require,但是后台报错:
java.lang.ArrayIndexOutOfBoundsException: arraycopy: last source index 32 out of bounds for byte[4]
org.fisco.bcos.sdk.v3.codec.ContractCodecException: cannot decode in decodeMethodAndGetAbiObjectByABIDefinition with appropriate interface ABI

@shanpeng238
Copy link
Author

微信图片_20231024144450
微信图片_20231024144753
微信图片_20231024144803
微信图片_20231024144809
微信图片_20231024144816

@kyonRay
Copy link
Member

kyonRay commented Oct 24, 2023

这个问题在3.4.0是已知问题,尝试使用3.5.0的jar包。可以看3.5.0 release信息:https://github.com/FISCO-BCOS/java-sdk/releases/tag/v3.5.0

@shanpeng238
Copy link
Author

shanpeng238 commented Oct 24, 2023 via email

@shanpeng238
Copy link
Author

现在我使用了3.5.0的jar包。目前的情况时抛出异常,但是这个并不是错误和异常,建议采用TransactionResponse那样的方式处理,
返回transactionResponse.getReturnCode()和transactionResponse.getReturnMessage()
这样处理是不是更优雅一些

@kyonRay
Copy link
Member

kyonRay commented Oct 24, 2023

感谢提出建议,会在下个版本考虑优化这部份的代码。

@kyonRay kyonRay self-assigned this Oct 24, 2023
@kyonRay kyonRay added enhancement New feature or request v3.x labels Oct 24, 2023
@kyonRay kyonRay reopened this Oct 25, 2023
@kyonRay kyonRay added the resolved The issue has been resolved label Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request resolved The issue has been resolved v3.x
Projects
None yet
Development

No branches or pull requests

2 participants