OrderBy子句破坏了我使用Apache Olingo实现的OData服务

时间:2015-06-02 23:01:12

标签: java odata olingo

我使用Apache Olingo开发了一个OData服务。当我使用包含'OrderBy'的URL进行查询时,它会抛出错误,而没有OrderBy的查询运行正常。 成功的网址 - http://localhost:8081/PeopleFinderService/peoplefinderservice.svc/EqxIntranetPeopleFinders?$ select = EmpId& $ inlinecount = allpages& $ top = 26 失败网址 - http://localhost:8081/PeopleFinderService/peoplefinderservice.svc/EqxIntranetPeopleFinders?$ orderby = EmpId& $ select = EmpId& $ inlinecount = allpages& $ top = 26

    HTTP Status 500 - org.apache.cxf.interceptor.Fault: org/apache/commons/codec/DecoderException

type Exception report

message org.apache.cxf.interceptor.Fault: org/apache/commons/codec/DecoderException

description The server encountered an internal error that prevented it from fulfilling this request.

exception

java.lang.RuntimeException: org.apache.cxf.interceptor.Fault: org/apache/commons/codec/DecoderException
    org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:116)
    org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:331)
    org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
    org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:239)
    org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)
    org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:203)
    org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:137)
    org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:158)
    org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:243)
    org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:168)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
    org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:219)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

1 个答案:

答案 0 :(得分:0)

起初,我的lib中有一个损坏的JAR并用正确的JAR替换它让我上面的错误说错了class / JAR.I从http://apache.arvixe.com//commons/codec/binaries/下载了丢失的JAR并修复了我的问题