Archive

Archive for the ‘eclipse’ Category

Subclipse/Subversion error on Ubuntu: Failed to load JavaHL Library

November 25, 2011 4 comments

I’ve installed subclipse and when I restart eclipse and try to share a project, I get this error:

The error is:


Failed to load JavaHL Library.
These are the errors that were encountered:
no libsvnjavahl-1 in java.library.path
no svnjavahl-1 in java.library.path
no svnjavahl in java.library.path
java.library.path = /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64/server:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/../lib/amd64:/app/oracle/product/10.2.0/db_1/Lib:/usr/lib64/xulrunner-addons:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib

In most of the cases is due to the lack of the libsvn-java library, so just install it:


$ sudo apt-get install libsvn-java

Now you have to tell eclipse where to find this libraries. First, locate where the is:


$sudo updatedb

$ locate libsvnjavahl-1.so
/usr/lib/jni/libsvnjavahl-1.so
/usr/lib/jni/libsvnjavahl-1.so.0
/usr/lib/jni/libsvnjavahl-1.so.0.0.0

Now, edit PATH_TO_ECLIPSE/eclipse.ini and add this line below -vmargs:


-Djava.library.path=/usr/lib/jni

This is my full eclipse.ini with the line already added:

-startup
plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.0.v20100503
-product
org.eclipse.epp.package.php.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Djava.library.path=/usr/lib/jni
-Dosgi.requiredJavaVersion=1.5
-XX:MaxPermSize=256m
-Xms40m
-Xmx384m

If you still get the error, you’d probably modified the wrong eclipse.ini. In my case, I have a copy of eclipse decompressed in /app folder, but I also have eclipse.ini in /etc, /usr/lib/eclipse and /opt/ibm/lotus/notes/framework/rcp/eclipse/plugins/com.ibm.rcp.base_6.2.2.20100729-1241/linux/x86/. So, be sure to modify the correct eclipse.ini.

To check if you have modified the correct eclipse.ini, you can follow the Linux troubleshooting section at http://subclipse.tigris.org/wiki/JavaHL.

Advertisements

Subversion: is already under version control

I’ve deleted a directory from my repository, and then I created one with the same name. When I issue a commit to subversion from eclipse, I get this error:


'<dir>' is already under version control

It means that an invisible .svn folder already exists with the “old” svn data.
To solve it, just removed the .svn folder and it will work again.

Categories: eclipse, subversion Tags: ,

Localhost: “Falied to open stream”

If you ever find this error in localhost:


Warning: require_once(xajax_core/xajax.inc.php): failed to open stream: Permission denied in /home/mike/eclipse_workspace/web/src/main.php on line 2 Fatal error: require_once(): Failed opening required 'xajax_core/xajax.inc.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/mike/eclipse_workspace/web/src/main.php on line 2

it’s due to a permission error. Today I’ve copied a backup copy from one computer to another and I’ve overwritten the folder’s content.

I resolved it with a chgrp & chmod:


$ chgrp -R www-data application

$ chmod -R 775 application

Subversion – svn: is not a working copy

March 22, 2011 3 comments

I had problems with subversion and now I neither can checkout my project, nor synchronizing it. I always get this error when I try to syncrhonize a folder with my repository:


org.tigris.subversion.javahl.ClientException: svn: '/home/mike/eclipse_workspace/project/src/front' is not a working copy

The problem is that subversion cannot locate the .svn folder, maybe because it has been deleted. To solve this you can:

  • Right click on the folder that is not working and choose Team -> Update to head

And the .svn folder is retrieved from the repo, and now you can synchronize again the files

Categories: eclipse, subversion Tags: , ,