{"action":"created","issue":{"url":"https://api.github.com/repos/Atmosphere/atmosphere/issues/1896","labels_url":"https://api.github.com/repos/Atmosphere/atmosphere/issues/1896/labels{/name}","comments_url":"https://api.github.com/repos/Atmosphere/atmosphere/issues/1896/comments","events_url":"https://api.github.com/repos/Atmosphere/atmosphere/issues/1896/events","html_url":"https://github.com/Atmosphere/atmosphere/issues/1896","id":61226128,"number":1896,"title":"Unable to load atmosphere-runtime and atmosphere-annotations into OSGi (Apache Karaf)","user":{"login":"sakno","id":1043452,"avatar_url":"https://avatars.githubusercontent.com/u/1043452?v=3","gravatar_id":"","url":"https://api.github.com/users/sakno","html_url":"https://github.com/sakno","followers_url":"https://api.github.com/users/sakno/followers","following_url":"https://api.github.com/users/sakno/following{/other_user}","gists_url":"https://api.github.com/users/sakno/gists{/gist_id}","starred_url":"https://api.github.com/users/sakno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sakno/subscriptions","organizations_url":"https://api.github.com/users/sakno/orgs","repos_url":"https://api.github.com/users/sakno/repos","events_url":"https://api.github.com/users/sakno/events{/privacy}","received_events_url":"https://api.github.com/users/sakno/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Atmosphere/atmosphere/labels/2.3.0","name":"2.3.0","color":"5319e7"},{"url":"https://api.github.com/repos/Atmosphere/atmosphere/labels/Workaround%20Available","name":"Workaround Available","color":"02d7e1"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-03-13T20:33:43Z","updated_at":"2015-03-14T14:28:26Z","closed_at":null,"body":"The following error occurs when I try to install atmosphere-runtime and atmosphere-annotations as OSGi bundles into Apache Karaf:\r\n```\r\njava.lang.Exception: Could not start bundle mvn:org.atmosphere/atmosphere-annotations/2.2.6 in feature(s) http-adapter-feature-1.0.0: Uses constraint violation. Unable to resolve bundle revision org.atmosphere.annotations [129.0] because it exports package 'org.atmosphere.annotation' and is also exposed to it from bundle revision org.atmosphere.runtime [130.0] via the following dependency chain:\r\n\r\n  org.atmosphere.annotations [129.0]\r\n    import: (&(osgi.wiring.package=org.atmosphere.config.service)(version>=2.2.0)(!(version>=3.0.0)))\r\n     |\r\n    export: osgi.wiring.package=org.atmosphere.config.service; uses:=org.atmosphere.annotation\r\n    export: osgi.wiring.package=org.atmosphere.annotation\r\n  org.atmosphere.runtime [130.0]\r\n\tat org.apache.karaf.features.internal.FeaturesServiceImpl.startBundle(FeaturesServiceImpl.java:480)\r\n\tat org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:435)\r\n\tat org.apache.karaf.features.internal.BootFeaturesInstaller.installBootFeatures(BootFeaturesInstaller.java:92)\r\n\tat org.apache.karaf.features.internal.BootFeaturesInstaller.start(BootFeaturesInstaller.java:76)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_75]\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_75]\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_75]\r\n\tat java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_75]\r\n\tat org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:297)[15:org.apache.aries.blueprint.core:1.4.1]\r\n\tat org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:958)[15:org.apache.aries.blueprint.core:1.4.1]\r\n\tat org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:712)[15:org.apache.aries.blueprint.core:1.4.1]\r\n\tat org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:824)[15:org.apache.aries.blueprint.core:1.4.1]\r\n\tat org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)[15:org.apache.aries.blueprint.core:1.4.1]\r\n\tat org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[15:org.apache.aries.blueprint.core:1.4.1]\r\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_75]\r\n\tat org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[15:org.apache.aries.blueprint.core:1.4.1]\r\n\tat org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:245)[15:org.apache.aries.blueprint.core:1.4.1]\r\n\tat org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:183)[15:org.apache.aries.blueprint.core:1.4.1]\r\n\tat org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:681)[15:org.apache.aries.blueprint.core:1.4.1]\r\n\tat org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:378)[15:org.apache.aries.blueprint.core:1.4.1]\r\n\tat org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:269)[15:org.apache.aries.blueprint.core:1.4.1]\r\n\tat org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:276)[15:org.apache.aries.blueprint.core:1.4.1]\r\n\tat org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:245)[15:org.apache.aries.blueprint.core:1.4.1]\r\n\tat org.apache.aries.blueprint.container.BlueprintExtender.modifiedBundle(BlueprintExtender.java:235)[15:org.apache.aries.blueprint.core:1.4.1]\r\n\tat org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:500)[9:org.apache.aries.util:1.1.0]\r\n\tat org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:433)[9:org.apache.aries.util:1.1.0]\r\n\tat org.apache.aries.util.tracker.hook.BundleHookBundleTracker$AbstractTracked.track(BundleHookBundleTracker.java:725)[9:org.apache.aries.util:1.1.0]\r\n\tat org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.bundleChanged(BundleHookBundleTracker.java:463)[9:org.apache.aries.util:1.1.0]\r\n\tat org.apache.aries.util.tracker.hook.BundleHookBundleTracker$BundleEventHook.event(BundleHookBundleTracker.java:422)[9:org.apache.aries.util:1.1.0]\r\n\tat org.apache.felix.framework.util.SecureAction.invokeBundleEventHook(SecureAction.java:1103)[org.apache.felix.framework-4.2.1.jar:]\r\n\tat org.apache.felix.framework.util.EventDispatcher.createWhitelistFromHooks(EventDispatcher.java:695)[org.apache.felix.framework-4.2.1.jar:]\r\n\tat org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:483)[org.apache.felix.framework-4.2.1.jar:]\r\n\tat org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4403)[org.apache.felix.framework-4.2.1.jar:]\r\n\tat org.apache.felix.framework.Felix.startBundle(Felix.java:2092)[org.apache.felix.framework-4.2.1.jar:]\r\n\tat org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1291)[org.apache.felix.framework-4.2.1.jar:]\r\n\tat org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304)[org.apache.felix.framework-4.2.1.jar:]\r\n\tat java.lang.Thread.run(Thread.java:745)[:1.7.0_75]\r\nCaused by: org.osgi.framework.BundleException: Uses constraint violation. Unable to resolve bundle revision org.atmosphere.annotations [129.0] because it exports package 'org.atmosphere.annotation' and is also exposed to it from bundle revision org.atmosphere.runtime [130.0] via the following dependency chain:\r\n\r\n  org.atmosphere.annotations [129.0]\r\n    import: (&(osgi.wiring.package=org.atmosphere.config.service)(version>=2.2.0)(!(version>=3.0.0)))\r\n     |\r\n    export: osgi.wiring.package=org.atmosphere.config.service; uses:=org.atmosphere.annotation\r\n    export: osgi.wiring.package=org.atmosphere.annotation\r\n  org.atmosphere.runtime [130.0]\r\n\tat org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3980)[org.apache.felix.framework-4.2.1.jar:]\r\n\tat org.apache.felix.framework.Felix.startBundle(Felix.java:2037)[org.apache.felix.framework-4.2.1.jar:]\r\n\tat org.apache.felix.framework.BundleImpl.start(BundleImpl.java:955)\r\n\tat org.apache.felix.framework.BundleImpl.start(BundleImpl.java:942)\r\n\tat org.apache.karaf.features.internal.FeaturesServiceImpl.startBundle(FeaturesServiceImpl.java:477)\r\n``` \r\nI think that this happen because both bundles export the same package (org.atmosphere.annotation).\r\n\r\nAtmoshere Framework version: 2.2.6\r\nApache Karaf version: 3.0.2"},"comment":{"url":"https://api.github.com/repos/Atmosphere/atmosphere/issues/comments/80508055","html_url":"https://github.com/Atmosphere/atmosphere/issues/1896#issuecomment-80508055","issue_url":"https://api.github.com/repos/Atmosphere/atmosphere/issues/1896","id":80508055,"user":{"login":"jfarcand","id":51285,"avatar_url":"https://avatars.githubusercontent.com/u/51285?v=3","gravatar_id":"","url":"https://api.github.com/users/jfarcand","html_url":"https://github.com/jfarcand","followers_url":"https://api.github.com/users/jfarcand/followers","following_url":"https://api.github.com/users/jfarcand/following{/other_user}","gists_url":"https://api.github.com/users/jfarcand/gists{/gist_id}","starred_url":"https://api.github.com/users/jfarcand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfarcand/subscriptions","organizations_url":"https://api.github.com/users/jfarcand/orgs","repos_url":"https://api.github.com/users/jfarcand/repos","events_url":"https://api.github.com/users/jfarcand/events{/privacy}","received_events_url":"https://api.github.com/users/jfarcand/received_events","type":"User","site_admin":false},"created_at":"2015-03-14T14:28:26Z","updated_at":"2015-03-14T14:28:26Z","body":"OK I've decided to not export atmosphere-runtime's  `org.atmosphere.annotations` because those classes are internal, except for one class `Processor`. I will move that class out of that package but first can you try `2.3.0-SNAPSHOT`"}}