I’m using the java driver, and running into an exception when trying to register the XMLGregorianCalendar class. Here’s the code snippet and error I ran into:
CODE:
CodecRegistry pojoCodecRegistry = fromProviders(PojoCodecProvider.builder() .register(XMLGregorianCalendar.class) .build());
ERROR:
org.bson.codecs.configuration.CodecConfigurationException: Property ‘year’ in XMLGregorianCalendar, has differing data types: TypeData{type=BigInteger} and TypeData{type=Integer}.
Any help is appreciated! Thank you.