1 Reply Latest reply on Mar 14, 2012 7:36 PM by ffang

    How to get JDBCAppender working in FuseESB 4.4.1-01-13 (Newbie)

    arunmrao

      version: apache-servicemix-4.4.1-fuse-01-13

      purpose: want to enable the JDBCAppender to log to a database

       

      in etc/org.ops4j.pax.logging.cfg, I made changes, added the appender:

      log4j.rootLogger=INFO, out, osgi:VmLogAppender, DB

       

      1. Database appender

      log4j.appender.DB=org.apache.log4j.jdbc.JDBCAppender

      log4j.appender.DB.URL=jdbc:mysql://localhost/ebond

      log4j.appender.DB.driver=com.mysql.jdbc.Driver

      log4j.appender.DB.user=root

      log4j.appender.DB.password=root

      log4j.appender.DB.sql=INSERT INTO LOGS VALUES('%x','%d','%C','%p','%m')

      log4j.appender.DB.layout=org.apache.log4j.PatternLayout

       

      I copied the jdbc driver jar file to the deploy - also tried copying it to the lib directory

      mysql-connector-java-5.1.15-bin.jar

      (straight from the mysql distribution)

       

      however, I cannot get the pax-logging-service to load the driver class:

      ClassNotFoundException: com.mysql.jdbc.Driver not found by org.ops4j.pax.logging.pax-logging-service

       

      I did looked at http://fusesource.com/issues/browse/ESB-1238 - didnt see anything there

       

      Do I need to create a fragment bundle for pax-logging-service ? tried with this pom

       

               

       

       

      Could you please guide me setting up database logging ?

      (I have a support contract - pm me if needed)

       

       

      Thanks