Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Plugin execution after "Install into host. Repository:" destination(After set plugin.xml, MANIFEST.MF, and other files plugin works great in run and debug mode. But after I install it via "Install into host. Repository:" mode, it will not more work)
Plugin execution after "Install into host. Repository:" destination [message #1816147] Tue, 22 October 2019 13:49 Go to next message
Yuri Di Carlo is currently offline Yuri Di CarloFriend
Messages: 6
Registered: October 2019
Junior Member
Hello,
as written in the subtitle, I wrote a simple plugin RCP with one menu, one command and one handler to execute the command.
Theme is as written that if I execute it in run or debug mode, everything works.

But if I install it, I see menu in "main.menu" and after pushed down the command, nothing happens. Differently from run and debug mode, where it works.

I attach plugin.xml, it.alba.rcp.commands.product and MANIFEST.MF.

I'm using Eclipse SDK

Version: 2019-09 (4.13)
Build id: I20190916-1045

Any help is appreciated. Thanks in advance.

Yuri
Re: Plugin execution after "Install into host. Repository:" destination [message #1816202 is a reply to message #1816147] Wed, 23 October 2019 14:17 Go to previous messageGo to next message
Eclipse UserFriend
Could you please run with `-consolelog` and attach the output here? I noticed that you're including embedded jar files, and a common mistake is that those embedded jars are not actually included in your bundle. Take a look at the the bundle contents and make sure your lib/*.jar files are present. If not, open your MANIFEST.MF then switch to the "Build" tab and ensure they are included for the binary build.
Re: Plugin execution after "Install into host. Repository:" destination [message #1816224 is a reply to message #1816202] Thu, 24 October 2019 11:43 Go to previous messageGo to next message
Yuri Di Carlo is currently offline Yuri Di CarloFriend
Messages: 6
Registered: October 2019
Junior Member
Hello,
first of all thanks for your reply. Second, I'm totally new to this RCP-or-something-else topic but I think that I didn't forget the lib JARs. I attach the installed plugin JAR.

The thing that gets me mad is that executing this plugin once installed via "Install into host. Repository:", it does not work. At difference when executed in eclipse via Testing -> Launch an Eclipse application plugin.xml eclipse tab.

I really don't know how to take output for running plugin with -consolelog argument. I ran it with Testing -> Launch an Eclipse application, buit my only console logging was what I wrote with system.out.println.

Thanks again
Yuri
Re: Plugin execution after "Install into host. Repository:" destination [message #1816229 is a reply to message #1816224] Thu, 24 October 2019 13:46 Go to previous messageGo to next message
Eclipse UserFriend
When I try to launch your Back-End command I see the following exception logged:
Caused by: java.lang.ClassNotFoundException: org.apache.commons.io.FileUtils cannot be found by it.alba.rcp.commands_1.0.0.201910241249
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:508)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:419)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:411)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 48 more


Which seemed odd. Looking through your jars, your embedded commons-io-2.6.jar does not look right:
$ x -d /tmp/it it.alba.rcp.commands_1.0.0.201910241249.jar 
results in /tmp/it/it.alba.rcp.commands_1.0.0.201910241249
$ cd /tmp/it/it.alba.rcp.commands_1.0.0.201910241249/
$ ls
Application.e4xmi		icons/
META-INF/			it/
OSGI-INF/			it.alba.rcp.commands.product
build.properties		lib/
css/				plugin.xml
$ cd lib/
$ ls -l
total 24
-rw-r--r--  1 bsd  wheel  9489 24 Oct  2019 commons-io-2.6.jar
-rw-r--r--  1 bsd  wheel  9489 24 Oct  2019 dom-2.3.0-jaxb-1.0.6.jar
$ jar tf commons-io-2.6.jar 
META-INF/
META-INF/MANIFEST.MF
it/
it/alba/
it/alba/rcp/
it/alba/rcp/commands/
it/alba/rcp/commands/first/
it/alba/rcp/commands/utils/
it/alba/rcp/commands/Application.class
it/alba/rcp/commands/ApplicationActionBarAdvisor.class
it/alba/rcp/commands/ApplicationWorkbenchAdvisor.class
it/alba/rcp/commands/ApplicationWorkbenchWindowAdvisor.class
it/alba/rcp/commands/Perspective.class
it/alba/rcp/commands/first/BEHandler.class
it/alba/rcp/commands/utils/RevisionUpdater.class
it/alba/rcp/commands/utils/Utilities.class
Re: Plugin execution after "Install into host. Repository:" destination [message #1816231 is a reply to message #1816229] Thu, 24 October 2019 14:11 Go to previous messageGo to next message
Yuri Di Carlo is currently offline Yuri Di CarloFriend
Messages: 6
Registered: October 2019
Junior Member
Fantastic.
Please let me know how have you done logging the exception when launching Back-End command

and

I will check how it can be that commons-io and dom-2.3.0-jaxb-1.0.6 also contain plugin and not its own classes!

Thanks so much

Yuri
Re: Plugin execution after "Install into host. Repository:" destination [message #1816232 is a reply to message #1816231] Thu, 24 October 2019 14:14 Go to previous messageGo to next message
Eclipse UserFriend
I ran with `-consolelog` :-)
Re: Plugin execution after "Install into host. Repository:" destination [message #1816233 is a reply to message #1816231] Thu, 24 October 2019 14:24 Go to previous messageGo to next message
Yuri Di Carlo is currently offline Yuri Di CarloFriend
Messages: 6
Registered: October 2019
Junior Member
So, I have exported again with "Export wizard", but specifying directory to "C:/Users/yuri.di.carlo/eclipse-rcp/.metadata/.plugins/org.eclipse.pde.core/install/", not "Install into host" option as before.

Dimension of JAR has changed (there are real JARs mentioned before) - 200KB, but not steady execution.

Yuri
Re: Plugin execution after "Install into host. Repository:" destination [message #1816234 is a reply to message #1816233] Thu, 24 October 2019 14:25 Go to previous messageGo to next message
Yuri Di Carlo is currently offline Yuri Di CarloFriend
Messages: 6
Registered: October 2019
Junior Member
New JAR. Sorry for 2nd reply.
Re: Plugin execution after "Install into host. Repository:" destination [message #1816235 is a reply to message #1816232] Thu, 24 October 2019 14:27 Go to previous messageGo to next message
Yuri Di Carlo is currently offline Yuri Di CarloFriend
Messages: 6
Registered: October 2019
Junior Member
ok, but when you specified this argument? in "run configuration" in eclipse? or when you executed plugin once installed?
in the 2nd case, when have you done that?

sorry for the newbie quests

thanks
Yuri
Re: Plugin execution after "Install into host. Repository:" destination [message #1816236 is a reply to message #1816234] Thu, 24 October 2019 14:31 Go to previous messageGo to next message
Eclipse UserFriend
I probably shouldn't execute code I haven't seen :-). Exception trace below.

I'll recommend that you explore performing your builds using Maven/Tycho. The "Export" wizards can be difficult to diagnose when there is a failure.

prova
java.io.FileNotFoundException: File '/usr/local/installs/e4-dev/Eclipse.app/Contents/MacOS/null\it.alba.rcp.commands\auth.txt' does not exist
	at org.apache.commons.io.FileUtils.openInputStream(FileUtils.java:297)
	at org.apache.commons.io.FileUtils.readFileToString(FileUtils.java:1805)
	at it.alba.rcp.commands.first.BEHandler.execute(BEHandler.java:52)
	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:291)
	at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:93)
	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:498)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:318)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:252)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:161)
	at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:152)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:494)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:487)
	at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:204)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:433)
	at org.eclipse.e4.ui.workbench.renderers.swt.AbstractContributionItem.handleWidgetSelection(AbstractContributionItem.java:446)
	at org.eclipse.e4.ui.workbench.renderers.swt.AbstractContributionItem.lambda$2(AbstractContributionItem.java:472)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4247)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1508)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1531)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1516)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1320)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4091)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3712)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1170)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1059)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:667)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:597)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
	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(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:656)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:592)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1498)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1471)


Re: Plugin execution after "Install into host. Repository:" destination [message #1816237 is a reply to message #1816236] Thu, 24 October 2019 14:33 Go to previous message
Eclipse UserFriend
Specify `-consolelog` on the command-line. If you're launching from within Eclipse, in the Launch Configuration's _Program Arguments_. If you're running from the command-line: `eclipse -consolelog`. On Windows, it will open a new CMD window to show the output.
Previous Topic:Error on exporting product
Next Topic:RCP for plugin runs via popup-menu
Goto Forum:
  


Current Time: Tue Apr 23 16:47:47 GMT 2024

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

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

Back to the top