Riley Rainey created OLINGO-293:
-----------------------------------

             Summary: 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


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 Calendar lastUpdate;

and

        @Temporal(TemporalType.TIMESTAMP)
        protected Date lastUpdate;

Both yield the same error.

I have tried POST-ing both as XML and JSON using the proper date format for 
each.





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

Reply via email to