[
https://issues.apache.org/jira/browse/CXF-5717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13984983#comment-13984983
]
Silvio Assuncao commented on CXF-5717:
--------------------------------------
I put here a sample
import org.joda.time.DateTime;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name = "Customer")
public class Customer {
private long id;
private String name;
private DateTime date;
public long getId() {
return id;
}
public DateTime getDate() {
return date;
}
public void setDate(DateTime date) {
this.date = date;
}
public void setId(long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
create another class to run the application
public class Test {
public static void main(String args[]) throws Exception {
SearchContext context = new SearchContextImpl(new MessageImpl());
SearchCondition<Customer> condition =
context.getCondition("date==2014-05-29", Customer.class);
}
}
and I receive this exception
Exception in thread "main"
org.apache.cxf.jaxrs.ext.search.PropertyNotFoundException
at
org.apache.cxf.jaxrs.ext.search.fiql.FiqlParser.parseComparison(FiqlParser.java:294)
at
org.apache.cxf.jaxrs.ext.search.fiql.FiqlParser.parseAndsOrsBrackets(FiqlParser.java:252)
at
org.apache.cxf.jaxrs.ext.search.fiql.FiqlParser.parse(FiqlParser.java:187)
at
org.apache.cxf.jaxrs.ext.search.SearchContextImpl.getCondition(SearchContextImpl.java:96)
at
org.apache.cxf.jaxrs.ext.search.SearchContextImpl.getCondition(SearchContextImpl.java:77)
at
org.apache.cxf.jaxrs.ext.search.SearchContextImpl.getCondition(SearchContextImpl.java:71)
If I change the type para java.util.Date the exception not occur
I saw that FiqlParser (2.7.11) have a method parseType that have this if "if
(Date.class.isAssignableFrom(valueType)) {" and because that if I don`t have
problem with Date
> FiqlParser with joda DateTime (SearchContext)
> ---------------------------------------------
>
> Key: CXF-5717
> URL: https://issues.apache.org/jira/browse/CXF-5717
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 2.7.11
> Reporter: Silvio Assuncao
> Assignee: Sergey Beryozkin
> Priority: Minor
> Labels: JAXRS, Search
>
> I'm using the SearchContext and try search some date and I've a exception.
> I'm using joda DateTime and the FiqlParser cannot parse this type (I debug it)
--
This message was sent by Atlassian JIRA
(v6.2#6252)