blockchain-application-using-fabric-java-sdk
blockchain-application-using-fabric-java-sdk copied to clipboard
Error Input byte array has incorrect ending byte at 1748
We are using the SDK to connect to Amazon Managed Blockchain but the following error occurs:
java.lang.Exception: java.lang.IllegalArgumentException: Input byte array has incorrect ending byte at 1748 at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:4140) at org.hyperledger.fabric.sdk.Channel.getConfigBlock(Channel.java:858) at org.hyperledger.fabric.sdk.Channel.parseConfigBlock(Channel.java:1781) at org.hyperledger.fabric.sdk.Channel.loadCACertificates(Channel.java:1618) at org.hyperledger.fabric.sdk.Channel.initialize(Channel.java:1107) atcom.transfesa.traceability.providers.DefaultChannelProvider.getLogisticChannelClient(DefaultChannelProvider.java:81) at com.transfesa.traceability.services.ChannelService.getChainInfo(ChannelService.java:99) at com.transfesa.traceability.controllers.ChainInfoController.getChainInfo(ChainInfoController.java:25)
We think that the error is because the certificate file supplied by Amazon (managedblockchain-tls-chain.pem) has two certificates when the normal is one. But this is a file supplied by Amazon.
Is it possible that the SDK is not able to handle a file with two certificates and needs only one?
Thanks
@Steampunk1453 , the SDK is not able to handle a file with two certificates and needs only one - you can try deleting one certificate in that file and test to be sure. If it works, then we may need to modify certificate file before using.
Ok, thanks. Now we use the managedblockchain-tls-chain.pem certificate file with the property "pemFile" and we have not the "Input byte array" error but we have "UNKNOWN: access denied" when we try to connect SDK with Amazon Managed Blockchain