Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

WebNFS: Problem with Sun's WebNFS api

16 views
Skip to first unread message

Joel Slovacek

unread,
Aug 23, 1999, 3:00:00 AM8/23/99
to
I have been trying to get Sun's WebNFS api working, but I come up with the
damndest exception. Here's my snippet of code, practically right from their
example code:

XFile f = new XFile("nfs://kingkong/content/foo.gif");
com.sun.nfs.XFileExtensionAccessor accessor =
(com.sun.nfs.XFileExtensionAccessor) f.getExtensionAccessor();
if (accessor.loginPCNFSD(NFS_SERVER, NFS_USERNAME, NFS_PASSWORD)) {
System.out.println("PCNFSD authentication successful");
} else {
System.out.println("PCNFSD authentication FAILED");
}
if (!f.exists()) {
System.out.println("Cannot find file!");
}

This throws the exception:

java.lang.ArrayIndexOutOfBoundsException: 64
at com.sun.rpc.Xdr.xdr_int(Xdr.java:146)
at com.sun.rpc.CredUnix.putCred(CredUnix.java:93)
at com.sun.rpc.Rpc.rpc_header(Rpc.java:203)
at com.sun.nfs.Nfs3.lookup(Nfs3.java:337)
at com.sun.nfs.NfsConnect.tryNfs(NfsConnect.java:313)
at com.sun.nfs.NfsConnect.connect(NfsConnect.java:204)
at com.sun.nfs.NfsConnect.connect(NfsConnect.java:83)
at com.sun.nfs.XFileAccessor.open(XFileAccessor.java:55)
at com.sun.xfile.XFile.bind(XFile.java:389)
at com.sun.xfile.XFile.exists(XFile.java:651)
at Test.main(Test.java:44)

Authentication runs without a hitch. Also, regardless of what I change the
file to, the same exception (with the same number 64) is thrown. It is only
thrown after authenticating. If I call accessor.logoutPCNFSD() then it
doesn't throw the exception, but can't find the file. I am completely
puzzled.

-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----

0 new messages