title: Spring oauth 2 {"error":"invalid_grant","error_description":"Bad credentials"}
body: <p>Here is my spring config:</p>
  
  <p>I have created a new user in MySQL table. It always works with the user <code>client1</code>
  but when a new user added, the above error (as in title) would be throw:</p>
  
  <blockquote>
    <p>Spring oauth 2 {"error":"invalid_grant","error_description":"Bad
    credentials"}</p>
  </blockquote>
  
  <p>In addition, I get 
  error while creating bean:</p>
  
  <blockquote>
    <p>'org.springframework.security.authenticationManager':  Unsatisfied
    dependency expressed through constructor argument with index 1 of type
    [org.springframework.security.authentication.AuthenticationManager]:
    Ambiguous constructor argument types
     - did you specify the correct bean references as constructor arguments?</p>
  </blockquote>
  
  <p>From the Spring trace log, I get:</p>
  
  <blockquote>
    <p>spring-security-oauth2
    2.0.6.RELEASE</p>
  </blockquote>
  
  <p>I am using JDBC store MySQL. </p>