title: Spring initialization failure related with CXF 2.4.10
body: <p>We have a working system with following technologies </p>
  
  <pre><code>&lt;spring-version&gt;3.0.1.RELEASE&lt;/spring-version&gt;
  &lt;quartz-version&gt;1.5.2&lt;/quartz-version&gt;
  &lt;axi2-version&gt;1.5.4&lt;/axi2-version&gt;
  &lt;cxf.version&gt;2.2.12&lt;/cxf.version&gt;
  </code></pre>
  
  <p>But after I tried to upgrade our dependencies some binding problems occured and I couldn't find any answer on web so I'm looking for help.</p>
  
  <p>I upgraded spring and quartz successfully, but when I tired to upgrade cxf it became a nightmare.</p>
  
  <p>Now we are running on Spring 3.2.0.RELEASE with Quartz 1.8.6 but we can not go any higher than cxf 2.3.11,</p>
  
  <p>When I tired to use cxf 2.7.2 first I had some conflicts about XmlSchema (method not found exception), I overcome it by excluding old version from axis2 dependencies (XmlSchema 1.4.3) and imported latest version xmlschema-core 2.0.3 and problem solved. </p>
  
  <p>But I started to get the following exception, this is happening immediatly after going upper than cxf 2.3.11.</p>
  
  <pre><code>    Oca 24, 2013 5:36:38 PM org.apache.catalina.core.StandardContext listenerStart
      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 'userService': Invocation of init method failed; nested exception is javax.xml.ws.WebServiceException: java.lang.NullPointerException
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1486)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
          at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
          at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
          at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
          at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
          at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:607)
          at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
          at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
          at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:383)
          at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)
          at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
          at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4323)
          at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4780)
          at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
          at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:785)
          at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:763)
          at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:557)
          at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1124)
          at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1047)
          at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:542)
          at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1390)
          at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:355)
          at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
          at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)
          at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:313)
          at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:293)
          at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:996)
          at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:771)
          at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
          at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:988)
          at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:275)
          at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
          at org.apache.catalina.core.StandardService.startInternal(StandardService.java:427)
          at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
          at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:649)
          at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
          at org.apache.catalina.startup.Catalina.start(Catalina.java:585)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:601)
          at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
          at com.googlecode.t7mp.RunMojo.execute(RunMojo.java:52)
          at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
          at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
          at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
          at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
          at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
          at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:601)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
          at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
      Caused by: javax.xml.ws.WebServiceException: java.lang.NullPointerException
          at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:357)
          at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:246)
          at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:525)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:601)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1612)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1553)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1483)
          ... 65 more
      Caused by: java.lang.NullPointerException
          at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createBindingInfo(AbstractWSDLBasedEndpointFactory.java:338)
          at org.apache.cxf.jaxws.JaxWsServerFactoryBean.createBindingInfo(JaxWsServerFactoryBean.java:181)
          at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpointInfo(AbstractWSDLBasedEndpointFactory.java:258)
          at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:143)
          at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:159)
          at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:207)
          at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:442)
          at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:329)
          ... 74 more
  
      Oca 24, 2013 5:36:38 PM org.apache.catalina.core.StandardContext startInternal
      SEVERE: Error listenerStart
      Oca 24, 2013 5:36:38 PM org.apache.catalina.core.StandardContext startInternal
      SEVERE: Context [/mpp] startup failed due to previous errors
      Oca 24, 2013 5:36:38 PM org.apache.catalina.core.ApplicationContext log
      INFO: Closing Spring root WebApplicationContext
      Oca 24, 2013 5:36:38 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
      SEVERE: The web application [/mpp] registered the JBDC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
      Oca 24, 2013 5:36:38 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
      SEVERE: The web application [/mpp] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak.
  </code></pre>
  
  <p>I have already read the migration documantation but coudnt find any answer regarding to my problem.</p>
  
  <p>This is what my shortnened pom.xml looks like</p>
  
  <pre><code>    &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;spring-version&gt;3.2.0.RELEASE&lt;/spring-version&gt;
          &lt;cxf.version&gt;2.6.0&lt;/cxf.version&gt;
          &lt;aspectjrt-version&gt;1.6.2&lt;/aspectjrt-version&gt;
          &lt;aspectjweaver-version&gt;1.5.0&lt;/aspectjweaver-version&gt;
          &lt;log4j-version&gt;1.2.17&lt;/log4j-version&gt;
      &lt;/properties&gt;
  
      &lt;dependencies&gt;
  
          &lt;!-- CXF Dependencies --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;
              &lt;artifactId&gt;cxf-api&lt;/artifactId&gt;
              &lt;version&gt;${cxf.version}&lt;/version&gt;
              &lt;scope&gt;compile&lt;/scope&gt;
          &lt;/dependency&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-transports-http&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-ws-security&lt;/artifactId&gt;
              &lt;version&gt;${cxf.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Spring Dependencies --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-web&lt;/artifactId&gt;
              &lt;version&gt;${spring-version}&lt;/version&gt;
              &lt;scope&gt;compile&lt;/scope&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;${spring-version}&lt;/version&gt;
              &lt;type&gt;pom&lt;/type&gt;
              &lt;scope&gt;compile&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-aop&lt;/artifactId&gt;
              &lt;version&gt;${spring-version}&lt;/version&gt;
              &lt;type&gt;pom&lt;/type&gt;
              &lt;scope&gt;compile&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-context-support&lt;/artifactId&gt;
              &lt;version&gt;${spring-version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.ws.xmlschema&lt;/groupId&gt;
              &lt;artifactId&gt;xmlschema-core&lt;/artifactId&gt;
              &lt;version&gt;2.0.3&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  </code></pre>
  
  <p>This is my webservice interface</p>
  
  <pre><code>    @WebService(name="UserWSImplService", targetNamespace = "http://user.services.ws.fourplay.com.tr/")
      public interface UserWSIF
  </code></pre>
  
  <p>This is my webservice implementation</p>
  
  <pre><code>    @WebService(endpointInterface = "tr.com.fourplay.ws.services.user.UserWSIF")
      public class UserWSImpl implements UserWSIF
  </code></pre>
  
  <p>This is my config xml</p>
  
  <pre><code>    &lt;bean id="userDBImpl" class="tr.com.fourplay.db.services.user.UserDBImpl" /&gt;
      &lt;bean id="userSrv" class="tr.com.fourplay.ws.services.user.UserWSImpl" &gt;
          &lt;property name="dbImpl" ref="userDBImpl" /&gt;
      &lt;/bean&gt;
  
      &lt;jaxws:endpoint id="userService" implementor="#userSrv" address="/userService" &gt;
      &lt;/jaxws:endpoint&gt;
  </code></pre>
  
  <p>This is my web.xml</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="UTF-8"?&gt;
      &lt;web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
               http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"&gt;
  
          &lt;display-name&gt;Mobile Service Platform&lt;/display-name&gt;
  
          &lt;listener&gt;
              &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
          &lt;/listener&gt;
  
          &lt;context-param&gt;
              &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
              &lt;param-value&gt;
                  classpath:application-context.xml
              &lt;/param-value&gt;
          &lt;/context-param&gt;
  
          &lt;servlet&gt;
              &lt;servlet-name&gt;CXFServlet&lt;/servlet-name&gt;
              &lt;display-name&gt;CXF Servlet&lt;/display-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;CXFServlet&lt;/servlet-name&gt;
              &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
          &lt;/servlet-mapping&gt;
  
      &lt;/web-app&gt;
  </code></pre>
  
  <p>Any help will be highly appriciated.</p>