On 9/6/07, Kevan Miller <[EMAIL PROTECTED]> wrote:
>
>
> On Sep 6, 2007, at 7:15 AM, Rick McGuire wrote:
>
> > Could you post a stack trace for this new failure?
> > Are you able to instantiate an instance of javax.mail.Multipart in
> > your code?
> >
> > I have a suspicion that the problem is with the classloader used to
> > load the SMTPAppender class, not the classloader configuration of
> > your app itself.
> >
> > Rick
> >
> > Xh wrote:
> >> Hi David!
> >>
> >> Now I use both org.apache.geronimo.configs/javamail and
> >> org.apache.geronimo.javamail/geronimo-javamail_1.4_mail dependencies.
> >>
> >> I did just like You asked, I've configured my SMTPAppender
> >> programmatically (in servlet's init method):
> >>
> >> SMTPAppender newAppender = new SMTPAppender();
> >>         newAppender.setSMTPDebug(true);
> >>         newAppender.setSMTPHost("HOST.pl");
> >>         newAppender.setSMTPUsername("USERXX");
> >>         newAppender.setSMTPPassword("****");
> >>         newAppender.setFrom("[EMAIL PROTECTED]");
> >>         newAppender.setTo("[EMAIL PROTECTED]");
> >>         newAppender.setSubject("Test!");
> >>         newAppender.setThreshold(Level.INFO);
> >>         newAppender.setLayout(new org.apache.log4j.SimpleLayout());
> >>                 Logger.getRootLogger().addAppender(newAppender);
> >>
> >> The result is still the same:
> >>
> >> java.lang.NoClassDefFoundError: javax/mail/Multipart
> >>      org.xh.log4jtest.Test.init(Test.java:25)
> >> what should I do now?
>
> Hi Lukasz,
> NoClassDefFoundError means that the Multipart class is being found,
> but some dependent class is not being located. We need to find out
> what that class is...


I guess javax.mail.Multipart is the class that is not being found when some
other calss that Lukasz's code is trying to load is using this Multipart.

One possibility is the the activation spec (e.g. org/apache/geronimo/
> specs/geronimo-activation_1.1_spec/1.0/geronimo-
> activation_1.1_spec-1.0.jar), but that's not making a lot of sense,
> ATM...
>
> What JRE are you running on? Can you share your test app/deployment
> plans with us? Alternatively, you'll need to debug the class loading
> to figure out what isn't being found...
>
> --kevan
>
>
>
>

Reply via email to