Using BouncyCastle J2ME encryption package in j2me midlet

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nickyeng
    Contributor
    • Nov 2006
    • 252

    Using BouncyCastle J2ME encryption package in j2me midlet

    I use Eclipse 3.2 which has j2me plug in.

    I use bouncycastle encryption package to encrypt a string that is going to SMS out to my company gateway.

    It runs well until i click "send" command, the error shown in console which is:
    Code:
    java.lang.NoClassDefFoundError: org/bouncycastle/crypto/PBEParametersGenerator
    	at MyApplication$HelpSelector.commandAction(+721)
    	at javax.microedition.lcdui.Display$DisplayAccessor.commandAction(+282)
    	at javax.microedition.lcdui.Display$DisplayManagerImpl.commandAction(+10)
    	at com.sun.midp.lcdui.DefaultEventHandler.commandEvent(+68)
    	at com.sun.midp.lcdui.AutomatedEventHandler.commandEvent(+47)
    	at com.sun.midp.lcdui.DefaultEventHandler$QueuedEventHandler.run(+250)
    Why it says NoClassDefFound Error ?
    How to fix this error ?

    any1 can help?
    please its urgent.

    thanks alot..
    from
    Nick
  • RedSon
    Recognized Expert Expert
    • Jan 2007
    • 4980

    #2
    Originally posted by nickyeng
    I use Eclipse 3.2 which has j2me plug in.

    I use bouncycastle encryption package to encrypt a string that is going to SMS out to my company gateway.

    It runs well until i click "send" command, the error shown in console which is:
    Code:
    java.lang.NoClassDefFoundError: org/bouncycastle/crypto/PBEParametersGenerator
    	at MyApplication$HelpSelector.commandAction(+721)
    	at javax.microedition.lcdui.Display$DisplayAccessor.commandAction(+282)
    	at javax.microedition.lcdui.Display$DisplayManagerImpl.commandAction(+10)
    	at com.sun.midp.lcdui.DefaultEventHandler.commandEvent(+68)
    	at com.sun.midp.lcdui.AutomatedEventHandler.commandEvent(+47)
    	at com.sun.midp.lcdui.DefaultEventHandler$QueuedEventHandler.run(+250)
    Why it says NoClassDefFound Error ?
    How to fix this error ?

    any1 can help?
    please its urgent.

    thanks alot..
    from
    Nick
    I think that comes from the class not being on the classpath or some other configuration error with java. Try asking this question in the Java forum to see what it comes up with.

    Comment

    • r035198x
      MVP
      • Sep 2006
      • 13225

      #3
      Originally posted by nickyeng
      I use Eclipse 3.2 which has j2me plug in.

      I use bouncycastle encryption package to encrypt a string that is going to SMS out to my company gateway.

      It runs well until i click "send" command, the error shown in console which is:
      Code:
      java.lang.NoClassDefFoundError: org/bouncycastle/crypto/PBEParametersGenerator
      	at MyApplication$HelpSelector.commandAction(+721)
      	at javax.microedition.lcdui.Display$DisplayAccessor.commandAction(+282)
      	at javax.microedition.lcdui.Display$DisplayManagerImpl.commandAction(+10)
      	at com.sun.midp.lcdui.DefaultEventHandler.commandEvent(+68)
      	at com.sun.midp.lcdui.AutomatedEventHandler.commandEvent(+47)
      	at com.sun.midp.lcdui.DefaultEventHandler$QueuedEventHandler.run(+250)
      Why it says NoClassDefFound Error ?
      How to fix this error ?

      any1 can help?
      please its urgent.

      thanks alot..
      from
      Nick
      If bouncycastle package is a .jar then you need to add it to your project's build path.

      Comment

      Working...