You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by bu...@apache.org on 2011/02/22 15:33:33 UTC

DO NOT REPLY [Bug 50817] New: The JDBCAppender can't insert log info like this:hello'world

https://issues.apache.org/bugzilla/show_bug.cgi?id=50817

           Summary: The JDBCAppender can't insert log info like
                    this:hello'world
           Product: Log4j
           Version: 1.2
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Appender
        AssignedTo: log4j-dev@logging.apache.org
        ReportedBy: haoweishow@gmail.com


If the log content has the "'",then I can't insert into database.

for example:

log.info("hello'world");

then the error information:

log4j:ERROR Failed to excute sql
java.sql.SQLException: ORA-00917: 缺失逗号
    at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:330)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:287)
    at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:742)
    at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:206)
    at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:945)
    at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1167)
    at
oracle.jdbc.driver.OracleStatement.executeUpdateInternal(OracleStatement.java:1613)
    at
oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:1578)
    at org.apache.log4j.jdbc.JDBCAppender.execute(ESBJDBCAppender.java:92)

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


DO NOT REPLY [Bug 50817] The JDBCAppender can't insert log info like this:hello'world

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50817

--- Comment #1 from haowei <ha...@gmail.com> 2011-02-22 09:36:43 EST ---
Use the jars:

classes12.jar
apache-log4j-1.2.16.jar
commons-logging-1.1.1.jar

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

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


DO NOT REPLY [Bug 50817] The JDBCAppender can't insert log info like this:hello'world

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50817

Anurag Agarwal <an...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |anurag08agarwal@gmail.com

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

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