title: spring-boot-security 2.2.5 - java.lang.NoClassDefFoundError:org/bouncycastle/crypto/params/Argon2Parameters
body: <p>I am using spring boot security version 2.2.5.RELEASE in that , I am creating a custom password encoder with Argon2PasswordEncoder as my password encoder. </p>
  
  <p>In this when i run, can see following error in the Argon2PasswordEncoder.java where i can see these two imports are missing,</p>
  
  <pre><code>import org.bouncycastle.crypto.generators.Argon2BytesGenerator;
  import org.bouncycastle.crypto.params.Argon2Parameters;
  </code></pre>
  
  <p><strong>Error:</strong></p>
  
  <pre><code>java.lang.NoClassDefFoundError: org/bouncycastle/crypto/params/Argon2Parameters$Builder
      at org.springframework.security.crypto.argon2.Argon2PasswordEncoder.encode(Argon2PasswordEncoder.java:78) ~[spring-security-core-5.2.2.RELEASE.jar:5.2.2.RELEASE]
      at com.custom.CustomPasswordEncoder.encode(CustomPasswordEncoder.java:11)
  </code></pre>
  
  <p>Please suggest me want to do, am I missing some dependency or its the spring boot version issue. And also how to overcome.
  Many thanks.</p>