On 16/07/13 14:16, nikosdim wrote:
Sergey Beryozkin wrote
I think the NPE is coming from your own code, see the exception fragment
below,
Cheers, Sergey
On 16/07/13 13:56, nikosdim wrote:
Caused by: java.lang.NullPointerException
at
com.ba.oasis.resources.ServersResource.doFindSelectedBooks(ServersResource.java:233)
@GET
@Path("matrix;{search}")
@Produces("plain/text")
public Response findSelectedBooks(
@PathParam("search") String searchExpression,
@MatrixParam("records") String records) {
SearchCondition<Book> sc = searchContext.getCondition(
searchExpression, Book.class);
List<String> cols = new ArrayList<String>();
SQLPrinterVisitor<Book> visitor = new SQLPrinterVisitor<Book>(
beanPropertiesMap,
"books"), cols);
sc.accept(visitor);
...
}
sc.accept(visitor); is line 233. This is where I get NullPointerException
when I try to access books;author==Peter;records=20
If I remove ;records=20 then it works fine.
The problem is "records=20" is not a correct FIQL syntax but I wonder
why the parser returns 'null'. I think it has to throw a proper
exception, I'll look into it.
As I said, you can't have a case where you'd like to use matrix
parameters to capture the expression and have this expression mixed in
with the other matrix parameters which are not meant to be part of the
expression (such as 'records' - this is a paging parameter which can
apply to the search results).
However, a wrong search expression must cause the exception, I'll look
into it
Thanks, Sergey
--
View this message in context:
http://cxf.547215.n5.nabble.com/Where-to-put-contextual-property-ignore-matrix-parameters-true-tp5730881p5730934.html
Sent from the cxf-user mailing list archive at Nabble.com.
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/
Blog: http://sberyozkin.blogspot.com