[jboss-user] [Messaging, JMS & JBossMQ] - Re: Problem with ClassNotFoundException while trying to add

blipsman do-not-reply at jboss.com
Thu Jul 13 21:07:37 EDT 2006


jaikiran,
thanks a lot man for the help! I really appreciate it.
it does work if I use Logger from log4j ( as you have suggested !! ).
but if I used wrapper around Logger, it did not work.
Really strange, but anyway, thanks a lot for your help!!

I am struggling with last problem regarding SMTPAppender.
This is the code I am trying to run directlly inside my init method.

 
  | Handler eHandler = new Handler("test");
  | SMTPAppender smtpAppender = new SMTPAppender();
  | 			
  | smtpAppender.setLayout(new SimpleLayout());
  | smtpAppender.setThreshold(ExtraLevel.toExtraLevel(props.getProperty(EMAIL_THRESHOLD)));
  | smtpAppender.setSMTPHost(props.getProperty(SMTP_SERVER));
  | smtpAppender.setTo(props.getProperty(EMAIL_RECIPIENT));
  | smtpAppender.setFrom(props.getProperty(EMAIL_FROM));
  | smtpAppender.setSubject(props.getProperty(EMAIL_SUBJECT));
  | smtpAppender.activateOptions();
  | eHandler.addAppender(smtpAppender);
  | handlers.add(eHandler);
  | 
  | 

Unfortunatelly, I get the error


  | java.lang.NoClassDefFoundError: javax/mail/internet/AddressException
  | 

when I try to execute the line


  | SMTPAppender smtpAppender = new SMTPAppender();
  | 

I put into the JBOSS_HOME/server/default/lib 2 jars 
mail.jar and activation.jar, but I still get this error.

Any idea ...?
Really strange, if I try to execute the same code outside of jboss all works just fine. 

Cheers jaikiran, and thanks again for sharing experience!!

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957938#3957938

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957938



More information about the jboss-user mailing list