cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gustav Sohtell (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CXF-4305) FIQL only gives nullpointerexception. @Context SearchContext does not seem to work.
Date Thu, 10 May 2012 11:21:51 GMT

     [ https://issues.apache.org/jira/browse/CXF-4305?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Gustav Sohtell updated CXF-4305:
--------------------------------

    Attachment: TestFiql.zip

Eclipse maven project
                
> FIQL only gives nullpointerexception. @Context SearchContext does not seem to work.
> -----------------------------------------------------------------------------------
>
>                 Key: CXF-4305
>                 URL: https://issues.apache.org/jira/browse/CXF-4305
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 2.5.2, 2.5.3
>         Environment: Tomcat 6.0.30
> Spring 3.1.1
> Windows Vista
>            Reporter: Gustav Sohtell
>         Attachments: TestFiql.zip
>
>
> I tried using FIQL in version 2.5.2 and 2.5.3. I cant get "@Context SearchContext searchContext"
to work. It is just null. I tried putting it as instance variable and method parameter with
no success. 
> I tried different queries, here is one: http://localhost:8080/testFiql/testFiql?_s=name==hello
> The exception I get:
> org.apache.cxf.interceptor.Fault
>         at org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:155)
>         at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:121)
>         at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:167)
>         at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:94)
>         at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>         at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
>         at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106)
>         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
>         at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:123)
>         at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:207)
>         at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:213)
>         at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:154)
>         at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:128)
>         at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:185)
>         at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:113)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
>         at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:164)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
>         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
>         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
>         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
>         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
>         at java.lang.Thread.run(Thread.java:662)
> Caused by: java.lang.NullPointerException
>         at com.gustav.test.SearchTestFiql.testFiqlSearch(SearchTestFiql.java:20)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:173)
>         at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:89)
> testFiql.java:
> package com.gustav.test;
> import javax.ws.rs.Path;
> import javax.ws.rs.core.Context;
> import org.apache.cxf.jaxrs.ext.search.SearchCondition;
> import org.apache.cxf.jaxrs.ext.search.SearchContext;
> import org.springframework.stereotype.Service;
> @Service("testFiql")
> @Path("/")
> public class SearchTestFiql {
>     
> //    @Context
> //    private SearchContext searchContext;
>     
>     @Path("testFiql")
>     public void testFiqlSearch(@Context SearchContext searchContext) {
>         System.out.println("Entering testFiqlSearch");
>         SearchCondition<String> sc = searchContext.getCondition(String.class);
>         System.out.println("Search conditions: " + sc.getSearchConditions());
>         System.out.println("Exiting testFiqlSearch");
>         
>     }
> }
> Please tell me if I can provide any more information which might help.
> I would gladly provide the entire Eclipse Maven project if I knew a way to attach it.
> Best regards, 
> Gustav

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message