Given
- Engine instance with custom DateFormat yyyy-MM-dd'T'HH:mm:ss configured as per documentation:
- Optimize instance with the same custom DateFormat configured:
serialization: # Define a custom date format that should be used for # fetching date data from the engine(should be the same as in the engine) engineDateFormat: yyyy-MM-dd'T'HH:mm:ss
When
- Start Optimize
Then
- Data import fails due to the DateFormat configuration:
13:30:10.572 [ThreadPoolTaskScheduler-1] ERROR o.c.o.s.i.e.f.d.ProcessDefinitionFetcher - Error during fetching of entities. Please check the connection with [camunda-bpm]! javax.ws.rs.client.ResponseProcessingException: com.fasterxml.jackson.databind.JsonMappingException: Text '2021-02-17T09:46:48' could not be parsed at index 19 (through reference chain: org.camunda.optimize.dto.engine.DeploymentEngineDto["deploymentTime"]) at org.glassfish.jersey.client.JerseyInvocation.translate(JerseyInvocation.java:702) at org.glassfish.jersey.client.JerseyInvocation.lambda$invoke$1(JerseyInvocation.java:632) at org.glassfish.jersey.client.JerseyInvocation.call(JerseyInvocation.java:654) at org.glassfish.jersey.client.JerseyInvocation.lambda$runInScope$3(JerseyInvocation.java:648) at org.glassfish.jersey.internal.Errors.process(Errors.java:292) at org.glassfish.jersey.internal.Errors.process(Errors.java:274) at org.glassfish.jersey.internal.Errors.process(Errors.java:205) at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:390) at org.glassfish.jersey.client.JerseyInvocation.runInScope(JerseyInvocation.java:648) at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:631) at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:406) at org.glassfish.jersey.client.JerseyInvocation$Builder.get(JerseyInvocation.java:302) at org.camunda.optimize.service.importing.engine.fetcher.definition.DefinitionFetcher.performDeploymentRequest(DefinitionFetcher.java:113) at org.camunda.optimize.service.importing.engine.fetcher.definition.DefinitionFetcher.lambda$addDeploymentTimeToDefinitionDtos$2(DefinitionFetcher.java:101) at org.camunda.optimize.service.importing.engine.fetcher.instance.RetryBackoffEngineEntityFetcher.fetchWithRetry(RetryBackoffEngineEntityFetcher.java:42) at org.camunda.optimize.service.importing.engine.fetcher.definition.DefinitionFetcher.addDeploymentTimeToDefinitionDtos(DefinitionFetcher.java:101) at org.camunda.optimize.service.importing.engine.fetcher.definition.DefinitionFetcher.fetchDefinitions(DefinitionFetcher.java:93) at org.camunda.optimize.service.importing.engine.fetcher.definition.DefinitionFetcher.fetchDefinitions(DefinitionFetcher.java:48) at org.camunda.optimize.service.importing.engine.mediator.ProcessDefinitionEngineImportMediator.getEntitiesNextPage(ProcessDefinitionEngineImportMediator.java:49) at org.camunda.optimize.service.importing.TimestampBasedImportMediator.importNextPage(TimestampBasedImportMediator.java:28) at org.camunda.optimize.service.importing.BackoffImportMediator.importNextPageRetryOnError(BackoffImportMediator.java:78) at org.camunda.optimize.service.importing.BackoffImportMediator.runImport(BackoffImportMediator.java:27) at org.camunda.optimize.service.importing.engine.EngineImportScheduler.lambda$executeImportRound$2(EngineImportScheduler.java:114) at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:546) at java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260) at java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:505) at org.camunda.optimize.service.importing.engine.EngineImportScheduler.executeImportRound(EngineImportScheduler.java:120) at org.camunda.optimize.service.importing.engine.EngineImportScheduler.runImportRound(EngineImportScheduler.java:96) at org.camunda.optimize.service.importing.engine.EngineImportScheduler.runImportRound(EngineImportScheduler.java:76) at org.camunda.optimize.service.importing.engine.EngineImportScheduler.run(EngineImportScheduler.java:38) at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:95) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: com.fasterxml.jackson.databind.JsonMappingException: Text '2021-02-17T09:46:48' could not be parsed at index 19 (through reference chain: org.camunda.optimize.dto.engine.DeploymentEngineDto["deploymentTime"]) at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:390) at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:349) at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.wrapAndThrow(BeanDeserializerBase.java:1807) at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:404) at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:195) at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:322) at com.fasterxml.jackson.databind.ObjectReader._bind(ObjectReader.java:2007) at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:1174) at org.glassfish.jersey.jackson.internal.jackson.jaxrs.base.ProviderBase.readFrom(ProviderBase.java:837) at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.invokeReadFrom(ReaderInterceptorExecutor.java:233) at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.aroundReadFrom(ReaderInterceptorExecutor.java:212) at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor.proceed(ReaderInterceptorExecutor.java:132) at org.glassfish.jersey.message.internal.MessageBodyFactory.readFrom(MessageBodyFactory.java:1072) at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:885) at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:819) at org.glassfish.jersey.client.ClientResponse.readEntity(ClientResponse.java:298) at org.glassfish.jersey.client.JerseyInvocation.translate(JerseyInvocation.java:699) ... 42 common frames omitted Caused by: java.time.format.DateTimeParseException: Text '2021-02-17T09:46:48' could not be parsed at index 19 at java.time.format.DateTimeFormatter.parseResolved0(DateTimeFormatter.java:1949) at java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1851) at java.time.ZonedDateTime.parse(ZonedDateTime.java:597) at org.camunda.optimize.service.util.mapper.CustomOffsetDateTimeDeserializer.deserialize(CustomOffsetDateTimeDeserializer.java:35) at org.camunda.optimize.service.util.mapper.CustomOffsetDateTimeDeserializer.deserialize(CustomOffsetDateTimeDeserializer.java:19) at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129) at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:402) ... 55 common frames omitted
Hints (optional):
As a workaround time zone must be included in the pattern yyyy-MM-dd'T'HH:mm:ssZ