David Glick | 1 Feb 2003 01:15
Picon

Using JDBCAppender to insert CLOB?

Does anyone have any advice on how to insert a CLOB into an Oracle table with 
the JDBCAppender?  I've been able to insert most other data types, but I'm 
totally lost on how to handle this.

Thanks for any help,

David Glick
Transmit Consulting, Inc
619-475-4052
dglick <at> cox.net
Madhava Reddy | 1 Feb 2003 15:04

RE: Hi Guys

Vijay,

I'm splitting logs according to debug levels. It works fine, but I'm not
sure whether it's how it needs to be done.. 

Here is sample of xml confuguration file I'm using.

<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">

    <appender name="DebugLog"
        class="org.apache.log4j.DailyRollingFileAppender">
        <param name="File"
            value="D:/tomcat4110/logs/Debug.log"/>
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%d %-5p
            %m%n"/>
        </layout>
    </appender>

    <appender name="InfoLog"
        class="org.apache.log4j.DailyRollingFileAppender">
        <param name="File"
            value="D:/tomcat4110/logs/Info.log"/>
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%d %-5p
            %m%n"/>
        </layout>
    </appender>
	
    <logger name="Debug">
(Continue reading)

Lutz Michael | 1 Feb 2003 15:30
Picon

RE: Using JDBCAppender to insert CLOB?


David,

I don't have the exact answer for you, but what I do know is that CLOB
support is generally database specific, and I know this to be true for
Oracle through JDBC.  This is a point one of my colleagues has pointed out
to me as we have looked carefully at Log4j. (without CLOB support, we limit
ourselves to a max length of 4,000 characters per field in Oracle.  CLOB's
of course can handle beyond this).

Time permitting, possibly Art will comment on exactly how to insert CLOB's
into Oracle, but I'm willing to bet the support just isn't there in the
current JDBC appenders (as a possible explanation).  Hopefully Art can
comment on the specifics, and someone can subsequently submit a patch, if
it's necessary.

Mike

-----Original Message-----
From: David Glick [mailto:dglick <at> cox.net]
Sent: Friday, January 31, 2003 7:16 PM
To: Log4J Users List
Subject: Using JDBCAppender to insert CLOB?

Does anyone have any advice on how to insert a CLOB into an Oracle table
with 
the JDBCAppender?  I've been able to insert most other data types, but I'm 
totally lost on how to handle this.

Thanks for any help,
(Continue reading)

Lutz Michael | 1 Feb 2003 18:03
Picon

RE: Using JDBCAppender to insert CLOB?


Good question.

I'm getting out of my comfort level here, because I don't know the specifics
about CLOB's, but I'll offer up all that I believe to be correct.

Last week, I showed my colleague the SQL typically found in a Log4j config
file for a JDBC setup (e.g. log4j.appender.myJDBC.Sql="INSERT INTO
table_name_here VALUES ..."), and he replied, "that SQL statement won't work
in Oracle if any of the fields are CLOB's."  Thus, I'm guessing that
possibly the fix could be made in the config file directly on the SQL;
however, I suspect there's more to it than that.  He indicated it was
somewhat complex.

Unfortunately, Art's out today (Saturday), but he does understand CLOB
support clearly (across RDBMS systems).  If the question is not answered by
Monday, I'll track him down and summarize from an Oracle perspective what
needs to be done.  Then the Log4j pros can determine the best approach,
although I'm hoping it's just a SQL change in the config file, we'll see.

I'm not familiar with the details of the Log4j JDBC appenders.  I just
wanted to offer up the fact that CLOB support is not consistent across
RDBMS's even if one is going through JDBC.

I apologize for not having a crystal clear answer.

-----Original Message-----
From: Martin [mailto:mgainty <at> hotmail.com]
Sent: Monday, September 02, 2002 9:23 AM
To: Log4J Users List
(Continue reading)

vijay reddy | 1 Feb 2003 20:25
Picon
Favicon

RE: Hi Guys

Hi Madhav,

      I used u r xml file, i am getting error 
"log4j:WARN No appenders could be found for logger"

In xml root
 i added the following line
<appender-ref ref="InfoLog"/>
<appender-ref ref="DebugLog"/>
it will look like this

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration
xmlns:log4j='http://jakarta.apache.org/log4j/'>

    <appender name="DebugLog"
class="org.apache.log4j.DailyRollingFileAppender">
        <param name="File" value="Debug.log"/>
        <layout
class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%d
%-5p %m%n"/>
        </layout>
    </appender>

    <appender name="InfoLog"
class="org.apache.log4j.DailyRollingFileAppender">
        <param name="File" value="Info.log"/>
        <layout
(Continue reading)

vijay reddy | 1 Feb 2003 21:33
Picon
Favicon

RE: Hi Guys

Hi Guys,

      Using filers it is working fine...

Thanks,
Vijay

--- Madhava Reddy <Madhava_Reddy <at> icon-scm.com> wrote:
> Vijay,
> 
> I'm splitting logs according to debug levels. It
> works fine, but I'm not
> sure whether it's how it needs to be done.. 
> 
> Here is sample of xml confuguration file I'm using.
> 
> <log4j:configuration
> xmlns:log4j="http://jakarta.apache.org/log4j/">
> 
>     <appender name="DebugLog"
>        
> class="org.apache.log4j.DailyRollingFileAppender">
>         <param name="File"
>             value="D:/tomcat4110/logs/Debug.log"/>
>         <layout
> class="org.apache.log4j.PatternLayout">
>             <param name="ConversionPattern"
> value="%d %-5p
>             %m%n"/>
>         </layout>
(Continue reading)

Rick Lin | 2 Feb 2003 08:04
Picon

JMSAppender and FallbackErrorHandler

Hi,
My program uses JMSAppender to log messages to a JMS topic. Also, I have
configured a FallbackErrorHandler to handle the situation while the JMS
server is down. The secondary appender basically logs messages to a
local file instead. However, there is a problem. The first message,
which detects the JMS logging problem, is gone. It seems that the first
"brave" message sacrifies itself and notifies its logger to switch to
the secondary appender but it doesn't save itself.

I wonder if anyone had experienced the similar problem before and could
tell me how to resolve this issue.

Thank you very much,
Rick
David Tonhofer | 2 Feb 2003 16:05
Picon

Just for fun: Some log4j class diagrams

Hi there,

I didn't have a date tonight, so I worked on some log4j class
diagrams. If anyone is interested:

http://rei1.m-plify.com/log4j/

...in PNG and Microsoft(r) Visio(r) format.

...they are of course incomplete, hard to print out and otherwise
vulnerable to heavy criticism. Flame on!

-- David Tonhofer
sk k | 2 Feb 2003 20:38
Picon
Favicon

Question


Hi,

Is there anyway to source values from an external xml
file(foo.xml) into log4j.xml properties file. 

Incase it is possible, how to do it? 

Thanks.

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
Mark Womack | 2 Feb 2003 22:59

RE: Just for fun: Some log4j class diagrams

These are very cool.  If you can generate them in pdf format, would you be
willing to post them to the log4j web/wiki site?

-Mark

> -----Original Message-----
> From: David Tonhofer [mailto:david.tonhofer <at> synapse.lu]
> Sent: Sunday, February 02, 2003 7:05 AM
> To: log4j-user <at> jakarta.apache.org
> Subject: Just for fun: Some log4j class diagrams
> 
> 
> Hi there,
> 
> I didn't have a date tonight, so I worked on some log4j class
> diagrams. If anyone is interested:
> 
> http://rei1.m-plify.com/log4j/
> 
> 
> ...in PNG and Microsoft(r) Visio(r) format.
> 
> ...they are of course incomplete, hard to print out and otherwise
> vulnerable to heavy criticism. Flame on!
> 
> -- David Tonhofer
> 
> 
> 
> ---------------------------------------------------------------------
(Continue reading)


Gmane