使用Web服务器Spring Boot检索Corda IOU状态时出错

时间:2019-04-02 09:15:25

标签: spring spring-boot corda

当我尝试仅检索我的iou's State时,我以以下错误结束。这不仅是当我检索我的借条时,甚至当我执行常规查询以检索整个状态时,仍然会收到错误。似乎我需要使用Jackson进行配置,但是我不知道该怎么做。我将不胜感激!

这是我的API:

@GetMapping(value = ["my-ious"])
    fun getMyIOUs(): ResponseEntity<List<StateAndRef<IOUState>>> {
        val myious = proxy.vaultQueryBy<IOUState>().states.filter { it.state.data.lender.equals(proxy.nodeInfo().legalIdentities.first()) }
        return ResponseEntity.ok(myious)
    }

我在这里得到回应:

{
    "timestamp": "2019-04-02T05:27:14.962+0000",
    "status": 500,
    "error": "Internal Server Error",
    "message": "Type definition error: [simple type, class net.i2p.crypto.eddsa.math.ed25519.Ed25519LittleEndianEncoding]; nested exception is com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class net.i2p.crypto.eddsa.math.ed25519.Ed25519LittleEndianEncoding and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) (through reference chain: java.util.ArrayList[0]->net.corda.core.contracts.StateAndRef[\"state\"]->net.corda.core.contracts.TransactionState[\"data\"]->com.template.IOUState[\"lender\"]->net.corda.core.identity.Party[\"owningKey\"]->net.i2p.crypto.eddsa.EdDSAPublicKey[\"params\"]->net.i2p.crypto.eddsa.spec.EdDSANamedCurveSpec[\"curve\"]->net.i2p.crypto.eddsa.math.Curve[\"field\"]->net.i2p.crypto.eddsa.math.Field[\"encoding\"])",
    "path": "/my-ious"
}

0 个答案:

没有答案