0

I try to migrate my plugin from eclipse 3.2 to eclipse 4.3. I face some major error when starting the plugin.

I got this error message:

The activator projectscheduler_final.Activator for bundle ProjectScheduler_Final is invalid

My OSGi Manifest looks like this:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: ProjectScheduler_Final Plug-in
Bundle-SymbolicName: ProjectScheduler_Final; singleton:=true
Bundle-Version: 1.0.0
Bundle-Activator: projectscheduler_final.Activator
Bundle-Localization: plugin
Bundle-ClassPath: mysql-connector-java-5.1.18-bin.jar
Require-Bundle: org.eclipse.ui,
 org.eclipse.core.runtime,
 org.eclipse.ui.forms
Eclipse-LazyStart: true

And my pluginxml like this

<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
<plugin>

   <extension
         id="application"
         point="org.eclipse.core.runtime.applications">
      <application>
         <run
               class="projectscheduler_final.Application">
         </run>
      </application>
   </extension>
   <extension
         point="org.eclipse.ui.perspectives">
      <perspective
            class="projectscheduler_final.Perspective"
            fixed="false"
            id="ProjectScheduler_Final.perspective"
            name="Perspective">
      </perspective>
   </extension>
   <extension
         point="org.eclipse.ui.views">
      <view
            name="View"
            class="projectscheduler_final.View"
            id="ProjectScheduler_Final.view">
      </view>
   </extension>
   <extension
         point="org.eclipse.ui.editors">
      <editor
            class="projectscheduler_final.ProjectSchedulerEditor"
            default="false"
            id="TestEditor"
            icon="images/folder_table.png"
            name="Test Editor"/>
      <editor
            class="projectscheduler_final.ProjectSchedulerEditorCreateProject"
            default="false"
            icon="images/wand.png"
            id="CreateProject"
            name="Create project editor"/>
      <editor
            class="projectscheduler_final.ProjectSchedulerEditorCreateSubProject"
            default="false"
            icon="images/wand.png"
            id="CreateSubProject"
            name="Create subproject editor"/>
   </extension>
   <extension
         point="org.eclipse.ui.commands">
      <command
            id="ProjectScheduler Final.command1"
            name="ProjectScheduler Final.command1"/>
   </extension>

</plugin>

I tried a few tutorials from Vogella and co. but nothing cleared the error. I checked the Names of the application etc. everything seems to be in place. It would be nice if anybody would have some hint or a pointer where I should take a closer look at..

Johnny000
  • 2,058
  • 5
  • 30
  • 59

2 Answers2

2

Firstly, you need to switch the core dependencies to the new target platform.

Go to plugin.xml -> Dependencies -> Remove the org.eclipse.ui, org.eclipse.core.runtime and org.eclipse.ui.forms then add them again!

Secondly, remember to include all of your required plug-in from the Debug Configurations window.

Go there, go to Plug-ins, deselect Target Platform, click Add Required Plug-ins, click Validate, then Apply and run it.

Many things have changed since 3.2, so if this still doesn't work, migrate the app manually. Start from scratch and copy class by class. Ocassionally see if the app starts.

Georgian
  • 8,795
  • 8
  • 46
  • 87
0

I solved to problem adding ., to the Bundle-ClassPath in the MANIFEST.MF

Johnny000
  • 2,058
  • 5
  • 30
  • 59