Sunday, June 29, 2008

Eclipse 3.4 Ganymede and Subclipse 1.4

Well, quite some traffic is coming into my site from Google regarding Eclipse 3.4/ Ganymede and Subclipse. These people land on my Ganymede first impression article, but are more likely running into problems with the new version of Subclipse. For those people, I hope this page can provide you with a little guidance on how to get Subclipse to work with Ganymede. Bear with me, as the version numbers 1.4.x and 1.5.x of Subversion and Subclipse can become very confusing!

As of June 19th 2008, a new 1.4.x version of the Subclipse plugin has been published as the update site to use on the Subclipse web site. The link to the update site of the old version 1.2.x Subclipse plugin has disappeared. Now, for this new 1.4.x Subclipse plugin, the Subversion 1.5.0 client libraries and bindings are required!

I for one run Ubuntu 8.04 Hardy Heron, and that ships with Subversion 1.4.6. This means that if I were to install the new 1.4.x Subclipse plugin and opt to install the JavaHL adapter only (because that is the recommended adapter), it will not work:



The "Unable to load default SVN Client" message when running the 1.4.x Subclipse plugin with the JavaHL adapter only

There are various ways around this problem. The first option is to manually install the Subversion 1.5.x client libraries and add them to you library path. For Windows users, it is a simple matter of installing the new Subversion 1.5 client and making sure JavaHL is on the path. For Unix users, this workaround obviously defeats the purpose of having a distro with package management and requires manual installation of the libraries in the correct locations. So this solution might not be the recommended way to go for all.

The second alternative is to also install the SVNKit adapter. This immediately causes Subclipse to work, there is no need to uninstall the JavaHL adapter. Downside of this of course is that you are using a beta version of the adapter. Hopefully there will be a final version of this adapter and an update to Subclipse 1.4.x to include a stable SVNKit soon.

The third alternative is to stick to the old 1.2.x version of Subclipse. This version will work just fine with Ganymede and integrates with the new Mylyn version that ships with it. I was using this old version of Subclipse before in my reviews and daily work with the Ganymede release candidates, and it seemed to run without any problems whatsoever. The link on the Subclipse web site to version 1.2.x has however disappeared, but it is just a matter of replacing the 4 with a 2 in the update site's URL:


http://subclipse.tigris.org/update_1.2.x


I hope this explains things a bit more and solves any problems you may run into in getting Subclipse to work with Ganymede.

Update regarding Subversive (June 29th): An anonymous commenter pointed out one can use Subversive as well. Although it has little to do with getting Subclipse to work, it is indeed another option one could consider. For us Unix users whose package manager has given us a Subversion version other than 1.4.5, you may want to opt for Subversive's SVNKit connector. If you, like me, want Mylyn integration, you also need a second update site besides the one provided by Polarion. The update sites are:


http://download.eclipse.org/technology/subversive/0.7/update-site/ and
http://www.polarion.org/projects/subversive/download/eclipse/2.0/update-site/


Subversive's goal is to eventually become the standard SVN team provider bundled with Eclipse. Although it is currently an incubator project, expect it to work well as it has been provided for a while now by the Polarion community!


17 comments:

Anonymous said...

http://polarion.org/index.php?page=download&project=subversive


Polarion provides update site with svn connectors:
http://polarion.org/projects/subversive/download/eclipse/2.0/update-site/

[BOFH]Basilisk said...

Indeed, Subversive is of course another option worth including. Do note that with Subversive you might also have to select SVNKit instead of JavaHL, as in this case the 1.4.5 JavaHL caused problems with the fact I am running 1.4.6 client libraries instead of 1.4.5.

Anonymous said...

Interesting, I am not the only one with Ganymede+subclipse issues...

I couldn't get any of the plugins to works.

I am taking your advise and backing up to subclipse 1.2.x will kepp you posted.

Unknown said...

Cool Thanks to your Blog, I got my Subclipse running, I opted for the SVNKit Adapter Beta though.

Anonymous said...

Well using the old SVN package didn't help for me. The process still hangs half of the time on large commits. I am switching back to CVS.

[BOFH]Basilisk said...

@anonymous whose commits are hanging: When it hangs, check whether the remainder of Eclipse is hanging as well (e.g. as become unresponsive, editing is slow). If so, you might want to consider increasing Eclipse's memory.

If this is not the case, then it could be the plugin, the client library or the svn server that is at fault. If you are able to do large commits using the svn command line tool, there might be an issue with the plugin. If the svn command line tool is also causing problems, then it is either the client libraries that can't handle the large commits, or it is some misconfiguration on the server. E.g. when serving svn over http via Apache, check for things like timeout settings.

In a proper setup, it should be possible to handle large commits. I have imported hundreds of megs (initial import of an already existing project) into an Apache hosted svn (mod_dav_svn) using Eclipse, so my initial guess would be to check the server side of things (which by no means should cause the plugin to hang of course).

Anonymous said...

THX a lot. After following your comments it was imediatelly working.

Alexis Hui said...

Thanks, your instructions worked perfectly. Like some others, I also opted for the SVNKit Adapter Beta. No issues with it yet.

gwagener said...

I'm curious if anyone else has had the following problem. I am using two Macs, one running 10.5.4, one running 10.4.11, Ganymede on both.

On the Leopard machine under the 1.4.x update site the "SVNKit Adapter BETA (optional)" folder has SVNKit Client Adapter 1.5.0.1 and SNVKit Library 1.2.0.4502. On the Tiger machine in the same spot it only shows the SVNKit Library without the Client Adapter.

Using SVNKit on the one machine has worked fine for me, but I can't get it on the other machine!

I updated the version of Subversion on the Tiger machine to be 1.4.4, the same as on the Leopard machine, but that didn't help. From this article it looks like I could update to 1.5.0 and use the JavaHL adapter, but I'd rather find a solution to this problem.

Cheers,

Graham

[BOFH]Basilisk said...

Hi Graham, could it be that the client adapter was already installed somehow? You could check in the installed software tab of the update manager. I have seen some quirks in the new update manager as well, so another thing you could try to do is to remove and then add the update site again (under "Manage Sites...").

Anonymous said...

On Ubuntu 8.04

Tried compiling and installing subversion and javahl 1.5.1 from source. I got it to build by
1. installing ant and ant-optional
2. ./configure --with-jdk=/usr/share/jvm/jdk-1.5.0 --enable-javahl
3. vim Makefile, change libneon.la to libneon.so (the former does not exist)
4. make
5. make sudo install
6. make javahl
7. make install-javahl

This all seems to work OK, but I still get the problem with eclipse, even if I edit ./eclipse/eclipse.ini to include the line
-Djava.library.path=/usr/local/lib/svn-javahl/svn-javahl.jar
which is where subversion puts the jar by default.

Ah well, I think I'll try SVNkit and hope for the best :-/

Anonymous said...

c.f. https://bugs.launchpad.net/ubuntu/+source/neon26/+bug/96700

You'll also need to install libneon27-dev and some other bits, but running ./configure will tell you what's missing.

Please post what you did here if you get it working.

[BOFH]Basilisk said...

@anonymous, mmmmhhhh, is the java.library.path setting appended or prepended (JavaDoc doesn't say)... If appended, it might still load the old version. Maybe try changing e.g. LD_LIBRARY_PATH or force it via /etc/ld.so.conf(.d)?

Anonymous said...

This fucking piece of shit used to work 1.2.9.. but now its a fucking piece of shit with tons of problems.. good work assholes.

Anonymous said...

I tried installing Subclipse 1.2.4 on Ganymede and:

An error occurred during provisioning.
Failed to prepare partial IU: [R]org.tigris.subversion.subclipse.core 1.2.4.

Anonymous said...

Thanks; I had installed only JavaHL but not SVNKit, installing that made things work.

Anonymous said...

Don't use Ganymede if you want subclipse.

Don't write software if you don't want subclipse.

That is all.