Closed amelongo closed 7 months ago
@amelongo
This is a known issue, due to a format change in the protocol parameters in one of the node release.
We are currently testing the next release, 0.5.1, which should be out very soon, in a week or two.
In the meantime, we have pushed a preview release, 0.5.1-preview1, which includes the latest koios-java-client (1.18.1). This should fix the above issue.
You may want to use 0.5.1-preview1 for both the cardano-client-lib core components and the koios backend service. Alternatively, you can just use the Koios backend service from the preview version (0.5.1-preview1). Both options should work.
<dependency>
<groupId>com.bloxbean.cardano</groupId>
<artifactId>cardano-client-lib</artifactId>
<version>0.5.0</version>
</dependency>
<dependency>
<groupId>com.bloxbean.cardano</groupId>
<artifactId>cardano-client-backend-koios</artifactId>
<version>0.5.1-preview1</version>
</dependency>
Will do.
Thanks so much for the assistance.
It works perfectly now.
Thanks for the assistance and good job on the work you put on developing this api
Dear Developers,
For a couple of days now I try to resolve an issue in my code only to find out this is due to an incompabitibilty in your code between your class, ProtocolParams, and that of Rest.Kois, EpochParams. The incompabitibility is at line 133 in the KoiosEpochService class. It is due to the fact that costModels is
private Map<String, Map<String, Long>> costModels;
where as in EpochParams, this is:private JsonNode costModels = null;
The error thrown is :
java.lang.NoSuchMethodError: 'java.util.Map rest.koios.client.backend.api.epoch.model.EpochParams.getCostModels()' at com.bloxbean.cardano.client.backend.koios.KoiosEpochService.convertToProtocolParams(KoiosEpochService.java:146) ~[cardano-client-backend-koios-0.5.0.jar!/:na] at com.bloxbean.cardano.client.backend.koios.KoiosEpochService.getProtocolParameters(KoiosEpochService.java:77) ~[cardano-client-backend-koios-0.5.0.jar!/:na]
And when I tried to use your version of EpochParams available in Rest.Kiois 1.17.3, I get this error:
error getting cardano events class com.fasterxml.jackson.databind.node.ObjectNode cannot be cast to class com.fasterxml.jackson.databind.node.TextNode (com.fasterxml.jackson.databind.node.ObjectNode and com.fasterxml.jackson.databind.node.TextNode are in unnamed module of loader org.springframework.boot.loader.LaunchedURLClassLoader @7ef20235) (through reference chain: java.util.ArrayList[0]->rest.koios.client.backend.api.epoch.model.EpochParams["cost_models"])
Please correct and if you have a temporary fix for this, please advise.
Thanks