Results 1 to 10 of 10
  1. #1
    aldm is offline Member
    Join Date
    Oct 2010
    Posts
    9
    Rep Power
    0

    Default java.lang.NoClassDefFoundError: javax/net/ssl/TrustManager

    Hi,

    I'm working one project in j2me and I have a following exception:

    java.lang.NoClassDefFoundError: javax/net/ssl/TrustManager

    Compiling is succesfull, but this exception occurs when aplication runs.
    I add jsse.jar (which contains TrustManager.class) to build path. I'm using Eclipse and there have no problems with running other application.

    What could be a problem?

    Thanks in advance,

    Amer

  2. #2
    aldm is offline Member
    Join Date
    Oct 2010
    Posts
    9
    Rep Power
    0

    Default

    Can anybody offer any kind of help???

  3. #3
    syst3m.tr0jan is offline Member
    Join Date
    Jan 2011
    Posts
    11
    Rep Power
    0

    Default

    extract the contents of the jsse.jar file using winrar and put the extracted files together with the .java file you are developing..

    hope this could help

  4. #4
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,431
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by syst3m.tr0jan View Post
    extract the contents of the jsse.jar file using winrar and put the extracted files together with the .java file you are developing..

    hope this could help
    Why would the OP need to do that? All that's needed is putting that other .jar file on the classpath.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  5. #5
    syst3m.tr0jan is offline Member
    Join Date
    Jan 2011
    Posts
    11
    Rep Power
    0

    Default

    i cant explain more about that because actually, thats just what i did when that error occurs when i try to load DB2Driver on the application ideveloped..

    when i put the .jar file on the classpath, still same exception was caught but when i extracted the files on that .jar file to the classpath, the connection was established..

  6. #6
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    OP, I strongly urge you to listen to Jos's recommendation and ignore syst3m. While the latter means well, is advice on this topic is off the mark.

  7. #7
    aldm is offline Member
    Join Date
    Oct 2010
    Posts
    9
    Rep Power
    0

    Default

    I put jsse.jar in the classapth, but it doesn't help. I put that in manifest file, so now manifest.mf looks like this:

    MIDlet-Name: IspisHTMLStranice
    MIDlet-Version: 1.0.0
    MIDlet-Vendor: Amer Zildzic
    Class-Path: lib/jsse.jar

    There is new line after last line (Class-Path...).

    jsse.jar is in lib folder inside my project...

  8. #8
    toadaly is offline Senior Member
    Join Date
    Jan 2009
    Posts
    671
    Rep Power
    6

    Default

    I think what might be going on is that jsse.jar contains shared objects and is implicitly expecting to find them in lib/ext. You might try moving jsse.jar to ${JAVA_HOME}/jre/lib/ext.

  9. #9
    aldm is offline Member
    Join Date
    Oct 2010
    Posts
    9
    Rep Power
    0

    Default

    I tried that, but it didn't work.
    In meantime, I find out that TustManager class cannot be used
    in j2me enviroment (only classic Java).

    Thank you all for your answers.

    BTW: Has anyone know how could I avoid ssl certificate
    verification in Java midlet?

    It would be great helo if somebody answer...

  10. #10
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,920
    Rep Power
    19

    Default

    You don't need to move that jar at all, surely?
    It's part of the SE.
    You shouldn't need to add it to the classpath or anything.

Similar Threads

  1. Replies: 2
    Last Post: 07-21-2012, 01:15 AM
  2. Replies: 5
    Last Post: 06-02-2010, 01:05 PM
  3. Replies: 3
    Last Post: 06-01-2010, 03:01 PM
  4. Replies: 0
    Last Post: 05-15-2010, 09:26 AM
  5. Replies: 6
    Last Post: 07-10-2008, 07:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •