title: Osgi Exception in Activator.start()
body: <p>I new Start osgi My code is running java application but it is not running osgi the error reason is 'import com.sun.codemodel' how resolve this problem .</p>
  
  <p>My activator class is : </p>
  
  <pre><code>package deneme;
  
  import java.io.File;
  import java.net.URL;
  
  import org.jsonschema2pojo.SchemaMapper;
  import org.osgi.framework.BundleActivator;
  import org.osgi.framework.BundleContext;
  
  import com.sun.codemodel.JCodeModel;
  
  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!!");
          String workingDir = System.getProperty("user.dir");
  
          JCodeModel codeModel = new JCodeModel();
          try {
              URL sourceRota = new URL("file:///C:/Users/Administrator/workspace/NavsimKisa/rota_yeni.json");
              URL sourceKriter = new URL("file:///C:/Users/Administrator/workspace/NavsimKisa/kriter_yeni.json");
              URL sourceSabit = new URL("file:///C:/Users/Administrator/workspace/NavsimKisa/sabit_yeni.json");
  
              new SchemaMapper().generate(codeModel, "ClassNameRota", "Rota.entity", sourceRota);
              new SchemaMapper().generate(codeModel, "ClassNameKriter", "Kriter.entity", sourceKriter);
              new SchemaMapper().generate(codeModel, "ClassNameSabit", "Sabit.entity", sourceSabit);
  
              codeModel.build(new File(workingDir + "/src/main/java"));
          } catch (Exception e) {
              // TODO: handle exception
          }
  
      }
  
      /*
       * (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>my error  : </p>
  
  <pre><code>my error is :Hello World!!
  !SESSION 2015-10-14 17:46:29.576 -----------------------------------------------
  eclipse.buildId=unknown
  java.version=1.8.0_60
  java.vendor=Oracle Corporation
  BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en
  Command-line arguments:  -dev file:D:/navsim3o/.metadata/.plugins/org.eclipse.pde.core/New_configuration (1)/dev.properties -os win32 -ws win32 -arch x86_64 -consoleLog -console
  
  !ENTRY deneme 4 0 2015-10-14 17:46:30.794
  !MESSAGE FrameworkEvent ERROR
  !STACK 0
  org.osgi.framework.BundleException: Exception in deneme.Activator.start() of bundle deneme.
      at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:734)
  Caused by: java.lang.ClassNotFoundException: com.sun.codemodel.JCodeModel cannot be found by deneme_1.0.0.qualifier
      at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
      at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
  
  Root exception:
  java.lang.NoClassDefFoundError: com/sun/codemodel/JCodeModel
      at deneme.Activator.start(Activator.java:22)
      at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
  
  Caused by: java.lang.ClassNotFoundException: com.sun.codemodel.JCodeModel cannot be found by deneme_1.0.0.qualifier
      at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
      at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
      at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
      at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      ... 16 more
  </code></pre>