I am working at an application in java which gets files from a share folder. For 2 days, i got same error trying to connect to the share folder. Until now, i didn't get this error. I dont know what is happened. Please help me. My code:
package ScanPatch;
import java.util.TimerTask;
import Controllers.InterfataController;
import jcifs.smb.NtlmPasswordAuthentication;
import jcifs.smb.SmbFile;
public class MyTask extends TimerTask{
public MyTask(){
}
@Override
public void run() {
//System.out.println("Hi see you after 10 seconds");
for(int i=0;i<InterfataController.getListaCheckbox().size();i++)
{
String path="smb://bcr-hqb-w0935/Oracle/Patchuri/" + InterfataController.getListaCheckbox().get(i).getText() +"/";
NtlmPasswordAuthentication userCred = new NtlmPasswordAuthentication("BCRWAN",
"Sebastian.burchidrag", "Parola952491");
SmbFile smbFile;
jcifs.Config.setProperty("jcifs.smb.client.disablePlainTextPasswords","false");
try {
smbFile = new SmbFile(path, userCred);
String [] patchuri=smbFile.list();
if(patchuri.length>1)
{
InterfataController.getListaCheckbox().get(i).setStyle("-fx-text-fill: red;");
}
else
{
InterfataController.getListaCheckbox().get(i).setStyle("-fx-text-fill: black;");
}
}catch(Exception e)
{
e.printStackTrace();
}
}
}
}
The error is : jcifs.smb.SmbException: 0xC000009A on String [] patchuri=smbFile.list(); this line. The idea is that if a restart my computer, the application will work for the first connection, but only first time, then a i will get this error.
User contributions licensed under CC BY-SA 3.0