title: eclipse4 RCP Fragment "Unable to load class from bundle"
body: <p>I currently try to migrate an Eclipse 3 RCP application to e4. The project is based on a main plugin project and several fragment projects. I'm using Eclipse Mars for developing. The following description is based on a sample project I created for this.</p>
  
  <p>The main application provides a simple menu with some handled menu items. The fragment should add some more menu items to this. But I get an exception telling me, that the assigned handler class could not be loaded:</p>
  
  <pre class="lang-none prettyprint-override"><code>!ENTRY org.eclipse.e4.ui.workbench 4 0 2015-10-15 17:44:04.540
  !MESSAGE Unable to load class 'de.fragment.Handler' from bundle '61'
  !STACK 0
  java.lang.ClassNotFoundException: Can not load a class from a fragment bundle: E4TestFragment_1.0.0.qualifier [61]
  </code></pre>
  
  <p>The structures of the both projects are more or less like follows.</p>
  
  <p><strong>Main application (eclipse PlugIn-Project):</strong></p>
  
  <ul>
  <li>META-INF/MANIFEST.MF</li>
  <li>Application.e4xmi</li>
  <li>plugin.xml</li>
  </ul>
  
  <p>MANIFEST.MF content:</p>
  
  <pre class="lang-none prettyprint-override"><code>Manifest-Version: 1.0
  Bundle-ManifestVersion: 2
  Bundle-Name: E4Test3
  Bundle-SymbolicName: E4Test3;singleton:=true
  Bundle-Version: 1.0.0.qualifier
  Require-Bundle: javax.inject;bundle-version="1.0.0",
   org.eclipse.core.runtime;bundle-version="3.11.0",
   org.eclipse.swt;bundle-version="3.104.0",
   org.eclipse.e4.ui.model.workbench;bundle-version="1.1.100",
   org.eclipse.jface;bundle-version="3.11.0",
   org.eclipse.e4.ui.services;bundle-version="1.2.0",
   org.eclipse.e4.ui.workbench;bundle-version="1.3.0",
   org.eclipse.e4.core.di;bundle-version="1.5.0",
   org.eclipse.e4.ui.di;bundle-version="1.1.0",
   org.eclipse.e4.core.contexts;bundle-version="1.4.0",
   org.eclipse.e4.ui.workbench.swt;bundle-version="0.13.0",
   org.eclipse.e4.ui.workbench.renderers.swt;bundle-version="0.13.0"
  Bundle-RequiredExecutionEnvironment: JavaSE-1.8
  Bundle-ClassPath: .
  </code></pre>
  
  <p><strong>Fragment (eclipse Fragment-Project):</strong></p>
  
  <ul>
  <li>de/fragment/Handler.java</li>
  <li>META-INF/MANIFEST.MF</li>
  <li>fragment.e4xmi</li>
  <li>fragment.xml</li>
  </ul>
  
  <p>MANIFEST.MF content:</p>
  
  <pre class="lang-none prettyprint-override"><code>Manifest-Version: 1.0
  Bundle-ManifestVersion: 2
  Bundle-Name: E4TestFragment
  Bundle-SymbolicName: E4TestFragment;singleton:=true
  Bundle-Version: 1.0.0.qualifier
  Bundle-RequiredExecutionEnvironment: JavaSE-1.8
  Fragment-Host:  E4Test3;bundle-version="1.0.0"
  Export-Package: de.fragment
  Bundle-ClassPath: .
  </code></pre>
  
  <p>The fragment.e4xmi itself is evaluated correctly. I checked this by removing the handler from the menu item which then just adds the icon to the gui.</p>
  
  <p>Honestly I have no idea what could cause this exception. Does anyone of you have an idea and could help me?</p>
  
  <p>Thanks in advance</p>