You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I have a Hibernate @Entity which extends PanacheEntityBase with String, Integer, Boolean member variables and I want to send it as the json body in a vert.x WebClient. When I call webClient.post(...).sendJson(entity) I see:
io.vertx.core.json.EncodeException: Failed to encode as JSON: interface javax.enterprise.context.RequestScoped (through reference chain: io.hyperfoil.tools.repo.entity.json.Hook["persistent"])
at io.vertx.core.json.jackson.JacksonCodec.toBuffer(JacksonCodec.java:165)
at io.vertx.core.spi.json.JsonCodec.toBuffer(JsonCodec.java:72)
at io.vertx.ext.web.client.impl.HttpContext.handleSendRequest(HttpContext.java:482)
at io.vertx.ext.web.client.impl.HttpContext.execute(HttpContext.java:286)
at io.vertx.ext.web.client.impl.HttpContext.next(HttpContext.java:270)
at io.vertx.ext.web.client.impl.predicate.PredicateInterceptor.handle(PredicateInterceptor.java:69)
at io.vertx.ext.web.client.impl.predicate.PredicateInterceptor.handle(PredicateInterceptor.java:32)
at io.vertx.ext.web.client.impl.HttpContext.next(HttpContext.java:267)
at io.vertx.ext.web.client.impl.HttpContext.fire(HttpContext.java:277)
at io.vertx.ext.web.client.impl.HttpContext.sendRequest(HttpContext.java:179)
at io.vertx.ext.web.client.impl.HttpContext.handlePrepareRequest(HttpContext.java:356)
at io.vertx.ext.web.client.impl.HttpContext.execute(HttpContext.java:283)
at io.vertx.ext.web.client.impl.HttpContext.next(HttpContext.java:270)
at io.vertx.ext.web.client.impl.predicate.PredicateInterceptor.handle(PredicateInterceptor.java:69)
at io.vertx.ext.web.client.impl.predicate.PredicateInterceptor.handle(PredicateInterceptor.java:32)
at io.vertx.ext.web.client.impl.HttpContext.next(HttpContext.java:267)
at io.vertx.ext.web.client.impl.HttpContext.fire(HttpContext.java:277)
at io.vertx.ext.web.client.impl.HttpContext.prepareRequest(HttpContext.java:166)
at io.vertx.ext.web.client.impl.HttpRequestImpl.send(HttpRequestImpl.java:331)
at io.vertx.ext.web.client.impl.HttpRequestImpl.sendJson(HttpRequestImpl.java:316)
at io.vertx.reactivex.ext.web.client.HttpRequest.sendJson(HttpRequest.java:526)
at io.hyperfoil.tools.repo.api.HookService.tellHooks(HookService.java:82)
at io.hyperfoil.tools.repo.api.HookService.newTest(HookService.java:69)
at io.hyperfoil.tools.repo.api.HookService_ClientProxy.newTest(HookService_ClientProxy.zig:99)
at io.hyperfoil.tools.repo.api.HookService_VertxInvoker_newTest_f2dc88ef28a38d97b8721d82bde1c1424d137260$$function$$21.handle(HookService_VertxInvoker_newTest_f2dc88ef28a38d97b8721d82bde1c1424d137260$$function$$21.zig:67)
at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$2(ContextImpl.java:316)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:834)
Expected behavior
I would expect to be able to use the json encoding that gets used when I return the Entity from a method with @GET annotations
Actual behavior
The method throws an exception and doesn't send the post request
To Reproduce
Steps to reproduce the behavior:
Create an @Entity that extends PanacheBaseEntity
Create a Webclient and try to post the entity sendJson
Configuration
# Add your application.properties here, if applicable.
Screenshots
(If applicable, add screenshots to help explain your problem.)
Environment (please complete the following information):
Output of java -version:
openjdk version "1.8.0_222"
OpenJDK Runtime Environment (build 1.8.0_222-20190711120915.buildslave.jdk8u-src-tar--b08)
OpenJDK 64-Bit GraalVM CE 19.2.0 (build 25.222-b08-jvmci-19.2-b02, mixed mode)
GraalVM version (if different from Java): 19.2.0.1
Quarkus version or git rev: 1.0.1.Final
Additional context
I am able to send the Entity if I use sendBuffer(Buffer.buffer(JsonbBuilder.create().toJson(entity)))
(Add any other context about the problem here.)
The text was updated successfully, but these errors were encountered:
are similar: quarkus cannot handle the propagation of the dedicated serialiser (either Json-B or Jackson) to its RS-component (e.g. RestEasy or Jersey). It always uses the host serializer even if other dependencies or extensions want to make use of another serializer as defined in its code. Quarkus ignores that. This leads to wrong (un)marshallings or unexpected error logs.
Describe the bug
I have a Hibernate
@Entity
which extendsPanacheEntityBase
with String, Integer, Boolean member variables and I want to send it as the json body in a vert.x WebClient. When I callwebClient.post(...).sendJson(entity)
I see:Expected behavior
I would expect to be able to use the json encoding that gets used when I return the Entity from a method with
@GET
annotationsActual behavior
The method throws an exception and doesn't send the post request
To Reproduce
Steps to reproduce the behavior:
@Entity
that extendsPanacheBaseEntity
Configuration
# Add your application.properties here, if applicable.
Screenshots
(If applicable, add screenshots to help explain your problem.)
Environment (please complete the following information):
uname -a
orver
:Linux laptop 5.0.6-200.fc29.x86_64 Switch to the Maven distributed copy of the SubstrateVM annotations #1 SMP Wed Apr 3 15:09:51 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
java -version
:openjdk version "1.8.0_222"
OpenJDK Runtime Environment (build 1.8.0_222-20190711120915.buildslave.jdk8u-src-tar--b08)
OpenJDK 64-Bit GraalVM CE 19.2.0 (build 25.222-b08-jvmci-19.2-b02, mixed mode)
Additional context
I am able to send the Entity if I use
sendBuffer(Buffer.buffer(JsonbBuilder.create().toJson(entity)))
(Add any other context about the problem here.)
The text was updated successfully, but these errors were encountered: