[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Question on JhlClientAdapter.isAvailable() ...

From: Gareth Bryan <gareth.bryan_at_gmail.com>
Date: 2005-06-18 17:48:58 CEST

Hi,

Am having problems using the adapter. Maybe you can help?

Runtime context is standalone java app, all relevant dlls are
available on java.library.path. Os is winxp. svnjavahl.jar is on the
classpath.

SVNClientAdapterFactory reports that the only client available is the
command line client (i.e.
SVNClientAdapterFacotry.isSVNClientAvailable(SVNClientAdapterFactory.JAVAHL_CLIENT)
returns false).

Following this discovery, I wrote a method which tests loading of the
native dlls - same as the implementation of
JhlClientAdapter.isAvailable(). This method worked without problems.
i.e. no UnsatisfiedLinkErrors or similar problems.

So I then, tried just asking the factory for the javahl adapter anyway
- just for kicks. To my suprise, I found that it returned a non-null
instance of JhlClientAdapter which appears to work!

My test method does this (of course, with a valid svn url)

...
    System.out.println(SVNClientAdapterFactory.isSVNClientAvailable(
      SVNClientAdapterFactory.JAVAHL_CLIENT));
    System.out.println(SVNClientAdapterFactory.isSVNClientAvailable(
      SVNClientAdapterFactory.COMMANDLINE_CLIENT));
    ISVNClientAdapter client = SVNClientAdapterFactory.createSVNClient(
      SVNClientAdapterFactory.JAVAHL_CLIENT);
    System.out.println(client);
    ISVNDirEntry[] array = client.getList(new SVNUrl("..."),
SVNRevision.HEAD, false);
    System.out.println(array.length);
    for (int i = 0; i < array.length; i++)
    {
      System.out.println(array[i].getPath());
    }
...

The output from this method is:

false
true
org.tigris.subversion.svnclientadapter.javahl.JhlClientAdapter@1ded0fd
3
etc
lib
src

So, my "problem" is that the factory reports that javahl is not
available, yet it returns an adapter instance which appears to work.

Can anyone explain that? Or, at least point me to some ideas for
debugging further?

Regards,

Gareth
Received on Sun Jun 19 01:48:58 2005

This is an archived mail posted to the Subclipse Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.