Bug 34491 - Missing include in build.jms target results in missing class in log4j jar
Summary: Missing include in build.jms target results in missing class in log4j jar
Status: VERIFIED FIXED
Alias: None
Product: Log4j - Now in Jira
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: All Windows XP
: P2 normal
Target Milestone: ---
Assignee: log4j-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-18 02:38 UTC by Andy McBride
Modified: 2005-05-24 16:37 UTC (History)
0 users



Attachments
patch to 1.2.9 build.xml (638 bytes, patch)
2005-04-18 02:41 UTC, Andy McBride
Details | Diff
patch to 1.3.x build.xml (609 bytes, patch)
2005-04-18 02:42 UTC, Andy McBride
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andy McBride 2005-04-18 02:38:47 UTC
The class org.apache.log4j.or.jms.MessageRenderer has never been specifically 
included in the compile sourcedirs in the build.jms target.

This has led to some variation in the inclusion of this class in the 
distributed log4j.jars:

log4j 1.0.4 - 1.2.5: MessageRenderer: class present 
log4j 1.2.6 - 1.2.7: MessageRenderer: class missing 
log4j 1.2.8:         MessageRenderer: class present 
log4j 1.2.9 - 1.3.x: MessageRenderer: class missing 

This investigation has highlighted an interesting sequence of events:

log4j 1.0.4 - 1.2.5: MessageRenderer was used in org.apache.log4.net.JMSSink 
which led to its automatic compilation
log4j 1.2.6 - 1.2.7: JMSSink modified to not use MessageRenderer, import 
remains but jdk1.3/target1.1 ignores the reference
log4j 1.2.8:       : jdk1.4/target1.2 used to build release, more agressive 
dependency analysis leads to compilation of MessageRenderer
log4j 1.2.9:       : jdk1.3/target1.1 used to build release, class missing again
log4j 1.3.6 alpha6 : jdk1.4/target1.2 used to build release, JMSSink has now 
had unused import removed so MessageRenderer not compiled

This class does not appear to be used in the current log4j codebase but I'm not 
sure if its supposed to be a part of the public API or not?

To ensure its inclusion in the distribution jar the package 
org.apache.log4j.or.jms should be specifically added to the javac include list 
in the build.jms target, the includes already exist in the jar targets.  

Patches are attached for the 1.2.9 and head branches of build.xml
Comment 1 Andy McBride 2005-04-18 02:41:42 UTC
Created attachment 14742 [details]
patch to 1.2.9 build.xml
Comment 2 Andy McBride 2005-04-18 02:42:14 UTC
Created attachment 14743 [details]
patch to 1.3.x build.xml
Comment 3 Ceki Gulcu 2005-04-18 10:22:54 UTC
Thanks Andy.
Comment 4 Ceki Gulcu 2005-04-28 22:52:11 UTC
Patch applied in both the 1.2 branch and HEAD.
Comment 5 Andy McBride 2005-05-03 22:27:59 UTC
This has been fixed in CVS Head but the problem still remains in the current 
1.2.9 release.  Reopened for awareness.  
Comment 6 Mark Womack 2005-05-24 07:27:06 UTC
Fix should be available in the 1.2.11rc1 release.  Please verify.  Verification 
of this bug is a blocking issue for the 1.2.11 release, #35032.  Thanks.
Comment 7 Andy McBride 2005-05-25 00:37:46 UTC
Yep, class present and working in 1.2.11rc1.  

If anyone is interested I have the beginings of a junit test which could be 
enhanced to validate the output from MessageRenderer against a known value.  
This currently uses the Mockrunner testing framework from 
http://mockrunner.sourceforge.net/index.html.  

Regards

Andy