Bouncy-castle integration in Websphere causing the following error

扶醉桌前 提交于 2019-12-25 11:49:11

问题


I am trying to configure bouncycastle in IBM Websphere App Server 7, my JRE Version is 1.6. I am getting the following error when trying to run the code:

Caused by: java.lang.ClassNotFoundException: sun.security.provider.Sun
                at java.net.URLClassLoader.findClass(URLClassLoader.java:434)
                at com.ibm.ws.bootstrap.ExtClassLoader.findClass(ExtClassLoader.java:191)
                at java.lang.ClassLoader.loadClass(ClassLoader.java:660)
                at com.ibm.ws.bootstrap.ExtClassLoader.loadClass(ExtClassLoader.java:111)
                at java.lang.ClassLoader.loadClass(ClassLoader.java:626)
                at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:62)
                at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:58)
                at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:511)
                at java.lang.ClassLoader.loadClass(ClassLoader.java:626)
                at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:543)
                at java.lang.ClassLoader.loadClass(ClassLoader.java:626)
                ... 47 more

I have tried the following:

  1. Placing bcprov-jdk15-145 in jre/lib/ext
  2. Placing bouncycastle-1.20 in project lib.
  3. Adding the following entry at the end in java.security file - security.provider.10=org.bouncycastle.jce.provider.BouncyCastleProvider
  4. Placed Sun JSSE jars in server's Runtime Folder

回答1:


Refer to example provided in http://www.jasypt.org/non-default-providers.html. Somewhere you have to code to choose the provider as BouncyCastleProvider in your code. Currently by default it is not picking that.




回答2:


Third party JCE Providers (including Sun JCE) are not supported in IBM WebSphere Application Server.

Get ready for weird issues in your server if you continue using them...



来源:https://stackoverflow.com/questions/44105570/bouncy-castle-integration-in-websphere-causing-the-following-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!