java.lang.NoClassDefFoundError: org.bouncycastle.jce.provider.BouncyCastleProvider
Asked Answered
M

3

10

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

Currently I have included this jar to my project lib and I am deploying it to WAS. So its throwing error:

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.

Can you please provide me guidance on this?

Manchu answered 2/4, 2015 at 5:39 Comment(4)
How do you build your war/ear?Peltate
Can we see the code where this error occursEnkindle
@kocko: I have developed stand alone pdf signature and its working properly. Then I have integrated that functionality with IBM Case manager Custom plugin. For this I have put the bouncy castle jar to the lib of my custom plugin project and registered it with build.xml.Manchu
Are you several years behind in patching? Please patch the sever to at least 8.5.5.x level.Croom
I
4

add this to pom.xml to overcome the following exception.

javax.servlet.ServletException: org.glassfish.jersey.server.ContainerException: 
   java.lang.NoClassDefFoundError: org/bouncycastle/jce/provider/BouncyCastleProvider
    org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:432)

Bouncy Castle Provider » 1.46

<dependency>
    <groupId>org.bouncycastle</groupId>
    <artifactId>bcprov-jdk16</artifactId>
    <version>1.46</version>
</dependency>
Injustice answered 25/5, 2020 at 13:35 Comment(0)
S
1

if you trying to execute it in CMD, make sure to you specify -providerpath correctly.

Sarajane answered 31/1, 2024 at 19:22 Comment(0)
H
0

If you using maven to build the app, then please add this as dependency in 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 )

Hydrostatics answered 2/4, 2015 at 6:24 Comment(1)
I am using ant to build the application and its external jar reference is added to its build.xmlManchu

© 2022 - 2025 — McMap. All rights reserved.