title: CXF-SOAP-SPRING deployment bean creation exception:Error creating bean with name 'accountDetailsService':
body: <p>Tomcat log file says: </p>
  
  <p><strong>SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
  org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'accountDetailsService': Invocation of init method failed; nested exception is java.lang.NoSuchFieldError: REFLECTION</strong></p>
  
  <p>applicationContext.xml:</p>
  
  <pre><code>`&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:context="http://www.springframework.org/schema/context"
   xmlns:util="http://www.springframework.org/schema/util"
   xmlns:p="http://www.springframework.org/schema/p"
   xmlns:jaxws="http://cxf.apache.org/jaxws"
   xmlns:jaxrs="http://cxf.apache.org/jaxrs"
   xsi:schemaLocation="
   http://www.springframework.org/schema/beans
   http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
   http://www.springframework.org/schema/context
   http://www.springframework.org/schema/context/spring-context-2.5.xsd/spring-spring-context-3.1.xsd-3.1.2.RELEASE.xsd
   http://www.springframework.org/schema/util
    http://www.springframework.org/schema/util/spring-util-3.1.xsd
    http://cxf.apache.org/jaxws
    http://cxf.apache.org/schemas/jaxws.xsd
    http://cxf.apache.org/jaxrs
    http://cxf.apache.org/schemas/jaxrs.xsd"&gt;
    &lt;import resource="classpath:META-INF/cxf/cxf.xml" /&gt;
    &lt;import resource="classpath:META-INF/cxf/cxf-servlet.xml" /&gt;
    &lt;jaxws:endpoint id="accountDetailsService"
     implementor="com.ctl.prepay.account.webservice.impl.AccountDetailsServiceImpl"
     address="/account"/&gt; 
  &lt;/beans&gt;`
  </code></pre>
  
  <p>web.xml:</p>
  
  <pre><code> &lt;?xml version="1.0" encoding="UTF-8"?&gt;
      &lt;web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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;account&lt;/display-name&gt;    
          &lt;!-- the session timeout --&gt;
          &lt;session-config&gt;
              &lt;session-timeout&gt;30&lt;/session-timeout&gt;
          &lt;/session-config&gt;    
          &lt;!-- welcome files --&gt;
          &lt;welcome-file-list&gt;
              &lt;welcome-file&gt;account.jsp&lt;/welcome-file&gt;
          &lt;/welcome-file-list&gt;    
          &lt;context-param&gt;
          &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
              &lt;param-value&gt;/WEB-INF/applicationContext.xml&lt;/param-value&gt;
          &lt;/context-param&gt;
          &lt;servlet&gt;
          &lt;servlet-name&gt;CXFServlet&lt;/servlet-name&gt;
          &lt;servlet-class&gt;org.apache.cxf.transport.servlet.CXFServlet&lt;/servlet-class&gt;
        &lt;/servlet&gt; 
        &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;CXFServlet&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/ws/*&lt;/url-pattern&gt;
        &lt;/servlet-mapping&gt;  
          &lt;listener&gt;
                  &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
          &lt;/listener&gt; 
           &lt;listener&gt;
              &lt;listener-class&gt;org.springframework.web.context.request.RequestContextListener&lt;/listener-class&gt;
          &lt;/listener&gt;    
          &lt;/web-app&gt;`
  </code></pre>
  
  <p>pom.xml:</p>
  
  <pre><code>&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/xsd/maven-4.0.0.xsd"&gt;
          &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
        &lt;groupId&gt;account&lt;/groupId&gt;
          &lt;artifactId&gt;account&lt;/artifactId&gt;
          &lt;packaging&gt;war&lt;/packaging&gt;
          &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  
  
      &lt;!--needs to be checked the requirement  --&gt;
          &lt;name&gt;account&lt;/name&gt;
          &lt;url&gt;http://maven.apache.org&lt;/url&gt;
  
  
          &lt;properties&gt;
              &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;    
              &lt;org.springframework.version&gt;3.2.8.RELEASE&lt;/org.springframework.version&gt;
          &lt;/properties&gt;
  
  
          &lt;dependencies&gt;
          &lt;!--to solve the errror  --&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;3.0.1&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.0.1&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;3.0.1&lt;/version&gt;
              &lt;/dependency&gt;
  
              &lt;dependency&gt;
                  &lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;
                  &lt;artifactId&gt;cxf-bundle-jaxrs&lt;/artifactId&gt;
                  &lt;version&gt;2.7.15&lt;/version&gt;
              &lt;/dependency&gt;
  
              &lt;dependency&gt;
                  &lt;groupId&gt;org.apache.felix&lt;/groupId&gt;
                  &lt;artifactId&gt;org.osgi.core&lt;/artifactId&gt;
                  &lt;version&gt;1.2.0&lt;/version&gt;
              &lt;/dependency&gt;
  
              &lt;dependency&gt;
                  &lt;groupId&gt;org.apache.felix&lt;/groupId&gt;
                  &lt;artifactId&gt;org.osgi.compendium&lt;/artifactId&gt;
                  &lt;version&gt;1.2.0&lt;/version&gt;
                  &lt;exclusions&gt;
                      &lt;exclusion&gt;
                          &lt;groupId&gt;org.apache.felix&lt;/groupId&gt;
                          &lt;artifactId&gt;org.osgi.foundation&lt;/artifactId&gt;
                      &lt;/exclusion&gt;
                  &lt;/exclusions&gt;
              &lt;/dependency&gt;
  
              &lt;dependency&gt;
                  &lt;groupId&gt;org.springframework&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-core&lt;/artifactId&gt;
                  &lt;version&gt;${org.springframework.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;3.0.4.RELEASE&lt;/version&gt;
              &lt;/dependency&gt;
  
  
              &lt;dependency&gt;
                  &lt;groupId&gt;org.springframework&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-beans&lt;/artifactId&gt;
                  &lt;version&gt;${org.springframework.version}&lt;/version&gt;
              &lt;/dependency&gt;
  
              &lt;dependency&gt;
                  &lt;groupId&gt;org.springframework&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-context&lt;/artifactId&gt;
                  &lt;version&gt;${org.springframework.version}&lt;/version&gt;
              &lt;/dependency&gt;
  
              &lt;dependency&gt;
                  &lt;groupId&gt;org.springframework&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-jdbc&lt;/artifactId&gt;
                  &lt;version&gt;${org.springframework.version}&lt;/version&gt;
              &lt;/dependency&gt;
  
              &lt;dependency&gt;
                  &lt;groupId&gt;com.oracle&lt;/groupId&gt;
                  &lt;artifactId&gt;ojdbc14&lt;/artifactId&gt;
                  &lt;version&gt;10.2.0.4.0&lt;/version&gt;
              &lt;/dependency&gt;
  
              &lt;dependency&gt;
                  &lt;groupId&gt;org.apache.httpcomponents&lt;/groupId&gt;
                  &lt;artifactId&gt;httpclient&lt;/artifactId&gt;
                  &lt;version&gt;4.1.1&lt;/version&gt;
              &lt;/dependency&gt;
  
              &lt;dependency&gt;
                    &lt;groupId&gt;exml&lt;/groupId&gt;
                    &lt;artifactId&gt;exml&lt;/artifactId&gt;
                    &lt;version&gt;7.0&lt;/version&gt;
             &lt;/dependency&gt;
  
             &lt;dependency&gt;
                  &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
                  &lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;
                  &lt;version&gt;1.7.12&lt;/version&gt;
              &lt;/dependency&gt;
  
              &lt;!-- JUnit --&gt;
            &lt;dependency&gt;
                  &lt;groupId&gt;junit&lt;/groupId&gt;
                  &lt;artifactId&gt;junit&lt;/artifactId&gt;
                  &lt;version&gt;4.11&lt;/version&gt;
                  &lt;scope&gt;test&lt;/scope&gt;
              &lt;/dependency&gt;
  
               &lt;dependency&gt;
                  &lt;groupId&gt;exml&lt;/groupId&gt;
                  &lt;artifactId&gt;exml&lt;/artifactId&gt;
                  &lt;version&gt;7.0&lt;/version&gt;
              &lt;/dependency&gt;
  
      &lt;!-- hibernate services --&gt;
  
              &lt;dependency&gt;
                  &lt;groupId&gt;taglibs&lt;/groupId&gt;
                  &lt;artifactId&gt;standard&lt;/artifactId&gt;
                  &lt;version&gt;1.1.2&lt;/version&gt;
              &lt;/dependency&gt;
  
              &lt;dependency&gt;
                  &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
                  &lt;artifactId&gt;jstl&lt;/artifactId&gt;
                  &lt;version&gt;1.1.2&lt;/version&gt;
              &lt;/dependency&gt;
  
              &lt;dependency&gt;
                  &lt;groupId&gt;commons-dbcp&lt;/groupId&gt;
                  &lt;artifactId&gt;commons-dbcp&lt;/artifactId&gt;
                  &lt;version&gt;20030825.184428&lt;/version&gt;
              &lt;/dependency&gt;
  
              &lt;dependency&gt;
                  &lt;groupId&gt;commons-pool&lt;/groupId&gt;
                  &lt;artifactId&gt;commons-pool&lt;/artifactId&gt;
                  &lt;version&gt;20030825.183949&lt;/version&gt;
              &lt;/dependency&gt;
  
              &lt;dependency&gt;
                  &lt;groupId&gt;org.hibernate.javax.persistence&lt;/groupId&gt;
                  &lt;artifactId&gt;hibernate-jpa-2.0-api&lt;/artifactId&gt;
                  &lt;version&gt;1.0.1.Final&lt;/version&gt;
              &lt;/dependency&gt;
  
              &lt;dependency&gt;
                  &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
                  &lt;artifactId&gt;hibernate-entitymanager&lt;/artifactId&gt;
                  &lt;version&gt;4.2.4.Final&lt;/version&gt;
                  &lt;exclusions&gt;
                      &lt;exclusion&gt;
                          &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
                          &lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;
                      &lt;/exclusion&gt;
                  &lt;/exclusions&gt;
              &lt;/dependency&gt;
  
              &lt;!--  --&gt;
  
  
               &lt;!--     &lt;dependency&gt;
                       &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
                       &lt;artifactId&gt;javax.servlet-api&lt;/artifactId&gt;
                       &lt;version&gt;3.0.1&lt;/version&gt;
                       &lt;scope&gt;provided&lt;/scope&gt;
                  &lt;/dependency&gt;
                   --&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
                  &lt;artifactId&gt;servlet-api&lt;/artifactId&gt;
                  &lt;version&gt;2.5&lt;/version&gt;
                  &lt;scope&gt;provided&lt;/scope&gt;
              &lt;/dependency&gt;
  
              &lt;dependency&gt;
                  &lt;groupId&gt;javax.servlet.jsp&lt;/groupId&gt;
                  &lt;artifactId&gt;jsp-api&lt;/artifactId&gt;
                  &lt;version&gt;2.1&lt;/version&gt;
                  &lt;scope&gt;provided&lt;/scope&gt;
              &lt;/dependency&gt;
  
  
          &lt;/dependencies&gt;
  
              &lt;build&gt;
              &lt;plugins&gt;
                  &lt;plugin&gt;
                      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                      &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                      &lt;version&gt;2.3.1&lt;/version&gt;
                      &lt;configuration&gt;
                          &lt;source&gt;1.7&lt;/source&gt;
                          &lt;target&gt;1.7&lt;/target&gt;
                          &lt;encoding&gt;${project.build.sourceEncoding}&lt;/encoding&gt;
                      &lt;/configuration&gt;
                  &lt;/plugin&gt;
  
  
                  &lt;plugin&gt;
                      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                      &lt;artifactId&gt;maven-resources-plugin&lt;/artifactId&gt;
                      &lt;version&gt;2.4.3&lt;/version&gt;
                      &lt;configuration&gt;
                          &lt;encoding&gt;${project.build.sourceEncoding}&lt;/encoding&gt;
                      &lt;/configuration&gt;
                  &lt;/plugin&gt;
  
              &lt;/plugins&gt;
  
               &lt;finalName&gt;account&lt;/finalName&gt;
          &lt;/build&gt;
  
  
  
  
      &lt;/project&gt;
  </code></pre>