Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Plugin NOT working when exported
Plugin NOT working when exported [message #606013] Sat, 12 June 2010 16:01
Todd Ferrell is currently offline Todd FerrellFriend
Messages: 5
Registered: October 2009
Junior Member
I wrote a plugin that creates a custom java project. This was working fine until I added the functionality to programmatically create a Server for the project. This functionality requires the org.eclipse.wst.server.core plugin and this too works fine when I run my plugin as an eclipse application, but when I export and restart, I get a NoClassDefFoundError on 'org.eclipse.wst.server.core.internal.ServerPlugin' when I try to run the following:

ServerPlugin.getInstance();

I have also tried:

Platform.getBundle("org.eclipse.wst.server.core").start();

This will run without error, but I still can't reference any classes in the bundle. I've included some additional source below. Any help would be greatly appreciated.

plugin.xml:

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

<extension
point="org.eclipse.ui.newWizards">
<wizard
name="XXXX IT Java Project"
icon="icons/XXX_logo.gif"
category="org.eclipse.jdt.ui.java"
class="com.XXX.XXXXit.project.creator.ui.wizards.JavaProjectWizard "
id="com.XXX.XXXXit.project.creator.ui.wizards.JavaProjectWizard "
preferredPerspectives=" org.eclipse.jdt.ui.JavaPerspective,org.eclipse.jdt.ui.JavaBr owsingPerspective,org.eclipse.jdt.ui.JavaHierarchyPerspectiv e "
project="true"
finalPerspective="org.eclipse.jdt.ui.JavaPerspective">
</wizard>
</extension>
<extension
point="org.eclipse.ui.propertyPages">
<page
name="Project Archetype"
objectClass="org.eclipse.core.resources.IProject"
adaptable="true"
class=" com.XXX.XXXXit.project.creator.ui.dialogs.QuestionAndRespons ePropertyPage "
id=" com.XXX.XXXXit.project.creator.ui.dialogs.QuestionAndRespons ePropertyPage ">

<enabledWhen>
<adapt type="org.eclipse.core.resources.IProject">
<test property="org.eclipse.core.resources.projectNature" value="com.XXX.XXXXit.project.creator.ui.ProjectArchetypeNature "/>
</adapt>
</enabledWhen>

</page>
</extension>
<extension
point="org.eclipse.ui.menus">
<menuContribution
locationURI="popup:org.eclipse.jdt.ui.PackageExplorer">
<command
commandId="com.XXX.XXXXt.project.makeArchetypeProject"
label="Make XXXX-IT Archetype"
style="push">
<visibleWhen>
<iterate operator="and" ifEmpty="false">
<adapt type="org.eclipse.core.resources.IProject">
<not>
<test property="org.eclipse.core.resources.projectNature"
value="com.XXX.XXXXit.project.creator.ui.ProjectArchetypeNature ">
</test>
</not>
</adapt>
</iterate>
</visibleWhen>
</command>
</menuContribution>
</extension>
<extension
point="org.eclipse.ui.commands">
<command
id="com.XXX.XXXXit.project.makeArchetypeProject"
name="MakeXXXX-IT Archetype">
</command>
</extension>
<extension
id="makeArchetypeProjectHandler"
name="makeArchetypeProjectHandler"
point="org.eclipse.ui.handlers">
<handler
class=" com.XXX.XXXXit.project.creator.handlers.MakeArchetypeProject Handler "
commandId="com.XXX.XXXXit.project.makeArchetypeProject">
</handler>
</extension>


<extension
point="org.eclipse.core.resources.natures"
id="com.XXX.XXXXit.project.creator.ui.ProjectArchetypeNature "
name="Project Archetype Nature">
<runtime>
<run class="com.XXX.XXXXit.project.creator.ui.ProjectArchetypeNature ">
</run>
</runtime>
<requires-nature id="org.eclipse.jdt.core.javanature"/>
</extension>
</plugin>

end plugin.xml

manifest.mf:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: XXX IT Project Creator UI
Bundle-SymbolicName: com.XXX.XXXit.project.archetype.ui;singleton:=true
Bundle-Version: 1.0.0
Bundle-Activator: com.XXX.XXXit.project.creator.ui.Activator
Bundle-Vendor: XXX XXX IT
Require-Bundle: com.todd.question.and.response;bundle-version="1.0.0",
org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.ui.ide,
org.eclipse.jdt.core;bundle-version="3.5.2",
org.eclipse.jdt.ui;bundle-version="3.5.2",
com.XXX.XXXit.project.archetype.core;bundle-version="1.0.0",
org.eclipse.jdt.launching;bundle-version="3.5.1",
org.eclipse.core.filesystem;bundle-version="1.2.1",
org.eclipse.team.cvs.core;bundle-version="3.3.200",
org.eclipse.team.cvs.ui;bundle-version="3.3.202",
org.eclipse.team.core;bundle-version="3.5.1",
org.eclipse.emf.mwe.core;bundle-version="0.7.2",
org.eclipse.debug.core;bundle-version="3.5.1",
org.eclipse.jst.server.tomcat.core;bundle-version="1.1.106",
org.eclipse.jst.j2ee;bundle-version="1.1.301",
org.eclipse.wst.common.frameworks;bundle-version="1.1.300",
org.eclipse.jst.j2ee.web;bundle-version="1.1.301",
org.eclipse.wst.server.core;bundle-version="1.1.102"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Export-Package: com.XXX.XXXit.project.creator.handlers
Bundle-ActivationPolicy: lazy

end manifest.mf

build.properties:

source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
icons/,\
plugin.xml,\
plugin.properties

end build.properties
Previous Topic:p2 director application - blindly pull in all IUs from a repo?
Next Topic:build fails and then succeeds without me changing anything
Goto Forum:
  


Current Time: Thu Apr 25 06:12:51 GMT 2024

Powered by FUDForum. Page generated in 0.03444 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top