tags:

views:

116

answers:

1

I'm trying to use Logback's DBAppender. My logback.xml has the following appender:

</appender>
 <appender name="DatabaseAppender" class="ch.qos.logback.classic.db.DBAppender">
  <connectionSource class="ch.qos.logback.core.db.DriverManagerConnectionSource">
   <driverClass>oracle.jdbc.OracleDriver</driverClass>
   <url>jdbc:oracle:thin:@HOST_URL:PORT:SERVICE_NAME</url>
   <user>USER</user>
   <password>PASS</password>
 </connectionSource>
</appender>

the url given works with other java classes in the same project but it fails with logback giving the following error

ORA-00904: "ARG3": invalid identifier

        at java.sql.SQLException: ORA-00904: "ARG3": invalid identifier

where ARG3 is the <url>jdbc:oracle:thin:@HOST_URL:PORT:SERVICEID</url>

+1  A: 

I'd be interested in the Oracle statement resulting in this error. My guess is that it is trying an INSERT INTO table (arg1, arg2, arg3) values (...); when the table doesn't contain that column.

If you don't know what the table is then checking here about forcing an error dump when the 904 error is encountered.

I can do a

ALTER system SET EVENTS '904 TRACE NAME ERRORSTACK LEVEL 3';

Then, when the error is raised, the database generates a trace file which should show the problem statement similar to the following :

ORA-00904: "FRFRF": invalid identifier
Current SQL statement for this session:
select frfrf from dual
Gary
You are right. Thanks for the advice. I dug a little and found out they changed the database structure but didn't update the documentation. From 0.9.19 onward the logging_event table needs the following four columns:arg0 VARCHAR(254);arg1 VARCHAR(254);arg2 VARCHAR(254);arg3 VARCHAR(254);
jose almeida