title: CQ5 OSGi bundle does not start:- Activator cannot be found
body: <p>I am working on a Mollom captcha implementation (as a component), for which I need an OSGI bundle created. I created one using eclipse (because it required a couple of more jars so as to compile correctly). Although the bundle was created without any errors, when I upload the jar onto the OSGi console, it just does not start. I opened up error.log and I find this:-</p>
  
  <pre><code>27.09.2013 12:10:33.264 *INFO* [pool-6-thread-34-com/day/cq/replication/job/publish(com/day/cq/replication/job/publish)] com.day.cq.replication.impl.AgentManagerImpl Processing job for agent publish
  27.09.2013 12:10:33.265 *INFO* [pool-6-thread-34-com/day/cq/replication/job/publish(com/day/cq/replication/job/publish)] com.day.cq.replication.Agent.publish Sending POST request to http://localhost:4503/bin/receive?sling:authRequestLogin=1
  27.09.2013 12:10:33.346 *INFO* [0:0:0:0:0:0:0:1 [1380264033342] POST /system/console/bundles/322 HTTP/1.1] com.mollom.client BundleEvent STARTING
  27.09.2013 12:10:33.346 *INFO* [0:0:0:0:0:0:0:1 [1380264033342] POST /system/console/bundles/322 HTTP/1.1] com.mollom.client BundleEvent STOPPING
  27.09.2013 12:10:33.346 *INFO* [0:0:0:0:0:0:0:1 [1380264033342] POST /system/console/bundles/322 HTTP/1.1] com.mollom.client BundleEvent STOPPED
  27.09.2013 12:10:33.346 *ERROR* [0:0:0:0:0:0:0:1 [1380264033342] POST /system/console/bundles/322 HTTP/1.1] cqse-httpservice %bundles.pluginTitle: Cannot start (org.osgi.framework.BundleException: Not found: com.mollom.client.Activator) org.osgi.framework.BundleException: Not found: com.mollom.client.Activator
  </code></pre>
  
  <p>The thing is, my jar <strong>DOES</strong> contain an activator class (the auto-generated one). </p>
  
  <p>Here is my manifest file:- </p>
  
  <pre><code>Manifest-Version: 1.0
  Bundle-ManifestVersion: 2
  Bundle-Name: Mollom Client
  Bundle-SymbolicName: com.mollom.client
  Bundle-Version: 1.0.0.qualifier
  Bundle-Activator: com.mollom.client.Activator
  Bundle-Vendor: MOLLOM
  Bundle-RequiredExecutionEnvironment: JavaSE-1.6
  Import-Package: org.osgi.framework;version="1.3.0"
  Export-Package: com.mollom.client,
   com.mollom.client.datastructures,
   com.mollom.client.rest
  Bundle-ClassPath: lib/com.sun.jersey.jersey-core-1.4.0.jar,
   lib/jersey-client.jar,
   lib/oauth-client-1.6.jar,
   lib/oauth-signature-1.4.jar,
   src/
  Bundle-ActivationPolicy: lazy
  </code></pre>
  
  <p>I understand that adding lib to the classpath is not best practise, but I doubt any of these included jars are going to be used beyond my Mollom Captcha service, so I went with it. </p>
  
  <p>I think my error has something to do with the way I'm setting my classpath.</p>
  
  <p>Can anyone point me in the right direction?</p>