Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-29389

Fix deserialization of some dates with Marklogic

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 10.10
    • Fix Version/s: 10.10-HF31
    • Component/s: Core MarkLogic
    • Release Notes Summary:
      Marklogic modules handles the deserialization of DST dates.
    • Backlog priority:
      900
    • Sprint:
      nxplatform #13, nxplatform #14
    • Story Points:
      1

      Description

      Using MarklogicHelper to deserialize a value which sounds correct like 2020-03-29T02:39:46.058 produces an error.

      It can be quickly reproduced with a simple unit test

          @Test
          public void test() {
              Calendar calendar = MarkLogicHelper.deserializeCalendar("2020-03-29T02:39:46.058");
              System.out.println(calendar);
          } 

      It raises this error

      org.joda.time.IllegalInstantException: Cannot parse "2020-03-29T02:39:46.058": Illegal instant due to time zone offset transition (Europe/Paris)
      	at org.joda.time.format.DateTimeParserBucket.computeMillis(DateTimeParserBucket.java:473)
      	at org.joda.time.format.DateTimeParserBucket.computeMillis(DateTimeParserBucket.java:411)
      	at org.joda.time.format.DateTimeFormatter.parseDateTime(DateTimeFormatter.java:928)
      	at org.nuxeo.ecm.core.storage.marklogic.MarkLogicHelper.deserializeCalendar(MarkLogicHelper.java:54)
      	at org.nuxeo.ecm.core.storage.marklogic.TestMarkLogicStateSerializer.test(TestMarkLogicStateSerializer.java:34)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
      	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
      	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
      	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
      	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
      	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
      	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
      	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
      	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:89)
      	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41)
      	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:542)
      	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:770)
      	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:464)
      	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours
                3h