Just a guess as to what is going on...

Perhaps you already have the bundle that you are trying to auto-install is already installed into the bundle cache, but under a different location. Thus, your auto-install fails because it doesn't match the old location and it tries to actually install the bundle again, but fails because symbolic name and version are not unique.

This is just a guess.

To test the theory, delete your cache directory and try again.

One other thing, you don't need to "install" and "start" your auto-install bundle. You can just auto-start it, which will automatically install it if it isn't installed already.

-> richard

asaf.lahav wrote:
Hi everybody,

I'm getting the following exception when I'm starting felix with only one
custom bundle:

ERROR: Auto-properties install. (org.osgi.framework.BundleException: Could
not create bundle object.)

org.osgi.framework.BundleException: Bundle symbolic name and version are not
unique.

      at org.apache.felix.framework.Felix.createModule(Felix.java:2647)

      at org.apache.felix.framework.Felix.createBundleInfo(Felix.java:2609)

      at org.apache.felix.framework.Felix.installBundle(Felix.java:1816)

      at org.apache.felix.framework.Felix.installBundle(Felix.java:1730)

      at
org.apache.felix.framework.Felix.processAutoProperties(Felix.java:2984)

      at org.apache.felix.framework.Felix.start(Felix.java:471)

      at org.apache.felix.framework.Felix.start(Felix.java:205)

      at example.LaunchingTest.main(LaunchingTest.java:26)

org.osgi.framework.BundleException: Bundle symbolic name and version are not
unique.

      at org.apache.felix.framework.Felix.createModule(Felix.java:2647)

      at org.apache.felix.framework.Felix.createBundleInfo(Felix.java:2609)

ERROR: Auto-properties start. (org.osgi.framework.BundleException: Could not
create bundle object.)

      at org.apache.felix.framework.Felix.installBundle(Felix.java:1816)

      at org.apache.felix.framework.Felix.installBundle(Felix.java:1730)

      at
org.apache.felix.framework.Felix.processAutoProperties(Felix.java:3015)

      at org.apache.felix.framework.Felix.start(Felix.java:471)

      at org.apache.felix.framework.Felix.start(Felix.java:205)

      at example.LaunchingTest.main(LaunchingTest.java:26)

DEBUG: WIRE: 2.0 -> org.osgi.service.packageadmin -> 0

DEBUG: WIRE: 2.0 -> org.osgi.service.startlevel -> 0

DEBUG: WIRE: 2.0 -> org.ungoverned.osgi.service.shell -> 2.0

DEBUG: WIRE: 2.0 -> org.osgi.framework -> 0

DEBUG: WIRE: 2.0 -> org.apache.felix.shell -> 2.0

DEBUG: WIRE: 3.0 -> org.osgi.framework -> 0

DEBUG: WIRE: 3.0 -> org.apache.felix.shell -> 2.0

->

There is only one bundle configured in the felix configuration file:

org.osgi.framework.system.packages=org.osgi.framework;
version=1.3.0,org.osgi.service.packageadmin; version=1.2.0,
org.osgi.service.startlevel; version=1.0.0, org.osgi.service.url;
version=1.0.0

felix.cache.profiledir=cache

felix.embedded.execution=true

felix.auto.install.1=reference:file:c:/Development/OGSi/OSGiTestBundle

felix.auto.start.1=reference:file:C:/Development/OGSi/OSGiFelix/bundle/org.a
pache.felix.shell-0.8.0-incubator.jar
file:C:/Development/OGSi/OSGiFelix/bundle/org.apache.felix.shell.tui-0.8.0-i
ncubator.jar

felix.auto.start.2=reference:file:c:/Development/OGSi/OSGiTestBundle

felix.log.level=1

felix.service.urlhandlers=true

Is that a bug or feature? :-)


Reply via email to