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 Paul Smith <ps...@aconex.com> on 2008/09/12 08:28:51 UTC
Duplicate class in log4j-extras
We have found there's a duplicate class in log4j and log4j-extras.
I've upgraded our local environment to a 1.2.16 snapshot with the
extras, and low and behold a Bamboo run failed a test (I got the
chicken.. grrr :) ). We have a test that iterates over the jar's in
the classpath looking for duplicate entries because it's a sure sign
of a mismatch of jar versions and hilarity can ensure later on so it's
best to spot this early.
Paul-Smiths-Computer:lib paulsmith$ unzip -l log4j-1.2.16.20080912.jar
| fgrep Unrecogn
286 09-10-08 11:06 org/apache/log4j/xml/
UnrecognizedElementHandler.class
Paul-Smiths-Computer:lib paulsmith$ unzip -l apache-log4j-
extras-1.0.20080912.jar| fgrep Unrecogn
286 06-27-08 08:24 org/apache/log4j/xml/
UnrecognizedElementHandler.class
Paul
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org
Re: Duplicate class in log4j-extras
Posted by Paul Smith <ps...@aconex.com>.
ok, well the problem may come around later for some folk. Java Web
Start is very anal, it does not like duplicate entries in the classpath.
I feel this is a bit 'hacky' solution for covering both sides. Should
we consider publishing log4j-extras requiring log4j 1.2.15? (we could
publish a "log4j-extras-pre1215" version otherwise. Having duplicate
classes could wind up problematic if we end up changing that class in
one distribution, and people find that they have an older one coming
first in the classpath. Seems like a loaded gun waiting to happen.
Paul
On 13/09/2008, at 12:08 AM, Curt Arnold wrote:
> This is intentional. log4j-extras needs the interface definition
> since it may work with versions of log4j prior to log4j 1.2.15.
> log4j 1.2.15 needs the definition since it calls the
> UnrecognizedElementHandler when it encounters an unrecognized element.
>
>
> On Sep 12, 2008, at 1:28 AM, Paul Smith wrote:
>
>> We have found there's a duplicate class in log4j and log4j-extras.
>> I've upgraded our local environment to a 1.2.16 snapshot with the
>> extras, and low and behold a Bamboo run failed a test (I got the
>> chicken.. grrr :) ). We have a test that iterates over the jar's
>> in the classpath looking for duplicate entries because it's a sure
>> sign of a mismatch of jar versions and hilarity can ensure later on
>> so it's best to spot this early.
>>
>> Paul-Smiths-Computer:lib paulsmith$ unzip -l
>> log4j-1.2.16.20080912.jar | fgrep Unrecogn
>> 286 09-10-08 11:06 org/apache/log4j/xml/
>> UnrecognizedElementHandler.class
>>
>> Paul-Smiths-Computer:lib paulsmith$ unzip -l apache-log4j-
>> extras-1.0.20080912.jar| fgrep Unrecogn
>> 286 06-27-08 08:24 org/apache/log4j/xml/
>> UnrecognizedElementHandler.class
>>
>>
>> Paul
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>
Paul Smith
Core Engineering Manager
Aconex
The easy way to save time and money on your project
696 Bourke Street, Melbourne,
VIC 3000, Australia
Tel: +61 3 9240 0200 Fax: +61 3 9240 0299
Email: psmith@aconex.com www.aconex.com
This email and any attachments are intended solely for the addressee.
The contents may be privileged, confidential and/or subject to
copyright or other applicable law. No confidentiality or privilege is
lost by an erroneous transmission. If you have received this e-mail in
error, please let us know by reply e-mail and delete or destroy this
mail and all copies. If you are not the intended recipient of this
message you must not disseminate, copy or take any action in reliance
on it. The sender takes no responsibility for the effect of this
message upon the recipient's computer system.
Re: Duplicate class in log4j-extras
Posted by Curt Arnold <ca...@apache.org>.
This is intentional. log4j-extras needs the interface definition
since it may work with versions of log4j prior to log4j 1.2.15. log4j
1.2.15 needs the definition since it calls the
UnrecognizedElementHandler when it encounters an unrecognized element.
On Sep 12, 2008, at 1:28 AM, Paul Smith wrote:
> We have found there's a duplicate class in log4j and log4j-extras.
> I've upgraded our local environment to a 1.2.16 snapshot with the
> extras, and low and behold a Bamboo run failed a test (I got the
> chicken.. grrr :) ). We have a test that iterates over the jar's in
> the classpath looking for duplicate entries because it's a sure sign
> of a mismatch of jar versions and hilarity can ensure later on so
> it's best to spot this early.
>
> Paul-Smiths-Computer:lib paulsmith$ unzip -l
> log4j-1.2.16.20080912.jar | fgrep Unrecogn
> 286 09-10-08 11:06 org/apache/log4j/xml/
> UnrecognizedElementHandler.class
>
> Paul-Smiths-Computer:lib paulsmith$ unzip -l apache-log4j-
> extras-1.0.20080912.jar| fgrep Unrecogn
> 286 06-27-08 08:24 org/apache/log4j/xml/
> UnrecognizedElementHandler.class
>
>
> Paul
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org