Uploaded image for project: 'Olingo'
  1. Olingo
  2. OLINGO-1394

High precision TimeStamp results EdmSimpleTypeException

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • V2 2.0.7, V2 2.0.11
    • None
    • odata2-core
    • None

    Description

      Receiving a high precision timestamp results the following root exception: org.apache.olingo.odata2.api.edm.EdmSimpleTypeException: The literal '2019-06-13T06:59:18.6740750Z' is not formatted properly.

      According to OLINGO-749 this is supposed to be fixed and working.

      odata-response
      <?xml version="1.0" encoding="utf-8"?>
      <entry m:etag="W/&quot;datetimeoffset'2019-06-13T06%3A59%3A18.6740750Z'&quot;"
             xml:base="https://example.com/odata-service/"
             xmlns="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
             xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices">
          <id>
              https://https://example.com/odata-service/CustomerCollection('00163E038C2E1EE299C1BB0BE9398FFF')
          </id>
          <title type="text">CustomerCollection('00163E038C2E1EE299C1BB0BE9398FFF')</title>
          <updated>2019-09-09T10:52:22Z</updated>
          <category term="cust.Customer" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
          <link href="CustomerCollection('00163E038C2E1EE299C1BB0BE9398F9B')" rel="edit" title="Customer"/>
          <content type="application/xml">
              <m:properties>
                  <d:ObjectID>00163E038C2E1EE299C1BB0BE9398FFF</d:ObjectID>
                  <d:ETag>2019-06-13T06:59:18.6740750Z</d:ETag>
              </m:properties>
          </content>
      </entry>
      
      Exception
      org.apache.olingo.odata2.api.ep.EntityProviderException: An exception of type 'EdmSimpleTypeException' occurred.
      
      	at org.apache.olingo.odata2.core.ep.consumer.XmlEntryConsumer.readEntry(XmlEntryConsumer.java:98)
      	at org.apache.olingo.odata2.core.ep.consumer.XmlEntityConsumer.readEntry(XmlEntityConsumer.java:91)
      	at org.apache.olingo.odata2.core.ep.AtomEntityProvider.readEntry(AtomEntityProvider.java:376)
      	at org.apache.olingo.odata2.core.ep.ProviderFacadeImpl.readEntry(ProviderFacadeImpl.java:179)
      	at org.apache.olingo.odata2.api.ep.EntityProvider.readEntry(EntityProvider.java:746)
      	at com.example.odata.internal.OlingoODataClient.findById(OlingoODataClient.java:88)
      	at com.example.odata.ODataClientTest.testDateParseError(ODataClientTest.java:326)
      	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.springframework.test.context.junit4.statements.RunBeforeTestExecutionCallbacks.evaluate(RunBeforeTestExecutionCallbacks.java:74)
      	at org.springframework.test.context.junit4.statements.RunAfterTestExecutionCallbacks.evaluate(RunAfterTestExecutionCallbacks.java:84)
      	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
      	at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)
      	at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)
      	at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84)
      	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
      	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:251)
      	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:97)
      	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.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
      	at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
      	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190)
      	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
      	at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
      	at org.junit.vintage.engine.execution.RunnerExecutor.execute(RunnerExecutor.java:40)
      	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
      	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
      	at java.util.Iterator.forEachRemaining(Iterator.java:116)
      	at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
      	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
      	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
      	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
      	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
      	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
      	at org.junit.vintage.engine.VintageTestEngine.executeAllChildren(VintageTestEngine.java:80)
      	at org.junit.vintage.engine.VintageTestEngine.execute(VintageTestEngine.java:71)
      	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:229)
      	at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$6(DefaultLauncher.java:197)
      	at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:211)
      	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:191)
      	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:128)
      	at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:69)
      	at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
      	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
      	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
      Caused by: org.apache.olingo.odata2.api.edm.EdmSimpleTypeException: The literal '2019-06-13T06:59:18.6740750Z' is not formatted properly.
      	at org.apache.olingo.odata2.core.edm.EdmDateTimeOffset.internalValueOfString(EdmDateTimeOffset.java:119)
      	at org.apache.olingo.odata2.core.edm.AbstractSimpleType.valueOfString(AbstractSimpleType.java:91)
      	at org.apache.olingo.odata2.core.ep.consumer.XmlPropertyConsumer.convert(XmlPropertyConsumer.java:206)
      	at org.apache.olingo.odata2.core.ep.consumer.XmlPropertyConsumer.readStartedElement(XmlPropertyConsumer.java:192)
      	at org.apache.olingo.odata2.core.ep.consumer.XmlEntryConsumer.readProperties(XmlEntryConsumer.java:602)
      	at org.apache.olingo.odata2.core.ep.consumer.XmlEntryConsumer.readContent(XmlEntryConsumer.java:555)
      	at org.apache.olingo.odata2.core.ep.consumer.XmlEntryConsumer.handleStartedTag(XmlEntryConsumer.java:137)
      	at org.apache.olingo.odata2.core.ep.consumer.XmlEntryConsumer.readEntry(XmlEntryConsumer.java:89)
      	... 56 more
      

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            gebezs Gebezs

            Dates

              Created:
              Updated:

              Slack

                Issue deployment