logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brett Randall" <javabr...@gmail.com>
Subject Re: Chainsaw database connectivity error
Date Wed, 15 Oct 2008 10:19:57 GMT
Looks like JDBC is seeing the curly braces as a JDBC escape sequence.
I reckon your quotes should be single quotes ' rather than
double-quotes " , as you are after a string literal.

Best of luck,
Brett


On Wed, Oct 15, 2008 at 8:34 PM, Rally,  Menka <menka.rally@fiserv.com> wrote:
> Hello
>
>
>
> I am facing problem in adding Oracle database receiver in chainsaw.
>
>
>
> Database details: -
>
>
>
> Here's the description of the APP_LOG table
>
>
>
> NAME                            Null?                Type
>
> ------------------------------- --------- -----
>
> LOG_ID                          NOT NULL         NUMBER(18,0)
>
> LOGGER                                               VARCHAR2(45)
>
> LOG_DATE                         NOT NULL      DATE
>
> LVL                                                     VARCHAR2(45)
>
> THREAD_NAME                                      VARCHAR2(45)
>
> MESSAGE                                             VARCHAR2(1000)
>
> NDC                                                    VARCHAR2(45)
>
> MDC                                                    VARCHAR2(45)
>
> CLASS_NAME                                        VARCHAR2(45)
>
> METHOD_NAME                                     VARCHAR2(45)
>
> FILE_NAME                                           VARCHAR2(45)
>
> LINE_NUMBER                                        VARCHAR2(45)
>
> PROPERTIES                                         VARCHAR2(1000)
>
> EXCEPTION                                           VARCHAR2(1000)
>
>
>
>
>
> XML Details: -
>
>
>
>
>
> <?xml version="1.0" encoding="UTF-8" ?>
>
> <!DOCTYPE log4j:configuration >
>
> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
> debug="true">
>
>   <appender name="A2" class="org.apache.log4j.ConsoleAppender">
>
>      <layout class="org.apache.log4j.SimpleLayout"/>
>
>   </appender>
>
>   <plugin name="CustomDBReceiver"
> class="org.apache.log4j.db.CustomSQLDBReceiver">
>
>      <connectionSource
> class="org.apache.log4j.db.DriverManagerConnectionSource">
>
>        <param name="password" value="LOG654"/>
>
>        <param name="user" value="APP_LOG_USER"/>
>
>        <param name="driverClass"
> value="oracle.jdbc.driver.OracleDriver"/>
>
>        <param name="url"
> value="jdbc:oracle:thin:@10.53.12.54:1521:odsd"/>
>
>        </connectionSource>
>
>      <param name="refreshMillis" value="5000"/>
>
>     <param name="sql" value='select logger as LOGGER, log_date as
> TIMESTAMP, lvl as LEVEL, thread_name as THREAD, ndc as NDC, mdc as
> MDC,message as MESSAGE,
>
>
>
> class_name as CLASS, method_name as METHOD, file_name as FILE,
> line_number as LINE,
> concat("{{application,databaselogs,hostname,localhost,log4jid,", log_id,
>
>
>
>
> "}}") as PROPERTIES, exception as EXCEPTION from APP_LOG'/>
>
>      <param name="IDField" value="log_id"/>
>
>  <param name="application" value="App"/>
>
>      <param name="hostname" value="Host"/
>
>   </plugin>
>
>   <root>
>
>      <level value="debug"/>
>
>   </root>
>
> </log4j:configuration>
>
>
>
>
>
>
>
> Following is the error coming in chainsaw logs
>
>
>
> Level
>
> ERROR
>
> Logger
>
> org.apache.log4j.db.CustomSQLDBReceiver
>
> Time
>
> 2008-10-14 05:30:53,066
>
> Thread
>
> Chainsaw-WorkerThread
>
> Message
>
> *************Problem receiving events
>
> NDC
>
> null
>
> Class
>
> ?
>
> Method
>
>
> Line
>
>
> File
>
>
> Properties
>
> {{hostname,chainsaw}{log4jid,384}{application,log}}
>
> Throwable
>
> java.sql.SQLException: Non supported SQL92 token at position: 221:
>
>        at
> oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
>
>        at
> oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
>
>        at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:1130)
>
>        at oracle.jdbc.driver.OracleSql.handleToken(OracleSql.java:201)
>
>        at oracle.jdbc.driver.OracleSql.handleODBC(OracleSql.java:121)
>
>        at oracle.jdbc.driver.OracleSql.parse(OracleSql.java:69)
>
>
>
>
>
>
>
> Thanks
>
> Menka
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message