[
https://issues.apache.org/jira/browse/OLINGO-240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13963817#comment-13963817
]
Chandan V.A commented on OLINGO-240:
------------------------------------
Hi,
Can you please attach the call stack information? Because I would like to see
if this is an issue specific to a particular JPA Provider and DB because I
could execute the request
http://localhost:8080/olingo-odata2-jpa-processor-ref-web/SalesOrderProcessing.svc/SalesOrders?$filter=CreationDate
eq datetime'2012-11-01T00:01:00' on the reference scenario without any
exception.
The reference scenario is based on EclipseLink and HSQLDB.
Regards
Chandan
> Filter by datetime is not working
> ---------------------------------
>
> Key: OLINGO-240
> URL: https://issues.apache.org/jira/browse/OLINGO-240
> Project: Olingo
> Issue Type: Bug
> Components: odata2-jpa, odata4-server
> Affects Versions: V2 1.2.0
> Reporter: Selvaratnam Ruckman Colins
> Assignee: Chandan V.A
> Priority: Blocker
>
> I apply the filter URI for search by datetime as mentioned below,
> /StockMarketData.svc/Tests?$filter=TradingDate eq
> datetime'2009-12-26T21:23:38'
> But it gives me following an error
> =========================
> <error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
> <code/>
> <message xml:lang="en">
> "OData - JPA Runtime: JPA query syntax is not correct"
> </message>
> </error>
> Also i got more information after download the source code and debug
> through,Please take took at the error message below
> org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPARuntimeException:
> "OData - JPA Runtime: JPA query syntax is not correct"
> java.lang.IllegalArgumentException: org.hibernate.QueryException: unexpected
> char: '{' [SELECT E1 FROM au.com.righttime.unity.odata.service.model.Test E1
> WHERE E1.tradingDate = {ts '2009-12-26 21:23:38.000'}]
> Error occurred at ODataRequestHandler.handle
> odataResponse =
> dispatcher.dispatch(method, uriInfo, request.getBody(),
> request.getContentType(), acceptContentType
> .toContentTypeString());
> I used JPA+HIbernate+MySql to export my JPA model and i used following
> annotation to map the date
> @Temporal(TemporalType.TIMESTAMP)
> private Calendar passwordCreatedDate;
> I tried all scenarios like Date...but does not work at all.
--
This message was sent by Atlassian JIRA
(v6.2#6252)