Problem updating eclipse rcp application from 4.16 to 4.22 - eclipse

I am updating my eclipse rcp application from 4.16 to 4.22.
If I run my updated eclipse rcp application in an entirely new workspace, it works.
If I run my updated eclipse rcp application on top of an existing workspace that previously ran the 4.16 version, there is this error about not finding an icon (this is the project explorer icon that changed from a gif to a png file):
!ENTRY org.eclipse.jface 4 0 2022-01-31 08:37:13.602
!MESSAGE /icons/full/eview16/resource_persp.gif
!STACK 0
java.io.FileNotFoundException: /icons/full/eview16/resource_persp.gif
at org.eclipse.osgi.storage.url.bundleentry.Handler.findBundleEntry(Handler.java:55)
I tried deleting everything in the workspace except the workpace/.metadata/.plugins/org.eclpse.core.resources
directory before launching my updated application, but it displays an empty application window with the following general error:
!ENTRY org.eclipse.osgi 4 0 2022-01-31 08:47:03.042
!MESSAGE An error occurred while automatically activating bundle com.xxx.xxx.xxx.xx.xxx (15).
!STACK 0
org.osgi.framework.BundleException: Error loading bundle activator.
If I close my application and launch a second time, everything works. The workspace somehow fixes itself.
Any ideas on how to fix my existing workspace before the first launch of my updated application? I do have an installer, so can perform some sort of one time fix.
Other things I have tried that result in a failed first launch, but fixed second launch:
Deleting the workspace/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi file
Modifying the workspace/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi file to reference resource_persp.png instead of resource_persp.gif

Related

Eclipse Application launch config throws InjectionException after changing target definition from Eclipse Neon (4.6) to Photon (4.8)

I'm developing some Eclipse plugins (based on xtext) and I tried to update the target definition from 4.6 Neon to 4.8 Photon.
I have a launch configuration that launches an Eclipse IDE with my plugins loaded. After updating the target definition, the launch configuration automatically updated the version numbers of the bundles that come from the target definition. Some of the new versions had new dependencies, which I added with the "Add Required Plug-ins" button. "Validate Plug-ins" finds no issues, however, when I run this launch configuration, it fails with the following exceptions (stack traces omitted):
!ENTRY org.eclipse.e4.ui.workbench 4 0 2018-07-16 17:58:31.550
!MESSAGE Unable to create class 'org.eclipse.e4.ui.internal.workbench.addons.CommandProcessingAddon' from bundle '495'
!STACK 0
org.eclipse.e4.core.di.InjectionException: Unable to process "CommandProcessingAddon.broker": no actual value was found for the argument "IEventBroker".
!ENTRY org.eclipse.e4.ui.workbench 4 0 2018-07-16 17:58:31.559
!MESSAGE Unable to create class 'org.eclipse.e4.ui.internal.workbench.addons.ContextProcessingAddon' from bundle '495'
!STACK 0
org.eclipse.e4.core.di.InjectionException: Unable to process "ContextProcessingAddon.broker": no actual value was found for the argument "IEventBroker".
!ENTRY org.eclipse.e4.ui.workbench 4 0 2018-07-16 17:58:31.568
!MESSAGE Unable to create class 'org.eclipse.e4.ui.workbench.swt.util.BindingProcessingAddon' from bundle '498'
!STACK 0
org.eclipse.e4.core.di.InjectionException: Unable to process "BindingProcessingAddon.broker": no actual value was found for the argument "IEventBroker".
!ENTRY org.eclipse.e4.ui.workbench 4 0 2018-07-16 17:58:31.602
!MESSAGE Unable to create class 'org.eclipse.e4.ui.workbench.addons.splitteraddon.SplitterAddon' from bundle '496'
!STACK 0
org.eclipse.e4.core.di.InjectionException: Unable to process "SplitterAddon.ps": no actual value was found for the argument "EPartService".
!ENTRY org.eclipse.e4.ui.workbench 4 0 2018-07-16 17:58:31.612
!MESSAGE Unable to create class 'org.eclipse.ui.internal.ide.addons.SaveAllDirtyPartsAddon' from bundle '689'
!STACK 0
org.eclipse.e4.core.di.InjectionException: Unable to process "SaveAllDirtyPartsAddon.eventBroker": no actual value was found for the argument "IEventBroker".
I have no idea what could be causing this. The launch configuration worked fine before. Googling these errors hasn't yielded a helpful result.
Most likely the list of auto-started plugins and their runlevels is corrupted. Opening the "Plug-ins" tab in the launch configuration and pressing the "Restore Defaults" button should fix the problem.
If you customized the list of plugins/features you will have to repeat that. (You can store the launch config in a file in the Common tab, make a backup and compare it with the result to make your life easier).
The same problem can also happen with products. In this case, the solution is to open the "Configuration" tab of the product configuration, click the "Remove All" button under "Start Levels", and click "Add Recommended".

Eclemma: Invalid Input Url Error in Eclipse

After starting Eclipe I see the following error message in the workspace/.metadata/.log
!ENTRY org.eclipse.core.runtime 4 0 2017-09-18 09:38:48.275
!MESSAGE Invalid input url:platform:/plugin/com.mountainminds.eclemma.ui/icons/full/eview16/coverage.gif
!STACK 0
java.io.IOException: Unable to resolve plug-in "platform:/plugin/com.mountainminds.eclemma.ui/icons/full/eview16/coverage.gif".
The message does not go away even after uninstalling or reinstalling the plugin.
Any ideas on how to resolve this?
Eclipse: Oxygen 4.7.0
EclEmma: 3.0.0
EclEmma became an Eclipse project and is now part of the Eclipse Java download packages. Due to the move, the plug-ins have been rename: com.mountainminds.eclemma.ui become org.eclipse.eclemma.ui.
If you use a workspace that have been used with EclEmma < 3.0.0 before,
start Eclipse with the option -clean and
reset all Java perspectives (coverage.gif is the icon of the Coverage view and could be referenced in the stored window/perspective layout).
This is the image the error is referring to.
Put it in the proper installation path on your machine and you'd be fine.

Eclipse luna crashed (Eclipse IDE closed abrubtly) during Eclipse Marketplace loading

I installed JDK-1.8_20 and Eclipse Luna in Linux Mint 16. When I clicked Eclipse Marketplace form menu, Eclipse Luna crashed (Eclipse IDE closed abrubtly). I checked the following answers but those answers are not matched with my scenarios:
Eclipse Marketplace hangs (Luna, Java8)
Market Place not working in Eclipse Luna
Is it possible to resolve this issue?
Update:
I have added log from /workspace/.metadata/.log file:
!ENTRY org.eclipse.core.resources 2 10035 2014-10-13 20:32:16.558
!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.
!ENTRY org.eclipse.m2e.logback.configuration 2 0 2014-10-13 20:32:17.080
!MESSAGE Exception while setting up logging:org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String
!STACK 0
java.lang.ClassCastException: org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String
at org.eclipse.m2e.logback.configuration.LogHelper.logJavaProperties(LogHelper.java:26)
at org.eclipse.m2e.logback.configuration.LogPlugin.loadConfiguration(LogPlugin.java:189)
at org.eclipse.m2e.logback.configuration.LogPlugin.configureLogback(LogPlugin.java:144)
at org.eclipse.m2e.logback.configuration.LogPlugin.access$2(LogPlugin.java:107)
at org.eclipse.m2e.logback.configuration.LogPlugin$1.run(LogPlugin.java:62)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
I had this problem as well. I had to change a GTK theme to fix it.
Put following into the ~/.config/gtk-3.0/settings.ini file:
[Settings]
gtk-theme-name = Adwaita
gtk-fallback-icon-theme = gnome
This seems to be related with both GTK2 and GTK3 starting in the same process.
the workaround is to use GTK2 for eclipse as well. This can be achieved in the following ways
1. add the following lines to eclipse.ini before -vmargs(recommended approach)
--launcher.GTK_version
2
2. set the environment variable SWT_GTK3 to 0 before launching eclipse. you need to do this every time you launch eclipse
Source: https://bugs.eclipse.org/bugs/show_bug.cgi?id=438598#c16

Eclipse crashes when loading the runtime workbench

I am experiencing trouble when starting the Runtime workbench in eclipse. The new eclipse opens up but crashes on the "Loading Workbench" instruction.
I've tried a few things already, namely:
rm -r .metadata
or
./eclipse -clean -clearPersistedState
I also tried to delete the .snap file, the workbench.xmi file, I tried uninstalling and reinstalling Eclipse, this didn't help.
Here's the log from the crash:
!ENTRY org.eclipse.core.net 1 0 2013-11-03 21:44:52.276
!MESSAGE System property http.nonProxyHosts has been set to local|*.local|169.254/16|*.169.254/16 by an external source. This value will be overwritten using the values from the preferences
!ENTRY org.eclipse.ui.workbench 4 2 2013-11-03 21:44:54.013
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.ui.workbench".
!STACK 0
java.lang.NullPointerException
at org.eclipse.equinox.internal.p2.ui.sdk.scheduler.migration.MigrationSupport.getLastMigration(MigrationSupport.java:232)
at org.eclipse.equinox.internal.p2.ui.sdk.scheduler.migration.MigrationSupport.baseChangedSinceLastPresentationOfWizard(MigrationSupport.java:193)
at org.eclipse.equinox.internal.p2.ui.sdk.scheduler.migration.MigrationSupport.performMigration(MigrationSupport.java:71)
at org.eclipse.equinox.internal.p2.ui.sdk.scheduler.AutomaticUpdateScheduler.earlyStartup(AutomaticUpdateScheduler.java:89)
at org.eclipse.ui.internal.EarlyStartupRunnable.runEarlyStartup(EarlyStartupRunnable.java:87)
at org.eclipse.ui.internal.EarlyStartupRunnable.run(EarlyStartupRunnable.java:66)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.Workbench$55.run(Workbench.java:2551)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
!ENTRY org.eclipse.ui 4 4 2013-11-03 21:44:54.028
!MESSAGE Unhandled Exception
!ENTRY org.eclipse.equinox.p2.ui.sdk.scheduler 4 0 2013-11-03 21:44:54.030
!MESSAGE Unable to execute early startup code for an extension
!STACK 0
java.lang.NullPointerException
at org.eclipse.equinox.internal.p2.ui.sdk.scheduler.migration.MigrationSupport.getLastMigration(MigrationSupport.java:232)
at org.eclipse.equinox.internal.p2.ui.sdk.scheduler.migration.MigrationSupport.baseChangedSinceLastPresentationOfWizard(MigrationSupport.java:193)
at org.eclipse.equinox.internal.p2.ui.sdk.scheduler.migration.MigrationSupport.performMigration(MigrationSupport.java:71)
at org.eclipse.equinox.internal.p2.ui.sdk.scheduler.AutomaticUpdateScheduler.earlyStartup(AutomaticUpdateScheduler.java:89)
at org.eclipse.ui.internal.EarlyStartupRunnable.runEarlyStartup(EarlyStartupRunnable.java:87)
at org.eclipse.ui.internal.EarlyStartupRunnable.run(EarlyStartupRunnable.java:66)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.Workbench$55.run(Workbench.java:2551)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Does somebody have a solution to this particular problem? I'm becoming crazy from not finding a solution.
Otherwise, I'll have to format and reinstall everything maybe?
Thank you guys if you can help!
OK after messing around with all eclipse files and stuff, I found the solution:
I had to use a new workspace that wasn't in the parent folder of the current workspace, explanation:
Old workspace:
somefolder/parentfolder/workspace/
Every workspace in the parentfolder/ is corrupted, so each time I was trying a new workspace in this folder, it didn't work
By using this kind of workspace, the problem wasn't there anymore:
somefolder/workspace
My advice to you if this happens: do not only use the parent folder to try a workspace but a completely random other folder.
Hope this helps other people in the same position.
I was getting the same error. I was able to run it using ./eclipse -clean -clearPersistedState but then got another error of "Locking not possible in the directory" and this got resolved by giving 777 permission to eclipse folder and its contents.
This worked for me.
cd /Applications/adt-bundle-mac-x86_64-20140702/eclipse/Eclipse.app/Contents/MacOS
Then inside there you will see two files eclipse and eclipse.ini.
You want to run this command ./eclipse -clean -clearPersistedState
Eclipse will start up, build your workspace, then restart. Then everything is fine. Good to go!

my eclipse stopped working today

Today I was running into problems with eclipse, like every time I closed a project a window popped up saying something like "error saving workspace" and complaining about apache xerces.
I decided to download a fresh install, and now it won't even start. I tried many variants (classic, javase, c++), hoping there was some distribution issues, but nothing worked. Eclipse starts saying "an error has occurred, see configurationlog ..."
Any idea? Are there some cached files in the system that might have become corrupted? I tried doing a "find / | grep eclipse" but found nothing interesting.
Thanks a lot for your help, I'm quite in trouble without it
Regards,
Nicola Montecchio
p.s. I tried also with 32 bit jvm but nothing changed
[edit] here is relevant bits of the log produced when starting:
!ENTRY org.eclipse.osgi 4 0 2010-07-23 21:35:16.835
!MESSAGE An unexpected runtime error has occurred.
!STACK 0
javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.SAXParserFactoryImpl not found
!ENTRY org.eclipse.osgi 4 0 2010-07-23 21:35:16.839
!MESSAGE
!STACK 0
org.osgi.framework.ServiceException: Exception in org.eclipse.core.runtime.internal.adaptor.EclipseAdaptorHook$ParsingService.getService()
!ENTRY org.eclipse.equinox.registry 4 0 2010-07-23 21:35:16.840
!MESSAGE Could not parse XML contribution for "org.eclipse.ant.core//plugin.xml". Any contributed extensions and extension points will be ignored.
!STACK 0
org.xml.sax.SAXException: Could not acquire XML parsing service.
and several other mostly related to xml ...
Sounds like your current workspace is severely broken. Create a new workspace and import the projects from the old locations (File -> Import), and see if that helps.
Things I'd try are renaming your workspace (so Eclipse will use a fresh one when starting up) or running Eclipse with the -clean parameter (in the console with ./eclipse -clean in your eclipse/ folder).