You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Michael Bolz (JIRA)" <ji...@apache.org> on 2014/06/10 08:59:02 UTC

[jira] [Updated] (OLINGO-293) Unable to POST an entity with a DateTime type field using underlying JPA model

     [ https://issues.apache.org/jira/browse/OLINGO-293?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Bolz updated OLINGO-293:
--------------------------------

    Assignee: Chandan V.A  (was: Michael Bolz)

> Unable to POST an entity with a DateTime type field using underlying JPA model
> ------------------------------------------------------------------------------
>
>                 Key: OLINGO-293
>                 URL: https://issues.apache.org/jira/browse/OLINGO-293
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata2-jpa
>    Affects Versions: V2 1.2.0
>         Environment: Tomcat 7.0.45
> Eclipselink 2.5.0
>            Reporter: Riley Rainey
>            Assignee: Chandan V.A
>            Priority: Minor
>
> Attempting to supply a value for a DateTime field in a POST operation yields this error message:
> <error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
>    <code/>
>    <message xml:lang="en">"OData - JPA Runtime: JPA create request is not correct"</message>
>    <innererror>class org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPARuntimeException : "OData - JPA Runtime: Internal error [argument type mismatch]"</innererror>
> </error>
> I have tried to declare the underlying field a few ways:
> 	@Temporal(TemporalType.TIMESTAMP)
> 	protected Date lastUpdate;
> and
> 	@Temporal(TemporalType.TIMESTAMP)
> 	protected Calendar lastUpdate;
> The first configuration fails, bit the second (using java.util.Calendar) seems to work.
> In the failing case, I have tried POST-ing both as XML and JSON using the proper date format for each.
> I can work around this for my specific application, but I expect there will be others that might prefer or need to use Date.



--
This message was sent by Atlassian JIRA
(v6.2#6252)