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?

Qiu
  • 5,651
  • 10
  • 49
  • 56
Bhavik vora
  • 274
  • 1
  • 3
  • 10

2 Answers2

3

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>
Yash
  • 9,250
  • 2
  • 69
  • 74
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 )

Selva
  • 230
  • 3
  • 17