-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Comments
@Sgitario any idea what's going on? |
I'm not sure if the bean is being registered several times or if there are two objects with the same type In the meantime, @vandrep if you know the class that is causing the conflict, you can exclude it using the property:
More info about this here: https://github.com/quarkusio/quarkus/wiki/Migration-Guide-3.0#jaxb |
I am facing the same issue, and now that I have excluded my classes with |
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. |
@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 |
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
The reproducer did help, many thanks for that! #33466 should address this issue. |
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
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)
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)
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.
Expected behavior
The test should continue to pass
Actual behavior
After the first execution, the test fails.
How to Reproduce?
Output of
uname -a
orver
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
orgradlew --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
The text was updated successfully, but these errors were encountered: