[jcifs] jcifs.smb.SmbAuthException: Access denied

suresh kolan kolansuresh9 at yahoo.com
Fri Apr 16 01:00:57 GMT 2004


Hi All,

I am getting following error message when I use the
following code from the examples..

I have winxp prof and jdk1.4. Please can anybody let
me know what I am missing here

import jcifs.smb.*;

jcifs.Config.setProperty( "wins", "192.168.1.220" );
SmbFileInputStream in = new SmbFileInputStream(
            "smb://username:password@host/c/My
Documents/somefile.txt" );
byte[] b = new byte[8192];
int n;
while(( n = in.read( b )) > 0 ) {
    System.out.write( b, 0, n );
}

jcifs.smb.SmbAuthException: Access denied
	at jcifs.smb.SmbTransport.send(SmbTransport.java:493)
	at
jcifs.smb.SmbSession.sessionSetup(SmbSession.java:155)
	at jcifs.smb.SmbSession.send(SmbSession.java:130)
	at jcifs.smb.SmbTree.treeConnect(SmbTree.java:122)
	at jcifs.smb.SmbTree.send(SmbTree.java:72)
	at jcifs.smb.SmbFile.send(SmbFile.java:499)
	at jcifs.smb.SmbFile.open(SmbFile.java:555)
	at
jcifs.smb.SmbFileInputStream.<init>(SmbFileInputStream.java:67)
	at
jcifs.smb.SmbFileInputStream.<init>(SmbFileInputStream.java:61)
	at
jcifs.smb.SmbFileInputStream.<init>(SmbFileInputStream.java:47)
	at com.rhi.ca.warp.testJCIFS.main(testJCIFS.java:25)
java.lang.NullPointerException
	at com.rhi.ca.warp.testJCIFS.main(testJCIFS.java:40)
Exception in thread "main" 


	
		
__________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online by April 15th
http://taxes.yahoo.com/filing.html


More information about the jcifs mailing list