0

I have been happily building an application on felix/osgi using Bndtools in my build process. I have wrapped all my 3rd party non-bundle jars as bundles, built all my in-house jars as bundles and have been working on 4 bundles w/ activators and services. It has all been working beautifully so far....

...Then, all of a sudden yesterday, bndtools started putting a '.' in my Import-Package directive in my MANIFEST.MF. This has resulted in the following error:

Auto-deploy install: org.osgi.framework.BundleException: Imporing '.' is invalid.

And causes the bundle to fail to load.

Now, presumably it is because of some change I made in my source code yesterday, but for the life of me I cannot figure out what that might be. The only changes I've made in the past couple days have been in my own source code. I have not added any 3rd party dependencies.

When I let the eclipse bnd builder generate the bundle, it does not put the '.' in the import list, but I am using the ant task for my build process and it is putting that '.' in the package list.

Can anyone comment as to why it is putting that in there?

Here is the bnd file:

Export-Package:  \
    com.omni.service.*, \
    com.omni.buildup.*
Bundle-Version: 1.0.0
Bundle-Activator: com.omni.service.osgi.OmniQueryServerActivator
Bundle-SymbolicName: omniquery-service
-resolve: auto
-runee: JavaSE-1.7
-runfw: org.apache.felix.framework;version='[4.2.0,4.2.0]'


-runbundles: \
    org.apache.felix.configadmin;version='[1.8.8,1.8.9)',\
    org.apache.felix.log;version='[1.0.1,1.0.2)',\
    org.apache.felix.metatype;version='[1.1.2,1.1.3)',\
    org.apache.felix.scr;version='[1.8.2,1.8.3)'
Adam Morgan
  • 425
  • 1
  • 3
  • 17
  • `.` represents the default package. It cannot be imported or exported in OSGi. Can you provide some more details on the problem bundle? bnd file? – BJ Hargrave Oct 22 '15 at 13:18
  • so if that represents the default package, does that suggest that somewhere I'm doing an import of a class that is using the default package? it would then presumably be (if one of my classes), in the root of one of my src/ folders? – Adam Morgan Oct 22 '15 at 13:39
  • No. But there may be some other issue which is confusing bnd. I have seen `.` pop up a long time ago. But not in any recent version of bnd. – BJ Hargrave Oct 22 '15 at 13:53

0 Answers0