[logback-user] Logback Oracle problem.

Søren Davidsen SODA at tdc.dk
Sat Jun 23 16:08:14 CEST 2007


Hi Ceki,

I figured a way to work around the problem in the meantime.

The problem seems to be with the supportsGetGeneratedKeys. The Oracle driver reports "true", but when logback calls getGeneratedKeys, it throws an SQLException "operation not allowed".

My temp. solution is to extend DBAppender and override DBAppender.start() to set cnxSupportsGetGeneratedKeys=false.  Maybe an option could be to make this a configurable property of the DBAppender?

Cheers,
Soren


-----Original Message-----
From: logback-user-bounces at qos.ch on behalf of Ceki Gulcu
Sent: Fri 6/22/2007 7:44 PM
To: logback users list
Subject: Re: [logback-user] Logback Oracle problem.
 
Hi Søren,

I'll have a look into this as soon as I get a chance.

In the mean time you may want to enter a bug report.

Cheers,

Søren Davidsen wrote:
> Hi List,
> 
> I am using logback 0.9.7, and having problems with getting logged into an Oracle database using the DBAppender.
> 
> I am using c3p0 as a datasource like this, and the tables are created as per the provided .sql files from the distribution:
> 
>         <appender name="DATABASE" class="ch.qos.logback.classic.db.DBAppender">
>                <connectionSource class="ch.qos.logback.core.db.DataSourceConnectionSource">
>                         <dataSource class="com.mchange.v2.c3p0.ComboPooledDataSource">
>                                 <driverClass>oracle.jdbc.OracleDriver</driverClass>
>                                 <jdbcUrl>jdbc:oracle:thin:@xxx:yy:ZZ</jdbcUrl>
>                                 <user>ppppp</user>
>                                 <password>qqqqqq</password>
>                                 <param name="acquireRetryAttempts" value="1" />
>                                 <param name="acquireIncrement" value="1" />
>                                 <param name="minPoolSize" value="1" />
>                                 <param name="maxPoolSize" value="2" />
>                                 <param name="maxConnectionAge" value="600" />
>                         </dataSource>
>                 </connectionSource>
>         </appender>
> 
> It works very sporadic, only some log-statements are put into the database (I have not yet found any pattern in which), and exceptions are never put into logging_event_exceptions
> 
> Is there something I need to do or something else I'm missing?
> 
> Thanks,
> Soren
> _______________________________________________
> Logback-user mailing list
> Logback-user at qos.ch
> http://qos.ch/mailman/listinfo/logback-user
> 

-- 
Ceki Gülcü
Logback: The reliable, generic, fast and flexible logging framework for Java.
http://logback.qos.ch
_______________________________________________
Logback-user mailing list
Logback-user at qos.ch
http://qos.ch/mailman/listinfo/logback-user

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 3723 bytes
Desc: not available
Url : http://qos.ch/pipermail/logback-user/attachments/20070623/16ef83b5/attachment.bin 


More information about the Logback-user mailing list