Rakesh
2005-01-20 22:18:11 UTC
Using jcifs-1.1.7.jar, I get jcifs.smb.SmbAuthException. Same exception
occurs during parent.makedir(), parent.makedir(), and parent.exists(). I
am able successfully create a file on the remote share if the directory
already exist; but I have not been successful in creating a new directory.
jcifs.smb.SmbAuthException: Logon failure: account currently disabled.
at jcifs.smb.SmbTransport.send(SmbTransport.java:695)
at jcifs.smb.SmbSession.sessionSetup(SmbSession.java:289)
at jcifs.smb.SmbSession.send(SmbSession.java:246)
at jcifs.smb.SmbTree.treeConnect(SmbTree.java:134)
at jcifs.smb.SmbFile.connect(SmbFile.java:827)
at jcifs.smb.SmbFile.connect0(SmbFile.java:797)
at jcifs.smb.SmbFile.queryPath(SmbFile.java:1202)
at jcifs.smb.SmbFile.exists(SmbFile.java:1285)
at jcifs.smb.SmbFile.mkdirs(SmbFile.java:2250)
at com.conformative.servicenet.services.CIFSResourceComponent.save
(CIFSResourceComponent.java:241)
The following is my java code that I use to create a file:
public boolean save(String relativeFilename, InputStream dataStrm) throws
IOException
{
SmbFile file = new SmbFile(cifsDir, relativeFilename);
if (!file.getCanonicalPath().startsWith(cifsDir.getCanonicalPath()))
return false;
SmbFile parent = new SmbFile( file.getParent() );
if( parent!=null && !parent.getPath().equals( cifsDir.getPath() ) )
parent.mkdirs();
OutputStream outStrm = file.getOutputStream();
Util.copyStream( dataStrm, outStrm );
return true;
}
-Rakesh
occurs during parent.makedir(), parent.makedir(), and parent.exists(). I
am able successfully create a file on the remote share if the directory
already exist; but I have not been successful in creating a new directory.
jcifs.smb.SmbAuthException: Logon failure: account currently disabled.
at jcifs.smb.SmbTransport.send(SmbTransport.java:695)
at jcifs.smb.SmbSession.sessionSetup(SmbSession.java:289)
at jcifs.smb.SmbSession.send(SmbSession.java:246)
at jcifs.smb.SmbTree.treeConnect(SmbTree.java:134)
at jcifs.smb.SmbFile.connect(SmbFile.java:827)
at jcifs.smb.SmbFile.connect0(SmbFile.java:797)
at jcifs.smb.SmbFile.queryPath(SmbFile.java:1202)
at jcifs.smb.SmbFile.exists(SmbFile.java:1285)
at jcifs.smb.SmbFile.mkdirs(SmbFile.java:2250)
at com.conformative.servicenet.services.CIFSResourceComponent.save
(CIFSResourceComponent.java:241)
The following is my java code that I use to create a file:
public boolean save(String relativeFilename, InputStream dataStrm) throws
IOException
{
SmbFile file = new SmbFile(cifsDir, relativeFilename);
if (!file.getCanonicalPath().startsWith(cifsDir.getCanonicalPath()))
return false;
SmbFile parent = new SmbFile( file.getParent() );
if( parent!=null && !parent.getPath().equals( cifsDir.getPath() ) )
parent.mkdirs();
OutputStream outStrm = file.getOutputStream();
Util.copyStream( dataStrm, outStrm );
return true;
}
-Rakesh