Announcement Announcement Module
Collapse
No announcement yet.
OSGi bundle template.mf issue - can't use bundles in Virgo. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • OSGi bundle template.mf issue - can't use bundles in Virgo.

    I have been trying to deploy the amqp bundles on Virgo and have run into an issue. For each bundle, the template.mf has to following Import-Template:

    Code:
    ...
    Import-Template:
    org.springframework.*;version="[3.0.5, 4.0.0)",
    ...
    This causes a side effect, namely the manifest is now importing the wrong version of Spring AMQP:

    Code:
    ...
    Import-Package: com.ericsson.otp.erlang,com.rabbitmq.client;version="[
     1.8.1, 2.0.0)",com.rabbitmq.utility;version="[1.8.1, 2.0.0)",javax.na
     ming,org.aopalliance.aop,org.apache.commons.logging;version="[1.1.1, 
     2.0.0)",org.springframework.amqp;version="[3.0.5, 4.0.0)"
    ...
    So that last bit there is an issue; there is no version="[3.0.5, 4.0.0)" for amqp yet, rather I would expect it to be version="[1.0.1, 1.0.1)".

    The error that occurs in Virgo RT is:

    Code:
            An Import-Package could not be resolved. Caused by missing constraint in bundle <org.springframework.amqp.rabbit_1.0.0.M3>
                 constraint: <Import-Package: org.springframework.amqp; version="[3.0.5,4.0.0)">
    Thanks,
    Tim

  • #2
    local solution

    I was able to get the one offending jar working locally by using the manifest:

    Code:
    Bundle-SymbolicName: org.springframework.amqp.rabbit
    Bundle-Name: Spring RabbitMQ Support
    Bundle-Vendor: SpringSource
    Bundle-Version: 1.0.0.M3
    Bundle-ManifestVersion: 2
    Import-Template: 
     org.springframework.*;version="[3.0.5, 4.0.0)",
     org.springframework.amqp.*;version="[1.0.0, 1.0.1)",
     org.springframework.erlang.*;version="[1.0.0, 1.0.1)",
     org.springframework.util.exec.*;version="[1.0.0, 1.0.1)",
     org.apache.commons.logging;version="[1.1.1, 2.0.0)",
     com.rabbitmq.*;version="[1.8.1, 2.0.0)",
     org.junit.*;version="0",
     org.w3c.dom.*;version="0",
     javax.xml.*;version="0"
    I only needed to change spring-rabbit-1.0.0.M3.jar by re-running bundlor manually with the above manifest.

    -Tim

    Comment


    • #3
      Why is org.junit in the manifest? It supposed to be 'test' scoped dependency.

      Comment


      • #4
        good question

        It does not need to be in there...just an oversight on my part.

        Comment

        Working...
        X