I think your XML that you're trying to insert should have the same
namespace declaration that you're inserting into. i.e. the CDATA section
below should have a xmlns:logj attribute.
Adithya V.S.S wrote:
HI,
forgot to mention , in the build file i have the task
<insert path="/log4j:configuration/root" position="after">
<![CDATA[
<appender name="${build}"
class="org.apache.log4j.RollingFileAppender">
<param name="File" value="uan.log" />
<param name="Append" value="true" />
<param name="MaxFileSize" value="25000KB" />
<param name="MaxBackupIndex" value="5"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{DATE} %-5p
%-15c{1} [%t][%x]: %m%n"/>
</layout>
</appender>
]]>
Please let me know where could be the error .
thanks
adi
---------- Forwarded message ----------
From: *Adithya V.S.S* <adi....@gmail.com <mailto:adi....@gmail.com>>
Date: Thu, May 28, 2009 at 1:46 AM
Subject: Using XML task, log4j error
To: xmltask-users@lists.sourceforge.net
<mailto:xmltask-users@lists.sourceforge.net>,
br...@oopsconsultancy.com <mailto:br...@oopsconsultancy.com>
Hi brain,
I am using XML task to insert some appenders into an XML file
my source and the destination file is same like the one below-
-------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
debug="null" threshold="null">
<appender class="org.apache.log4j.RollingFileAppender"
name="APPLOGFILE">
<param name="File" value="workshop.log"/>
<param name="Append" value="true"/>
<param name="MaxFileSize" value="3000KB"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{DATE} %-5p %-15c{1}:
%m%n"/>
</layout>
</appender>
<root>
<priority value="fatal"/>
</root>
</log4j:configuration>
When i use xml task , it gives me an error saying *log4j:error Cannot
find the declaration of element 'log4j:configuration* , i kept the
*log4j.dtd* in the same location where my build file exists but it
still gives me the same error.
Please help me out, what should be done in solving this
--
adi
--
Adithya V.S.S
------------------------------------------------------------------------
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com
------------------------------------------------------------------------
_______________________________________________
Xmltask-users mailing list
Xmltask-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xmltask-users
--
Brian Agnew http://www.oopsconsultancy.com
OOPS Consultancy Ltd
Tel: +44 (0)7720 397526
Fax: +44 (0)20 8682 0012
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com
_______________________________________________
Xmltask-users mailing list
Xmltask-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xmltask-users