[OpenAFS] Error while running JAFS

Shaji Kalidasan shajiindia@yahoo.com
Thu, 24 Nov 2005 08:02:35 -0800 (PST)


--0-1590356924-1132848155=:73511
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Hi Jeffrey,
  
  Thank you very much for providing me your valuable inputs instantly and pointing out exactly where I am going wrong.
  
  How or where can I get the "JAFS.DLL" or "libjafs.so" in order to run my test program successfully.
  
  Please note that I don't have the expertise in C/C++ to compile the classes/files into .dll or .so in case if that is the answer. Can I borrow the native libraries from someone else who uses JAFS :-)
  
  Any help is greatly appreciated.
  
  Thank you,
  Shaji

Jeffrey Altman <jaltman@secure-endpoints.com> wrote:  Shaji:

The problem you are having is not related to AFS.   In order for a Java
class to interface with non-Java libraries, it must use the Java Native
Interface (JNI).  The JNI support must be built separately for every
platform on which you wish to use the Java class libraries.   The error
you are receiving from the Java VM is that the JNI library "JAFS.DLL" or
"libjafs.so" on UNIX/Linux cannot be found.   The library cannot be
found in the PATH designated by the java.library.path variable.

Jeffrey Altman

Shaji Kalidasan wrote:
> Hi,
> 
> I downloaded the Java classes from the location where you directed, then
> I compiled the Java files and when I tried to run the testAFS.java it
> reports the following error.
> 
> D:\workspace\jafs>*java testAFS me@something.com password servername 10*
> Exception in thread "main" java.lang.UnsatisfiedLinkError: no jafs in
> java.library.path
>         at java.lang.ClassLoader.loadLibrary(Unknown Source)
>         at java.lang.Runtime.loadLibrary0(Unknown Source)
>         at java.lang.System.loadLibrary(Unknown Source)
>         at org.openafs.jafs.AFSLibraryLoader.(Token.java:455)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Unknown Source)
>         at org.openafs.jafs.Token.(Token.java:111)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Unknown Source)
>         at testAFS.main(testAFS.java:635)
> 
> 
> I first ran this in my windows machine (Windows 2000 Professional), even
> though the target machine is Linux. What settings do I need to do prior
> to running this application or what is the pre-requisite for running
> this test program on both environments or Do I need to include any other
> libraries?
> 
> As I am new to AFS, I need your valuable help in figuring this out.
> Please guide me where I am going wrong.
> 
> Thank you,
> Shaji
> 
> */Peter Somogyi 
/* wrote:
> 
>     Hi,
> 
>     On Tuesday 22 November 2005 18.01, Shaji Kalidasan wrote:
>     > Hi,
>     >
>     > I am in the process of developing a J2EE web based AFS ID password
>     reset
>     > tool for my organization, currently we have it working with PHP &
>     Perl.
>     >
>     > I am looking for any implementation of Java API for AFS, I
>     searched the
>     > internet but I could not find one.
> 
>     JAFS is in openafs-1.4.1/src/JAVA.
>     Please read earlier discussions in the mail archives.
> 
>     Peter
> 
>     _______________________________________________
>     OpenAFS-info mailing list
>     OpenAFS-info@openafs.org
>     https://lists.openafs.org/mailman/listinfo/openafs-info
> 
> 
> ------------------------------------------------------------------------
> Yahoo! Music Unlimited - Access over 1 million songs. Try it free.
> 
> 




		
---------------------------------
 Yahoo! Music Unlimited - Access over 1 million songs. Try it free.
--0-1590356924-1132848155=:73511
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

<div id="RTEContent">Hi Jeffrey,<br>  <br>  Thank you very much for providing me your valuable inputs instantly and pointing out exactly where I am going wrong.<br>  <br>  How or where can I get the "<span style="font-weight: bold;">JAFS.DLL</span>" or "<span style="font-weight: bold;">libjafs.so</span>" in order to run my test program successfully.<br>  <br>  Please note that I don't have the expertise in C/C++ to compile the classes/files into <span style="font-weight: bold;">.dll</span> or <span style="font-weight: bold;">.so </span>in case if that is the answer. Can I borrow the native libraries from someone else who uses JAFS :-)<br>  <br>  Any help is greatly appreciated.<br>  <br>  Thank you,<br>  Shaji<br><br><b><i>Jeffrey Altman &lt;jaltman@secure-endpoints.com&gt;</i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;">  Shaji:<br><br>The problem you are having is not related to AFS.   In order for a
 Java<br>class to interface with non-Java libraries, it must use the Java Native<br>Interface (JNI).  The JNI support must be built separately for every<br>platform on which you wish to use the Java class libraries.   The error<br>you are receiving from the Java VM is that the JNI library "JAFS.DLL" or<br>"libjafs.so" on UNIX/Linux cannot be found.   The library cannot be<br>found in the PATH designated by the java.library.path variable.<br><br>Jeffrey Altman<br><br>Shaji Kalidasan wrote:<br>&gt; Hi,<br>&gt; <br>&gt; I downloaded the Java classes from the location where you directed, then<br>&gt; I compiled the Java files and when I tried to run the testAFS.java it<br>&gt; reports the following error.<br>&gt; <br>&gt; D:\workspace\jafs&gt;*java testAFS me@something.com password servername 10*<br>&gt; Exception in thread "main" java.lang.UnsatisfiedLinkError: no jafs in<br>&gt; java.library.path<br>&gt;         at java.lang.ClassLoader.loadLibrary(Unknown Source)<br>&gt;         at
 java.lang.Runtime.loadLibrary0(Unknown Source)<br>&gt;         at java.lang.System.loadLibrary(Unknown Source)<br>&gt;         at org.openafs.jafs.AFSLibraryLoader.<clinit>(Token.java:455)<br>&gt;         at java.lang.Class.forName0(Native Method)<br>&gt;         at java.lang.Class.forName(Unknown Source)<br>&gt;         at org.openafs.jafs.Token.<clinit>(Token.java:111)<br>&gt;         at java.lang.Class.forName0(Native Method)<br>&gt;         at java.lang.Class.forName(Unknown Source)<br>&gt;         at testAFS.main(testAFS.java:635)<br>&gt; <br>&gt; <br>&gt; I first ran this in my windows machine (Windows 2000 Professional), even<br>&gt; though the target machine is Linux. What settings do I need to do prior<br>&gt; to running this application or what is the pre-requisite for running<br>&gt; this test program on both environments or Do I need to include any other<br>&gt; libraries?<br>&gt; <br>&gt; As I am new to AFS, I need your valuable help in figuring this out.<br>&gt; Please
 guide me where I am going wrong.<br>&gt; <br>&gt; Thank you,<br>&gt; Shaji<br>&gt; <br>&gt; */Peter Somogyi <psomogyi @gamax.hu="">/* wrote:<br>&gt; <br>&gt;     Hi,<br>&gt; <br>&gt;     On Tuesday 22 November 2005 18.01, Shaji Kalidasan wrote:<br>&gt;     &gt; Hi,<br>&gt;     &gt;<br>&gt;     &gt; I am in the process of developing a J2EE web based AFS ID password<br>&gt;     reset<br>&gt;     &gt; tool for my organization, currently we have it working with PHP &amp;<br>&gt;     Perl.<br>&gt;     &gt;<br>&gt;     &gt; I am looking for any implementation of Java API for AFS, I<br>&gt;     searched the<br>&gt;     &gt; internet but I could not find one.<br>&gt; <br>&gt;     JAFS is in openafs-1.4.1/src/JAVA.<br>&gt;     Please read earlier discussions in the mail archives.<br>&gt; <br>&gt;     Peter<br>&gt; <br>&gt;     _______________________________________________<br>&gt;     OpenAFS-info mailing list<br>&gt;     OpenAFS-info@openafs.org<br>&gt;    
 https://lists.openafs.org/mailman/listinfo/openafs-info<br>&gt; <br>&gt; <br>&gt; ------------------------------------------------------------------------<br>&gt; Yahoo! Music Unlimited - Access over 1 million songs. Try it free.<br>&gt; <http: //pa.yahoo.com/*http://us.rd.yahoo.com/evt="36035/*http://music.yahoo.com/unlimited/"><br>&gt; <br></http:></psomogyi></clinit></clinit></blockquote><br></div><p>
		<hr size=1> <a href="http://pa.yahoo.com/*http://us.rd.yahoo.com/evt=36035/*http://music.yahoo.com/unlimited/">Yahoo! Music Unlimited - Access over 1 million songs. Try it free.</a>
--0-1590356924-1132848155=:73511--