Issue #135 resolved

Eclipse startup error : Checking if Mercurial is correctly insalled

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(EclipseLazyStarter.java:125)
    	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:427)
    	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:193)
    	at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:368)
    	at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:444)
    	at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:397)
    	at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:385)
    	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:87)
    	at java.lang.ClassLoader.loadClass(Unknown Source)
    	at org.eclipse.osgi.framework.internal.core.BundleLoader.loadClass(BundleLoader.java:313)
    	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:52)
    	at org.eclipse.ui.internal.WorkbenchPlugin.createExtension(WorkbenchPlugin.java:263)
    	at org.eclipse.ui.internal.decorators.LightweightDecoratorDefinition$1.run(LightweightDecoratorDefinition.java:124)
    	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.decorators.LightweightDecoratorDefinition.internalGetDecorator(LightweightDecoratorDefinition.java:120)
    	at org.eclipse.ui.internal.decorators.LightweightDecoratorDefinition.decorate(LightweightDecoratorDefinition.java:251)
    	at org.eclipse.ui.internal.decorators.LightweightDecoratorManager$LightweightRunnable.run(LightweightDecoratorManager.java:72)
    	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
    	at org.eclipse.ui.internal.decorators.LightweightDecoratorManager.decorate(LightweightDecoratorManager.java:356)
    	at org.eclipse.ui.internal.decorators.LightweightDecoratorManager.getDecorations(LightweightDecoratorManager.java:338)
    	at org.eclipse.ui.internal.decorators.DecorationScheduler$1.ensureResultCached(DecorationScheduler.java:374)
    	at org.eclipse.ui.internal.decorators.DecorationScheduler$1.run(DecorationScheduler.java:334)
    	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
    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(BundleContextImpl.java:1028)
    	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:984)
    	at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346)
    	at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:265)
    	at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:400)
    	at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:111)
    	... 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(AbstractShellCommand.java:233)
    	at com.vectrace.MercurialEclipse.commands.AbstractShellCommand.executeToBytes(AbstractShellCommand.java:138)
    	at com.vectrace.MercurialEclipse.commands.AbstractShellCommand.executeToBytes(AbstractShellCommand.java:124)
    	at com.vectrace.MercurialEclipse.commands.AbstractShellCommand.executeToBytes(AbstractShellCommand.java:120)
    	at com.vectrace.MercurialEclipse.commands.AbstractShellCommand.executeToString(AbstractShellCommand.java:258)
    	at com.vectrace.MercurialEclipse.commands.HgPathsClient.getPaths(HgPathsClient.java:25)
    	at com.vectrace.MercurialEclipse.commands.HgPathsClient.getPaths(HgPathsClient.java:20)
    	at com.vectrace.MercurialEclipse.storage.HgRepositoryLocationManager.loadProjectRepos(HgRepositoryLocationManager.java:246)
    	at com.vectrace.MercurialEclipse.storage.HgRepositoryLocationManager.start(HgRepositoryLocationManager.java:103)
    	at com.vectrace.MercurialEclipse.MercurialEclipsePlugin.start(MercurialEclipsePlugin.java:102)
    	at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:1009)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:1003)
    	... 35 more
    Caused by: java.io.IOException: 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(AbstractShellCommand.java:165)
    	... 47 more
    Caused by: java.io.IOException: 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 http://www.vectrace.com/mercurialeclipse/ 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

    HgEclipse 1.5.0.201001202311

    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. Alexander Frey
    • changed version to 1.5

    Same error for me. Mac 10.6.2 with latest eclipse and HgEclipse 1.5....

    Is there any way to get eclipse working with Mercurial ?? :)

    thanks, Alexander

  10. 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 (http://www.javaforge.com/project/hge) 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.

  11. Log in to comment