Results 1 to 1 of 1
  1. #1
    newnewgen is offline Member
    Join Date
    May 2010
    Posts
    2
    Rep Power
    0

    Default java.lang.NoClassDefFoundError Using eclipse

    Hi,

    I am using eclipse 3.4.0 version.

    I am trying to send a mail through java program, But i get the following error.

    exception_name = java.lang.NoClassDefFoundError
    exception_message = javax.mail.Session
    script_name = Script6
    script_id = Script6.java
    line_number = 40
    exception_stack = at Script6.testMain(Script6.java:40)
    at org.eclipse.equinox.internal.app.EclipseAppContain er.callMethodWithException(EclipseAppContainer.jav a:574)
    at org.eclipse.equinox.internal.app.EclipseAppHandle. run(EclipseAppHandle.java:195)
    at org.eclipse.core.runtime.internal.adaptor.EclipseA ppLauncher.runApplication(EclipseAppLauncher.java: 110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseA ppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.ru n(EclipseStarter.java:382)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.ru n(EclipseStarter.java:179)
    at org.eclipse.equinox.launcher.Main.invokeFramework( Main.java:549)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.ja va:504)
    at org.eclipse.equinox.launcher.Main.run(Main.java:12 36)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1 212)
    at org.eclipse.core.launcher.Main.main(Main.java:30)
    at com.rational.test.ft.util.FtClassLoader.loadClass( FtClassLoader.java:160)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:6 09)

    I have added the following jar files in

    Java->Build Path->classpath variables {I have configured it}

    activation 1.1.1.jar
    dsn.jar
    imap.jar
    mail.jar
    mailapi.jar
    pop3.jar
    smtp.jar

    project->Java Build path
    activation1.1.1.jar
    imap.jar
    mail.jar
    smtp.jar

    Or is there any firewall, due to which the session api is not working?

    Following are only 3 lines of code.
    // Set the host smtp address
    Properties props = new Properties();
    props.put("mail.smtp.host", "172.194.82.106");
    Session session = Session.getDefaultInstance(props, null);
    session.setDebug(false);

    Any help...

    thanks in advance

    regards
    bharat
    Attached Thumbnails Attached Thumbnails java.lang.NoClassDefFoundError Using eclipse-config1.jpg   java.lang.NoClassDefFoundError Using eclipse-config.jpg   java.lang.NoClassDefFoundError Using eclipse-config2.jpg  

Similar Threads

  1. Replies: 8
    Last Post: 08-07-2009, 12:47 PM
  2. Replies: 1
    Last Post: 04-07-2009, 11:50 AM
  3. Using Eclipse IDE:java.lang.NoClassDefFoundError: main
    By Ms.Ranjan in forum New To Java
    Replies: 6
    Last Post: 12-12-2008, 11:17 PM
  4. Replies: 5
    Last Post: 09-03-2008, 06:29 PM
  5. java.lang.NoClassDefFoundError
    By J_a_y in forum New To Java
    Replies: 2
    Last Post: 08-07-2007, 12:51 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
  •