在执行查询时我的 Quarkus 应用程序中遇到了一些奇怪的问题,但没有得到响应。我正在使用 quarkus-hibernate-reactive 和 quarkus-reactive-client。出现以下错误:
[org.jbo.res.res.i18n] (vert.x-eventloop-thread-3) RESTEASY002020: Unhandled asynchronous exception, sending
back 500: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class io.smallrye.mutiny.context.ContextPropagationUniInterceptor$2 and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS)
at com.fasterxml.jackson.databind.exc.InvalidDefinitionException.from(InvalidDefinitionException.java:77)
at com.fasterxml.jackson.databind.SerializerProvider.reportBadDefinition(SerializerProvider.java:1277)
at com.fasterxml.jackson.databind.DatabindContext.reportBadDefinition(DatabindContext.java:400)
at com.fasterxml.jackson.databind.ser.impl.UnknownSerializer.failForEmpty(UnknownSerializer.java:71)
at com.fasterxml.jackson.databind.ser.impl.UnknownSerializer.serialize(UnknownSerializer.java:33)
at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider._serialize(DefaultSerializerProvider.java:480)
at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:319)
at com.fasterxml.jackson.databind.ObjectWriter$Prefetch.serialize(ObjectWriter.java:1516)
at com.fasterxml.jackson.databind.ObjectWriter.writeValue(ObjectWriter.java:1006)
at org.jboss.resteasy.plugins.providers.jackson.ResteasyJackson2Provider.writeTo(ResteasyJackson2Provider.java:329)
at org.jboss.resteasy.core.messagebody.AsyncBufferedMessageBodyWriter.asyncWriteTo(AsyncBufferedMessageBodyWriter.java:24)
at org.jboss.resteasy.core.interception.jaxrs.ServerWriterInterceptorContext.writeTo(ServerWriterInterceptorContext.java:87)
@Inject
URepository uRepository;
@POST
@javax.ws.rs.Path("/add")
@Produces({MediaType.APPLICATION_JSON, MediaType.TEXT_PLAIN})
@Consumes({ MediaType.APPLICATION_JSON, MediaType.TEXT_PLAIN })
public Uni<Response> addUser(UBean userIN,@HeaderParam("userName") String addedBy) throws Exception{
Uni<Integer> cf = createNewFolders(userIN.getUserName());
return Response.ok(cf.onItem().transform(c -> {
if (c.intValue() == 1) {
return uRepository.addUser(userIN).onItem().transform(h -> h.longValue());
} else {
return null;
}
});
}
public Uni<Integer> createNewFolders(String addedBy) {
//creating FBean Object
FBean f=new FBean(addedBy);
calladdFile(f);
Uni.createFrom().item(1);
}
public void calladdFile(FBean fileIN) {
addFile(fileIN).onItem().transform(m -> m);
}
public Uni<Integer> addFile(FBean fileIN) {
Object[] array = {fileIN.getName(), fileIN.getExt(),
fileIN.getOwner(), fileIN.getFrom(), fileIN.Date(),
fileIN.getType()};
List<Object> l = Arrays.asList(array);
Tuple t = Tuple.tuple(l);
return SqlClientHelper.inTransactionUni(client, tx -> {
return tx.preparedQuery(sql)
.execute(t).onItem().
transform(pg -> pg.iterator().next().getInteger("id"));
});
}
请让我知道我在做什么错为什么会出现此错误?