Sponsors


Blog powered by TypePad

« Ruby Snippet: Shortening Long Strings For Display | Main | The SOA and Agile Culture Clash »

March 06, 2007

Subclipse Installation Problem on Mac OS X

Like my development environments, things change.  Since my next project is to extend a product written in Java and, since I used to develop Eclipse rich clients in my webMethods days, I figured I'd install Eclipse on my MacBook Pro.

We use SVN so, I also installed the most excellent Subclipse Eclipse plug-in.  All was going well until, I tried to synchronize to the repository.  When I did, I got the following error:

Picture_1_2












The console also told me that my "Network connection closed unexpectedly...":

Picture_3_1




After trying several different versions of the Subclipse and hunting around, I discovered this: http://dev2dev.bea.com/pub/a/2005/11/subclipse.html.  In my Eclipse SVN preferences (Window > Preferences... > Team > SVN) the SVN Interface "JavaHL (JNI)" was checked by default.

Thanks to Mark Phippard, I've learned that the JavaHL default is ideal if you're using svn+ssh and you already have JavaHL binaries installed on your OS.  Perhaps this is the typical case.  In this scenario, the plug-in will find your svn+ssh config and use your existing credentials.  Cool.

However, I didn't have JavaHL installed on my Mac, so no such seamlessness for me.

One way to to fix this problem, is to just change the SVN interface to "SVNKit (Pure Java)".  You might also install the JavaHL binaries for your OS (and configure for your SSH credentials), in which case Subclipse's default option will work just fine.  If you're in my boat, using the SVNKit option and re-entering them in the ensuing dialog is probably your best bet.

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/t/trackback/277049/16642612

Listed below are links to weblogs that reference Subclipse Installation Problem on Mac OS X:

Comments

The JavaHL comment is not accurate. We only provide a JavaHL binary for Win32, but likewise, that only gets installed in Win32 too. For OS X and Linux you just have to provide JavaHL yourself, usually as a result of installing some Subversion package for your OS.

If JavaHL was checked and there were no errors reported in the preference page, then it found and was using a JavaHL library.

Your problem sounds more like you were using the svn+ssh:// protocol and there was an error in the SSH config. JavaHL relies on the same SSH configuration as the command line client, so it may not have been done yet. SVNKit includes a pure Java SSH client and can prompt you for the info you need. If using SSH, and SVNKit works OK, then that is what I would use. At the same time, some people prefer to use javaHL precisely because it will re-use all of the SSH client infrastructure they are already using for other purposes.

Mark

Mark,

Thanks for your work and for your restraint in responding to my original post (a little unnecessary frustration seeped out, there). I believe I've posted the correction - if not let me know.

Thanks again.

It is not text book accurate, but it is close enough. I wouldn't bother to update it again. Nonetheless, I will try to explain it more (can't help myself).

JavaHL is part of Subversion. It is a JNI library that lets you access the Subversion native libraries from Java. So when you are using JavaHL, you are essentially using the same code the command line client uses. This is also why you have to obtain it as part of some larger Subversion package for your OS. Anyway, since JavaHL is using the same code as the command line it is configured the same way as the command line. For SSH connections, that means you have to enter your SSH configuration information into the "config" file located in ~/.subversion. I think it has the basic info for OpenSSH already entered. So if you already use the Subversion command line, you have probably already configured this information, and then Subclipse and JavaHL will just work. Likewise, if you are heavy SSH user you probably already rely on something like OpenSSH and have all of the pieces like a key-agent already in place. So reusing all of this infrastructure is good.

But if you are new, the graphical out of the box goodness of the SVNKit option is the way to go.

Mark

We are experiencing "Network connection closed unexpectedly" errors when we do commits from both Subclipse in windows and linux command line client Subversion. I've read posts in other forums where this occurs for diffs but not for commits.

We are not using SSH at all. We do have some checkstyle checks invoked from a pre-commit script. When we remove those checks, the problem seems to go away, but when we add them back in, they don't immediately resurface. Commits will succeed, then fail (and always fail). Mark, any thoughts?

Our team was experiencing this problem, and we solved it this morning by *making sure that the default password is changed before using svn*. We were using Putty has a ssh terminal, and somehow it suppressed the standard ssh directive that all new users must change their passwords during the initial logon.

svn was being prompted by ssh to "change user password"...since svn does not know how to interpret this, is simply disconnects.

hope this helps.

- mark

Thank you! I thought I was going nuts. I had SVN installed from macports and was using an svn+ssh config that worked fine from the command line. Going to Subclipse, I first got tripped up on the JavaHL requirement, but figured if I went to tigris and installed their subversion dist, I would get it and alll would be well. That didn't work, but that plus the tip about using the native vs. JNI interface did the trick. Thanks again!

I'm using svn without SSH. I had JavaHL selected at first. I have the command-line subversion exhibited below. Even so, when I opened the Eclipse preferences page I get a complaint about JavaHL not being found (or something like that). What's going wrong, and how would I fix that?

The command-line svn works fine (it manipulates my working copy without asking for password). The subversion Eclipse plugin keeps asking for my password over and over and over again. I switched SVNKit, and got no improvement. What's going wrong, and how would I fix it?

$ svn --version
svn, version 1.4.4 (r25188)
compiled Aug 3 2007, 09:34:41

Copyright (C) 2000-2006 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).

The following repository access (RA) modules are available:

* ra_dav : Module for accessing a repository via WebDAV (DeltaV) protocol.
- handles 'http' scheme
- handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
- handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
- handles 'file' scheme

If you are using MacPorts www.macports.org (I highly recommend it)
Install subversion:

$ sudo port install subversion

Then install the JavaHL bindings:

$ sudo port install subversion-javahlbindings

Now restart Eclipse and you should be fine.


Thanks for the post, Mike.

I had this problem with Xubuntu, Eclipse 3.2 and Subclipse. JavaHL didn't work, so I did an apt-cache search for it. Found an uninstalled application called 'libsvn-javahl'. I installed it and it also installed an app called 'libsvn-java'. This got rid of the warning in the Preferences after a restart, but the JavaHL interface still gave me connection problems. I've given up for now and changed interface.

Interestingly, I had no such trouble with Ubuntu.

Post a comment

If you have a TypeKey or TypePad account, please Sign In