1 Reply Latest reply on Jun 13, 2012 4:37 AM by Freeman(Yue) Fang

    Unresolved constraint in bundle ...: Unable to resolve

    nicolas duminil Master

      Greetings,

       

      I have to bundles: a routing layer one, defining Camel routes, and a model layer one, defining the domain object used by the routes. The model bundle contains the following:

       

      <Export-Package>com.mycompany.myproject.integration.model.*</Export-Package>

       

      However, building it I have the following output:

       

      Warning building bundle com.mycompany.myproject.integration:myproject.model:bundle:0.0.1-SNAPSHOT : Instructions in Export-Package that are never used: com\.mycompany\.myproject\.integration\.model\..*|com\.mycompany\.myproject\.integration\.model

      Classpath: Jar:.,Jar:camel-bindy,Jar:camel-core,Jar:slf4j-api,Jar:commons-management,Jar:commons-lang

       

      Warning building bundle com.mycompany.myproject.integration:myproject.model:bundle:0.0.1-SNAPSHOT : Superfluous export-package instructions:

      --- maven-install-plugin:2.3.1:install (default-install) @ myproject.model ---

       

      The routing bundle has the following in its pom:

       

       

       

      Deploying this raises the following exception:

       

      java.lang.Exception: Could not start bundle mvn:com.mycompany.myproject.integration/myproject.routing/0.0.1-SNAPSHOT in feature(s) myproject-0.0.1-SNAPSHOT: Unresolved constraint in bundle myproject.routing : Unable to resolve 429.0: missing requirement package; (package=com.mycompany.myproject

      .integration.model)

              at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:353)[41:org.apache.karaf.features.core:2.2.2.fuse-04-06]

              at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeature(FeaturesServiceImpl.java:280)[41:org.apache.karaf.features.core:2.2.2.fuse-04-06]

              at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeature(FeaturesServiceImpl.java:276)[41:org.apache.karaf.features.core:2.2.2.fuse-04-06]

              at org.apache.karaf.features.command.InstallFeatureCommand.doExecute(InstallFeatureCommand.java:62)[20:org.apache.karaf.features.command:2.2.2.fuse-04-06]

              at org.apache.karaf.features.command.FeaturesCommandSupport.doExecute(FeaturesCommandSupport.java:39)[20:org.apache.karaf.features.command:2.2.2.fuse-04-06]

              at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:38)[36:org.apache.karaf.shell.console:2.2.2.fuse-04-06]

              at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)[36:org.apache.karaf.shell.console:2.2.2.fuse-04-06]

              at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[36:org.apache.karaf.shell.console:2.2.2.fuse-04-06]

              at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:474)[36:org.apache.karaf.shell.console:2.2.2.fuse-04-06]

              at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:400)[36:org.apache.karaf.shell.console:2.2.2.fuse-04-06]

              at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[36:org.apache.karaf.shell.console:2.2.2.fuse-04-06]

              at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[36:org.apache.karaf.shell.console:2.2.2.fuse-04-06]

              at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[36:org.apache.karaf.shell.console:2.2.2.fuse-04-06]

              at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)[36:org.apache.karaf.shell.console:2.2.2.fuse-04-06]

              at org.apache.karaf.shell.console.jline.Console.run(Console.java:240)[36:org.apache.karaf.shell.console:2.2.2.fuse-04-06]

              at java.lang.Thread.run(Thread.java:662)[:1.6.0_24]

      Caused by: org.osgi.framework.BundleException: Unresolved constraint in bundle myproject.routing : Unable to resolve 429.0: missing requirement package; (package=com.mycompany.myproject.integration.model)

              at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3466)[org.apache.felix.framework-3.0.9-fuse-05-06.jar:]

              at org.apache.felix.framework.Felix.startBundle(Felix.java:1739)[org.apache.felix.framework-3.0.9-fuse-05-06.jar:]

              at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:927)[org.apache.felix.framework-3.0.9-fuse-05-06.jar:]

       

      Looking in the myproject.model MANIFEST.MF I don't have any Export-Package directive despite the instruction given by the POM. What could be the problem here ?

       

      Many thanks in advance,

       

      Nicolas