logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Stauffer <jstau...@spscommerce.com>
Subject DBAppender cannot function without a connection source
Date Tue, 11 May 2004 18:04:47 GMT
I am trying out the new DBAppender but I apparently don't know how to
configure it.  Can someone provide an example?  I searched the code for
DBAppender and ConnectionSource to try to find examples but I couldn't find
any.  My config and error are below.

	<appender name="JDBC3" class="org.apache.log4j.db.DBAppender">
		<param name="url"
value="jdbc:oracle:thin:@goofy:1521:dwebec" />
		<param name="username" value="jamess" /> 
		<param name="password" value="123" />
	</appender>

log4j:WARN No such property [url] in org.apache.log4j.db.DBAppender.
log4j:WARN No such property [username] in org.apache.log4j.db.DBAppender.
log4j:WARN No such property [password] in org.apache.log4j.db.DBAppender.
log4j:ERROR Could not create an Appender. Reported error follows.
java.lang.IllegalStateException: DBAppender cannot function without a
connection source
	at
org.apache.log4j.db.DBAppender.activateOptions(DBAppender.java:49)
	at
org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:228)
	at
org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java
:154)
	at
org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator
.java:169)
	at
org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigu
rator.java:514)
	at
org.apache.log4j.xml.DOMConfigurator.parseCategory(DOMConfigurator.java:475)
	at
org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:876)
	at
org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:768)
	at
org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:717)
	at
org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:685)
	at
org.apache.log4j.xml.XMLWatchdog.doOnChange(DOMConfigurator.java:915)
	at
org.apache.log4j.helpers.FileWatchdog.checkAndConfigure(FileWatchdog.java:80
)
	at
org.apache.log4j.helpers.FileWatchdog.<init>(FileWatchdog.java:49)
	at org.apache.log4j.xml.XMLWatchdog.<init>(DOMConfigurator.java:908)
	at
org.apache.log4j.xml.DOMConfigurator.configureAndWatch(DOMConfigurator.java:
675)
	at
org.apache.log4j.xml.DOMConfigurator.configureAndWatch(DOMConfigurator.java:
660)
...(my code)


James Stauffer

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message