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 Dominique Laurent <la...@gmail.com> on 2008/02/06 16:32:43 UTC

MANIFEST.MF broken in log4j-1.2.15.jar

Hi,

Just to let you know that the manifest (MANIFEST.MF) in log4j-1.2.15.jaruses:


Name: org.apache.log4j

instead of


Name: org/apache/log4j/


Note the dot '.' instead of the slash '/'.

It means that the following piece of code:

        String implementationVersion =
org.apache.log4j.Appender.class.getPackage().getImplementationVersion();
        System.out.println("implementationVersion: \"" +
implementationVersion + '"');

now returns null instead of implementationVersion: "1.2.15" as it did in
previous releases.

Could you please reset it to "Name: org/apache/log4j/" ?

Thanks in advance,

Best regards,
Dominique

Re: MANIFEST.MF broken in log4j-1.2.15.jar

Posted by Dominique Laurent <la...@gmail.com>.
Hi Curt,

What you can use with dots is "Extension-Name" e.g.

Extension-Name: org.apache.log4j

but "Name" needs slashes and using "Name" with dots prevents
Package#getImplementationVersion() from returning something useful.

So you could have:

Extension-Name: org.apache.log4j
Name: org/apache/log4j/

and everyone would be happy I guess.

Kind regards,
Dominique


On 06/02/2008, Curt Arnold <ca...@apache.org> wrote:
>
>
> On Feb 6, 2008, at 9:32 AM, Dominique Laurent wrote:
>
> > Hi,
> >
> > Just to let you know that the manifest (MANIFEST.MF) in
> > log4j-1.2.15.jar uses:
> >
> >
> > Name: org.apache.log4j
> >
> > instead of
> >
> >
> > Name: org/apache/log4j/
> >
> >
> > Note the dot '.' instead of the slash '/'.
> >
> > It means that the following piece of code:
> >
> >         String implementationVersion =
> > org
> > .apache.log4j.Appender.class.getPackage().getImplementationVersion();
> >         System.out.println("implementationVersion: \"" +
> > implementationVersion + '"');
> >
> > now returns null instead of implementationVersion: "1.2.15" as it
> > did in previous releases.
> >
> > Could you please reset it to "Name: org/apache/log4j/" ?
> >
> > Thanks in advance,
> >
> > Best regards,
> > Dominique
>
>
> I've confirmed it is a change from log4j 1.2.14 and earlier.  It may
> have been a mistake when writing the Maven POM file, but it may have
> been intentional and needs a bit more research to see if there was a
> motivation behind the change.
>
> From
> http://java.sun.com/j2se/1.4.2/docs/guide/jar/jar.html#Manifest%20Specification
> >
> > The individual sections define various attributes for packages or
> > files contained in this JAR file. Not all files in the JAR file need
> > to be listed in the manifest as entries, but all files which are to
> > be signed must be listed. The manifest file itself must not be
> > listed.  Each section must start with an attribute with the name as
> > "Name", and the value must be a relative path to the file, or an
> > absolute URL referencing data outside the archive.
>
> So the name definitely should be separated with slashes.
>
> Could you file a bug report (http://issues.apache.org/bugzilla) for
> this issue and specify the JVM vendor and version you were using.
>
> Likely best to keep the "org.apache.log4j" entry and add a second
> entry for "org/apache/log4j".
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>
>

Re: MANIFEST.MF broken in log4j-1.2.15.jar

Posted by Curt Arnold <ca...@apache.org>.
On Feb 6, 2008, at 9:32 AM, Dominique Laurent wrote:

> Hi,
>
> Just to let you know that the manifest (MANIFEST.MF) in  
> log4j-1.2.15.jar uses:
>
>
> Name: org.apache.log4j
>
> instead of
>
>
> Name: org/apache/log4j/
>
>
> Note the dot '.' instead of the slash '/'.
>
> It means that the following piece of code:
>
>         String implementationVersion =  
> org 
> .apache.log4j.Appender.class.getPackage().getImplementationVersion();
>         System.out.println("implementationVersion: \"" +  
> implementationVersion + '"');
>
> now returns null instead of implementationVersion: "1.2.15" as it  
> did in previous releases.
>
> Could you please reset it to "Name: org/apache/log4j/" ?
>
> Thanks in advance,
>
> Best regards,
> Dominique


I've confirmed it is a change from log4j 1.2.14 and earlier.  It may  
have been a mistake when writing the Maven POM file, but it may have  
been intentional and needs a bit more research to see if there was a  
motivation behind the change.

 From http://java.sun.com/j2se/1.4.2/docs/guide/jar/jar.html#Manifest%20Specification
>
> The individual sections define various attributes for packages or  
> files contained in this JAR file. Not all files in the JAR file need  
> to be listed in the manifest as entries, but all files which are to  
> be signed must be listed. The manifest file itself must not be  
> listed.  Each section must start with an attribute with the name as  
> "Name", and the value must be a relative path to the file, or an  
> absolute URL referencing data outside the archive.

So the name definitely should be separated with slashes.

Could you file a bug report (http://issues.apache.org/bugzilla) for  
this issue and specify the JVM vendor and version you were using.

Likely best to keep the "org.apache.log4j" entry and add a second  
entry for "org/apache/log4j".
  

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