Vaadin and Virgo

Hi,

I am trying to create an webapp (Shared Services WAR) that uses Vaadin 6.6.0 and deploy it in a Virgo OSGi container (3.0.0.M05), but I keep running into trouble because Virgo can’t resolve the dependency to Vaadin.

I modified the MANIFEST.MF inside of vaadin-6.6.0.jar to circumvent some problematic package-imports declared here (see
ticket 6945
). This works and I can successfully deploy Vaadin into Virgo server. The bundle is Active.

In my project Vaadin is referenced in the MANIFEST.MF as follows:

Require-Bundle: com.vaadin;bundle-version="6.6.0"
Import-Package: com.vaadin;resolution="optional";version="[6.6.0,6.6.0
 ]",com.vaadin.ui;resolution="optional";version="[6.6.0,6.6.0]
"

Everything compiles fine (using Maven and Bundlor plugin), but when I deploy the bundle I get the following error:

Cannot resolve: MyOsgiProject
    Resolver report:
        An Import-Package could not be resolved. Caused by missing constraint in bundle <MyOsgiProject_1.0.0>
             constraint: <Import-Package: com.vaadin; version="[6.6.0,6.6.0]
">
            with attributes {resolution=optional}

I tried all kinds of combinations: removed the Require-bundle, removed resolution=optional declaration, etc. but to no avail.

What am I doing wrong here? Anyone ideas? Help greatly appreciated.

Okay, this appeared to be a very easy issue…

All Export-Packages of the Vaadin jar appear to be exported as version (0.0.0). Setting the version of Import-Packages in MANIFEST.MF accordingly fixed the issue.