Eclipse startup error : Checking if Mercurial is correctly insalled

Issue #135 resolved
Anonymous created an issue

After having installed MercirualEclipse 1.3.1019 under windows, I get the following error popup when I start up eclipse:

{{{ 'Checking if Mercurial is correctly installed...' has encountered a problem.

An internal error occurred during "Checking if Mercurial is correctly installed..." }}}

When I run the command line ''hg'', it seems to be installed perfectly (imerge is activated, as it the installation docs require)

Reported by anonymous

Comments (34)

  1. Anonymous

    The immediate cause is that Eclipse cannot run "hg" (Cannot run program "hg" (in directory "C:\Daten\Projekte\fxn\Agent"): CreateProcess error=2, The system cannot find the file specified).

    This is because Java (or Eclipse, I don't know), when trying to run the default command "hg", only looks for "hg.exe", which of course isn't there. I built a small executable which does much the same as Mercurial's "hg.bat". With that on the path, MercurialEclipse works fine.

  2. Anonymous

    I see the problem: Having a standard Windows binary release of Mercurial on the path will work out of the box, because there is a "hg.exe" file there. The issue only affects systems with Mercurial built from source, because they have the "hg.bat" wrapper instead.

    I don't think it is a configuration issue. Entering the correct path to "hg.bat" would fix it. Only the preferences pane doesn't work, because MercurialEclipse fails to initialize.

  3. Kim Sullivan
    • changed status to new
    • changed version to 1.3
    • changed milestone to 1.3.x

    Bastian: Actually, it really is a bug, because the preferences page can't be acessed because the hg executable can't be found. Heres the log of the error I get when I actually try to access the properties to set the correct path to the executable:

    !ENTRY org.eclipse.equinox.registry 4 1 2009-03-04 10:02:10.634
    !MESSAGE Unable to create the selected preference page.
    !STACK 0
    org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter$TerminatingClassNotFoundException: An error occurred while automatically activating bundle com.vectrace.MercurialEclipse (426).
    	at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(
    	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(
    	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(
    	at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(
    	at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(
    	at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(
    	at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(
    	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(
    	at java.lang.ClassLoader.loadClass(Unknown Source)
    	at org.eclipse.osgi.framework.internal.core.BundleLoader.loadClass(
    	at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(
    	at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(
    	at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(
    	at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(
    	at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(
    	at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(
    	at org.eclipse.ui.internal.WorkbenchPlugin$
    	at org.eclipse.swt.custom.BusyIndicator.showWhile(
    	at org.eclipse.ui.internal.WorkbenchPlugin.createExtension(
    	at org.eclipse.ui.internal.decorators.LightweightDecoratorDefinition$
    	at org.eclipse.ui.internal.decorators.LightweightDecoratorDefinition.internalGetDecorator(
    	at org.eclipse.ui.internal.decorators.LightweightDecoratorDefinition.decorate(
    	at org.eclipse.ui.internal.decorators.LightweightDecoratorManager$
    	at org.eclipse.ui.internal.decorators.LightweightDecoratorManager.decorate(
    	at org.eclipse.ui.internal.decorators.LightweightDecoratorManager.getDecorations(
    	at org.eclipse.ui.internal.decorators.DecorationScheduler$1.ensureResultCached(
    	at org.eclipse.ui.internal.decorators.DecorationScheduler$
    Caused by: org.osgi.framework.BundleException: Exception in com.vectrace.MercurialEclipse.MercurialEclipsePlugin.start() of bundle com.vectrace.MercurialEclipse.
    	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(
    	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(
    	at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(
    	at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(
    	at org.eclipse.osgi.framework.util.SecureAction.start(
    	at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(
    	... 30 more
    Caused by: com.vectrace.MercurialEclipse.exception.HgException: Cannot run program "D:\Program Files\Mercurial\hg.exe" (in directory "D:\Progs\eclipse\dropins\net.sf.colorer_0.8.0\colorer"): CreateProcess error=2, The system cannot find the file specified
    	at com.vectrace.MercurialEclipse.commands.AbstractShellCommand.executeToStream(
    	at com.vectrace.MercurialEclipse.commands.AbstractShellCommand.executeToBytes(
    	at com.vectrace.MercurialEclipse.commands.AbstractShellCommand.executeToBytes(
    	at com.vectrace.MercurialEclipse.commands.AbstractShellCommand.executeToBytes(
    	at com.vectrace.MercurialEclipse.commands.AbstractShellCommand.executeToString(
    	at com.vectrace.MercurialEclipse.commands.HgPathsClient.getPaths(
    	at com.vectrace.MercurialEclipse.commands.HgPathsClient.getPaths(
    	at com.vectrace.MercurialEclipse.MercurialEclipsePlugin.start(
    	at org.eclipse.osgi.framework.internal.core.BundleContextImpl$
    	at Method)
    	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(
    	... 35 more
    Caused by: Cannot run program "D:\Program Files\Mercurial\hg.exe" (in directory "D:\Progs\eclipse\dropins\net.sf.colorer_0.8.0\colorer"): CreateProcess error=2, The system cannot find the file specified
    	at java.lang.ProcessBuilder.start(Unknown Source)
    	at com.vectrace.MercurialEclipse.commands.AbstractShellCommand.executeToStream(
    	... 47 more
    Caused by: CreateProcess error=2, The system cannot find the file specified
    	at java.lang.ProcessImpl.create(Native Method)
    	at java.lang.ProcessImpl.<init>(Unknown Source)
    	at java.lang.ProcessImpl.start(Unknown Source)
    	... 49 more

    Because mercurial won't start unless it finds the executable, I can't set the correct path to the executable.

    EDIT: Actually, I probably had a working installation of mercurial eclipse (that's why it looks on D:\Program Files). I recently uninstalled that copy, and plan top use the executable bundled with TortoiseHg, instead of the standalone binary version (in case you wondered why it looks for hg on the D drive).

  4. Anonymous

    Hi, I tried to run your plug-in from but when I enter the http: address and click on "Finish" the preference window for Mercurial pops up with the following pop up error message:

    Cannot run program "hg": CreateProcess error=2, The system cannot find the file specified, error code: -100 Reason: Cannot run program "hg": CreateProcess error=2, The system cannot find the file specified

    Could you tell me what should I do to fix it?

    Thank you, Elena

  5. Anonymous

    Hi, I had the same problem when I used eclipse in ubuntu 9.10. I resolved it by installing mercurial paquet from Synaptic.

  6. Anonymous

    there isnt an eclipse 1.3.1 that i'm aware of... eclipse 3.1 is not supported anymore - do you mean eclipse 3.1????

  7. alta88

    no, it's not fixed:

    Cannot run program "C:\Programs\cygwin\bin\hg": CreateProcess error=193, %1 is not a valid Win32 application


    this is from intland; who knows what the state is these days.

  8. Bastian Doetsch

    You seem to be using cygwin and hg - the error message is directly from java, claiming that your hg version can't be executed. This doesn't look like a plugin error, it looks very much like a Mercurial configuration error - and it is definitely not this bug but a different thing (CreateProcess error = 2 is NOT CreateProcess error = 193), so I'm closing this bug again.

    Please file a bug with Intland, I don't have access to their final source code, as they haven't provided it so far.

  9. Bastian Doetsch

    same error? really? please provide the stacktrace, as the last comment of alta88 was a cygwin/java error - I doubt you got the same. and please file it with intland ( as you're using HgEclipse as you stated above. This tracker will be closed soon, when HgEclipse becomes MercurialEclipse again - the projects will merge, but due as intland contributes a lot and prefers javaforge, we'll move the main dev site to javaforge.

    One more thing: I got MercurialEclipse, Mercurial 1.5+ (current dev version) and Eclipse 3.5.2 Cocoa 64 running on Mac OS 10.6.2.

    Have you read the installation section in our wiki, especially the part about Mac OS X? Have you tried starting Eclipse from command line? Probably your PYTHONPATH is not set correctly on session initialization.

  10. Log in to comment