Would you please give me a example of SMTPAppender

2002-07-10 Thread fish

Dear sir:
Would you please give me a example of SMTPAppender£¬thank you !

CuiFang

From ChangChun , China



DOMConfig and log4j:Configuration

2002-07-10 Thread Ramesh

I am using the Tomcat4.0 and struts for my web app.

we have written the following loginconfig.xml


please some one can help on this...most urgent





http://jakarta.apache.org/log4j/";>











































when i run the parser class,in which i had used the follwoing method.

DOMConfigurator.configure("C:\\Program Files\\Apache Tomcat 
4.0\\webapps/logconfig.xml");

i am getting the following errors.

Starting service Tomcat-Standalone
Apache Tomcat/4.0.3
register('-//Apache Software Foundation//DTD Struts Configuration 1.0//EN', 'jar
:file:C:/Program Files/Apache Tomcat 4.0/webapps/invenio/WEB-INF/lib/struts.jar!
/org/apache/struts/resources/struts-config_1_0.dtd'
register('-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN', 'jar:file:C:/
Program Files/Apache Tomcat 4.0/webapps/invenio/WEB-INF/lib/struts.jar!/org/apac
he/struts/resources/web-app_2_2.dtd'
register('-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN', 'jar:file:C:/
Program Files/Apache Tomcat 4.0/webapps/invenio/WEB-INF/lib/struts.jar!/org/apac
he/struts/resources/web-app_2_3.dtd'
resolveEntity('-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN', 'http://
java.sun.com/dtd/web-app_2_3.dtd')
 Resolving to alternate DTD 'jar:file:C:/Program Files/Apache Tomcat 4.0/webapps
/invenio/WEB-INF/lib/struts.jar!/org/apache/struts/resources/web-app_2_3.dtd'
Call org.apache.struts.action.ActionServlet.addServletMapping(action/java.lang.S
tring,*.do/java.lang.String)
Starting service Tomcat-Apache
Apache Tomcat/4.0.3
Set For myFile called  = C:\SERVICEDEF\DocSetEdit.xml
Creating new Instance of InvenioDatabaseConnection
before Connection Created
Connection Created
log4j:ERROR Could not parse input source [org.xml.sax.InputSource@4acfcd].
java.net.MalformedURLException: unknown protocol: c
at java.net.URL.(URL.java:480)
at java.net.URL.(URL.java:376)
at java.net.URL.(URL.java:330)
at org.apache.xerces.impl.XMLEntityManager.startEntity(XMLEntityManager.
java:796)
at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(XMLEntityManag
er.java:756)
at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScanner
Impl.java:267)
at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(
XMLDocumentScannerImpl.java:826)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XM
LDocumentFragmentScannerImpl.java:333)
at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.jav
a:524)
at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.jav
a:580)
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:253)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.
java:201)
at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java
:672)
at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java
:616)
at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java
:584)
at org.apache.log4j.xml.DOMConfigurator.configure(DOMConfigurator.java:6
94)
at com.inveniotech.workflow.InvenioTechXMLParser.(InvenioTechXMLPa
rser.java:43)
at com.inveniotech.workflow.xmlLoading.setMyFile(xmlLoading.java:29)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.struts.util.PropertyUtils.setSimpleProperty(PropertyUtils.
java:988)
at org.apache.struts.util.PropertyUtils.setNestedProperty(PropertyUtils.
java:904)
at org.apache.struts.util.PropertyUtils.setProperty(PropertyUtils.java:9
32)
at org.apache.struts.util.BeanUtils.populate(BeanUtils.java:509)
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:772)
at org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.
java:2061)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:156
4)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.jav

Re: DOMConfig and log4j:Configuration

2002-07-10 Thread Ceki Gülcü


Try



etc..

That's "log4j.dtd", not "C:/Program Files/.../log4j.dtd".

At 19:24 10.07.2002 +0800, you wrote:
>I am using the Tomcat4.0 and struts for my web app.
>
>we have written the following loginconfig.xml
>
>
>please some one can help on this...most urgent
>
>
>
>4.0/webapps/log4j.dtd">
>
>http://jakarta.apache.org/log4j/";>

--
Ceki


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Log4j hanging application...

2002-07-10 Thread jenny . hunt

We have been using log4j (v113) successfully for some time now with
Weblogic 6.1and J2SE 1.3.1_02 on Sun Solaris.
We have just started experiencing what appears to be a log4j problem (!!)
in one of our environments.
At startup time log4j is configured successfully , but when a call is made
to isDebugEnabled control never returns and so weblogic hangs.
This only happens when we start using anything other than DEBUG.
I have tried using the most basic properties files but as long as it is set
at anything other than DEBUG, it will hang.
There is a way round it... start with everything at DEBUG, then use a
servlet to reconfigure log4j at INFO/WARN etc -- but not very clever
I noticed a similar problem mentioned here some time ago but it was never
resolved (mail from Thomas Porschberg "loop due to getInstance" May 2002)
Does anyone have any ideas?
Thanks
Jenny

PS. Here is an edited ( I took out all waiting threads) thread dump after
it hung:
Starting WebLogic Server 
   
[Full GC 32784K->3382K(2096000K), 0.4124035 secs]
[GC 33836K->4511K(2096000K), 0.0516093 secs]
log4j: Parsing for [root] with value=[INFO,CONSOLE,TESTLOG].
log4j: Priority token is [INFO].
log4j: Category root set to INFO
log4j: Parsing appender named "CONSOLE".
log4j: Parsing layout options for "CONSOLE".
log4j: Setting property [conversionPattern] to [%d %p [%t] %c - %m%n].
log4j: End of parsing for "CONSOLE".
log4j: Parsed "CONSOLE" options.
log4j: Parsing appender named "TESTLOG".
log4j: Parsing layout options for "TESTLOG".
log4j: Setting property [conversionPattern] to [%d %p [%t] %c - %m%n].
log4j: End of parsing for "TESTLOG".
log4j: Setting property [immediateFlush] to [true].
log4j: Setting property [maxBackupIndex] to [10].
log4j: Setting property [file] to [/opt/config/logs/TEST.log].
log4j: Setting property [maxFileSize] to [20MB].
log4j: Parsed "TESTLOG" options.
log4j: Finished configuring.
Full thread dump:

"ExecuteThread: '9' for queue: '__weblogic_admin_rmi_queue'" daemon prio=5 
tid=0x3c9760 nid=0x52 waiting on monitor [0x6af01000..0x6af019d8]
  at java.lang.Object.wait(Native Method)
  at java.lang.Object.wait(Object.java:420)
  at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:94)
  at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:118)

 (Lots more of similar waiting threads)...
..
..


"ExecuteThread: '0' for queue: 'default'" daemon prio=5 tid=0x532f78 nid=0xd waiting 
on monitor [0x6f401000..0x6f4019d8]
  at java.lang.Object.wait(Native Method)
  at java.lang.Object.wait(Object.java:420)
  at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:94)
  at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:118)

"Thread-0" daemon prio=10 tid=0x530650 nid=0xc waiting on monitor 
[0x71101000..0x711019d8]
  at java.lang.Thread.sleep(Native Method)
  at 
weblogic.transaction.internal.TransactionManagerImpl$1.run(TransactionManagerImpl.java:1546)
  at java.lang.Thread.run(Thread.java:484)

"Signal Dispatcher" daemon prio=10 tid=0x168e78 nid=0xa waiting on monitor [0..0]

"Finalizer" daemon prio=8 tid=0x165b80 nid=0x7 waiting on monitor 
[0xfe201000..0xfe2019d8]
  at java.lang.Object.wait(Native Method)
  at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:108)
  at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:123)
  at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:162)

"Reference Handler" daemon prio=10 tid=0x164258 nid=0x6 waiting on monitor 
[0xfe301000..0xfe3019d8]
  at java.lang.Object.wait(Native Method)
  at java.lang.Object.wait(Object.java:420)
  at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:110)

"main" prio=5 tid=0x298f8 nid=0x1 runnable [0xffbed000..0xffbee63c]
  at org.apache.log4j.Category.isDebugEnabled(Category.java:753)
  at 
com.myapp.foundation.base.security.connectionfilter.MyAppConnectionFilter.(MyAppConnectionFilter.java:59)
  at java.lang.Class.newInstance0(Native Method)
  at java.lang.Class.newInstance(Class.java:237)
  at 
weblogic.security.SecurityService.initializeConnectionFilter(SecurityService.java:217)
  at weblogic.security.SecurityService.initialize(SecurityService.java:113)
  at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:402)
  at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:202)
  at weblogic.Server.main(Server.java:35)

"VM Thread" prio=5 tid=0x156c98 nid=0x4 runnable

"VM Periodic Task Thread" prio=10 tid=0x168098 nid=0x8 runnable
"Suspend Checker Thread" prio=10 tid=0x168988 nid=0x9 runnable






The HSBC Group's website is at http://www.hsbc.com
_

HSBC Bank Plc, which is regulated in the UK by FSA, has issued the 
information contained in this message (including any attached 
documents) for its institutional and professional customers only. 
It is not 

Re: Can't control logging via root - get all msgs despite settingpriority

2002-07-10 Thread Adam Hardy

Hi All,
I've configured the root logger to put all errors & fatals in a log file.

My problem comes when I configure a second logger. My second logger 
passes all debug & above to the console. However as soon as I configure 
this second logger, the root logger also sends all debug & above to the 
file.

I can't figure out how to stop this. Can anyone help?


Thanks
Adam


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Can't control logging via root - get all msgs despite setting priority

2002-07-10 Thread Ebersole, Steven

Did you set the additivity flag to false on the second logger?

You should have something like:


log4j.rootLogger=ERROR, A1

log4j.myDefinedLogger=DEBUG, A2
log4j.additivity.myDefinedLogger=false






Steve Ebersole
IT Integration Engineer
Vignette Corporation 
512.741.4195

Visit http://www.vignette.com




|-Original Message-
|From: Adam Hardy [mailto:[EMAIL PROTECTED]]
|Sent: Wednesday, July 10, 2002 2:19 PM
|To: Log4J Users List
|Subject: Re: Can't control logging via root - get all msgs despite
|setting priority
|
|
|Hi All,
|I've configured the root logger to put all errors & fatals in 
|a log file.
|
|My problem comes when I configure a second logger. My second logger 
|passes all debug & above to the console. However as soon as I 
|configure 
|this second logger, the root logger also sends all debug & 
|above to the 
|file.
|
|I can't figure out how to stop this. Can anyone help?
|
|
|Thanks
|Adam
|
|
|--
|To unsubscribe, e-mail:   
|
|For 
|additional commands, e-mail: 
|
|

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Can't control logging via root - get all msgs despite setting priority

2002-07-10 Thread Ebersole, Steven

Sorry, brain-fart, should be:

log4j.rootLogger=ERROR, A1

log4j.logger.myDefinedLogger=DEBUG, A2
log4j.logger.additivity.myDefinedLogger=false






Steve Ebersole
IT Integration Engineer
Vignette Corporation 
512.741.4195

Visit http://www.vignette.com




|-Original Message-
|From: Ebersole, Steven 
|Sent: Wednesday, July 10, 2002 2:24 PM
|To: 'Log4J Users List'
|Subject: RE: Can't control logging via root - get all msgs despite
|setting priority
|
|
|Did you set the additivity flag to false on the second logger?
|
|You should have something like:
|
|
|log4j.rootLogger=ERROR, A1
|
|log4j.myDefinedLogger=DEBUG, A2
|log4j.additivity.myDefinedLogger=false
|
|
|
|
|
|
|Steve Ebersole
|IT Integration Engineer
|Vignette Corporation 
|512.741.4195
|
|Visit http://www.vignette.com
|
|
|
|
||-Original Message-
||From: Adam Hardy [mailto:[EMAIL PROTECTED]]
||Sent: Wednesday, July 10, 2002 2:19 PM
||To: Log4J Users List
||Subject: Re: Can't control logging via root - get all msgs despite
||setting priority
||
||
||Hi All,
||I've configured the root logger to put all errors & fatals in 
||a log file.
||
||My problem comes when I configure a second logger. My second logger 
||passes all debug & above to the console. However as soon as I 
||configure 
||this second logger, the root logger also sends all debug & 
||above to the 
||file.
||
||I can't figure out how to stop this. Can anyone help?
||
||
||Thanks
||Adam
||
||
||--
||To unsubscribe, e-mail:   
||
||For 
||additional commands, e-mail: 
||
||
|

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Can't control logging via root - get all msgs despite setting priority

2002-07-10 Thread Adam Hardy

Ah, that sounds like the problem. No I didn't configure additivity at 
all. I'm using an XML file and I don't remember seeing an additivity 
attribute in the DTD. I'm at home now but I'll check it out tomorrow in 
the office.


Thanks alot
Adam

Ebersole, Steven wrote:

>Sorry, brain-fart, should be:
>
>log4j.rootLogger=ERROR, A1
>
>log4j.logger.myDefinedLogger=DEBUG, A2
>log4j.logger.additivity.myDefinedLogger=false
>
>
>
>
>
>
>Steve Ebersole
>IT Integration Engineer
>Vignette Corporation 
>512.741.4195
>
>Visit http://www.vignette.com
>
>
>
>
>|-Original Message-
>|From: Ebersole, Steven 
>|Sent: Wednesday, July 10, 2002 2:24 PM
>|To: 'Log4J Users List'
>|Subject: RE: Can't control logging via root - get all msgs despite
>|setting priority
>|
>|
>|Did you set the additivity flag to false on the second logger?
>|
>|You should have something like:
>|
>|
>|log4j.rootLogger=ERROR, A1
>|
>|log4j.myDefinedLogger=DEBUG, A2
>|log4j.additivity.myDefinedLogger=false
>|
>|
>|
>|
>|
>|
>|Steve Ebersole
>|IT Integration Engineer
>|Vignette Corporation 
>|512.741.4195
>|
>|Visit http://www.vignette.com
>|
>|
>|
>|
>||-Original Message-
>||From: Adam Hardy [mailto:[EMAIL PROTECTED]]
>||Sent: Wednesday, July 10, 2002 2:19 PM
>||To: Log4J Users List
>||Subject: Re: Can't control logging via root - get all msgs despite
>||setting priority
>||
>||
>||Hi All,
>||I've configured the root logger to put all errors & fatals in 
>||a log file.
>||
>||My problem comes when I configure a second logger. My second logger 
>||passes all debug & above to the console. However as soon as I 
>||configure 
>||this second logger, the root logger also sends all debug & 
>||above to the 
>||file.
>||
>||I can't figure out how to stop this. Can anyone help?
>||
>||
>||Thanks
>||Adam
>||
>||
>||--
>||To unsubscribe, e-mail:   
>||
>||For 
>||additional commands, e-mail: 
>||
>||
>|
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>
>  
>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Log4j hanging application...

2002-07-10 Thread Ceki Gülcü

Is this problem reproducible?

By the way, in 1.1.3. line 753 in Category.java is javadoc not an
executable java statement. So the following line

 at org.apache.log4j.Category.isDebugEnabled(Category.java:753)

is somewhat suspicious. Can you check what line 753 corresponds to in
your copy of log4j? Nevertheless, the fact that it seems to hang
within log4j code is very alarming.

At 15:52 10.07.2002 +0100, [EMAIL PROTECTED] wrote:
>We have been using log4j (v113) successfully for some time now with
>Weblogic 6.1and J2SE 1.3.1_02 on Sun Solaris.
>We have just started experiencing what appears to be a log4j problem (!!)
>in one of our environments.
>At startup time log4j is configured successfully , but when a call is made
>to isDebugEnabled control never returns and so weblogic hangs.
>This only happens when we start using anything other than DEBUG.
>I have tried using the most basic properties files but as long as it is set
>at anything other than DEBUG, it will hang.
>There is a way round it... start with everything at DEBUG, then use a
>servlet to reconfigure log4j at INFO/WARN etc -- but not very clever
>I noticed a similar problem mentioned here some time ago but it was never
>resolved (mail from Thomas Porschberg "loop due to getInstance" May 2002)
>Does anyone have any ideas?
>Thanks
>Jenny
>
>PS. Here is an edited ( I took out all waiting threads) thread dump after
>it hung:
>Starting WebLogic Server 
>   configuration file ./config/config.xml ...>
>[Full GC 32784K->3382K(2096000K), 0.4124035 secs]
>[GC 33836K->4511K(2096000K), 0.0516093 secs]
>log4j: Parsing for [root] with value=[INFO,CONSOLE,TESTLOG].
>log4j: Priority token is [INFO].
>log4j: Category root set to INFO
>log4j: Parsing appender named "CONSOLE".
>log4j: Parsing layout options for "CONSOLE".
>log4j: Setting property [conversionPattern] to [%d %p [%t] %c - %m%n].
>log4j: End of parsing for "CONSOLE".
>log4j: Parsed "CONSOLE" options.
>log4j: Parsing appender named "TESTLOG".
>log4j: Parsing layout options for "TESTLOG".
>log4j: Setting property [conversionPattern] to [%d %p [%t] %c - %m%n].
>log4j: End of parsing for "TESTLOG".
>log4j: Setting property [immediateFlush] to [true].
>log4j: Setting property [maxBackupIndex] to [10].
>log4j: Setting property [file] to [/opt/config/logs/TEST.log].
>log4j: Setting property [maxFileSize] to [20MB].
>log4j: Parsed "TESTLOG" options.
>log4j: Finished configuring.
>Full thread dump:
>
>"ExecuteThread: '9' for queue: '__weblogic_admin_rmi_queue'" daemon prio=5 
>tid=0x3c9760 nid=0x52 waiting on monitor [0x6af01000..0x6af019d8]
>   at java.lang.Object.wait(Native Method)
>   at java.lang.Object.wait(Object.java:420)
>   at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:94)
>   at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:118)
>
> (Lots more of similar waiting threads)...
>..
>..
>
>
>"ExecuteThread: '0' for queue: 'default'" daemon prio=5 tid=0x532f78 
>nid=0xd waiting on monitor [0x6f401000..0x6f4019d8]
>   at java.lang.Object.wait(Native Method)
>   at java.lang.Object.wait(Object.java:420)
>   at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:94)
>   at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:118)
>
>"Thread-0" daemon prio=10 tid=0x530650 nid=0xc waiting on monitor 
>[0x71101000..0x711019d8]
>   at java.lang.Thread.sleep(Native Method)
>   at 
> 
>weblogic.transaction.internal.TransactionManagerImpl$1.run(TransactionManagerImpl.java:1546)
>   at java.lang.Thread.run(Thread.java:484)
>
>"Signal Dispatcher" daemon prio=10 tid=0x168e78 nid=0xa waiting on monitor 
>[0..0]
>
>"Finalizer" daemon prio=8 tid=0x165b80 nid=0x7 waiting on monitor 
>[0xfe201000..0xfe2019d8]
>   at java.lang.Object.wait(Native Method)
>   at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:108)
>   at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:123)
>   at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:162)
>
>"Reference Handler" daemon prio=10 tid=0x164258 nid=0x6 waiting on monitor 
>[0xfe301000..0xfe3019d8]
>   at java.lang.Object.wait(Native Method)
>   at java.lang.Object.wait(Object.java:420)
>   at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:110)
>
>"main" prio=5 tid=0x298f8 nid=0x1 runnable [0xffbed000..0xffbee63c]
>   at org.apache.log4j.Category.isDebugEnabled(Category.java:753)
>   at 
> 
>com.myapp.foundation.base.security.connectionfilter.MyAppConnectionFilter.(MyAppConnectionFilter.java:59)
>   at java.lang.Class.newInstance0(Native Method)
>   at java.lang.Class.newInstance(Class.java:237)
>   at 
> 
>weblogic.security.SecurityService.initializeConnectionFilter(SecurityService.java:217)
>   at 
> weblogic.security.SecurityService.initialize(SecurityService.java:113)
>   at weblogic.t3.srvr.T3Srvr.initialize

deriving from Logger problems

2002-07-10 Thread Piccoli, Lucio

hi all,

I have derived a Logger class MyLogger from org.apache.log4j.Logger.
Everything seems to work fine except for the logging output. The logger name
displayed is *allways* set to MyLogger not the logger name that has been
requested. I checked Logger.getName() and it is returning correctly the
request logger name. 

What gives?

Any help appreciated.

-lucio piccoli
-
QCOM Australia Pty Ltd 
ph +61 7 3858 6256


--
To unsubscribe, e-mail:   
For additional commands, e-mail: