geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevan Miller <>
Subject Re: G2.0.1 geronimo-javamail dependency is not loading?
Date Thu, 06 Sep 2007 14:36:00 GMT

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("");
>>         newAppender.setSMTPUsername("USERXX");
>>         newAppender.setSMTPPassword("****");
>>         newAppender.setFrom("");
>>         newAppender.setTo("");
>>         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(
>> 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...

One possibility is the the activation spec (e.g. org/apache/geronimo/ 
activation_1.1_spec-1.0.jar), but that's not making a lot of sense,  

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...


View raw message