Community
Participate
Working Groups
Build Identifier: I try to get JavaHL working on Windows 7 x64. Therefore the Native JavaHL 1.6 connector was installed. Due to missing x64 binaries at the polarion update site and an installer text like this "You also need to select binaries for your platform or install it manually." I played around and found a shortcoming in org.polarion.team.svn.connector.javahl.JavaHLConnectorFactory.checkLibraries() that does not evaluate subversion.native.library to load libsvnjavahl-1.dll. Please correct this. Reproducible: Always
Fixed.
I think subversion.native.library points to the platform dependent library e.g. -Dsubversion.native.library=/usr/local/lib/libsvnjavahl-1.so on Linux and -Dsubversion.native.library=d:/svn16/libsvnjavahl-1.dll on Windows which is loaded by System.load(). Therefore please look into org.tigris.subversion.javahl.NativeResources.loadNativeLibrary() which is called by org.tigris.subversion.javahl.SVNClient static block. That's all. A fallback should be the consecutive loading of /*"libdb44", "intl3_svn"*/"libapr-1", "libapriconv-1", "libaprutil-1", "libeay32", "ssleay32", "dbghelp", "libsvn_subr-1", "libsvn_delta-1", "libsvn_fs-1", "libsvn_repos-1", "libsvn_diff-1", "libsvn_wc-1", "libsasl", "libsvn_ra-1", "libsvn_client-1" by calling System.loadLibrary();
Of course I've looked into the code you're pointing to. and that is why I did what I did: 1) The reason why there is a code that is loading dependencies one-by-one is because Windows does not try to look for dependencies in the same folder the library is located if the path not in the "library load path". That is why they're loaded like that under Windows only. You can google for it too. 2) "subversion.native.library" - is a full path, that is why on the Windows platform all dependencies should be placed in the place specified by the "library load path" or should be loaded manually like I mentioned earlier, but with the full path. And that is what I meant by saying "the issue is fixed": that I've added the code that is loading dependencies on the Windows platform from the folder specified by the "subversion.native.library" property. So, now Windows users have a nice solution that allows them not to worry about placing libraries "into the right place" and with the latest changes it will work the same way with the "subversion.native.library" property specified. I checked this solution and it really works just fine. Alternatively I can just kill every line of code regarding library loading on the Windows platform and recommend you to put corresponding path in the "library load path" on your Windows station. All that was said earlier have no relation to the Unix platforms where that specific hack is not needed. So, now please tell me why you've reopened the report even before testing the real solution. From what you've wrote I can't see what is wrong there.
Thank you for your fast reply. Now I'd like to explain my concern. I installed the precompiled binaries from SlikSVN. The dlls look like: libsvnjavahl-1.dll SlikSvn-DB44-20-x64.dll SlikSvn-libapr-1.dll SlikSvn-libaprutil-1.dll SlikSvn-libeay32.dll SlikSvn-libintl-x64.dll SlikSvn-Sasl21-23-x64.dll SlikSvn-ssleay32.dll SlikSvn-svn_client-1.dll SlikSvn-svn_delta-1.dll SlikSvn-svn_diff-1.dll SlikSvn-svn_fs-1.dll SlikSvn-svn_ra-1.dll SlikSvn-svn_repos-1.dll SlikSvn-svn_subr-1.dll SlikSvn-svn_wc-1.dll I added the folder containing the dlls to the PATH env variable. But your loading procedure wouldn't find them because the filenames don't match or some are even missing. If I only specify subversion.native.library=d:\sliksvn\bin\libsvnjavahl-1.dll and use only System.load("d:\sliksvn\bin\libsvnjavahl-1.dll") your svn team provider works like a charm. I hope you could understand me.
(In reply to comment #4) I see, they're all named in a really weird way, thank you for the detailed explanation. That is too bad. But still I don't want people to have need to specify path to the plug-in folder inside the Eclipse installation on the Windows platform. And to top it all there will be a need to change the path for every new version of binaries. That will be pretty ugly, I think. Then I'll just avoid loading dependencies in case if "subversion.native.library" property is set. And there will be a condition: on Windows platform you should specify not only the "subversion.native.library" property but the path to the dependencies for the OS as well.
Done. Now when "subversion.native.library" property is used the "Path" environment variable on a Windows platforms must be set as well.
Works fine.
*** Bug 323714 has been marked as a duplicate of this bug. ***