Problems with SVN in Eclipse on Mac OS X Mountain Lion (10.8)

I’m working on a new PHP project. Until now I’ve mainly been working on a Windows machine but today I wanted to move to my MacBook. So I just created a working copy and created a PHP project in Eclipse referencing the working copy. Unfortunately I got the following error message:

Failed to load JavaHL Library.
These are the errors that were encountered:
no libsvnjavahl-1 in java.library.path
/usr/local/Cellar/subversion/1.7.8/lib/libsvnjavahl-1.0.dylib:  Library not loaded: /usr/local/lib/libsqlite3.0.8.6.dylib   Referenced from: /usr/local/Cellar/subversion/1.7.8/lib/libsvnjavahl-1.0.dylib   Reason: image not found
no svnjavahl in java.library.path
java.library.path = .:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java

I already had some issues with SVN on Mountain Lion some time ago. But I thought I was done with it. After carefully reading the error message, I remember I had just upgraded my Home Brew package and saw the following while upgrading sqllite:

==> Upgrading sqlite
==> Downloading http://sqlite.org/sqlite-autoconf-3071502.tar.gz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/sqlite/3.7.15.2 --enable-dynamic-extensions
==> make install
==> Caveats
This formula is keg-only: so it was not symlinked into /usr/local.

Mac OS X already provides this software and installing another version in
parallel can cause all kinds of trouble.

OS X already provides (an older) sqlite3.

Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

    LDFLAGS:  -L/usr/local/opt/sqlite/lib
    CPPFLAGS: -I/usr/local/opt/sqlite/include

OK, so now what ? First check whether the library missed by Eclipse is really missing:

$ ls -l /usr/local/lib/libsqlite3.0.8.6.dylib
ls: /usr/local/lib/libsqlite3.0.8.6.dylib: No such file or directory

Ok, then try to find it:

$ find /usr -name "libsqlite3.0.8.6.dylib"
/usr/local/Cellar/sqlite/3.7.10/lib/libsqlite3.0.8.6.dylib
/usr/local/Cellar/sqlite/3.7.13/lib/libsqlite3.0.8.6.dylib
/usr/local/Cellar/sqlite/3.7.14.1/lib/libsqlite3.0.8.6.dylib
/usr/local/Cellar/sqlite/3.7.15/lib/libsqlite3.0.8.6.dylib
/usr/local/Cellar/sqlite/3.7.15.2/lib/libsqlite3.0.8.6.dylib
find: /usr/sbin/authserver: Permission denied

Ok so I have the choice. Now let’s just create a soft link to one of them:

$ ln -s /usr/local/Cellar/sqlite/3.7.15.2/lib/libsqlite3.0.8.6.dylib /usr/local/lib/libsqlite3.0.8.6.dylib

Now, deleting the project and recreating again isn’t enough since it will not try again to get the whole subversion thing working. You need to restart eclipse and recreate the project.
This time the subversion binding did work and after converting the working copy (it looks like I created it with svn 1.6 instead of 1.7), everything was working fine !

3 thoughts on “Problems with SVN in Eclipse on Mac OS X Mountain Lion (10.8)

Leave a Reply

Your email address will not be published.