I use BouncyCastle for encryption in my application. When I run it standalone, everything works fine. However, if I put it in the webapp and deploy on JBoss server, I get a
For those who don't want to change server level config,
adding the bouncy castle jars with use-physical-code-source worked for me