title: Missing Constraint: Import-Package: Not able to start Activator
body: <p>I am trying to work on an example where <code>JPA</code> is used in <code>OSGi</code>, but I am facing a weird issue while starting the activator.</p>
  
  <p>When I start the activator a validation dialog box pops up and says the above error. I have imported the packages and its the first time I am seeing this problem.</p>
  
  <p><img src="https://i.stack.imgur.com/AlmEy.jpg" alt="enter image description here"></p>
  
  <p>I have the following <strong>Activator</strong> class:</p>
  
  <pre><code>package org.aricent.jpaosgi;
  
  public class Activator implements BundleActivator {
  
  /*
   * (non-Javadoc)
   * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
   */
  public void start(BundleContext context) throws Exception {
      System.out.println("Hello World!!");
  
      try {
          EntityManagerFactory emf = Persistence
                  .createEntityManagerFactory("todos");
          EntityManager em = emf.createEntityManager();
      } catch (Exception e) {
          e.printStackTrace();
      }
  }
  
  /*
   * (non-Javadoc)
   * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
   */
  public void stop(BundleContext context) throws Exception {
      System.out.println("Goodbye World!!");
  }
  </code></pre>
  
  <p>}</p>
  
  <p><strong>MANIFEST.MF</strong></p>
  
  <pre><code>Manifest-Version: 1.0
  Bundle-ManifestVersion: 2
  META-persistence: META-INF/persistence.xml
  JPA-PersistenceUnits: todos
  Bundle-Name: JpaOsgi
  Bundle-SymbolicName: org.aricent.jpaOsgi
  Bundle-Version: 1.0.0.qualifier
  Bundle-Activator: org.aricent.jpaosgi.Activator
  Bundle-RequiredExecutionEnvironment: JavaSE-1.6
  Import-Package: javax.persistence;version="2.1.0",
                  org.osgi.framework;version="1.3.0"
  Bundle-ActivationPolicy: lazy
  </code></pre>
  
  <p><strong>persistence.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
  &lt;persistence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
    version="2.0" xmlns="http://java.sun.com/xml/ns/persistence"&gt;
    &lt;persistence-unit name="todos" transaction-type="RESOURCE_LOCAL"&gt;
    &lt;provider&gt;org.eclipse.persistence.jpa.PersistenceProvider&lt;/provider&gt;
  &lt;class&gt;myJPAProject.Todo&lt;/class&gt;
  &lt;properties&gt;
    &lt;property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.EmbeddedDriver" /&gt;
    &lt;property name="javax.persistence.jdbc.url"
      value="jdbc:derby:/home/vogella/databases/simpleDb;create=true" /&gt;
    &lt;property name="javax.persistence.jdbc.user" value="test" /&gt;
    &lt;property name="javax.persistence.jdbc.password" value="test" /&gt;
  
    &lt;!-- EclipseLink should create the database schema automatically --&gt;
    &lt;property name="eclipselink.ddl-generation" value="create-tables" /&gt;
    &lt;property name="eclipselink.ddl-generation.output-mode"
      value="database" /&gt;
  &lt;/properties&gt;
  </code></pre>
  
  <p>
   </p>
  
  <p>Can anyone plz help me out here. Thank you.</p>