Odata4j Android - 非法日期时间格式

时间:2015-05-11 12:15:06

标签: android odata sap

我在我的android代码中遇到下面所述的异常,我试图使用ODATA JAR库解析odata4j服务。

  

java.lang.IllegalArgumentException:非法日期时间格式2015-05-07T00%3A00%3A00

我在Android代码中收到错误:

  

列表list = c.getEntities(“EntityName”)。execute()。toList();

我的整个堆栈跟踪如下所示:

 Caused by: java.lang.IllegalArgumentException: bad valueString [datetime'2015-05-07T00%3A00%3A00'] as part of keyString [*****='*****',*****='0',***='*****',date=datetime'2015-05-07T00%3A00%3A00',*****='*******']
            at org.odata4j.core.OEntityKey.parse(OEntityKey.java:157)
            at org.odata4j.format.xml.AtomFeedFormatParser.parseEntityKey(AtomFeedFormatParser.java:300)
            at org.odata4j.format.xml.AtomFeedFormatParser.entityFromAtomEntry(AtomFeedFormatParser.java:431)
            at org.odata4j.format.xml.AtomFeedFormatParser.parseEntry(AtomFeedFormatParser.java:349)
            at org.odata4j.format.xml.AtomFeedFormatParser.parseFeed(AtomFeedFormatParser.java:169)
            at org.odata4j.format.xml.AtomFeedFormatParser.parse(AtomFeedFormatParser.java:157)
            at org.odata4j.format.xml.AtomFeedFormatParser.parse(AtomFeedFormatParser.java:45)
            at org.odata4j.consumer.ConsumerQueryEntitiesRequest.doRequest(ConsumerQueryEntitiesRequest.java:67)
            at org.odata4j.consumer.ConsumerQueryEntitiesRequest.getEntries(ConsumerQueryEntitiesRequest.java:50)
            at org.odata4j.consumer.ConsumerQueryEntitiesRequest.execute(ConsumerQueryEntitiesRequest.java:40)
            at *******.MyActivity$LoadSpinners.doInBackground(MyActivity.java:287)
            at *******.MyActivity$LoadSpinners.doInBackground(MyActivity.java:202)
            at android.os.AsyncTask$2.call(AsyncTask.java:287)
            at java.util.concurrent.FutureTask.run(FutureTask.java:234)
            at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
            at java.lang.Thread.run(Thread.java:841)
     Caused by: java.lang.IllegalArgumentException: Illegal datetime format 2015-05-07T00%3A00%3A00
            at org.odata4j.internal.InternalUtil.parseDateTimeFromXml(InternalUtil.java:96)
            at org.odata4j.expression.ExpressionParser.readExpression(ExpressionParser.java:462)
            at org.odata4j.expression.ExpressionParser.parse(ExpressionParser.java:64)
            at org.odata4j.core.OEntityKey.parse(OEntityKey.java:152)

在某些敏感信息中放置了******,例如不相关的属性和应用包名称。

0 个答案:

没有答案