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!

In what jar is: com.sun.activation.registries.MailCapFile located?

843830Mar 18 2004 — edited Mar 22 2004
I am attempting to implement JavaMail in an application in an OS400 environment. I simply want to send a text message (no attachements). My code works up to the point of: Transport.send(message); where I get a NoClassDefFound: com/sun/activation/registries/MailCapFile

Here's the code:
private void sendEmail(String recipient,String msg){
String smtpSvr = "xxx.yyyyyyyyy.com";
String subject = "Log Transfer Errors";
String from = "Helpdesk@DAKSOFT.com";
Properties p = System.getProperties();
p.put("mail.smtp.host",smtpSvr);
Session mailSession = Session.getDefaultInstance(p,null);
Message message = new MimeMessage(mailSession);
try {
message.setRecipients(Message.RecipientType.TO,InternetAddress.parse(recipient));
message.setFrom(new InternetAddress(from));
message.setSubject(subject);
message.setContent(msg,"text/plain");
Transport.send(message);
} catch (AddressException e) {
System.out.println(""+e);
} catch (MessagingException e) {
System.out.println(""+e);
} catch (Exception e) {
System.out.println(""+e);
}
}

I have JavaMail working fine in a servlet running in WebSphere 5.0 on the same OS400 v5r2.
Do I need to add another jar file to my CLASSPATH?? Don't know in what jar the:
com.sun.activation.registries.MailCapFile class is in????
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 19 2004
Added on Mar 18 2004
2 comments
508 views