You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by fa...@oocl.com on 2004/09/07 16:40:43 UTC
Help with using commons-email
Hi all,
I'm a newbie, so please forgive me if this problem has already been addressed. I downloaded the commons-email from the Sandbox and wanted to try it out; but I could not get the example for the SimpleMail working. I kept getting the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: javax/mail/MessagingException
at SimpleMail.main(SimpleMail.java:10)
I have checked my Classpath multiple times and I have javamail-1.3.1 and jaf-1.0.2 and commons-lang in my classpath (using JDK 1.4.2_05 SE). So I wrote a simple email sender program without using the commons-email and it worked without a hitch (I'm using Eclipse 3 as my IDE).
So I guess, what I want to know is this a problem with the commons-email or is there something I am not doing.
Thanks for all the help.
Regards,
Farhan
IMPORTANT NOTICE
Email from OOCL Logistics is confidential and may be legally privileged. If it is not intended for you, please delete it immediately unread. The internet cannot guarantee that this communication is free of viruses, interception or interference and anyone who communicates with us by email is taken to accept the risks in so doing. Without limitation, OOCL Logistics and its affiliates accept no liability whatsoever and howsoever arising in connection with the use of this email. Under no circumstances shall this email constitute a binding agreement for provision of services by OOCL Logistics, which is subject to the standard terms and conditions of OOCL Logistics.
Re: Help with using commons-email
Posted by Joe Germuska <Jo...@Germuska.com>.
At 10:40 AM -0400 9/7/04, <fa...@oocl.com> wrote:
>Hi all,
>
>I'm a newbie, so please forgive me if this problem has already been
>addressed. I downloaded the commons-email from the Sandbox and
>wanted to try it out; but I could not get the example for the
>SimpleMail working. I kept getting the following error:
>
> Exception in thread "main" java.lang.NoClassDefFoundError:
>javax/mail/MessagingException
> at SimpleMail.main(SimpleMail.java:10)
>
>I have checked my Classpath multiple times and I have javamail-1.3.1
>and jaf-1.0.2 and commons-lang in my classpath (using JDK 1.4.2_05
>SE). So I wrote a simple email sender program without using the
>commons-email and it worked without a hitch (I'm using Eclipse 3 as
>my IDE).
>
>So I guess, what I want to know is this a problem with the
>commons-email or is there something I am not doing.
no need to apologize -- commons-email doesn't have a very high
profile, so not much has been addressed.
I have trouble seeing how it can be a problem with commons-email,
although if you wrote an app using JavaMail directly, then there's
clearly something strange going on.
Are you saying that those jars are on your classpath, as in part of
the CLASSPATH environment variable?
For what it's worth, I just wrote an extremely simple test class
(main method below) and ran it from within my IDE (JBuilder) and
didn't get any errors.
public static void main(String[] argv) throws MessagingException {
SimpleEmail msg = new SimpleEmail();
msg.setHostName("mail.jgsullivan.com");
msg.setFrom("Joe@Germuska.com");
msg.addTo("joe@germuska.com");
msg.setSubject("testing SimpleEmail");
msg.setMsg("This is a test");
msg.send();
}
So I think it's ultimately a local problem.
Joe
--
Joe Germuska
Joe@Germuska.com
http://blog.germuska.com
"In fact, when I die, if I don't hear 'A Love Supreme,' I'll turn
back; I'll know I'm in the wrong place."
- Carlos Santana
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
RE: Help with using commons-email
Posted by Eric Pugh <ep...@upstate.com>.
Commons email works, we use it over in Turbine land.. It is definitly a
classpath issue.. take a looksee in your jars and verify that you have the
javax.mail.MessengingException class somewhere...
> -----Original Message-----
> From: farhan.ahmed@oocl.com [mailto:farhan.ahmed@oocl.com]
> Sent: Tuesday, September 07, 2004 4:41 PM
> To: commons-dev@jakarta.apache.org
> Subject: Help with using commons-email
>
>
> Hi all,
>
> I'm a newbie, so please forgive me if this problem has already been
> addressed. I downloaded the commons-email from the Sandbox and wanted to
> try it out; but I could not get the example for the SimpleMail working.
> I kept getting the following error:
>
> Exception in thread "main" java.lang.NoClassDefFoundError:
> javax/mail/MessagingException
> at SimpleMail.main(SimpleMail.java:10)
>
> I have checked my Classpath multiple times and I have javamail-1.3.1 and
> jaf-1.0.2 and commons-lang in my classpath (using JDK 1.4.2_05 SE). So I
> wrote a simple email sender program without using the commons-email and
> it worked without a hitch (I'm using Eclipse 3 as my IDE).
>
> So I guess, what I want to know is this a problem with the commons-email
> or is there something I am not doing.
>
> Thanks for all the help.
>
> Regards,
> Farhan
>
>
> IMPORTANT NOTICE
> Email from OOCL Logistics is confidential and may be legally privileged.
> If it is not intended for you, please delete it immediately unread. The
> internet cannot guarantee that this communication is free of viruses,
> interception or interference and anyone who communicates with us by
> email is taken to accept the risks in so doing. Without limitation,
> OOCL Logistics and its affiliates accept no liability whatsoever and
> howsoever arising in connection with the use of this email. Under no
> circumstances shall this email constitute a binding agreement for
> provision of services by OOCL Logistics, which is subject to the
> standard terms and conditions of OOCL Logistics.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org