svn for eclipse on mac os lion - eclipse

I need to use Subversion with Eclipse on Mac Lion. I encounter problem as below
I saw: Subclipse in Mac OS Lion shows "Unable to load default SVN client" error
In my context:
I use Mac OS Lion 10.7.2
Eclipse version: 3.7.1 64 bit
I install Subversion: Universal Subversion 1.6.17 Binaries for Lion (Mac OS X 10.7) in the page: http://www.open.collab.net/downloads/community/
I install Subclipse by the "Install New Software..." feature of Eclipse with the update link: http://subclipse.tigris.org/update_1.8.x
It install Subclipse 1.8.2, JavaHL 1.7.1.1 and some other packages.
When I go to menu Preferences/ Team / SVN , it produce error: "Incompatible JavaHL library loaded. 1.7.x or later required."
I find to install SVN Kit, so use it instead of JavaHL as the very first link refer (here), but I don't see it in Subclipse package.

The issue is that you need the right native Subversion libraries for the version of Subclipse you use. This page has information and a chart of the versions:
http://subclipse.tigris.org/wiki/JavaHL
The binaries on CollabNet website are still for SVN 1.6 so you either need to get SVN 1.7 binaries (MacPorts and Homebrew are good places to get it) or you need to use Subclipse 1.6.x.

Follow the steps as below to get it working:
Install subclipse via update url: http://subclipse.tigris.org/update_1.8.x
Install subversion using the binary from here: http://www.ubersvn.com/download (scroll down to "Command-Line Client 1.6.18 and 1.7.6 certified by WANdisco" section since that's all you need)

I found a solution (download from WanDisco instead of CollabNet) in this thread: Subclipse in Mac OS Lion shows "Unable to load default SVN client" error

I went to this topic because I was in need to make SVN 1.7 to work with subclipse.
For those with the same problem, the easiest way to fix it is to install Subversion and JavaHL from MacPorts.
The packages you need to install with macports are subversion and subversion-javahlbindings (check here), they are both 1.7.1.
With these packages you can install the subclipse using the update site with version 1.8.x. (http://subclipse.tigris.org/update_1.8.x)
If you don't have macports installed follow these instructions. I am sure it will be useful for other things too. You also need to install XCode from AppStore.

Installing the binaries from http://www.wandisco.com/subversion/download#osx fixed this issue for me.

In case anyone using homebrew wants SVN version 1.6 support (as I did due to interacting with some old servers), here is how I got it to work:
Install SVN 1.6 via homebrew:
brew tap homebrew/versions
brew info homebrew/versions/subversion16
brew install homebrew/versions/subversion16 --java
Ensure that /usr/local/bin is in your PATH before /usr/bin, so that homebrew's SVN is ran instead of OS X's.
If using Eclipse:
Be sure to install Subclipse 1.6 (e.g. use the 1.6 update site) instead of the newest one.
If you follow the homebrew formula instructions to link the java library to OS X's Extensions, you do NOT have to edit your Eclipse.ini file to include the path there. For posterity, those commands are:
sudo mkdir -p /Library/Java/Extensions
sudo ln -s /usr/local/lib/libsvnjavahl-1.dylib /Library/Java/Extensions/libsvnjavahl-1.dylib
HTH

This post resolved my problem: http://bridgetconsulting.com/?p=64 Requires MacPorts
Add to /opt/local/etc/macports.conf this line
universal_archs i386 x86_64
and run
sudo port install subversion-javahlbindings +no_bdb +universal

I installed subversion 1.7 and the java-hl bindings using homebrew by following the instructions here.
Specifically:
[sudo] brew install subversion --universal --java
Then linking the installed libraries in /Library/Java/Extensions so eclipse picked them up.
/Library/Java/Extensions $ sudo ln -sf /usr/local/lib/libsvnjavahl-1.dylib
/Library/Java/Extensions $ sudo ln -sf /usr/local/lib/libsvnjavahl-1.jnilib

You only installed the Java HL package. Uninstall JavaHL and install the SVN Kit. You can find options for connecting in Preferences -> Team...

Related

Install svn kit from updatesite archieve

I have updated my svn to 1.8 which unfortunately is not supported by subversive (using the svnkit connector). Since I would like to avoid downgrading, I am trying to install the alpha of the svnkit. I download the "Eclipse Update Site Archive" and extract it.
In eclipse I select "add update site"->"local" and navigate to the folder containing site.xml. After this Eclipse tells me "could not find file:/path/I/choose/".
How can I install this connector and do I need further steps to use a svn 1.8 working copy with subversive? (Besides selecting the newly installed connector)
LET THERE BE LIGHT!
Download the CollabNetSubversion-client rpm in the correct architecture (registration required).
Install rpm sudo apt-get install rpm
Install svn client without deps: sudo rpm -ivh --nodeps CollabNetSubversion-client-1.8.0-2. x86_64.rpm
Find collabnet installation `sudo updatedb then locate *collabnet* (or use find or whatever you like), should be /opt/CollabNet_Subversion/bin/collabnetsvn-config
Get the lib path, should be /opt/CollabNet_Subversion/lib
Open your eclipse.ini
Enter the lib path-Djava.library.path=/opt/CollabNet_Subversion/lib under the vmargs line.
Install your SVN Plugin of choice (Subclipse or Subversive)
Choose JavHL (JNI) 1.8.0 as your SVN interface
CHECK THE #&%$§# PROJECTS OUT AND COMMIT THE $%&#§ OUT OF THEM!

Failed to load JavaHL Library

After updating to Snow Lion I started receiving these errors in Flash Builder / Eclipse when trying to use SVN:
Failed to load JavaHL Library.
These are the errors that were encountered:
no libsvnjavahl-1 in java.library.path
/opt/subversion/lib/libsvnjavahl-1.0.dylib: Library not loaded: /usr/lib/libpq.5.dylib Referenced from: /opt/subversion/lib/libsvnjavahl-1.0.dylib Reason: no suitable image found. Did find: /usr/lib/libpq.5.dylib: mach-o, but wrong architecture /usr/lib/libpq.5.dylib: mach-o, but wrong architecture
no svnjavahl in java.library.path
java.library.path = .:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
Try this:
Select Window >> Preferences
Expand Team >> SVN
Under SVN interface set Client to SVNKit (Pure Java) SVNKit....
If you do not need to use JavaHL, Subclipse also provides a pure-Java SVN API library -- SVNKit (http://svnkit.com). Just install the SVNKit client adapter and library plugins from the Subclipse update site and then choose it in the preferences under Team > SVN.
On Kubuntu, my path to the library changed because of installing another Java version. Here's the whole picture, but in short:
sudo apt-get install libsvn-java
sudo find / -name libsvnjavahl-1.so
The output from the last command could look like this, for example:
/usr/lib/x86_64-linux-gnu/jni/libsvnjavahl-1.so
This gives you the path, so you can add the following to your eclipse.ini:
-Djava.library.path=/usr/lib/x86_64-linux-gnu/jni/
Check out this blog. It has a ton of information.
Also if installing through brew don´t miss this note:
You may need to link the Java bindings into the Java Extensions folder:
$ sudo mkdir -p /Library/Java/Extensions
$ sudo ln -s /usr/local/lib/libsvnjavahl-1.dylib /Library/Java/Extensions/libsvnjavahl-1.dylib
I Just installed Mountain Lion and had the same problem
I use FLashBuilder (which is 32bit) and MountainLion is 64bit, which means by default MacPorts installs everything as 64bit. The version of subclipse I use is 1.8
As i had already installed Subversion and JavaHLBindings I just ran this command:
sudo port upgrade --enforce-variants active +universal
This made mac ports go through everything already installed and also install the 32bit version.
I then restarted FlashBuilder and it no longer showed any JavaHL errors.
You may or may not need JavaHL depending on your OS. In addition to other suggestions just posting this here.
For other OS see this source: http://subclipse.tigris.org/wiki/JavaHL
maybe you can try this: change jdk version.
And I resolved this problem by change jdk from 1.6.0_37 to 1.6.0.45 .
BR!
i tried every single solution available and finally for me the problem was:
uninstall Native JavaHL 1.6
install everything under Subclipse from this site:
http://subclipse.tigris.org/update_1.10.x>
For me i started getting this problem when I upgraded to java 8, and then reverted back to java 7. Upgraded again to java 8 and the problem got resolved.
For Eclipse/STS v3.9.X windows user, you may need to update your subclipse version.
Go to Help > Install New Software > Click on Subclipse and edit the version from 1.6.X to 1.8.X
This method also apply to those who encounter JavaHL not available. You can check whether JavaHL is available or not by Go to Windows > Preference > Team > SVN. You may check it in SVN Interface > Client section.
If this work on MAC OS, kindly response in comment section. :)
My Understanding - Basically, svn client comes by default on Mac os. While installing in eclipse we should match svn plugin to the mac plugin and javaHL wont be missing. There is a lengthy process to update by installing xcode and then by using homebrew or macports which you can find after googling but if you are in hurry use simply the steps below.
1) on your mac terminal shell
$ svn --version
Note down the version e.g. 1.7.
2) open the link below
http://subclipse.tigris.org/wiki/JavaHL
check which version of subclipse you need corresponding to it. e.g.
Subclipse Version SVN/JavaHL Version
1.8.x 1.7.x
3) ok, pick up url corresponding to 1.8.x from
http://subclipse.tigris.org/servlets/ProjectProcess?pageID=p4wYuA
and add to your eclipse => Install new Software under help
select whatever you need, svn client or subclipse or mylyn etc and it will ask for restart of STS/eclipse thats it you are done. worked for me.
NOTE: if you already have multiple versions installed inside your eclipse then its best to uninstall all subclipse or svn client versions from eclipse plugins and start fresh with steps listed above.

How to upgrade JavaHL on Ubuntu?

Environment
Ubuntu 10.10
Eclipse Java EE Indigo Service Release 1
Subclipse 1.8.x
libsvn1 1.6.12
svn 1.7.x
Problem
Subclipse 1.8.x requires JavaHL version 1.7.x. I need Subclipse 1.8.x in order to use svn 1.7.x.
Ubuntu 10.10 does not have subversion 1.7 packages or libsvn1 1.7 packages.
Question
Is there any way to upgrade the libsvn1 package on Ubuntu, possibly by configuring another package repository or installing the package directly? If the latter is possible, where can I find the libsvn1/JavaHL packages? Surely someone else must be trying to use svn 1.7 on this Ubuntu version right?
(Copied from another answer)
Remove your existing libsvn-java:
sudo apt-get purge libsvn-java
Then, add the following software source and re-install:
sudo add-apt-repository ppa:dominik-stadler/subversion-1.7
sudo apt-get update
sudo apt-get install libsvn-java
(found here)
Update: for Ubuntu 14 use the subversion 1.8 repo instead
sudo add-apt-repository ppa:dominik-stadler/subversion-1.8
(Thanks to #YetAnotherMatt's answer below)
If you do not want to mess around with your Ubuntu packages while you wait for them to update to SVN 1.7.x, one thing you can do is install the CollabNet client RPM. This installs into a private namespace (/opt/CollabNet_Subversion) so it does not alter any of your Ubuntu packages. You can install the RPM by using the "alien" package. We have had Subclipse users confirm that this client works for them.
http://www.open.collab.net/downloads/subversion/linux.html
I think the real problem is that the jni location changed in 14.04 from /usr/lib/jni to something like /usr/lib/x86_64-linux-gnu/jni
I recommend editing your eclipse ini's vmargs java.library.path setting thus
ORIGINAL: -Djava.library.path=/usr/lib/jni
NEW: -Djava.library.path=/usr/lib/x86_64-linux-gnu/jni
This setting determination from where eclipse expects to locate the library files
#VishalKale, and anyone else trying to follow #jlb's instructions on more recent versions of Ubuntu, use the Subversion-1.8 repository instead:
sudo add-apt-repository ppa:dominik-stadler/subversion-1.8
For more details: Getting subclipse to work on Ubuntu 64 and Indigo - Incompatible JavaHL library loaded. 1.7.x or later required

Incompatible JavaHL library for Subclipse in 64 bit Kubuntu

I'm trying to get Subversion working under Eclipse 3.7 in a 64 bit Kubuntu 11.10 but having problems. I've installed subclipse 1.8.1, installed 'libsvn-java' and have added -Djava.library.path=/usr/lib/jni/ under the -vmargs in the /usr/lib/eclipse/eclipse.ini file, but now getting the error message:
Incompatible JavaHL library loaded. 1.7.x or later required.
and can't seem to find out how to upgrade my JavaHL. I've reinstalled the subclipse plugin, which apparently also installs JavaHL version 1.7.1, so perhaps this isn't a case of JavaHL not being installed, but perhaps unfindable? - Anyone with any ideas?
** EDIT **
As mentioned below the links provided in the accepted answer have stopped working, but you can download updated files here (credit to Rekhyt) but you will need subclipse version 1.8.x which you can install by adding http://subclipse.tigris.org/update_1.8.x to Eclipse
I installed subclipse 1.8 first then installed these files in order:
libsvn-java_1.7.2-0ubuntu0~ppa1_amd64.deb
subversion_1.7.2-0ubuntu0~ppa1_amd64.deb
libsvn1_1.7.2-0ubuntu0~ppa1_amd64.deb
If you need 32 bit go to the launchpad page and click the 'subversion - 1.7.2-0ubuntu0~ppa1' link at the bottom of the page - this will bring up all the relevant files
Alternatively, you may do the following, which automates the package installation:
apt-add-repository ppa:dominik-stadler/subversion-1.7
apt-get update
apt-get dist-upgrade
Because of that
First of all I had to uninstall the old packages before installing the new ones (thanks to Sergi)
for i386
go to here
install in order geb packages
libsvn1_1.7.1-0ubuntu0~ppa4_i386.deb (979.2 KiB)
subversion_1.7.1-0ubuntu0~ppa4_i386.deb (1.2 MiB)
libsvn-java_1.7.1-0ubuntu0~ppa4_i386.deb
for amd64
go to here
install in order geb packages
libsvn1_1.7.1-0ubuntu0~ppa4_amd64.deb (1.0 MiB)
subversion_1.7.1-0ubuntu0~ppa4_amd64.deb (1.2 MiB)
libsvn-java_1.7.1-0ubuntu0~ppa4_amd64.deb (446.7 KiB)
it worked for me.
Sadly, I can't comment yet (or I don't understand how this site works :-)), but maybe Dave Shuck interested in it: if you change the dependencies of the .deb package, and remove the libserf-private everything works fine. Easiest to do that with this script: videbcontrol
Since I cannot comment yet and my edit has been rejected:
I stumbled across the same problem. The repositories of Xubuntu 10.11 are out of date. Packages can be found at this location. Proceed according to javaloper's posting.
Download files libserf, libaprutil, libsvn1, subversion, libsvn-java from here.
During download choose appropriate environment i.e 32bit or 64bit version.

subclipse: Unable to load default SVN Client

I am constantly getting this error when working with eclispe and the subclipse plugin:
Unable to load default SVN Client
I have already installed both the SVNKit and the JavaHL provider, but it can't be found in the preferences:
I am using eclipse for win64bit
I had this problem after installing the latest eclipse and installing subclipse from the marketplace. To resolve you can follow these steps:
Click Help >> Install New Software...
Set Work with: Subclipse 1.10.x Update Site - http://subclipse.tigris.org/update_1.10.x
Ensure Hide items that are already installed is checked.
Click Select All.
Click Next.
Complete the remainder of the installation as usual.
For ubuntu 12.04 amd64
sudo apt-get install libsvn-java
add this to eclipse.ini after -vmargs:
-vmargs
-Djava.library.path=/usr/lib/jni:/usr/lib/x86_64-linux-gnu/jni
...
What JavaHL provider have you installed? It sounds like you need 64 bit JavaHL support. Have you tried SlikSVN?
I solved this with easiest way:
sudo apt-get install libsvn-java
sudo cp /usr/lib/jni/* /usr/lib
Faced the same problem after installed subclipse 1.8 from eclipse marketplace and resolved thru following steps:
1. Install subversion client (required)
2. Install Subversion JavaHL Native Library Adapter (required)
And it works now.
P/S: Eclipse Indigo
I don't know about JavaHL but to make the SVNKit appear on the list of SVN interfaces, you need to install the "SVN Client Adapter" and the "SVNKit Adapter" as well.
You can find those on the update site of Subclipse (*http://subclipse.tigris.org/update_1.8.x*).
I have a similar problem with Subclipse 1.8. Due to licenses limitations, SVN client aren't bundled with SVN any more. So I find the message "Unable to load default SVN Client".
My solutions is to install SVN client. It can't be easier. Go to Eclispe Marketplace, type Subclipse and click to install Subclipse again, select all options. When restarting Eclipse, it will prompt us to install an SVN client, choose SVNKit or JavaHL (I choose JavaHL). After restarting one more time, it all works.
In fedora 16 on x64 i meet also, i solved by downloading subversion 1.7 from here and installing:
yum install subversion-javahl-1.7.1-1.fc16.x86_64.rpm subversion-libs-1.7.1-1.fc16.x86_64.rpm subversion-1.7.1-1.fc16.x86_64.rpm
Install SVN on Eclipse Juno using the update site at http://subclipse.tigris.org/update_1.8.x
Go to Help -> Install new software, then Add update site.
Zend Studio 9 if you upgrade/update to 9.0.3 you will get this error as well. You need to uninstall all subEclipse and JavaHL stuff then follow the install procedures again and restart Zend studio.
Build 20120625 in Zend Version 9.0.3
If you are using the Subversive plugin (which is newer than the Subclipse one, and the two are easily confused with one another), you might run into problems finding the library even after configuring the library path in eclipse.ini. To fix the entire problem, you might need to add this setting to the file as well:
-Dsubversion.native.library=C:/SlikSVN_JavaHL/libsvnjavahl-1.dll
Read http://www.eclipse.org/subversive/installation-instructions.php for more help, it's a good-quality explanation of everything.
I had same problem with Spring STS 3.5.1 and Sub eclipse version 1.6. Upgraded to version 1.10 of subeclipse and everything is working fine.
The above problem arises with custom eclipse installation and due to updated version of subclipse.
You have to install the older version of subclipse manually.
For this i have done as following:
Under Help menu click "Install New Software..."
Select "http://subclipse.tigris.org/update_1.6.x" from the drop down menu
If URL of any other advanced version of are available change it to look as above.
Check the options selected are sensible e.g. "Hide items that are already installed"
Click "Select All"
Click Next/Finish through to completion.
After finishing the installation,under windows menu go to preferences,click on Team and on SVN.
Now change the client from Java HL to SVN pure kit.
That's it.
This resolved problem for me
Eclipse Java EE IDE for Web Developers.
Version: Oxygen.3a Release (4.7.3a)
Build id: 20180405-1200
I solved this problem as follows
1) Install Subversive - SVN Team Provider 4.0.5 from marketplace
2) Team -> SVN -> SVN Connectors and set SVNKit 1.8.14
3) Restart eclipse
All works well