From: | Thomas SMETS <tsmets(at)brutele(dot)be> |
---|---|
To: | pgsql-jdbc(at)postgreSQL(dot)org |
Subject: | JDBC driver does not support getGeneratedKeys method |
Date: | 2006-04-25 22:53:10 |
Message-ID: | 1146005590.8794.23.camel@localhost.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
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(at)logging(dot)apache(dot)org>,
ML log4j dev <log4j-dev(at)logging(dot)apache(dot)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(at)yahoo(dot)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>
From | Date | Subject | |
---|---|---|---|
Next Message | Kris Jurka | 2006-04-25 23:59:18 | Re: JDBC driver does not support getGeneratedKeys method |
Previous Message | Kris Jurka | 2006-04-24 20:55:08 | Re: Automated setting of timezone with connection pooling |