Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Quarkus) Native command microservice fails with Yasson NullPointerException #2

Open
michael-schnell opened this issue Dec 26, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@michael-schnell
Copy link
Member

Executing the "create-person-command.sh" fails with a Nullpointer Exception in Yasson. Works fine in development node.

2019-12-26 09:24:31,046 WARNING [jav.per.spi] (vert.x-worker-thread-1) javax.persistence.spi::No valid providers found.
2019-12-26 09:24:31,047 INFO  [org.fui.ddd.esr.EventStoreRepository] (vert.x-worker-thread-1) Update aggregate: id=PERSON 84565d62-115e-4502-b7c9-38ad69c64b05, version=-1, nextVersion=0
2019-12-26 09:24:31,049 SEVERE [org.ecl.yas.int.Marshaller] (vert.x-worker-thread-1) null
2019-12-26 09:24:31,049 SEVERE [org.ecl.yas.int.Marshaller] (vert.x-worker-thread-1) Generating incomplete JSON
2019-12-26 09:24:31,049 ERROR [io.qua.ver.htt.run.QuarkusErrorHandler] (vert.x-worker-thread-1) HTTP Request to /persons/create failed, error id: 97189e47-d7c8-446d-b8bf-d5ff21354829-1: org.jboss.resteasy.spi.UnhandledException: java.lang.RuntimeException: Error serializing data
	at org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(ExceptionHandler.java:106)
	at org.jboss.resteasy.core.ExceptionHandler.handleException(ExceptionHandler.java:372)
	at org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:209)
	at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:496)
	at org.jboss.resteasy.core.SynchronousDispatcher.lambda$invoke$4(SynchronousDispatcher.java:252)
	at org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:153)
	at org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:363)
	at org.jboss.resteasy.core.SynchronousDispatcher.preprocess(SynchronousDispatcher.java:156)
	at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:238)
	at io.quarkus.resteasy.runtime.standalone.RequestDispatcher.service(RequestDispatcher.java:73)
	at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler.dispatch(VertxRequestHandler.java:118)
	at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler.lambda$handle$0(VertxRequestHandler.java:74)
	at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$2(ContextImpl.java:316)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.lang.Thread.run(Thread.java:748)
	at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:460)
	at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:193)
Caused by: java.lang.RuntimeException: Error serializing data
	at org.fuin.esc.spi.JsonbDeSerializer.marshal(JsonbDeSerializer.java:104)
	at org.fuin.esc.esjc.CommonEvent2EventDataConverter.convert(CommonEvent2EventDataConverter.java:91)
	at org.fuin.esc.esjc.ESJCEventStore.asEventData(ESJCEventStore.java:343)
	at org.fuin.esc.esjc.ESJCEventStore.appendToStream(ESJCEventStore.java:154)
	at org.fuin.cqrs4j.example.quarkus.command.app.EventStoreFactory_ProducerMethod_createEventStore_167f972db6f0d3b769bfef3aa9e63304ea2ec05b_ClientProxy.appendToStream(EventStoreFactory_ProducerMethod_createEventStore_167f972db6f0d3b769bfef3aa9e63304ea2ec05b_ClientProxy.zig:240)
	at org.fuin.ddd4j.esrepo.EventStoreRepository.update(EventStoreRepository.java:222)
	at org.fuin.ddd4j.esrepo.EventStoreRepository.add(EventStoreRepository.java:251)
	at org.fuin.ddd4j.esrepo.EventStoreRepository.add(EventStoreRepository.java:243)
	at org.fuin.cqrs4j.example.quarkus.command.api.PersonResource.create(PersonResource.java:70)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:151)
	at org.jboss.resteasy.core.MethodInjectorImpl.lambda$invoke$3(MethodInjectorImpl.java:122)
	at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:616)
	at java.util.concurrent.CompletableFuture.uniApplyStage(CompletableFuture.java:628)
	at java.util.concurrent.CompletableFuture.thenApply(CompletableFuture.java:1996)
	at java.util.concurrent.CompletableFuture.thenApply(CompletableFuture.java:110)
	at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:122)
	at org.jboss.resteasy.core.ResourceMethodInvoker.internalInvokeOnTarget(ResourceMethodInvoker.java:594)
	at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTargetAfterFilter(ResourceMethodInvoker.java:468)
	at org.jboss.resteasy.core.ResourceMethodInvoker.lambda$invokeOnTarget$2(ResourceMethodInvoker.java:421)
	at org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:363)
	at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:423)
	at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:391)
	at org.jboss.resteasy.core.ResourceMethodInvoker.lambda$invoke$1(ResourceMethodInvoker.java:365)
	at java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:995)
	at java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2137)
	at java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:110)
	at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:365)
	at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:477)
	... 15 more
Caused by: javax.json.bind.JsonbException: Internal error: null
	at org.eclipse.yasson.internal.Marshaller.marshall(Marshaller.java:82)
	at org.eclipse.yasson.internal.Marshaller.marshall(Marshaller.java:102)
	at org.eclipse.yasson.internal.JsonBinding.toJson(JsonBinding.java:133)
	at org.fuin.esc.spi.JsonbDeSerializer.marshal(JsonbDeSerializer.java:101)
	... 43 more
Caused by: java.lang.NullPointerException
	at org.eclipse.yasson.internal.ClassParser.parseIfaceMethodAnnotations(ClassParser.java:154)
	at org.eclipse.yasson.internal.ClassParser.parseClassAndInterfaceMethods(ClassParser.java:112)
	at org.eclipse.yasson.internal.ClassParser.parseProperties(ClassParser.java:69)
	at org.eclipse.yasson.internal.MappingContext.lambda$createParseClassModelFunction$1(MappingContext.java:92)
	at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)
	at org.eclipse.yasson.internal.MappingContext.getOrCreateClassModel(MappingContext.java:82)
	at org.eclipse.yasson.internal.Marshaller.getRootSerializer(Marshaller.java:163)
	at org.eclipse.yasson.internal.Marshaller.serializeRoot(Marshaller.java:143)
	at org.eclipse.yasson.internal.Marshaller.marshall(Marshaller.java:76)
	... 46 more

@michael-schnell michael-schnell changed the title Quarkus native command microservice fails with Yasson NullPointerException (Quarkus) Native command microservice fails with Yasson NullPointerException Dec 28, 2019
@michael-schnell michael-schnell added the bug Something isn't working label Dec 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant