0

I got some error from Struts based project in my Eclipse

java.lang.NoClassDefFoundError: org/bouncycastle/asn1/ASN1OctetString 

What kind of error is this can any one explain it?

Roman C
  • 49,761
  • 33
  • 66
  • 176

2 Answers2

0

The error isn't org/bouncycastle/asn1/ASN1OctetString, it's NoClassDefFoundError. It means that the org/bouncycastle/asn1/ASN1OctetString class couldn't be found in any of the directories or jars in your CLASSPATH. From the linked docs:

Thrown if the Java Virtual Machine or a ClassLoader instance tries to load in the definition of a class (as part of a normal method call or as part of creating a new instance using the new expression) and no definition of the class could be found.

T.J. Crowder
  • 1,031,962
  • 187
  • 1,923
  • 1,875
0

The file are you looking is from The Legion of the Bouncy Castle

Legion of the Bouncy Castle Java Cryptography APIs Description:

The Bouncy Castle Crypto package is a Java implementation of cryptographic algorithms. The package is organised so that it contains a light-weight API suitable for use in any environment (including the newly released J2ME) with the additional infrastructure to conform the algorithms to the JCE framework.

The file is also downloadable from maven repository here.

You have error because this file is not available in the Java classpath. Download the file and put it into WEB-INF/lib.

Roman C
  • 49,761
  • 33
  • 66
  • 176