ipfs-shipyard / java-ipfs-http-client

A Java implementation of the HTTP IPFS API
MIT License
538 stars 243 forks source link

Bootstrap method returned null #150

Closed sontqq closed 1 year ago

sontqq commented 4 years ago

I keep getting the same error. Not sure if it is caused because there are no bootstrap addresses added or something else.

java.lang.ClassCastException: Bootstrap method returned null

Anyone knows how to resolve this issue or how to add custom bootstrap address?

Code:

byte[] data = "hellobello".getBytes();
IPFS ipfs = new IPFS("/ip4/192.168.0.157/tcp/5001");
NamedStreamable.ByteArrayWrapper file = new NamedStreamable.ByteArrayWrapper("testfile.txt",data);
MerkleNode result = ipfs.add(file).get(0);
odisseus commented 4 years ago

Can you post the entire stack trace? Stack Overflow suggests that this might be caused by incompatible versions of Java.

kevodwyer commented 1 year ago

Closing issue, feel free to re-open and provide more detail if still required