java.lang.NoClassDefFoundError: org.bouncycastle.jce.provider.BouncyCastleProvider
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/29405727/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
java.lang.NoClassDefFoundError: org.bouncycastle.jce.provider.BouncyCastleProvider
提问by Bhavik vora
I am facing issue in configuring Bouncy Castle with my websphere
. I am working on pdf document signature and it requires dependency of Bouncy Castle. I am using websphere v8.5
, java 6
and bcprov-jdk15on-1.47.jar
我在配置 Bouncy Castle 时遇到了问题websphere
。我正在处理 pdf 文档签名,它需要依赖 Bouncy Castle。我正在使用websphere v8.5
,java 6
并且bcprov-jdk15on-1.47.jar
Currently I have included this jar to my project lib and I am deploying it to WAS. So its throwing error:
目前,我已将此 jar 包含到我的项目库中,并将其部署到 WAS。所以它的抛出错误:
java.lang.NoClassDefFoundError: org.bouncycastle.jce.provider.BouncyCastleProvider.
java.lang.NoClassDefFoundError: org.bouncycastle.jce.provider.BouncyCastleProvider。
After getting this error I have tried to configure Bouncy Castle to WAS
by putting bcprov-jdk15on-1.47.jar
to [WAS_HOME]/java/jre/lib/ext/
and updated java.security
. After that when I am starting application server but server is not starting.
收到这个错误我试图配置充气城堡后WAS
通过把bcprov-jdk15on-1.47.jar
以[WAS_HOME]/java/jre/lib/ext/
和更新java.security
。之后,当我启动应用程序服务器但服务器未启动时。
Can you please provide me guidance on this?
你能给我提供这方面的指导吗?
回答by Selva
If you using maven to build the app, then please add this as dependency in pom.xml.
如果您使用 maven 构建应用程序,那么请将其添加为 pom.xml 中的依赖项。
If you are using this jar as external reference from your File System, make sure to export it along with your war (in case of eclipse , you can set export option from build path lib )
如果您将此 jar 用作文件系统的外部引用,请确保将其与 war 一起导出(在 eclipse 的情况下,您可以从构建路径 lib 设置导出选项)
回答by glen mankabidi
add this
添加这个
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk16</artifactId>
<version>1.46</version>
</dependency>