Subclipse, HTTPS and lots of nightly fun

Subclipse is normally a component of your Eclipse IDE. It manages the interaction that you have at your repository. Once you start using it, sometimes going back to the command-line of things can seem tough (unless you’re a true power user).

If you were like me a few months ago, your Subversion repository had a self-signed certificate, and only allowed SSL connections for repository access. There was one problem. Subclipse access to the SSL based repository would error out, returning such things like:

svn: PROPFIND request failed on ‘/svn’
svn: decompression_failure: remotely generated; fatal
svn: PROPFIND request failed on ‘/svn’
svn: decompression_failure: remotely generated; fatal

The error has changed since I first started trying to fix the problem, but generally I got PROPFIND errors.

Having no real knowledge of Java internals, this problem forced me to go into Windows for awhile (deadlines to meet, things to kill) since SSL worked flawlessly there. The problem wasn’t with subclipse, but rather it was with the Java JDK that I had installed. There are a multitude of solutions to this problem of course, and i’m not the first to post about it (the problem also varies from person to person).

Operating on an Ubuntu system, I tried installing stuff for JNI, upgrading my encryption strength for JavaSVN.. — if it was on Google, I tried it.

I finally settled on the following (going off of the installation information here) :

1. First, I had to find the JDK. There might be later versions, but I used the one in the example. Sun’s site can be a little hard to navigate, so I just plugged the self-extracting file into a search engine.

The first link that came up had a bunch of download options. I hit the radio button for “Accept License Agreement” and after the page reloaded, proceeded to begin downloading the Linux self-extracting file.

Once finished, I did as the article noted (the $ notation denotes regular user, # for super-user):

$ bash jdk-1_5_0_06-linux-i586.bin

If you want to skip over the license (you’re probably better off reading things you agree to though), you can hit ‘q’ since the license agreement is piped through `more`. Answer `yes` to continue afterwards.

(The below might be Debian/Ubuntu specific, but please try)
$ sudo mv jdk1.5.0_06 /usr/local/
$ sudo ln -s /usr/local/jdk1.5.0_06/bin/* /usr/local/bin/
$ java -version

The above `java -version` command should spit out the version. You should see something like:

$ java -version
java version “1.5.0_06”
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)

Now restart Radrails, and try to import a project. It should work. The first signs of success are a username/password prompt for your repository (if you have one), and then a directory listing of your projects.

Thanks to the folks over at for publishing a good article.

Please note that you can probably use repository-based JDKs (apt, etc), but I have personally tried these without too much success on my own. If anybody gets this working with a stable repository version, by all means leave a comment so that others will know.


11 responses to “Subclipse, HTTPS and lots of nightly fun

  1. Eugen Anghel

    Thanks for the help! This helped

  2. Thanks, you just saved me a ton of time. I’d never have guessed on my own that Ubuntu included a 1.4.x java version (gcj) and that a 1.5.x version was needed to make this work.
    I installed sun-java5-jre, symlinked /usr/lib/jvm/java-gcj to /usr/lib/jvm/java-1.5.0-sun/ and now it all works flawlessly.

  3. thx for providing this information.

    i do not exactly get what sander was doing, imo the simplest solution is to alter the used vm in the eclipse startup script (i use ubuntu feisty) by inserting f.e.

    ‘export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun/jre’.

    works fine for me.

  4. rnix: for that to be the simplest solution, the person doing it would need to be aware that there was such a thing as an eclipse startup script, would need to know where this existed, and would need to know that Eclipse would find the java it used by looking at the JAVA_HOME variable.
    The day I got this working was my second day on Ubuntu. I did not yet know these things – just needed to be productive. :)

    (And so, since the original article talked about symlinking things, that’s what I started doing, too; just in Ubuntu specific places, rather than Debian ones.)

  5. Thanks. It helped me. Really, thanks.

  6. This worked beautifully for me. I was trying to change the internal version of Java to be 1.5 but it was not working. Obviuosly, since Eclipse is also a Java app, it needs the correct java version when starting Eclipse..

  7. matyi52

    Thanks, it really helped me!
    Here is my solution:

    It was weird that Eclipse works well in my gentoo. After I read this post, I understood that the java version is the problem in my Ubuntu. The gjc was the default. So I’ve installed sun-java5-jdk using apt-get install. After some googleing I found how to change the default java vm: sudo update-alternatives –config java

    Than I tested again the https repository connection in Eclipse, but it didn’t work.
    In my gentoo the java version is SUN 1.6.0_01. So I installed sun-java6-jdk, than update-alternatives again. The same result.

    After I read the comments above, I looked into the eclipse startup script which is located at /usr/bin/eclipse. I realized, that when JAVA_HOME is not set, it uses the the first compatible vm from /etc/eclipse/java_home, and does not take the default java vm set with update-alternatives into consideration.

    But it can be overridden in ~/.eclipse/eclipserc:

    export JAVACMD=/usr/bin/java

    which is points in this way to the java vm set with update-alternatives.

    I tested it with 1.5.0_11 and 1.6.0 too, it works in both cases.

  8. Pingback: TrackbackGenerator

  9. Thanks man ! You also saved me a headache, very useful comments also :) Now I’m happily subscribed to yet another interesting RSS feed ;)

  10. I solve this problem by doing two things:
    1. Install sun java via package management, apt-get, aptitude or simply synaptic.
    2. Set correct java version as default.

    Hmmm and sometimes I have to do more…

    1. Install java

    $ sudo apt-get install sun-java5-jdk

    you type it in a terminal window (Applications -> Accessories -> Terminal)… this should take care of all dependencies (and install both jre and jdk — for development).

    2. Set up default

    The next thing I do is to set the default java:
    $ sudo update-alternatives –config java

    This opens a menu where you should choose your newly installed java version.

    After this there’s no need to do anything with environment variables and such, you should be able to verify your java by doing:

    $ java -version

    My problems with Eclipse and subversion was that Eclipse was using gjc-java, which quite frankly sucks. Unfortunately my Eclipse kept messing around even after I’ve installed the right java, and that was when I found this file:


    This file seems to contain a list of jvm’s in priority order, and it must have been mauled since the last time they updated eclipse or since I run it before without the right version. Anyway, in this list kaffe and gjc are on the top. I’d suggest you edit it and put your installed java on top:

    $ sudo gedit /etc/eclipse/java_home

    NOTE: you may not have to do this… but if eclipse keeps messing around it might help.

    However, once I got Eclipse to work i still had problems because it kept insisting on using gjc for my projects, so I also had to go in and change the default jvm in Eclipse (you can do it from the “new project dialog”.)

    Hope this helps

    P.s. I always find adding “ubuntu” in my searches tends to bring me to the very excellent articles on ubuntu forum of which many have saved me hours of sweat and tears! :D.s.

  11. Jensens

    Erik. excellent. I suppose your post saves me hours on moving a slow and flawky Eclipse on Ubuntu Feisty into a useful IDE. Thank you very much.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: