May org.json.JSONObject used in org.hyperledger.fabric.contract.execution.JSONTransactionSerializer lead submit payloads not matching?
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Error
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- java
- Área
- backend-api-design
Línea de trabajo
Comience con org.hyperledger.fabric.contract.execution.JSONTransactionSerializer y la llamada a GatewayClient.endorse mostrada en el stack trace. Reproduzca la discrepancia de endorsement utilizando el tipo de retorno genérico Response y las definiciones proporcionadas de Asset y de la interfaz del contrato. Se considerará completado cuando se haya establecido si se admiten tipos de retorno genéricos y se haya documentado o corregido el comportamiento.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
When I call a submit method from application via gateway, I received an Exception below.
Caused by: org.hyperledger.fabric.client.EndorseException: io.grpc.StatusRuntimeException: ABORTED: failed to collect enough transaction endorsements, see attached details for more info
at org.hyperledger.fabric.client.GatewayClient.endorse(GatewayClient.java:74)
at org.hyperledger.fabric.client.ProposalImpl.endorse(ProposalImpl.java:76)
at org.hyperledger.fabric.client.Proposal.endorse(Proposal.java:64)
at pers.u8f23.fabric.app.api.AbstractAssetContractSubmit.createAsset(AbstractAssetContractSubmit.java:13)
at pers.u8f23.fabric.app.Main.chaincodeOperations(Main.java:84)
at pers.u8f23.fabric.app.Main.main(Main.java:65)
Caused by: io.grpc.StatusRuntimeException: ABORTED: failed to collect enough transaction endorsements, see attached details for more info
at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:268)
at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:249)
at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:167)
at org.hyperledger.fabric.protos.gateway.GatewayGrpc$GatewayBlockingStub.endorse(GatewayGrpc.java:455)
at org.hyperledger.fabric.client.GatewayClient.endorse(GatewayClient.java:72)
... 5 more
Detail message attached to this Exception is ProposalResponsePayloads do not match.
Returned type is a generic class. Both the generic type and the type argument are defined as type in fabric demo .
public interface AbstractAssetContractSubmit {
Response<Asset> createAsset(Context context, String value);
Response<Void> deleteAsset(Context context, String assetId);
Response<Void> updateAsset(Context context, String assetId, String value);
}
@DataType
public final class Response<T> {
@Property
private final T body;
@Property
private final int code;
@Property
private final String msg;
public Response(@JsonProperty("body") T body, @JsonProperty("code") int code,
@JsonProperty("msg") String msg) {
this.body = body;
this.code = code;
this.msg = msg;
}
public T getBody() {
return this.body;
}
public int getCode() {
return this.code;
}
public String getMsg() {
return this.msg;
}
}
@DataType
public final class Asset {
@Property
private final String id;
@Property
private final String creatorId;
@Property
private final String ownerId;
@Property
private final long createTime;
@Property
private final long lastTransferTime;
@Property
private final long lastUpdateTime;
@Property
private final String assetValue;
public Asset(@JsonProperty("id") String id, @JsonProperty("creatorId") String creatorId,
@JsonProperty("ownerId") String ownerId, @JsonProperty("createTime") long createTime,
@JsonProperty("lastTransferTime") long lastTransferTime,
@JsonProperty("lastUpdateTime") long lastUpdateTime,
@JsonProperty("assetValue") String assetValue) {
this.id = id;
this.creatorId = creatorId;
this.ownerId = ownerId;
this.createTime = createTime;
this.lastTransferTime = lastTransferTime;
this.lastUpdateTime = lastUpdateTime;
this.assetValue = assetValue;
}
public String getId() {
return this.id;
}
public String getCreatorId() {
return this.creatorId;
}
public String getOwnerId() {
return this.ownerId;
}
public long getCreateTime() {
return this.createTime;
}
public long getLastTransferTime() {
return this.lastTransferTime;
}
public long getLastUpdateTime() {
return this.lastUpdateTime;
}
public String getAssetValue() {
return this.assetValue;
}
}
Does this chaincode api support java generic type as method return type?
Anyone is welcome to answer this question.
- Lenguaje dominante
- Java
- Estrellas
- 322
- Forks
- 210
- Merge medio
- 15 h 16 min
- PR fusionados (30 d)
- 29
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de hyperledger/fabric-chaincode-java
-
enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
hyperledger/fabric-chaincode-java#628 ·
Los mantenedores suelen responder en 1 día
-
Optimize ClassGraph ScanningAbiertoenhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
hyperledger/fabric-chaincode-java#627 ·
Los mantenedores suelen responder en 1 día
-
DataType nested classAbiertobug
Dificultad 3/5 1-2 días Aptitud para principiantes 75/100
hyperledger/fabric-chaincode-java#626 ·
Los mantenedores suelen responder en 1 día
-
External Chaincode Mutual TLSAbiertobug
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
hyperledger/fabric-chaincode-java#625 ·
Los mantenedores suelen responder en 1 día
-
Read/write batchingQuizá libre de nuevo @jadebluestar la tomó hace 119 días y no hay ningún pull request abierto. Abiertoenhancement help wanted
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
hyperledger/fabric-chaincode-java#378 · 4 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de hyperledger/fabric-chaincode-java
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
2026 Error Report
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
triplea-game/triplea#15096 ·
Los mantenedores suelen responder en 1 día
-
[Bug][API] Switching workflow versions leaves schedules onlinePosiblemente ocupada @zhuangchong la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
apache/dolphinscheduler#18731 ·
Los mantenedores suelen responder en 1 día
-
Implement JDBC Domain Enums (`SqlCategory`, `SqlExecutionStatus`, `SqlExecutionType`) in Core ModuleAbiertocore-module enhancement good first issue
Dificultad 1/5 1-3 horas Aptitud para principiantes 87/100
sdlc-pro/spring-lens#531 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
apache/rocketmq-dashboard#7340 ·
Los mantenedores suelen responder en 3 días