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

Two classes have the same XML type name "xmlObject". #33441

Closed
vandrep opened this issue May 17, 2023 · 6 comments · Fixed by #33466
Closed

Two classes have the same XML type name "xmlObject". #33441

vandrep opened this issue May 17, 2023 · 6 comments · Fixed by #33466
Labels
kind/bug Something isn't working triage/needs-reproducer We are waiting for a reproducer.
Milestone

Comments

@vandrep
Copy link

vandrep commented May 17, 2023

After upgrading from 2.16.2 to 3.0.1 I'm getting the exception below when running tests with quarkus dev. Every first tests round are complete without trouble. But when the tests are run again, they keep failing until I stop dev mode and start it again.

The exception occurs while testing a process that uses a RestClient which consumes XML. I'm using Wiremock to create the endpoint.

        at io.restassured.internal.ValidatableResponseOptionsImpl.statusCode(ValidatableResponseOptionsImpl.java:89)
        at org.acme.ExampleResourceTest.testHelloEndpoint(ExampleResourceTest.java:19)
        Suppressed: java.lang.RuntimeException: org.glassfish.jaxb.runtime.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
Two classes have the same XML type name "xmlObject". Use @XmlType.name and @XmlType.namespace to assign different names to them.
        this problem is related to the following location:
                at org.acme.XmlObject
        this problem is related to the following location:
                at org.acme.XmlObject

                at io.quarkus.jaxb.runtime.JaxbContextProducer.createJAXBContext(JaxbContextProducer.java:80)
                at io.quarkus.jaxb.runtime.JaxbContextProducer.jaxbContext(JaxbContextProducer.java:29)
                at io.quarkus.jaxb.runtime.JaxbContextProducer_ProducerMethod_jaxbContext_6a6d20272304edd64c7bdfa35e3ed5d5971a3949_Bean.doCreate(Unknown Source)
                at io.quarkus.jaxb.runtime.JaxbContextProducer_ProducerMethod_jaxbContext_6a6d20272304edd64c7bdfa35e3ed5d5971a3949_Bean.create(Unknown Source)
                at io.quarkus.jaxb.runtime.JaxbContextProducer_ProducerMethod_jaxbContext_6a6d20272304edd64c7bdfa35e3ed5d5971a3949_Bean.create(Unknown Source)
                at io.quarkus.arc.impl.AbstractSharedContext.createInstanceHandle(AbstractSharedContext.java:113)
                at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:37)
                at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:34)
                at io.quarkus.arc.impl.LazyValue.get(LazyValue.java:26)
                at io.quarkus.arc.impl.ComputingCache.computeIfAbsent(ComputingCache.java:69)
                at io.quarkus.arc.impl.AbstractSharedContext.get(AbstractSharedContext.java:34)
                at io.quarkus.jaxb.runtime.JaxbContextProducer_ProducerMethod_jaxbContext_6a6d20272304edd64c7bdfa35e3ed5d5971a3949_Bean.get(Unknown Source)
                at io.quarkus.jaxb.runtime.JaxbContextProducer_ProducerMethod_jaxbContext_6a6d20272304edd64c7bdfa35e3ed5d5971a3949_Bean.get(Unknown Source)
                at io.quarkus.jaxb.runtime.JaxbContextProducer_ProducerMethod_marshaller_9a19ba6b6391808bfb74663c9d044d412a8d27d6_Bean.doCreate(Unknown Source)
                at io.quarkus.jaxb.runtime.JaxbContextProducer_ProducerMethod_marshaller_9a19ba6b6391808bfb74663c9d044d412a8d27d6_Bean.create(Unknown Source)
                at io.quarkus.jaxb.runtime.JaxbContextProducer_ProducerMethod_marshaller_9a19ba6b6391808bfb74663c9d044d412a8d27d6_Bean.create(Unknown Source)
                at io.quarkus.arc.impl.RequestContext.getIfActive(RequestContext.java:74)
                at io.quarkus.arc.impl.ClientProxies.getDelegate(ClientProxies.java:30)
                at jakarta.xml.bind.JaxbContextProducer_ProducerMethod_marshaller_9a19ba6b6391808bfb74663c9d044d412a8d27d6_ClientProxy.arc$delegate(Unknown Source)
                at jakarta.xml.bind.JaxbContextProducer_ProducerMethod_marshaller_9a19ba6b6391808bfb74663c9d044d412a8d27d6_ClientProxy.marshal(Unknown Source)
                at io.quarkus.rest.client.reactive.jaxb.runtime.ClientMessageBodyWriter.marshal(ClientMessageBodyWriter.java:56)
                at io.quarkus.rest.client.reactive.jaxb.runtime.ClientMessageBodyWriter_Subclass.marshal$$superforward(Unknown Source)
                at io.quarkus.rest.client.reactive.jaxb.runtime.ClientMessageBodyWriter_Subclass$$function$$3.apply(Unknown Source)
                at io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:74)
                at io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:63)
                at io.quarkus.arc.impl.ActivateRequestContextInterceptor.invoke(ActivateRequestContextInterceptor.java:124)
                at io.quarkus.arc.impl.ActivateRequestContextInterceptor.aroundInvoke(ActivateRequestContextInterceptor.java:33)
                at io.quarkus.arc.impl.ActivateRequestContextInterceptor_Bean.intercept(Unknown Source)
                at io.quarkus.arc.impl.InterceptorInvocation.invoke(InterceptorInvocation.java:42)
                at io.quarkus.arc.impl.AroundInvokeInvocationContext.perform(AroundInvokeInvocationContext.java:38)
                at io.quarkus.arc.impl.InvocationContexts.performAroundInvoke(InvocationContexts.java:26)
                at io.quarkus.rest.client.reactive.jaxb.runtime.ClientMessageBodyWriter_Subclass.marshal(Unknown Source)
                at io.quarkus.rest.client.reactive.jaxb.runtime.ClientMessageBodyWriter.writeTo(ClientMessageBodyWriter.java:37)
                at io.quarkus.rest.client.reactive.jaxb.runtime.ClientMessageBodyWriter_Subclass.writeTo$$superforward(Unknown Source)
                at io.quarkus.rest.client.reactive.jaxb.runtime.ClientMessageBodyWriter_Subclass$$function$$4.apply(Unknown Source)
                at io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:74)
                at io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:63)
                at io.quarkus.arc.impl.ActivateRequestContextInterceptor.invoke(ActivateRequestContextInterceptor.java:124)
                at io.quarkus.arc.impl.ActivateRequestContextInterceptor.aroundInvoke(ActivateRequestContextInterceptor.java:33)
                at io.quarkus.arc.impl.ActivateRequestContextInterceptor_Bean.intercept(Unknown Source)
                at io.quarkus.arc.impl.InterceptorInvocation.invoke(InterceptorInvocation.java:42)
                at io.quarkus.arc.impl.AroundInvokeInvocationContext.perform(AroundInvokeInvocationContext.java:38)
                at io.quarkus.arc.impl.InvocationContexts.performAroundInvoke(InvocationContexts.java:26)
                at io.quarkus.rest.client.reactive.jaxb.runtime.ClientMessageBodyWriter_Subclass.writeTo(Unknown Source)
                at org.jboss.resteasy.reactive.client.impl.ClientSerialisers.invokeClientWriter(ClientSerialisers.java:126)
                at org.jboss.resteasy.reactive.client.impl.RestClientRequestContext.writeEntity(RestClientRequestContext.java:265)
                at org.jboss.resteasy.reactive.client.handlers.ClientSendRequestHandler.setRequestHeadersAndPrepareBody(ClientSendRequestHandler.java:525)
                at org.jboss.resteasy.reactive.client.handlers.ClientSendRequestHandler$2.accept(ClientSendRequestHandler.java:196)
                at org.jboss.resteasy.reactive.client.handlers.ClientSendRequestHandler$2.accept(ClientSendRequestHandler.java:117)
                at io.smallrye.context.impl.wrappers.SlowContextualConsumer.accept(SlowContextualConsumer.java:21)
                at io.smallrye.mutiny.helpers.UniCallbackSubscriber.onItem(UniCallbackSubscriber.java:73)
                at io.smallrye.mutiny.operators.uni.UniOperatorProcessor.onItem(UniOperatorProcessor.java:47)
                at io.smallrye.mutiny.operators.uni.UniOnItemTransformToUni$UniOnItemTransformToUniProcessor.onItem(UniOnItemTransformToUni.java:60)
                at org.jboss.resteasy.reactive.client.AsyncResultUni.lambda$subscribe$1(AsyncResultUni.java:35)
                at io.vertx.core.impl.future.FutureImpl$3.onSuccess(FutureImpl.java:141)
                at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60)
                at io.vertx.core.impl.future.FutureImpl.tryComplete(FutureImpl.java:211)
                at io.vertx.core.impl.future.PromiseImpl.tryComplete(PromiseImpl.java:23)
                at io.vertx.core.http.impl.HttpClientImpl.lambda$null$5(HttpClientImpl.java:683)
                at io.vertx.core.impl.future.FutureImpl$3.onSuccess(FutureImpl.java:141)
                at io.vertx.core.impl.future.FutureBase.lambda$emitSuccess$0(FutureBase.java:54)
                at io.vertx.core.impl.EventLoopContext.execute(EventLoopContext.java:86)
                at io.vertx.core.impl.DuplicatedContext.execute(DuplicatedContext.java:163)
                at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:51)
                at io.vertx.core.impl.future.FutureImpl.addListener(FutureImpl.java:196)
                at io.vertx.core.impl.future.PromiseImpl.addListener(PromiseImpl.java:23)
                at io.vertx.core.impl.future.FutureImpl.onComplete(FutureImpl.java:164)
                at io.vertx.core.impl.future.PromiseImpl.onComplete(PromiseImpl.java:23)
                at io.vertx.core.http.impl.Http1xClientConnection.createStream(Http1xClientConnection.java:1270)
                at io.vertx.core.http.impl.HttpClientImpl.lambda$doRequest$6(HttpClientImpl.java:666)
                at io.verpl.pool.Endpoint.lambda$getConnection$0(Endpoint.java:52)
                at io.vertx.core.http.impl.SharedClientHttpStreamEndpoint$Request.handle(SharedClientHttpStreamEndpoint.java:162)
                at io.vertx.core.http.impl.SharedClientHttpStreamEndpoint$Request.handle(SharedClientHttpStreamEndpoint.java:123)
                at io.vertx.core.impl.EventLoopContext.emit(EventLoopContext.java:55)
                at io.vertx.core.impl.ContextBase.emit(ContextBase.java:239)
                at io.vertx.core.net.impl.pool.SimpleConnectionPool$LeaseImpl.emit(SimpleConnectionPool.java:704)
                at io.vertx.core.net.impl.pool.SimpleConnectionPool$ConnectSuccess$2.run(SimpleConnectionPool.java:338)
                at io.vertx.core.net.impl.pool.CombinerExecutor.submit(CombinerExecutor.java:56)
                at io.vertx.core.net.impl.pool.SimpleConnectionPool.execute(SimpleConnectionPool.java:245)
                at io.vertx.core.net.impl.pool.SimpleConnectionPool.lambda$connect$2(SimpleConnectionPool.java:257)
                at io.vertx.core.http.impl.SharedClientHttpStreamEndpoint.lambda$connect$2(SharedClientHttpStreamEndpoint.java:102)
                at io.vertx.core.impl.future.FutureImpl$3.onSuccess(FutureImpl.java:141)
                at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60)
                at io.vertx.core.impl.future.FutureImpl.tryComplete(FutureImpl.java:211)
                at io.vertx.core.impl.future.Composition$1.onSuccess(Composition.java:62)
                at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60)
                at io.vertx.core.impl.future.FutureImpl.addListener(FutureImpl.java:196)
                at io.vertx.core.impl.future.PromiseImpl.addListener(PromiseImpl.java:23)
                at io.vertx.core.impl.future.Composition.onSuccess(Composition.java:43)
                at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60)
                at io.vertx.core.impl.future.FutureImpl.tryComplete(FutureImpl.java:211)
                at io.vertx.core.impl.future.PromiseImpl.tryComplete(PromiseImpl.java:23)
                at io.vertx.core.Promise.complete(Promise.java:66)
                at io.vertx.core.net.impl.NetClientImpl.lambda$connected$9(NetClientImpl.java:330)
                at io.vertx.core.net.impl.VertxHandler.setConnection(VertxHandler.java:82)
                at io.vertx.core.net.impl.VertxHandler.handlerAdded(VertxHandler.java:88)
                at io.netty.channel.AbstractChannelHandlerContext.callHandlerAdded(AbstractChannelHandlerContext.java:1114)
                at io.netty.channel.DefaultChannelPipeline.callHandlerAdded0(DefaultChannelPipeline.java:609)
                at io.netty.channel.DefaultChannelPipeline.addLast(DefaultChannelPipeline.java:223)
                at io.netty.channel.DefaultChannelPipeline.addLast(DefaultChannelPipeline.java:195)
                at io.vertx.core.net.impl.NetClientImpl.connected(NetClientImpl.java:332)
                at io.vertx.core.net.impl.NetClientImpl.lambda$connectInternal2$3(NetClientImpl.java:294)
                at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:264)
                at io.vertx.core.net.impl.ChannelProvider.connected(ChannelProvider.java:172)
                at io.vertx.core.net.impl.ChannelProvider.lambda$handleConnect$0(ChannelProvider.java:155)
                at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:590)
                at io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:583)
                at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:559)
                at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:492)
                at io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:636)
                at io.netty.util.concurrent.DefaultPromise.setSuccess0(DefaultPromise.java:625)
                at io.netty.util.concurrent.DefaultPromise.trySuccess(DefaultPromise.java:105)
                at io.netty.channel.DefaultChannelPromise.trySuccess(DefaultChannelPromise.java:84)
                at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.fulfillConnectPromise(AbstractNioChannel.java:300)
                at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:335)
                at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:776)
                at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)
                at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)
                at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
                at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
                at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
                at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
                at java.base/java.lang.Thread.run(Thread.java:833)
        Caused by: org.glassfish.jaxb.runtime.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
Two classes have the same XML type name "xmlObject". Use @XmlType.name and @XmlType.namespace to assign different names to them.
        this problem is related to the following location:
                at org.acme.XmlObject
        this problem is related to the following location:
                at org.acme.XmlObject

                at org.glassfish.jaxb.runtime.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:83)
                at org.glassfish.jaxb.runtime.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:421)
                at org.glassfish.jaxb.runtime.v2.runtime.JAXBContextImpl.(JAXBContextImpl.java:255)
                at org.glassfish.jaxb.runtime.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1115)
                at org.glassfish.jaxb.runtime.v2.ContextFactory.createContext(ContextFactory.java:144)
                at org.glassfish.jaxb.runtime.v2.JAXBContextFactory.createContext(JAXBContextFactory.java:44)
                at jakarta.xml.bind.ContextFinder.find(ContextFinder.java:368)
                at jakarta.xml.bind.JAXBContext.newInstance(JAXBContext.java:605)
                at io.quarkus.jaxb.runtime.JaxbContextProducer.createJAXBContext(JaxbContextProducer.java:78)
                ... 122 more

Expected behavior

The test should continue to pass

Actual behavior

After the first execution, the test fails.

How to Reproduce?

  1. Create a XML consumer RestClient
  2. Mock the responding endpoint with Wiremock
  3. Create a Test that uses this RestClient
  4. Execute quarkus dev and start the tests
  5. Run the test again to see the exception

Output of uname -a or ver

Linux 5.15.90.1-microsoft-standard-WSL2 #1 SMP Fri Jan 27 02:56:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Output of java -version

openjdk version "17.0.7" 2023-04-18 OpenJDK Runtime Environment (build 17.0.7+7-Ubuntu-0ubuntu122.04.2) OpenJDK 64-Bit Server VM (build 17.0.7+7-Ubuntu-0ubuntu122.04.2, mixed mode, sharing)

GraalVM version (if different from Java)

No response

Quarkus version or git rev

3.0.1

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.6.3 Maven home: /usr/share/maven Java version: 17.0.7, vendor: Private Build, runtime: /usr/lib/jvm/java-17-openjdk-amd64 Default locale: en, platform encoding: UTF-8 OS name: "linux", version: "5.15.90.1-microsoft-standard-wsl2", arch: "amd64", family: "unix"

Additional information

No response

@vandrep vandrep added the kind/bug Something isn't working label May 17, 2023
@geoand
Copy link
Contributor

geoand commented May 17, 2023

@Sgitario any idea what's going on?

@Sgitario
Copy link
Contributor

I'm not sure if the bean is being registered several times or if there are two objects with the same type xmlObject (the good one and the mocked one). @vandrep can you attach the reproducer so I can easily play with it? I will take a look into this probably tomorrow or Friday.

In the meantime, @vandrep if you know the class that is causing the conflict, you can exclude it using the property:

quarkus.jaxb.exclude-classes=org.acme.one.Model

More info about this here: https://github.com/quarkusio/quarkus/wiki/Migration-Guide-3.0#jaxb

@tomperr
Copy link

tomperr commented May 17, 2023

I am facing the same issue, and now that I have excluded my classes with quarkus.jaxb.exclude-classes property to avoid several registrations, it looks like my JaxbContextCustomizer is not triggered anymore when manipulating these classes, so the workaround is not so efficient.

@Sgitario Sgitario added the triage/needs-reproducer We are waiting for a reproducer. label May 17, 2023
@Sgitario
Copy link
Contributor

I am facing the same issue, and now that I have excluded my classes with quarkus.jaxb.exclude-classes property to avoid several registrations, it looks like my JaxbContextCustomizer is not triggered anymore when manipulating these classes, so the workaround is not so efficient.

Since you are excluding the classes, It's expected that your customizations do not affect the excluded classes.

Please, share a reproducer so we can see what's going on.

@vandrep
Copy link
Author

vandrep commented May 18, 2023

@Sgitario, I was using this reproducer yesterday but it's giving me another exception now.

Since the behaviour is the same - only happens after a first success - I believe this new exception could also help. If it doesn't help, let me know and I'll try to reproduce the previous one.

New exception:

2023-05-18 06:21:12,887 ERROR [io.qua.test] (Test runner thread) Internal error running tests: java.lang.RuntimeException: java.lang.RuntimeException: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class org.glassfish.jaxb.core.v2.model.nav.ReflectionNavigator$7 and no pr
operties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) (through reference chain: io.quarkus.deployment.dev.testing.TestRunResults["results"]->java.util.Collections$UnmodifiableMap["org.acme.ExampleResourceTest"]->io.quarkus.deployment.dev.testing.Test
ClassResult["failing"]->java.util.ArrayList[0]->io.quarkus.deployment.dev.testing.TestResult["problems"]->java.util.Collections$UnmodifiableRandomAccessList[0]->java.lang.AssertionError["suppressed"]->java.lang.RuntimeException[0]->java.lang.RuntimeException["cause"]->org.glassfish.jaxb.runtime.v2.runtime.Illeg
alAnnotationsException["errors"]->java.util.Collections$UnmodifiableRandomAccessList[0]->org.glassfish.jaxb.core.v2.runtime.IllegalAnnotationException["sourcePos"]->java.util.Collections$UnmodifiableRandomAccessList[0]->java.util.Collections$UnmodifiableRandomAccessList[0])
        at io.quarkus.devui.runtime.continuoustesting.ContinuousTestingJsonRPCService.invokeAction(ContinuousTestingJsonRPCService.java:96)
        at io.quarkus.devui.runtime.continuoustesting.ContinuousTestingJsonRPCService.getResults(ContinuousTestingJsonRPCService.java:89)
        at io.quarkus.devui.runtime.continuoustesting.ContinuousTestingJsonRPCService.accept(ContinuousTestingJsonRPCService.java:39)
        at io.quarkus.devui.runtime.continuoustesting.ContinuousTestingJsonRPCService.accept(ContinuousTestingJsonRPCService.java:15)
        at io.quarkus.devui.runtime.continuoustesting.ContinuousTestingJsonRPCService_ClientProxy.accept(Unknown Source)
        at io.quarkus.dev.testing.ContinuousTestingSharedStateManager.setLastState(ContinuousTestingSharedStateManager.java:36)
        at io.quarkus.dev.testing.ContinuousTestingSharedStateManager.setInProgress(ContinuousTestingSharedStateManager.java:45)
        at io.quarkus.deployment.dev.testing.ContinuousTestingSharedStateListener.testRunStarted(ContinuousTestingSharedStateListener.java:48)
        at io.quarkus.deployment.dev.testing.TestSupport.runInternal(TestSupport.java:416)
        at io.quarkus.deployment.dev.testing.TestSupport$3.run(TestSupport.java:381)
        at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.RuntimeException: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class org.glassfish.jaxb.core.v2.model.nav.ReflectionNavigator$7 and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEA
NS) (through reference chain: io.quarkus.deployment.dev.testing.TestRunResults["results"]->java.util.Collections$UnmodifiableMap["org.acme.ExampleResourceTest"]->io.quarkus.deployment.dev.testing.TestClassResult["failing"]->java.util.ArrayList[0]->io.quarkus.deployment.dev.testing.TestResult["problems"]->java.u
til.Collections$UnmodifiableRandomAccessList[0]->java.lang.AssertionError["suppressed"]->java.lang.RuntimeException[0]->java.lang.RuntimeException["cause"]->org.glassfish.jaxb.runtime.v2.runtime.IllegalAnnotationsException["errors"]->java.util.Collections$UnmodifiableRandomAccessList[0]->org.glassfish.jaxb.core
.v2.runtime.IllegalAnnotationException["sourcePos"]->java.util.Collections$UnmodifiableRandomAccessList[0]->java.util.Collections$UnmodifiableRandomAccessList[0])
        at io.quarkus.devui.deployment.menu.ContinuousTestingProcessor.lambda$registerGetResultsMethod$5(ContinuousTestingProcessor.java:198)
        at io.quarkus.dev.console.DevConsoleManager.invoke(DevConsoleManager.java:135)
        at io.quarkus.devui.runtime.continuoustesting.ContinuousTestingJsonRPCService.invokeAction(ContinuousTestingJsonRPCService.java:94)
        ... 10 more
Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class org.glassfish.jaxb.core.v2.model.nav.ReflectionNavigator$7 and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) (through reference chain
: io.quarkus.deployment.dev.testing.TestRunResults["results"]->java.util.Collections$UnmodifiableMap["org.acme.ExampleResourceTest"]->io.quarkus.deployment.dev.testing.TestClassResult["failing"]->java.util.ArrayList[0]->io.quarkus.deployment.dev.testing.TestResult["problems"]->java.util.Collections$Unmodifiable
RandomAccessList[0]->java.lang.AssertionError["suppressed"]->java.lang.RuntimeException[0]->java.lang.RuntimeException["cause"]->org.glassfish.jaxb.runtime.v2.runtime.IllegalAnnotationsException["errors"]->java.util.Collections$UnmodifiableRandomAccessList[0]->org.glassfish.jaxb.core.v2.runtime.IllegalAnnotatio
nException["sourcePos"]->java.util.Collections$UnmodifiableRandomAccessList[0]->java.util.Collections$UnmodifiableRandomAccessList[0])
        at com.fasterxml.jackson.databind.exc.InvalidDefinitionException.from(InvalidDefinitionException.java:77)
        at com.fasterxml.jackson.databind.SerializerProvider.reportBadDefinition(SerializerProvider.java:1306)
        at com.fasterxml.jackson.databind.DatabindContext.reportBadDefinition(DatabindContext.java:408)
        at com.fasterxml.jackson.databind.ser.impl.UnknownSerializer.failForEmpty(UnknownSerializer.java:53)
        at com.fasterxml.jackson.databind.ser.impl.UnknownSerializer.serialize(UnknownSerializer.java:30)
        at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serializeContents(IndexedListSerializer.java:119)
        at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serialize(IndexedListSerializer.java:79)
        at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serialize(IndexedListSerializer.java:18)
        at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serializeContents(IndexedListSerializer.java:119)
        at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serialize(IndexedListSerializer.java:79)
        at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serialize(IndexedListSerializer.java:18)
        at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:733)
        at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:774)
        at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:178)
        at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serializeContents(IndexedListSerializer.java:119)
        at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serialize(IndexedListSerializer.java:79)
        at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serialize(IndexedListSerializer.java:18)
        at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:733)
        at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:774)
        at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:178)
        at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:733)
        at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:774)
        at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:178)
        at com.fasterxml.jackson.databind.ser.std.ObjectArraySerializer.serializeContents(ObjectArraySerializer.java:253)
        at com.fasterxml.jackson.databind.ser.std.ObjectArraySerializer.serialize(ObjectArraySerializer.java:214)
        at com.fasterxml.jackson.databind.ser.std.ObjectArraySerializer.serialize(ObjectArraySerializer.java:23)
        at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:733)
        at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:774)
        at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:178)
        at com.fasterxml.jackson.databind.serndexedListSerializer.serializeContents(IndexedListSerializer.java:119)
        at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serialize(IndexedListSerializer.java:79)
        at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serialize(IndexedListSerializer.java:18)
        at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:733)
        at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:774)
        at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:178)
        at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serializeContents(IndexedListSerializer.java:119)
        at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serialize(IndexedListSerializer.java:79)
        at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serialize(IndexedListSerializer.java:18)
        at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:733)
        at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:774)
        at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:178)
        at com.fasterxml.jackson.databind.ser.std.MapSerializer.serializeFields(MapSerializer.java:808)
        at com.fasterxml.jackson.databind.ser.std.MapSerializer.serializeWithoutTypeInfo(MapSerializer.java:764)
        at com.fasterxml.jackson.databind.ser.std.MapSerializer.serialize(MapSerializer.java:720)
        at com.fasterxml.jackson.databind.ser.std.MapSerializer.serialize(MapSerializer.java:35)
        at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:733)
        at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:774)
        at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:178)
        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.ObjectMapper._writeValueAndClose(ObjectMapper.java:4624)
        at com.fasterxml.jackson.databind.ObjectMapper.writeValue(ObjectMapper.java:3852)
        at io.quarkus.devui.deployment.menu.ContinuousTestingProcessor.lambda$registerGetResultsMethod$5(ContinuousTestingProcessor.java:193)
        ... 12 more

Sgitario added a commit to Sgitario/quarkus that referenced this issue May 18, 2023
The classes in the recorder were not cleared when restaring the app, so the classes to be bound were accumulated in each iteration. 

Fix quarkusio#33441
@Sgitario
Copy link
Contributor

at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serializeContents(IndexedListSerializer.java:119)
at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serialize(IndexedListSerializer.java:79)
at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serialize(IndexedListSerializer.java:18)
at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serializeContents(IndexedListSerializer.java:119)

The reproducer did help, many thanks for that! #33466 should address this issue.

@quarkus-bot quarkus-bot bot added this to the 3.2 - main milestone May 18, 2023
michelle-purcell pushed a commit to michelle-purcell/quarkus that referenced this issue May 18, 2023
The classes in the recorder were not cleared when restaring the app, so the classes to be bound were accumulated in each iteration. 

Fix quarkusio#33441
@gsmet gsmet modified the milestones: 3.2 - main, 3.1.0.Final May 23, 2023
gsmet pushed a commit to gsmet/quarkus that referenced this issue May 23, 2023
The classes in the recorder were not cleared when restaring the app, so the classes to be bound were accumulated in each iteration.

Fix quarkusio#33441

(cherry picked from commit 4a5006e)
@gsmet gsmet modified the milestones: 3.1.0.Final, 3.0.4.Final May 23, 2023
gsmet pushed a commit to gsmet/quarkus that referenced this issue May 23, 2023
The classes in the recorder were not cleared when restaring the app, so the classes to be bound were accumulated in each iteration.

Fix quarkusio#33441

(cherry picked from commit 4a5006e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working triage/needs-reproducer We are waiting for a reproducer.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants