Summary: | JDBCAccessLogValve uses reserved word "user" as column name | ||
---|---|---|---|
Product: | Tomcat 5 | Reporter: | rik <rik> |
Component: | Catalina | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | trivial | ||
Priority: | P5 | ||
Version: | 5.5.14 | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All |
Description
rik
2005-12-27 14:28:45 UTC
Suggested fix? (In reply to comment #1) > Suggested fix? Change to "username" or \"user\" (with quotes) in line 79 and 146 You can change it at your JDBCValve <Valve className="JDBCAccessLogValve" driverName="your_jdbc_driver" connectionURL="your_jdbc_url" pattern="combined" resolveHosts="false" userField="userName" /> But I also think user is not a nice default, and we better change it. Thanks reporting it. How do we get this Valve working for Oracle. 1. Oracle doesn't have Auto_Increment, instead they have sequences. 2. Oracle cannot directly create a table as access. It had to be "access". (Anyways I worked it around with tableName = "accesslogs" in the server.xml) I had to strip down the table struct to this CREATE TABLE accesslogs ( id VARCHAR(255), remoteHost CHAR(15), userName CHAR(15), timestamp TIMESTAMP, virtualHost VARCHAR(64), method VARCHAR(8), query VARCHAR(255), status SMALLINT, bytes INT, referer VARCHAR(128), userAgent VARCHAR(128) ); Can this valve provide fix for the default table struct? Also, the valve fails to log in the Oracle DB if I use the following pattern pattern="Combined Log Format: %{X-Forwarded-For}i %a %h %q %v %D %T %l %u %t %r %s %b %{User-Agent}i %{Referer}i" It works well for pattern="combined" Bugzilla is not a support forum. Please direct your questions to the Tomcat users mailing list rather than re-opening a five year old resolved bug. |