Hello,

I am attempting to use the JDBCAppender developed by Thomas Fenner and am
encountering the following problem.  When I leave the
"log4j.appender.JDBC.connector" option comment out, and utilize the
"DefaultConnectionHandler" in the JDBCAppender class it get the following
error:

     log4j:ERROR JDBCAppender::configure(), java.lang.Exception:
JDBCAppender::connect(), java.lang.NullPointerException

When I create a class to implement a class to support the
JDBCConnectionHandler interface and specify it in the connector option, I
get the following error:

     log4j:ERROR JDBCAppender::configure(), java.lang.Exception:
JDBCAppender::connect(), java.lang.ClassNotFoundException: Log4jJDBCHandler

My environment is as follows:

        Tomcat:   3.2.1
        Apache:  1.3.14
        MySQL:  3.23
        OS:       WIN 2K
        JDK:       1.3

The log4j.properties file is as shown below:

        log4j.rootCategory=JDBC

  
        # Configure the JDBCAppender
        log4j.appender.JDBC=com.klopotek.utils.log.JDBCAppender

        # JDBC is a class of JDBCAppender, which writes messages into the
database
        log4j.appender.JDBC.url=jdbc:mysql://localhost:3306/mydb
        log4j.appender.JDBC.username=test
        log4j.appender.JDBC.password=test

        # Connector-option to specify your own JDBCConnectionHandler
        #log4j.appender.JDBC.connector=MyConnectionHandler

        # Table-option to specify one table contained by the database for
loging
        log4j.appender.JDBC.table=syslog

        # Columns-option to describe the important columns of the table 
        # (Not nullable columns are mandatory to describe!)
        log4j.appender.JDBC.columns=LogTime~TIMESTAMP
MessageId~ID~com.eaonet.utilities.MyIDHandler MessageText~MSG
ObjectName~getClass().getName() 

        # Define the layout of the messages (optional) for the database
        log4j.appender.JDBC.layout=org.apache.log4j.PatternLayout
        log4j.appender.JDBC.layout.ConversionPattern=%m

        # Buffer-opiton:  define the size of the message-event-buffer
(optional)
        #log4j.appender.JDBC.buffer=1

        # Commit-option:  define a auto-commitment (optional)
        #log4j.appenderlJDBC.commit=Y

        # Print only messages of priority which is equal to or above the
value specified below in the package com.eaonet.
        # Possible values: DEBUG, INFO, WARN, ERROR, FATAL
        log4j.category.com.myappo=INFO

I have compiled the JDBCAppender along with the supporting classes and
created a JAR file which I have placed in the TOMCAT_HOME/lib directory.  It
is finding the JDBCAppender class ok but is failing on the connector
options.  

I am sure that I must have something configured incorrectly, or am not
specifying something quite right.  Any assistance would be appreciated.

Regards,


Todd G. Nist
Email:   [EMAIL PROTECTED]



The information in this electronic mail ("e-mail") message may
be confidential and for use of only the named recipient.  The
information may be protected by privilege, work product immunity
or other applicable law.  If you are not the intended recipient
the retention, dissemination, distribution or copying of this
e-mail message is strictly prohibited.  If you receive this e-mail
message in error please notify us immediately by telephone
at 770-723-1011 or [EMAIL PROTECTED]  Thank you. 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to