logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 34747] New: - DBAppender with Microsoft's JDBC jars throws exception: Can't start a cloned connection while in manual transaction mode.
Date Wed, 04 May 2005 19:17:17 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=34747>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34747

           Summary: DBAppender with Microsoft's JDBC jars throws exception:
                    Can't start a cloned connection while in manual
                    transaction mode.
           Product: Log4j
           Version: 1.3alpha
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Appender
        AssignedTo: log4j-dev@logging.apache.org
        ReportedBy: dalewis@tikva.com


I checked out the latest log4j code into eclipse, including chainsaw.  I was
previously using JDBCAppender with log4j 1.2.8, but I wanted to use chainsaw to
view the logs, so I changed to DBAppender so I could use DBReceiver.

The dialect/mssql.sql file worked great for setting up the tables.  However,
once I started trying to write to the log, I got this error:

java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Can't start a
cloned connection while in manual transaction mode.

I found a reference on Microsoft's support site
(http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B313181):

"This error occurs when you try to execute multiple statements against a SQL
Server database with the JDBC driver while in manual transaction mode
(AutoCommit=false) and while using the direct (SelectMethod=direct) mode. Direct
mode is the default mode for the driver."

I started digging into the code, and saw that in fact DBAppender was opening
multiple statements on the same connection if getGeneratedKeys is not supported
(as it is not in this instance).

I have a patch that I will attach.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


Mime
View raw message