Hi
On 12/02/13 15:42, Kiril Gavrailov wrote:
Hey Guys,
I have a project that uses FIQL and respectively SearchContext.
However when I migrated form cxf 2.4.10 to 2.7.3 my filtering
functionallity has stopped working.
What is the project setup?
The search context is injected with the @Context annotation as a field
variable in an abstract class, later on this abstract class is extended
for different rest resources and they all have filtering on a particular
get method.
What is the problem?
I have attached the whole exception (hope that the mailing list will
show the attachment, if no please do tell me I'll send them in the mail).
What are my outcomes so far?
When I started debugging I noticed that the searchContext variable is
kept into a threadlocal variable, but when the get() method of thread
local is invoked it returns null.
Further more the value of the threadlocalmap is null. Which means that
the context is not being injected properly.
When I continued debugging what I found is the following:
In the org.apache.cxf.jaxrs.utils.InjectionUtils class the method
injectContextFields invokes the org.apache.cxf.jaxrs.utils.JAXRSUtils
createContextValue which returns null and fails to inject the search
context.
Furthermore in the createContextValue method for the search context the
method ProviderFactory.getInstance(m).createContextProvider is invoked
which also returns null
since the contextProviders List in the
org.apache.cxf.jaxrs.provider.ProviderFactory is *empty*.
Unfortunately I'm unable to realize what's going with the
contextProviders field. So I'm asking you for your help. Do you have any
idea what's going on and why my search context is not being injected
properly?
If you need any further information please do tell.
Thanks for trying to get to the bottom of it, FYI, given that no
auto-discovery of providers is supported in CXF (I keep saying it will
be but not at the moment), one has to explicitly register
"org.apache.cxf.jaxrs.ext.search.SearchContextProvider" as
jaxrs:provider, this will do it
Thanks, Sergey
Thanks in advance.
Best Regards,
Kiril