CXF - ClassCastException (SEIStub/ClientProxy)

Remove JAX-WS Libraries from buildpath, so this can resolves my problem that is (ClassCastException) SEIStub to ClientProxy.


The solution was to include a sun-web.xml (or glassfish-web.xml) file in the war WEB-INF. See How to pick CXF over Metro on Glassfish

EDIT

Contents of glassfish-web.xml:

<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE sun-web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Application Server 9.0 Servlet 2.5//EN' 
    'http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd'>

<glassfish-web-app>
    <!-- Need this to tell Glassfish not to load the JAX-WS RI classes so it will 
        use the CXF ones instead -->
    <class-loader delegate="false" />
</glassfish-web-app>