title: OSGI bundle is not getting started in Apache Servicemix
body: <p>I am developing http client application as a OSGI bundle project, i have used apache maven to create project folder structure used below command.</p>
  
  <pre><code>mvn archetype:generate -DarchetypeGroupId=org.apache.karaf.archetypes -DarchetypeArtifactId=karaf-blueprint-archetype -DarchetypeVersion=2.3.7 -DgroupId=com.techiyhub -DartifactId=integration.sms -Dversion=1.0-SNAPSHOT -Dpackage=com.techiyhub.integration.sms
  </code></pre>
  
  <p>The above command created project folder structure, as i am using httpclient based application. i have added dependencies in pom.xml as below.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;&lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;groupId&gt;com.techiyhub&lt;/groupId&gt;
  &lt;artifactId&gt;integration.sms&lt;/artifactId&gt;
  &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  &lt;packaging&gt;bundle&lt;/packaging&gt;
  &lt;name&gt;integration.sms Blueprint Bundle&lt;/name&gt;
  &lt;description&gt;integration.sms OSGi blueprint bundle project.&lt;/description&gt;
  &lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.felix&lt;/groupId&gt;
              &lt;artifactId&gt;maven-bundle-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.4.0&lt;/version&gt;
              &lt;extensions&gt;true&lt;/extensions&gt;
              &lt;configuration&gt;
                  &lt;instructions&gt;
                      &lt;Bundle-SymbolicName&gt;${project.artifactId}&lt;/Bundle-SymbolicName&gt;
                      &lt;Bundle-Version&gt;${project.version}&lt;/Bundle-Version&gt;
                      &lt;Export-Package&gt;
                          com.techiyhub.integration.sms*;version=${project.version}
                      &lt;/Export-Package&gt;
                      &lt;Import-Package&gt;
                          *
                      &lt;/Import-Package&gt;
                  &lt;/instructions&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.httpcomponents&lt;/groupId&gt;
          &lt;artifactId&gt;httpcore&lt;/artifactId&gt;
          &lt;version&gt;4.3.2&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.httpcomponents&lt;/groupId&gt;
          &lt;artifactId&gt;httpclient&lt;/artifactId&gt;
          &lt;version&gt;4.3.5&lt;/version&gt;
      &lt;/dependency&gt;       
      &lt;dependency&gt;
          &lt;groupId&gt;commons-logging&lt;/groupId&gt;
          &lt;artifactId&gt;commons-logging&lt;/artifactId&gt;
          &lt;version&gt;1.0.4&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;commons-codec&lt;/groupId&gt;
          &lt;artifactId&gt;commons-codec&lt;/artifactId&gt;
          &lt;version&gt;1.6&lt;/version&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt; 
  </code></pre>
  
  <p></p>
  
  <p>I executed below command,</p>
  
  <p>mvn install</p>
  
  <p>it created desired jar file in local maven repository.</p>
  
  <p>Problem started here. i tried to deploy the bundle in apache servicemix it has installed the bundle but while starting bundle it gave an error</p>
  
  <p>i have executed below commands in servicemix shell</p>
  
  <p>osgi:install mvn:com.techiyhub/integration.sms/1.0-SNAPSHOT</p>
  
  <p>it got installed with bundle id, then i executed below command</p>
  
  <p>osgi:start 302</p>
  
  <p>It gave below error</p>
  
  <blockquote>
    <p>Error executing command: Error starting bundles:
            Unable to start bundle 302: Unresolved constraint in bundle integration.sms [302]: Unable to resolve 302.0: miss
    ing requirement [302.0] osgi.wiring.package; (osgi.wiring.package=org.apache.http)</p>
  </blockquote>
  
  <p>Full error stack trace as below</p>
  
  <blockquote>
    <p></p>
  </blockquote>
  
  <pre><code>2015-10-26 14:33:12,551 | ERROR | l Console Thread | Console                          | 22 - org.apache.karaf.shell.cons
  ole - 2.4.3 | Exception caught while executing command
  org.apache.karaf.shell.console.MultiException: Error starting bundles:
          Unable to start bundle 302: Unresolved constraint in bundle integration.sms [302]: Unable to resolve 302.0: miss
  ing requirement [302.0] osgi.wiring.package; (osgi.wiring.package=org.apache.http)
          at org.apache.karaf.shell.console.MultiException.throwIf(MultiException.java:91)
          at org.apache.karaf.shell.osgi.StartBundle.doExecute(StartBundle.java:43)
          at org.apache.karaf.shell.osgi.BundlesCommand.doExecute(BundlesCommand.java:37)
          at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:38)
          at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)
          at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_80]
          at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_80]
          at org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java:54)[16:org.apache.aries.proxy.impl:1.0.4]
  
          at org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:119)[16:org.apache.aries.proxy.impl:1.0.4]
          at org.apache.karaf.shell.console.commands.$BlueprintCommand22803378.execute(Unknown Source)[22:org.apache.karaf
  .shell.console:2.4.3]
          at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[22:org.apache.karaf.shell.console:2.
  4.3]
          at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)[22:org.apache.karaf.shell.console:2.4.3]
          at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)[22:org.apache.karaf.shell.console:2.
  4.3]
          at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[22:org.apache.karaf.shell.console:2.4.3]
          at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[22:org.apache.karaf.shell.console:2.4.3]
          at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[22:org.apache.karaf.shell.console:2.4.3]
          at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:92)[22:org.apache.karaf.shel
  l.console:2.4.3]
          at org.apache.karaf.shell.console.jline.Console.run(Console.java:195)[22:org.apache.karaf.shell.console:2.4.3]
          at org.apache.karaf.shell.console.jline.DelayedStarted.run(DelayedStarted.java:79)[22:org.apache.karaf.shell.con
  sole:2.4.3]
  Caused by: java.lang.Exception: Unable to start bundle 302: Unresolved constraint in bundle integration.sms [302]: Unabl
  e to resolve 302.0: missing requirement [302.0] osgi.wiring.package; (osgi.wiring.package=org.apache.http)
          at org.apache.karaf.shell.osgi.StartBundle.doExecute(StartBundle.java:39)
          ... 18 more
  Caused by: org.osgi.framework.BundleException: Unresolved constraint in bundle integration.sms [302]: Unable to resolve
  302.0: missing requirement [302.0] osgi.wiring.package; (osgi.wiring.package=org.apache.http)
          at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4002)
          at org.apache.felix.framework.Felix.startBundle(Felix.java:2045)
          at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:976)
          at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:963)
          at org.apache.karaf.shell.osgi.StartBundle.doExecute(StartBundle.java:37)
          ... 18 more
  
  
          Caused by: org.osgi.framework.BundleException: Unresolved constraint in bundle : Unable to resolve: missing requirement [302.0] osgi.wiring.package;(osgi.wiring.package=org.apache.http)
  </code></pre>
  
  <p>Please help me out on this.</p>