java.lang.ClassNotFoundException: org.apache.cxf.transport.servlet.CXFServlet
<p>I am new to Apache CXF and I was trying to deploy a sample CXF webservice in Jboss 9.0.1.  But I am continuosly getting the error  </p>

<p><strong>java.lang.ClassNotFoundException: org.apache.cxf.transport.servlet.CXFServlet.</strong> </p>

<p>I spent a lot of time to fix this issues. The things I have done so far are</p>

<p>1) Checked for the jar file cxf-rt-transports-http-<em>.</em>.*.jar. This is existing in my war file.<br>
2) Made parent last class loading in jboss by specifying the xml file jboss-classloading.xml</p>

<p>But still the same error exists. Attached the files</p>

<p><strong>web.xml</strong></p>

<pre><code>&lt;web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    version="2.5"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"&gt;
    &lt;display-name&gt;cxf&lt;/display-name&gt;
    &lt;servlet&gt;
        &lt;description&gt;Apache CXF Endpoint&lt;/description&gt;
        &lt;display-name&gt;cxf&lt;/display-name&gt;
        &lt;servlet-name&gt;cxf&lt;/servlet-name&gt;
        &lt;servlet-class&gt;org.apache.cxf.transport.servlet.CXFServlet&lt;/servlet-class&gt;
        &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
    &lt;/servlet&gt;
    &lt;servlet-mapping&gt;
        &lt;servlet-name&gt;cxf&lt;/servlet-name&gt;
        &lt;url-pattern&gt;/services/*&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
    &lt;session-config&gt;
        &lt;session-timeout&gt;60&lt;/session-timeout&gt;
    &lt;/session-config&gt;
&lt;/web-app&gt;
</code></pre>

<p><strong>cxf-servlet.xml</strong></p>

<pre><code>&lt;beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws"
    xmlns:soap="http://cxf.apache.org/bindings/soap"
    xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://cxf.apache.org/bindings/soap http://cxf.apache.org/schemas/configuration/soap.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"&gt;
    &lt;jaxws:server id="jaxwsService" serviceClass="demo.hw.server.HelloWorld"
        address="/hello_world"&gt;
        &lt;jaxws:serviceBean&gt;
            &lt;bean class="demo.hw.server.HelloWorldImpl" /&gt;
        &lt;/jaxws:serviceBean&gt;
    &lt;/jaxws:server&gt;
&lt;/beans&gt;
</code></pre>

<p><strong>pom.xml</strong></p>

<pre><code>&lt;?xml version="1.0"?&gt;
&lt;!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor 
    license agreements. See the NOTICE file distributed with this work for additional 
    information regarding copyright ownership. The ASF licenses this file to 
    you under the Apache License, Version 2.0 (the "License"); you may not use 
    this file except in compliance with the License. You may obtain a copy of 
    the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required 
    by applicable law or agreed to in writing, software distributed under the 
    License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 
    OF ANY KIND, either express or implied. See the License for the specific 
    language governing permissions and limitations under the License. --&gt;
&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;groupId&gt;demo.hw.server&lt;/groupId&gt;
    &lt;artifactId&gt;java_first_jaxws&lt;/artifactId&gt;
    &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
    &lt;packaging&gt;war&lt;/packaging&gt;
    &lt;name&gt;Java First demo using JAX-WS APIs&lt;/name&gt;
    &lt;description&gt;Java First demo using JAX-WS APIs&lt;/description&gt;
    &lt;properties&gt;
        &lt;cxf.version&gt;3.1.6&lt;/cxf.version&gt;
        &lt;cxf.release.base&gt;${basedir}/../..&lt;/cxf.release.base&gt;
    &lt;/properties&gt;
    &lt;dependencies&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;
            &lt;artifactId&gt;cxf-rt-frontend-jaxws&lt;/artifactId&gt;
            &lt;version&gt;${cxf.version}&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;
            &lt;artifactId&gt;cxf-rt-frontend-jaxrs&lt;/artifactId&gt;
            &lt;version&gt;3.1.6&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;
            &lt;artifactId&gt;cxf-rt-transports-http&lt;/artifactId&gt;
            &lt;version&gt;${cxf.version}&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.springframework&lt;/groupId&gt;
            &lt;artifactId&gt;spring-web&lt;/artifactId&gt;
            &lt;version&gt;4.1.6.RELEASE&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;
            &lt;artifactId&gt;cxf-rt-frontend-simple&lt;/artifactId&gt;
            &lt;version&gt;2.7.7&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;
            &lt;artifactId&gt;cxf-rt-core&lt;/artifactId&gt;
            &lt;version&gt;2.7.18&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;
            &lt;artifactId&gt;cxf-rt-databinding-aegis&lt;/artifactId&gt;
            &lt;version&gt;3.0.4&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;
            &lt;artifactId&gt;cxf-rt-transports-local&lt;/artifactId&gt;
            &lt;version&gt;3.1.6&lt;/version&gt;
        &lt;/dependency&gt;
    &lt;/dependencies&gt;
&lt;/project&gt;
</code></pre>