From: Thomas SMETS <tsmets@brutele.be>
To: pgsql-jdbc@postgreSQL.org
Subject: JDBC driver does not support getGeneratedKeys method
Date: Wed, 26 Apr 2006 00:53:10 +0200
Message-ID: <1146005590.8794.23.camel@localhost.localdomain> (raw)
Dear,
I try to use Log4J new DBAppender (cfr. the config file herebelow) but
it keeps on complaining with the following message :
Reported error: "Exception in Action for tag <appender>" at line 20
column -1
java.lang.IllegalStateException: DBAppender cannot function if the JDBC
driver does not support getGeneratedKeys method *and* without a specific
SQL dialect
at org.apache.log4j.db.DBAppender.activateOptions(DBAppender.java:179)
As I cannot get the information out of the ML's of Log4J ( Log4J Users
List <log4j-user@logging.apache.org>,
ML log4j dev <log4j-dev@logging.apache.org> ) on how to set the
SQL_DIALECT variable .... I was wandering if the postgresql driver
allowed for getGeneratedKeys....
I was wandering if I needed to use the "jxDBCon-Open Source JDBC driver
framework" available here : http://jxdbcon.sourceforge.net/ ... ?
Tx,
\T,
--
Thomas Lionel SMETS
rue J. Wytsmanstraat 62
1050 Brussels
T : +32 (0)2 742 05 94
M : +32 (0)497 44 68 12
@ : duvelbier-tsmets@yahoo.com
Do you skype (callto://tsmets) ?
<snip>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration
debug="true"
xmlns:log4j='http://jakarta.apache.org/log4j/';
<appender name="DB" class="org.apache.log4j.db.DBAppender">
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p %c - %m%n"/>
</layout>
<connectionSource
class="org.apache.log4j.db.DriverManagerConnectionSource">
<param name="driver" value="org.postgresql.Driver" />
<param name="url"
value="jdbc:postgresql://localhost:5432/Log4j" />
<param name="username" value="xyz" />
<param name="password" value="xyz" />
<param name="dialect" value="POSTGRES_DIALECT" />
</connectionSource>
</appender>
<appender name="STDOUT" class="org.apache.log4j.ConsoleAppender">
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p %c - %m%n"/>
</layout>
</appender>
<root>
<level value ="debug"/>
<appender-ref ref="Db" />
</root>
<logger name="com">
<level value="debug" />
<appender-ref ref="STDOUT" />
</logger>
</log4j:configuration>
</snip>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: tsmets@brutele.be
Subject: Re: JDBC driver does not support getGeneratedKeys method
In-Reply-To: <1146005590.8794.23.camel@localhost.localdomain>
References: <1146005590.8794.23.camel@localhost.localdomain>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox