Oh awesome. I am implementing jax-ws. Yes please. On Jul 23, 2014 7:16 PM, "Sergey Beryozkin" <[email protected]> wrote:
> Hi > On 23/07/14 04:10, Dudley Butt wrote: > >> Indeed, I have a common jar I have to use and its referencing 2.7. I've >> tried excluding it but still seems to hang around. Is there any other way >> I >> can use bean-validator using CXF 2.7? >> I've used it successfully with the Hibernate 4 implementation using JAX-RS >> and SPRING MVC/WS 3.0.7, no CXF. >> Must be a way in CXF 2.7? >> >> CXF 3.0.0 introduces the feature, but users can definitely do it in CXF > 2.7.x. One needs to create a custom CXF interceptor or may be even simpler, > custom invoker, register it with the endpoint. Custom invoker has the > access to the service object instance and method parameter values as well > to the response object, so you can get it all validated by delegating to > Hibernate > > Do you need it for JAX-WS or JAX-RS ? > > Cheers, Sergey > > >> >> On 23 July 2014 09:01, Dudley Butt <[email protected]> >> wrote: >> >> Hi Sergey, >>> >>> Thank you for the response. I have double checked my libs on my >>> classpath. >>> Might be including a 2.7 one via another dependency, trying to track it >>> down now. >>> BTW, I see we are still on Spring 3.0.7, I see CXF 3 prefers a higher >>> version, or should it work on 3.0.7? >>> >>> regards >>> Dudley >>> >>> >>> On 22 July 2014 20:18, Sergey Beryozkin <[email protected]> wrote: >>> >>> Hi >>>> >>>> This method is available, see >>>> >>>> https://fisheye6.atlassian.com/browse/~tag=cxf-3.0.0/cxf/ >>>> core/src/main/java/org/apache/cxf/service/invoker/ >>>> FactoryInvoker.java?r= >>>> 9db7dec8dfe58a4add1b22898997e4c6e25f17d9 >>>> >>>> You may have CXF 2.7.x loaded somewhere ? >>>> >>>> Cheers, Sergey >>>> >>>> >>>> On 22/07/14 12:48, Dudley Butt wrote: >>>> >>>> Hi all, >>>>> >>>>> I've been trying to get this working for ages, please could someone >>>>> maybe >>>>> give me a pointer here. >>>>> I've followed this guide --> >>>>> http://cxf.apache.org/docs/validationfeature.html >>>>> >>>>> For the life of me, every-time I try access my service, it gives me >>>>> this >>>>> stack trace. >>>>> I have the right libs, I just cant see what on earth is causing this. >>>>> >>>>> Please help. >>>>> >>>>> </b> <u>The server encountered an internal error that prevented it from >>>>> fulfilling this request.</u></p><p><b>exception</b> >>>>> <pre>javax.servlet.ServletException: Servlet execution threw an >>>>> exception >>>>> org.apache.tomcat.websocket.server.WsFilter.doFilter( >>>>> WsFilter.java:52) >>>>> </pre></p><p><b>root cause</b> <pre>java.lang.NoSuchMethodError: >>>>> org.apache.cxf.service.invoker.FactoryInvoker.isSingletonFactory()Z >>>>> >>>>> org.apache.cxf.validation.AbstractValidationInterceptor. >>>>> getServiceObject(AbstractValidationInterceptor.java:90) >>>>> org.apache.cxf.validation.BeanValidationInInterceptor. >>>>> getServiceObject( >>>>> BeanValidationInInterceptor.java:38) >>>>> >>>>> org.apache.cxf.validation.AbstractValidationInterceptor.handleMessage( >>>>> AbstractValidationInterceptor.java:60) >>>>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept( >>>>> PhaseInterceptorChain.java:272) >>>>> >>>>> 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:248) >>>>> org.apache.cxf.transport.servlet.ServletController. >>>>> invoke(ServletController.java:222) >>>>> >>>>> org.apache.cxf.transport.servlet.ServletController. >>>>> invoke(ServletController.java:153) >>>>> org.apache.cxf.transport.servlet.CXFNonSpringServlet. >>>>> invoke(CXFNonSpringServlet.java:167) >>>>> >>>>> org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest( >>>>> AbstractHTTPServlet.java:286) >>>>> org.apache.cxf.transport.servlet.AbstractHTTPServlet. >>>>> doPost(AbstractHTTPServlet.java:206) >>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:646) >>>>> org.apache.cxf.transport.servlet.AbstractHTTPServlet. >>>>> service(AbstractHTTPServlet.java:262) >>>>> org.apache.tomcat.websocket.server.WsFilter.doFilter( >>>>> WsFilter.java:52) >>>>> </pre></p><p><b>note</b> <u>The full stack trace of the root cause is >>>>> available in the Apache Tomcat/7.0.54 logs.</u></p><HR size="1" >>>>> noshade="noshade"><h3>Apache Tomcat/7.0.54</h3></body></html> >>>>> >>>>> >>>>> >>>> -- >>>> Sergey Beryozkin >>>> >>>> Talend Community Coders >>>> http://coders.talend.com/ >>>> >>>> Blog: http://sberyozkin.blogspot.com >>>> >>>> >>> >>> >> > >
