Richard, thank you so much for spotting this! I could have been staring at this for months without finding the problem.

For the future, it might be handy to have some sort of bundle validator, to check bundles against the specifications, and help solve problems like this. Do you know if such a thing exists?

Martijn


On 15/09/11 17:16, Richard Hall wrote:
First, let me say that this works on the trunk build of the Felix
framework (3.3.0-SNAPSHOT), which you can grab from the Apache Maven
snapshot repository. However, it is still not going to be 100% correct.

The reason why it works on the trunk framework is I fixed a bug in
filter creation that was incorrectly throwing IllegalArgumentExceptions
when some strings contained non-escaped parentheses characters, when it
reality the non-escaped parentheses characters were acceptable. This was
wrong in 3.2.2 and I fixed it in trunk. So that's why it works now.

The reason it is not 100% correct still, though, is that it didn't dawn
on me when looking at the metadata below that the Require-Bundle header
has been specified incorrectly. It should not be using "version", it
should be using "bundle-version" as the matching attribute. That's what
uncovered this bug in the framework.

If "bundle-version" is used then the attribute correctly gets converted
to a version range and you won't run into the parentheses bug, thus it
should start working on 3.2.2 too...and actually working correctly,
since right now it is treating "version" as just a string with a value,
not a version range.

-> richard


On Wed, Sep 14, 2011 at 10:47 AM, Richard Hall <[email protected]
<mailto:[email protected]>> wrote:

    If you just try to install the bundle manually, does it still fail?

    If so, privately email me the bundle and I'll look at it. If not,
    maybe you can tell me how to recreate the issue.

    -> richard

    On Wed, Sep 14, 2011 at 10:30 AM, Martijn van Iersel
    <[email protected] <mailto:[email protected]>> wrote:

        Here is the MANIFEST.MF from the bundle
        org.apache.batik.transcoder.__jar. I see nothing wrong with it...

        Or is it possible that the error is in a different bundle? The
        error report mentioned org.apache.batik.transcoder.__jar...


        Manifest-Version: 1.0
        Implementation-Vendor: The Apache Software Foundation
        (http://xmlgraph
        ics.apache.org/batik/ <http://ics.apache.org/batik/>)
        Bundle-Localization: plugin
        Bundle-__RequiredExecutionEnvironment: J2SE-1.3
        Bundle-SymbolicName: org.apache.batik.transcoder
        Require-Bundle:
        org.apache.batik.bridge;__version="[1.7.0,1.8.0)",org.ap
          
ache.batik.dom;version="[1.7.__0,1.8.0)",org.apache.batik.__dom.svg;versi
          
on="[1.7.0,1.8.0)",org.apache.__batik.ext.awt;version="[1.7.0,__1.8.0)",o
          
rg.apache.batik.svggen;__version="[1.7.0,1.8.0)",org.__apache.batik.util;
          
version="[1.7.0,1.8.0)",org.__apache.batik.xml;version="[1.__7.0,1.8.0)"
        Export-Package:
        org.apache.batik.transcoder;__version="1.7.0",org.apache
          
.batik.transcoder.image;__version="1.7.0",org.apache.__batik.transcoder.i
          
mage.resources;version="1.7.0"__,org.apache.batik.transcoder.__keys;versi
          
on="1.7.0",org.apache.batik.__transcoder.print;version="1.7.__0",org.apac
          
he.batik.transcoder.svg2svg;__version="1.7.0",org.apache.__batik.transcod
          
er.wmf;version="1.7.0",org.__apache.batik.transcoder.wmf.__tosvg;version=
        "1.7.0"
        Bundle-Version: 1.7.0.v200903091627
        Bundle-Vendor: %providerName
        Bundle-Name: %pluginName
        Build-Id: 20080106-110642-EST (cam [Linux 2.6.22.8 i386, Java
        1.3.1_19
          -b03])
        Implementation-Title: Batik transcoder
        Implementation-Version: 1.7+r608262
        Import-Package: org.w3c.dom.svg;version="[1.1.__0,1.3.0)"
        Bundle-ManifestVersion: 2

        --
        Martijn

        On 14/09/11 17:19, Richard Hall wrote:

            Just a guess, but you forgetting to put quotes around the
            version range in
            your manifest file? You must specify version ranges with
            quotes, like:

                 Import-Package: foo; version="[1.0.0,2.0.0)"

            ->  richard



        
------------------------------__------------------------------__---------
        To unsubscribe, e-mail: users-unsubscribe@felix.__apache.org
        <mailto:[email protected]>
        For additional commands, e-mail: [email protected]
        <mailto:[email protected]>





---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to