[logback-user] Problems with DBAppender / JNDI / JBoss 7 / OracleDB

Henning Diederichs grave1740 at googlemail.com
Mon Dec 19 16:31:39 CET 2011

Hi there,

I’m trying to log into Oracle database tables using DBAppender and
JNDIConnectionSource. I created the needed tables for logging as
mentioned in documentation. I want to use connection pooling and the
JNDI variant for getting the pool. Here’s my configuration:

-JBoss 7.0.2 (the complete one, not the web profile)
-Oracle DB 11g
-logback-classic 0.9.29 -ojdbc

I configured the following things:
In JBoss:
-A new module for Oracle JDBC drivers
-A new connection pool using Oracle JDBC drivers in the modules segment of JBoss
     In standalone.xml:
              <datasource jndi-name="java:/myLog"
pool-name="myLogPool" enabled="true" jta="true"
use-java-context="true" use-ccm="true">
-logback-classic.jar and it's dependencies are being shipped with my .ear file.

In logback.xml:
<appender name="DBAppender" class="ch.qos.logback.classic.db.DBAppender">
         <connectionSource class="ch.qos.logback.core.db.JNDIConnectionSource">
                   <param name="jndiLocation" value="java:/myLog" />
         <appender-ref ref="DBAppender" />

I have also configured a RollingFileAppender and a ConsoleAppender.
They both work fine on my JBoss. In the server.log from JBoss you can
see that he successfully published my data source myLog under
java:/myLog. I can't see any problems occurring due to logging from
JBoss. No problems with logging via logback are mentioned. But when my
application starts logging, the entries are logged to console and the
file appender, but nothing is written to the database. I have a second
connection pool configured in JBoss for my application. That one is
working fine.

I can't figure out what the problem is.
Please help me.



More information about the Logback-user mailing list