I have this very unusual problem.
I developed this plugin with property page. When I run plug-in as Eclipse application it works perfectly, but when I export it and copy it to eclipse/dropin folder I get ClassNotFoundException.
My Manifest.mf looks like this:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: SpectrumPlugin
Bundle-SymbolicName: sinaut.spectrum.plugin; singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: sinaut.spectrum.plugin.activator.SpectrumPluginActivator
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.4.0",
org.eclipse.ui;bundle-version="3.4.2",
org.eclipse.core.resources;bundle-version="3.4.2",
org.eclipse.ui.console;bundle-version="3.3.1"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ClassPath: JARs/sshfactory.jar,
.
Import-Package: org.eclipse.ui.console
Export-Package: com.jscape.a,
sinaut.spectrum.plugin.activator,
sinaut.spectrum.plugin.ftp,
sinaut.spectrum.plugin.preferences,
sinaut.spectrum.plugin.remotebuild,
sinaut.spectrum.plugin.ssh
plugin.xml looks like this:
<plugin>
<extension
point="org.eclipse.ui.preferencePages">
<page
id="BildPreferencePage"
name="Bild Preferences"
class="sinaut.spectrum.plugin.preferences.BildPreferencePage"
>
</page>
</extension>
<extension
point="org.eclipse.core.runtime.preferences">
<initializer
class="sinaut.spectrum.plugin.preferences.PreferenceInitializer">
</initializer>
</extension>
<extension
point="org.eclipse.ui.actionSets">
<actionSet
id="sinaut.spectrum.plugin.RemoteBildActionSet"
label="RemoteBildActionSet"
visible="true">
<menu
id="sinaut.spectrum.plugin.RemoteBuildMenu"
label="Remote Build Menu">
<groupMarker
name="content">
</groupMarker>
<separator
name="additions">
</separator>
</menu>
<action
class="sinaut.spectrum.plugin.remotebuild.RemoteBuild"
icon="/icons/rb.gif"
id="sinaut.spectrum.plugin.RemoteBuild"
label="Remote Build"
state="true"
style="push"
toolbarPath="Normal/additions">
</action>
</actionSet>
</extension>
</plugin>
And I've got this message when I try to start this property page "Unable to create the selected preference page.sinaut.spectrum.plugin.preferences.BildPreferencePage", with this stack trace:
java.lang.ClassNotFoundException: sinaut.spectrum.plugin.preferences.BildPreferencePage
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:483)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:399)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:387)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:87)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at org.eclipse.osgi.framework.internal.core.BundleLoader.loadClass(BundleLoader.java:315)
at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:227)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1274)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:160)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:867)
at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:51)
at org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugin.java:267)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchPlugin.createExtension(WorkbenchPlugin.java:263)
at org.eclipse.ui.internal.dialogs.WorkbenchPreferenceNode.createPage(WorkbenchPreferenceNode.java:47)
at org.eclipse.jface.preference.PreferenceDialog.createPage(PreferenceDialog.java:1306)
at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.createPage(FilteredPreferenceDialog.java:385)
at org.eclipse.jface.preference.PreferenceDialog.showPage(PreferenceDialog.java:1197)
at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.showPage(FilteredPreferenceDialog.java:682)
at org.eclipse.jface.preference.PreferenceDialog$10.run(PreferenceDialog.java:702)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.jface.preference.PreferenceDialog$9.selectionChanged(PreferenceDialog.java:698)
at org.eclipse.jface.viewers.StructuredViewer$3.run(StructuredViewer.java:842)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:880)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
at org.eclipse.jface.viewers.StructuredViewer.firePostSelectionChanged(StructuredViewer.java:840)
at org.eclipse.jface.viewers.StructuredViewer.handlePostSelect(StructuredViewer.java:1153)
at org.eclipse.jface.viewers.StructuredViewer$5.widgetSelected(StructuredViewer.java:1178)
at org.eclipse.jface.util.OpenStrategy.firePostSelectionEvent(OpenStrategy.java:250)
at org.eclipse.jface.util.OpenStrategy.access$4(OpenStrategy.java:244)
at org.eclipse.jface.util.OpenStrategy$3.run(OpenStrategy.java:418)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:133)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3378)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3036)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at org.eclipse.ui.internal.OpenPreferencesAction.run(OpenPreferencesAction.java:65)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:583)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:500)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1158)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3401)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3033)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2384)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2348)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2200)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:490)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
It must be something stupid, but I just can't see it.
If anyone can help me with this. I've been stuck for hours on this.
Launch eclipse with below argument
-console
Then find your plug-in id in OSGi console like
ss sinaut.spectrum.plugin
Last using diag to see why your plug-in can't be resolved
diag <id found by ss command>
and try to start it to see whether anything is wrong in its activator
start <id>
Related
When opening the pom.xml in Eclipse using the "Maven Pom Editor" and switching to the tab pom.xml I cannot format the file.
Hitting Ctrl+Shift+F in an totally non-formatted file does not do anyting. When going via the context menu Source -> Format The Format option is disabled.
When I open the file in a XML Editor instead, the formatting works.
Any idea on why this could be the case?
I tried the EMBEDDED Maven and the external version 3.5.2
Eclipse:
Eclipse IDE for Java Developers
Version: Oxygen.2 Release (4.7.2)
Build id: 20171218-0600
m2e Plugin 1.8.2
EDIT [SOLVED]:
I right clicked on the file in the Package Explorer. There, Source -> Format was enabled. Clicking it caused an Exception:
java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 2
at org.eclipse.wst.sse.core.internal.text.TextRegionListImpl.get(TextRegionListImpl.java:147)
at org.eclipse.wst.xml.core.internal.formatter.DefaultXMLPartitionFormatter.formatWithinTag(DefaultXMLPartitionFormatter.java:886)
at org.eclipse.wst.xml.core.internal.formatter.DefaultXMLPartitionFormatter.formatStartTag(DefaultXMLPartitionFormatter.java:543)
at org.eclipse.wst.xml.core.internal.formatter.DefaultXMLPartitionFormatter.formatRegion(DefaultXMLPartitionFormatter.java:448)
at org.eclipse.wst.xml.core.internal.formatter.DefaultXMLPartitionFormatter.formatStartTag(DefaultXMLPartitionFormatter.java:564)
at org.eclipse.wst.xml.core.internal.formatter.DefaultXMLPartitionFormatter.formatRegion(DefaultXMLPartitionFormatter.java:448)
at org.eclipse.wst.xml.core.internal.formatter.DefaultXMLPartitionFormatter.formatStartTag(DefaultXMLPartitionFormatter.java:564)
at org.eclipse.wst.xml.core.internal.formatter.DefaultXMLPartitionFormatter.formatRegion(DefaultXMLPartitionFormatter.java:448)
at org.eclipse.wst.xml.core.internal.formatter.DefaultXMLPartitionFormatter.formatStartTag(DefaultXMLPartitionFormatter.java:564)
at org.eclipse.wst.xml.core.internal.formatter.DefaultXMLPartitionFormatter.formatRegion(DefaultXMLPartitionFormatter.java:448)
at org.eclipse.wst.xml.core.internal.formatter.DefaultXMLPartitionFormatter.formatStartTag(DefaultXMLPartitionFormatter.java:564)
at org.eclipse.wst.xml.core.internal.formatter.DefaultXMLPartitionFormatter.formatRegion(DefaultXMLPartitionFormatter.java:448)
at org.eclipse.wst.xml.core.internal.formatter.DefaultXMLPartitionFormatter.formatStartTag(DefaultXMLPartitionFormatter.java:564)
at org.eclipse.wst.xml.core.internal.formatter.DefaultXMLPartitionFormatter.formatRegion(DefaultXMLPartitionFormatter.java:448)
at org.eclipse.wst.xml.core.internal.formatter.DefaultXMLPartitionFormatter.formatSiblings(DefaultXMLPartitionFormatter.java:491)
at org.eclipse.wst.xml.core.internal.formatter.DefaultXMLPartitionFormatter.format(DefaultXMLPartitionFormatter.java:204)
at org.eclipse.wst.xml.core.internal.formatter.DefaultXMLPartitionFormatter.format(DefaultXMLPartitionFormatter.java:160)
at org.eclipse.wst.xml.core.internal.formatter.XMLFormatterFormatProcessor.formatModel(XMLFormatterFormatProcessor.java:107)
at org.eclipse.wst.xml.core.internal.formatter.XMLFormatterFormatProcessor.formatModel(XMLFormatterFormatProcessor.java:89)
at org.eclipse.wst.xml.core.internal.formatter.XMLFormatterFormatProcessor.formatFile(XMLFormatterFormatProcessor.java:67)
at org.eclipse.wst.sse.ui.internal.handlers.FormatHandler.format(FormatHandler.java:165)
at org.eclipse.wst.sse.ui.internal.handlers.FormatHandler$1.run(FormatHandler.java:204)
at org.eclipse.ui.internal.PendingSyncExec.run(PendingSyncExec.java:58)
at org.eclipse.ui.internal.UILockListener.doPendingWork(UILockListener.java:168)
at org.eclipse.ui.internal.UISynchronizer.lambda$0(UISynchronizer.java:150)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:37)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4213)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3820)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
within Eclipse and the file could not be opened anymore. After closing the editor completely and reopening the file the formatting now works!
Right-click on the pom.xml file > go-to source > click Format.
This was happening for me with eclipse 2022-03. The fix was to make sure that the XML Language Server was enabled...
If I create a test class to use through testng everything works fine as expected. If I then try to run this test via a .xml file then I get the following error log. I am certain all my packages and classes are labelled correctly. I have tried un-installing and reinstalling eclipse and making new workspaces too and trying it with multiple different classes and packages but I always get the same error.
I am running Eclipse Mars on a 64-bit Windows 7.
Thanks.
The following data will be sent:
------
STATUS
------
pluginId org.eclipse.ui
pluginVersion 3.107.0.v20150507-1945
code 0
severity 4
message Unhandled event loop exception
fingerprint 3ed0857c
Exception:java.lang.NullPointerException: null
at HIDDEN.HIDDEN(HIDDEN:-1)
at HIDDEN.HIDDEN(HIDDEN:-1)
at HIDDEN.HIDDEN(HIDDEN:-1)
at HIDDEN.HIDDEN(HIDDEN:-1)
at HIDDEN.HIDDEN(HIDDEN:-1)
at HIDDEN.HIDDEN(HIDDEN:-1)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchShortcutExtension.launch(LaunchShortcutExtension.java:431)
at org.eclipse.debug.internal.ui.actions.LaunchShortcutAction.run(LaunchShortcutAction.java:74)
at org.eclipse.debug.internal.ui.actions.LaunchShortcutAction.runWithEvent(LaunchShortcutAction.java:123)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:595)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:511)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:420)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4362)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1113)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1137)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1122)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:788)
at org.eclipse.jface.action.ActionContributionItem$9.handleEvent(ActionContributionItem.java:1293)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4362)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1113)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4180)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3769)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:654)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:598)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:139)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
at sun.reflect.NativeMethodAccessorImpl.invoke0(null:-2)
at sun.reflect.NativeMethodAccessorImpl.invoke(null:-1)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(null:-1)
at java.lang.reflect.Method.invoke(null:-1)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
------
REPORT
------
anonymousId 3741d217-639d-4c96-970a-231ce281c5eb
name
email
comment
eclipseBuildId 4.5.1.M20150904-0015
eclipseProduct org.eclipse.epp.package.jee.product
javaRuntimeVersion 1.8.0_60-b27
osgiWs win32
osgiOs Windows7
osgiOsVersion 6.1.0
osgiArch x86_64
logMessage false
ignoreSimilar false
-------
BUNDLES
-------
name org.eclipse.core.databinding.observable
version 1.5.0.v20150422-0725
name org.eclipse.core.databinding
version 1.5.0.v20150422-0725
name org.eclipse.core.runtime
version 3.11.1.v20150903-1804
name org.eclipse.debug.ui
version 3.11.100.v20150731-1137
name org.eclipse.e4.ui.workbench
version 1.3.0.v20150531-1948
name org.eclipse.e4.ui.workbench.swt
version 0.13.0.v20150504-0621
name org.eclipse.equinox.app
version 1.3.300.v20150423-1356
name org.eclipse.equinox.launcher
version 1.3.100.v20150511-1540
name org.eclipse.jface
version 3.11.0.v20150602-1400
name org.eclipse.swt
version 3.104.1.v20150825-0743
name org.eclipse.ui
version 3.107.0.v20150507-1945
name org.eclipse.ui.ide.application
version 1.1.0.v20150422-0725
name org.eclipse.ui.ide
version 3.11.0.v20150825-2158
name org.testng.eclipse
version 6.9.7.201510070420
This is the class I am using:
package Test1;
import org.testng.annotations.Test;
public class NewTest {
#Test
public void testOne() {
System.out.println("Run this.");
}
}
and then I right click the class, navigate to TestNG and Convert to TestNG.
testng.xml then appears under my project folder (not within any sub folders of the project) and testng.xml reads as
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Suite" parallel="none">
<test name="Test">
<classes>
<class name="Test1.NewTest"/>
</classes>
</test> <!-- Test -->
</suite> <!-- Suite -->
The current version of Eclipse Mars (v4.5) in combination with TestNG () has indeed a bug. See the comments in the bug, as there is a workaround.
Same question with similar workaround: Run as TestNG Suite not working in eclipse.
I am creating an Eclipse plugin that is relying on the latest version of EGet found here.
In the plugin.xml of my project, I add the 4.1 version to my "required dependencies"
I thought this would fix my issue when trying to run the code.
However, I am now receiving this error when I am trying to install the software:
The reason I am doing this is because of the following exception I have received:
org.eclipse.e4.core.di.InjectionException: java.lang.NoSuchMethodError: org.eclipse.egit.core.project.RepositoryMapping.getMapping(Lorg/eclipse/core/resources/IProject;)Lorg/eclipse/egit/core/project/RepositoryMapping;
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:62)
at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:247)
at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:229)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:149)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:499)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:825)
at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.handleWidgetSelection(HandledContributionItem.java:701)
at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.access$6(HandledContributionItem.java:685)
at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem$4.handleEvent(HandledContributionItem.java:613)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
Has anyone encountered this before? Any guidance on resolving this issue?
You need to also add the bundles EGit depends on, find the list of dependencies of the org.eclipse.egit.ui bundle in its OSGi manifest:
http://git.eclipse.org/c/egit/egit.git/tree/org.eclipse.egit.ui/META-INF/MANIFEST.MF
The complete list of all dependencies and the p2 repositories they can be installed from can be found in EGit's target platform for the respective platform version, e.g. for Mars (Eclipse 4.5) :
http://git.eclipse.org/c/egit/egit.git/tree/org.eclipse.egit.target/egit-4.5.target
I know there are other questions on the subject but I' ve tried them all and didn' t work for me. I want to write some output to excel files from my rcp plug in but it shows:
java.lang.NoClassDefFoundError: org/apache/poi/hssf/usermodel/HSSFWorkbook
So I do: plugin.xml->runtime tab-> add the poi jars in the classpath section.
But then when i try to run, it shows:
org.osgi.framework.BundleException: The activator spyros.getInfo.Activator for
bundle spyros.getInfo is invalid.
My questions:
Do i have to put the poi jars in a specific folder (example in META-INF folder) and then add them to classpath?
How can i fix the activator error?
My MANIFEST.MF
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: GetInfo
Bundle-SymbolicName: spyros.getInfo; singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: spyros.getInfo.Activator
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.jdt.core;bundle-version="3.7.1",
org.eclipse.core.resources;bundle-version="3.7.100",
org.eclipse.ui,
org.eclipse.jdt.ui;bundle-version="3.7.1"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: org.apache.commons.collections
Bundle-ClassPath: lib/poi-3.8-20120326.jar,
lib/poi-examples-3.8-20120326.jar,
lib/poi-excelant-3.8-20120326.jar,
lib/poi-ooxml-3.8-20120326.jar,
lib/poi-ooxml-schemas-3.8-20120326.jar,
lib/poi-scratchpad-3.8-20120326.jar
My build properties
output.. = bin/
bin.includes = plugin.xml,\
META-INF/,\
icons/,\
lib/poi-3.8-20120326.jar,\
lib/poi-examples-3.8-20120326.jar,\
lib/poi-excelant-3.8-20120326.jar,\
lib/poi-ooxml-3.8-20120326.jar,\
lib/poi-ooxml-schemas-3.8-20120326.jar,\
lib/poi-scratchpad-3.8-20120326.jar
My plugin.xml
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension
point="org.eclipse.ui.commands">
<command
defaultHandler="spyros.getInfo.handlers.GetInfo"
id="spyros.getInfo.commands.GetInfo"
name="GetInfo">
</command>
</extension>
<extension
point="org.eclipse.ui.menus">
<menuContribution
allPopups="false"
locationURI="menu:org.eclipse.ui.main.menu">
<menu
id="spyros.getInfo.commands.GetInfo"
label="My Info">
<command
commandId="spyros.getInfo.commands.GetInfo"
label="Get Info"
style="push"
tooltip="Get Info from methods">
</command>
</menu>
</menuContribution>
</extension>
</plugin>
I am so confused, but i am sure that stackoverflow community will help, because you are the best! Thanx in advance!
This is because of:
There has been a ClassNotFoundException trying to load the class in the first place, before it's even got to the start() method.
So for solve this problem:
You have to add . in to your class path see following image.
Add scr as source in your build and . in your bin.includes. See the image below:
I am using Eclipse Indigo, with the latest JBoss tools.
For an existing Seam 2 project I am unable to apply Seam 2 Settings to any of the Seam projects (the main seam project, ejb).
Any time that I try and set seam settings to a known Seam runtime I get the following nullpointer:
java.lang.NullPointerException
at org.eclipse.core.internal.resources.ProjectDescription.setBuildSpec(ProjectDescription.java:569)
at org.jboss.tools.jst.web.WebModelPlugin.addNatureToProjectWithValidationSupport(WebModelPlugin.java:206)
at org.jboss.tools.seam.core.SeamUtil.enableSeamSupport(SeamUtil.java:57)
at org.jboss.tools.seam.ui.preferences.SeamSettingsPreferencePage.performOk(SeamSettingsPreferencePage.java:759)
at org.eclipse.jface.preference.PreferenceDialog$13.run(PreferenceDialog.java:964)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
at org.eclipse.jface.preference.PreferenceDialog.okPressed(PreferenceDialog.java:944)
at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.okPressed(FilteredPreferenceDialog.java:447)
at org.eclipse.jface.preference.PreferenceDialog.buttonPressed(PreferenceDialog.java:233)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at org.eclipse.ui.dialogs.PropertyDialogAction.run(PropertyDialogAction.java:158)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
I solved this, but I never got to the root cause.
I used a version I knew worked and copied the .classpath and .project files for eclipse into the offending project. Not the best solution, but it worked. Nothing I could to manually worked in preferences when comparing the 2 projects, as they were exactly the same(except for the code base changes).
For me, I was able to fix this adding the buildSpec and nature tags to the .project file, then restarting eclipse.
<buildCommand>
<name>org.jboss.tools.seam.core.seambuilder</name>
<arguments>
</arguments>
</buildCommand>
...
<natures>
<nature>org.jboss.tools.seam.core.seamnature</nature>
</natures>