Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

NoClassDefFoundError using Bouncy Castle with J2ME [urgent]

843811Feb 19 2006 — edited Apr 6 2007
Hi. I'm working in a Midlet that deals with encrypt/decrypt messages. So I downloaded the Bouncy Castle's lightweight crypto API for J2ME to do the encryption/decryption, but I'm having problems in the running.

I found in Internet the source of a class that do exactly what I need, but when I run the application, I get the following error:

java.lang.NoClassDefFoundError: org/bouncycastle/crypto/CryptoException
at com.sun.midp.midlet.MIDletState.createMIDlet(+14)
at com.sun.midp.midlet.Scheduler.schedule(+52)
at com.sun.midp.main.Main.runLocalClass(+28)
at com.sun.midp.main.Main.main(+116)

That's not the class fault, I tried to do some tests before and I've got the same problems. And this not happen only with the CryptoException class. I changed the code several times trying to solve the problem and the classes that are shown in the exception changes. I searched for similar problems with Bouncy Castle in J2ME, and I found one or two cases that was exactly like my problem, but with no solution. One of them was in this forum, but that was posted one year ago, so I decided to make a new post.

It's strange, becouse is like the VM don't find the classes in the path, but they are right there, where the error says. I tried everything, change/set the classpath, created a obfuscated package, downloaded the complete version of the Bouncy Castle, copied the source files to my project, but nothing works.

Im using the Eclipse IDE 3.1, with EclipseME plugin, the Sun's j2me wireless toolkit 2.2, and jdk1.5. I need this working until next week, so it's king of urgent. If someone knows the solution for this, i will be very grateful.

Regards
Fabiano
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 4 2007
Added on Feb 19 2006
11 comments
2,101 views