Batch Update error using Logback with Postgres on Windows

I'm using Postgres 9.2 on Windows with Logback 0.9.18. I am using the DBAppender to log to a database. I am able to log a single logging_event record, but whenever I add something to the MDC which triggers records being written to the logging_event_property table, I get the following error: I can't for the life of me figure out what's going on. thanks! BTW, the JDBC driver is postgresql-9.2-1002.jdbc4.jar 16:33:01,514 |-ERROR in ch.qos.logback.classic.db.DBAppender[db] - problem appending event java.sql.BatchUpdateException: Batch entry 0 INSERT INTO logging_event_property (event_id, mapped_key, mapped_value) VALUES (3, 'dog', 'dog') was aborted. Call getNextException to see the cause. at java.sql.BatchUpdateException: Batch entry 0 INSERT INTO logging_event_property (event_id, mapped_key, mapped_value) VALUES (3, 'dog', 'dog') was aborted. Call getNextException to see the cause. at at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2746) at at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1887) at at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:405) at at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2893) at at ch.qos.logback.classic.db.DBAppender.insertProperties(DBAppender.java:173) at at ch.qos.logback.classic.db.DBAppender.subAppend(DBAppender.java:94) at at ch.qos.logback.core.db.DBAppenderBase.append(DBAppenderBase.java:98) * * *---* *Dawson Mossman* Certified ScrumMaster 454.7061 ext. 226

What version of logback are you using? Those line number don't seem to match the latest release, 1.0.11. You could try putting better error handling into DbAppender, and calling getNextException() as suggested in the exception. Please do report back with any patches to DdAppender to make it more robust. David -- View this message in context: http://logback.10977.n7.nabble.com/Batch-Update-error-using-Logback-with-Pos... Sent from the Users mailing list archive at Nabble.com.
participants (2)
-
Dawson Mossman
-
diroussel