Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

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: javax/mail/MessagingException

843834Apr 30 2010 — edited Apr 30 2010
Hi everybody.
My name is Wlady, i'm italian, venice.
I use NetBeans IDE 6.8, installed jdk1.6.0_20, javaMail 1.4.3 and jaf1.1.1.
I set my class path like this:
... C:\JAVA\javamail-1.4.3\mail.jar;C:\JAVA\jaf-1.1.1\activation.jar;C:\Program Files (x86)\java\jdk1.6.0_20\bin;C:\Program Files (x86)\java\jdk1.6.0_20\jre\bin;
and I try also copy mail.jar and activation.jar file in ext directory... with:
... C:\Program Files (x86)\java\jdk1.6.0_20\jre\lib\ext\mail.jar;C:\Program Files (x86)\java\jdk1.6.0_20\jre\lib\ext\activation.jar;

When I use NetBeans, my classes works very well... but when I try to launch the file producting by compileing "fileName.html", my JApplet do not appear in the browser.. this is the message..

java.lang.RuntimeException: java.lang.NoClassDefFoundError: javax/mail/MessagingException
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: javax/mail/MessagingException
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$12.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: javax.mail.MessagingException ECCC....

My JApplet is a Form.. simply questions to ask people if they like my website.
I applied a method (private void sendData(java.awt.event.ActionEvent evt) to a Jbutton..I use an addition class SendMailUsingAuthentication for use an object inside this method...

.....
SendMailUsingAuthentication send = new SendMailUsingAuthentication();
String a = evt.getActionCommand();
if(a.equals("sendData")){
try {
send.postMail(emailList, emailSubjectTxt, emailMsgTxt, emailFromAddress);
} catch (MessagingException ex) {
Logger.getLogger(Share.class.getName()).log(Level.SEVERE, null, ex);
}
.....

It works in NetBeans, I perfectly get email.
I use the Library Manager to create a library and add a reference to that library in my project too... but nothing.

Why my browser don't sees the classes?
Thank You.

Edited by: wladyVenice on Apr 30, 2010 1:57 PM

Edited by: wladyVenice on Apr 30, 2010 2:10 PM

Edited by: wladyVenice on Apr 30, 2010 2:13 PM

Edited by: wladyVenice on Apr 30, 2010 2:14 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 28 2010
Added on Apr 30 2010
3 comments
2,093 views