title: BasicDataSource is overridden by non-compatible bean instance of type UrlDecodingDataSource
body: <p>I tried to expose my Spring Restful web api to Pivotal Cloud Foundary, I successfully connected with Pivotal MySql database, in Local it is working fine but when I push the war in <code>PCF</code> it throws an exception</p>
  
  <pre><code>    nested exception is java.lang.IllegalStateException: @Bean method
   SpringBeanContainer.dataSource called as bean reference for type
   [org.apache.commons.dbcp2.BasicDataSource] but overridden by non-compatible
   bean instance of type [org.cloudfoundry.reconfiguration.org.springframework.cloud.service.relational.UrlDecodingDataSource].
  </code></pre>
  
  <p>I am new to cloud and i don't have an idea much about it, it seems that <code>UrlDecodingDataSource</code> tries to override something, due to this my <code>sessionFactory</code> is not able to create as bean.</p>
  
  <p><strong>Detailed Log</strong></p>
  
  <pre><code>      [OUT] org.springframework.beans.factory.UnsatisfiedDependencyException:
       Error creating bean with name 'loginController': Unsatisfied dependency
       expressed through field 'userDetailService'; nested exception is 
      org.springframework.beans.factory.UnsatisfiedDependencyException: 
  Error creating bean with name 'userDetailService': Unsatisfied dependency
   expressed through field 'uddDao'; nested exception is
   org.springframework.beans.factory.UnsatisfiedDependencyException: Error
   creating bean with name 'userDetailDaoImpl': Unsatisfied dependency expressed
   through field 'sessionFactory'; nested exception is
   org.springframework.beans.factory.BeanCreationException: Error creating bean
   with name 'sessionFactory' defined in
   com.javarnd.cc.configuration.SpringBeanContainer: Bean instantiation via
   factory method failed; nested exception is
   org.springframework.beans.BeanInstantiationException: Failed to instantiate
   [org.springframework.orm.hibernate5.LocalSessionFactoryBean]: Factory method
   'sessionFactory' threw exception; nested exception is
   java.lang.IllegalStateException: @Bean method SpringBeanContainer.dataSource
   called as bean reference for type [org.apache.commons.dbcp2.BasicDataSource]
   but overridden by non-compatible bean instance of type [org.cloudfoundry.reconfiguration.org.springframework.cloud.service.relational.UrlDecodingDataSource].
  </code></pre>
  
  <p><strong>DataSource snippet in my SpringBeanContainer</strong></p>
  
  <pre><code>@Bean // Simple Bean Defination in XML
      public BasicDataSource dataSource() {
          BasicDataSource dataSource = new BasicDataSource();
          dataSource.setDriverClassName(env.getProperty(DRIVER_CLASS));
          dataSource.setUrl(env.getProperty(URL));
          dataSource.setUsername(env.getProperty(USERNAME));
          dataSource.setPassword(env.getProperty(PASSWORD));
          return dataSource;
      }
  </code></pre>
  
  <p>Kindly help me to resolve this or sugge</p>