RE: Logging with log4j and using SMTP appender

"Stephen McConnell" <[email protected]>
Newsgroups gmane.comp.jakarta.avalon.user
Message-ID <005d01c48f2a$f7773680$1601a8c0@gloria>
Try replacing the merlin.logging.implementation value that you are
currently using with:

  avalon/logging/avalon-logging-log4j#SNAPSHOT

In theory this should work but I have not tested it.

Steve.



> -----Original Message-----
> From: Stephen McConnell [mailto:[email protected]]
> Sent: 31 August 2004 09:09
> To: 'Avalon framework users'
> Subject: RE: Logging with log4j and using SMTP appender
> 
> 
> Jaroslaw:
> 
> To resolve this problem we will need to update the plugin meta
descriptor
> for avalon-logging-log4j.  What is the property value that you have
> currently assigned for 'merlin.logging.implementation'?
> 
> Stephen.
> 
> 
> 
> > -----Original Message-----
> > From: Jaros³aw Pa³ka [mailto:[email protected]]
> > Sent: 30 August 2004 10:03
> > To: Avalon framework users
> > Subject: Logging with log4j and using SMTP appender
> >
> > Hello!
> >
> > I have some problems with merlin 3.3.0 and log4j logging
> implementation.I
> > would like to use SMTP appender for ERROR and FATAL log events.
> > When I start merlin with following log4j configuration:
> > log4j.rootLogger=ALL, A1
> >
> > log4j.logger./mrt-vend-server=ERROR,A2
> >
> > # A1 is set to be a FileAppender.
> > log4j.appender.A1=org.apache.log4j.FileAppender
> >
> >
> > # A1 uses PatternLayout.
> > log4j.appender.A1.layout=org.apache.log4j.PatternLayout
> > log4j.appender.A1.file=mrt-vend-server.log
> > log4j.appender.A1.layout.ConversionPattern=%d{dd MMM yyyy HH:mm}
[%t] %-
> 5p
> > %c - %m%n
> >
> > log4j.appender.A2=org.apache.log4j.net.SMTPAppender
> > log4j.appender.A2.SMTPHost=server01
> > [email protected]
> > [email protected]
> > log4j.appender.A2.subject=MRT Vend Server logs
> > log4j.appender.A2.bufferSize=5
> >
> > I get this exception:
> >
> > ---- error report
------------------------------------------------------
> --
> > ------
> > Exception: java.lang.NoClassDefFoundError
> > Message: javax/mail/Multipart
> > ---- stack trace
-------------------------------------------------------
> --
> > ------
> > java.lang.NoClassDefFoundError: javax/mail/Multipart
> > java.lang.Class.forName0(Native Method)
> > java.lang.Class.forName(Class.java:141)
> > org.apache.log4j.helpers.Loader.loadClass(Loader.java:160)
> >
>
org.apache.log4j.helpers.OptionConverter.instantiateByClassName(OptionCo
nv
> > erter.java:309)
> >
>
org.apache.log4j.helpers.OptionConverter.instantiateByKey(OptionConverte
r.
> > java:112)
> >
>
org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator
.j
> > ava:620)
> >
>
org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator
.j
> > ava:603)
> >
>
org.apache.log4j.PropertyConfigurator.parseCatsAndRenderers(PropertyConf
ig
> > urator.java:524)
> >
>
org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.j
av
> > a:408)
> >
>
org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.j
av
> > a:432)
> >
>
org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.jav
a:
> > 327)
> >
>
org.apache.avalon.logging.log4j.Log4JLoggingFactory.configureURL(Log4JLo
gg
> > ingFactory.java:203)
> >
>
org.apache.avalon.logging.log4j.Log4JLoggingFactory.configure(Log4JLoggi
ng
> > Factory.java:164)
> >
>
org.apache.avalon.logging.log4j.Log4JLoggingFactory.create(Log4JLoggingF
ac
> > tory.java:146)
> >
>
org.apache.avalon.merlin.impl.DefaultFactory.createLoggingManager(Defaul
tF
> > actory.java:578)
> >
>
org.apache.avalon.merlin.impl.DefaultFactory.create(DefaultFactory.java:
18
> > 8)
> > org.apache.avalon.merlin.cli.Main.<init>(Main.java:301)
> > org.apache.avalon.merlin.cli.Main.main(Main.java:255)
> >
------------------------------------------------------------------------
> --
> > ------
> >
> > I tried put mail.jar and activation.jar in block.xml and in java
> > classpath, but I still get this exception.
> >
> > Can anyone help me?
> >
> > Thanks
> >
> > Jaroslaw Palka
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.