[jcifs] The system cannot find the path specified

Coppens Benoît (All4IT) Benoit.Coppens at UCB-Group.com
Fri Jun 20 10:07:46 GMT 2008


Hi,
 
I'm using the following code to retrieve a document from a DFS:
 
********************
public static void main(String[] args) {

  try {

    jcifs.Config.setProperty( "jcifs.netbios.wins", "10.1.253.2" );
    NtlmPasswordAuthentication auth = new NtlmPasswordAuthentication("UCB-CORP", "E118616", "password");
    SmbFile fileToGet = new SmbFile("smb://ntbrafscl011.dir.ucb-group.com/dfs/Sites/Braine/GTSO/GECTD/DSPE/Department organization/Archives/Time sheet/TS SVL SVT JLH - 060504.xls", auth);
    SmbFileInputStream in = new SmbFileInputStream(fileToGet);
    byte[] b = new byte[8192];
    int n;
    while(( n = in.read( b )) > 0 ) {
      System.out.write( b, 0, n );
    }

  }
  catch (Exception e) {
    e.printStackTrace();
  }

}
********************

If I use jcifs-1.2.18.jar, it works fine.
If I use jcifs-1.2.21.jar, it does not work and the error is:

********************
1: new Socket: java.net.DatagramSocket at 54172f
2: new Socket: Socket[addr=/10.1.253.2,port=445,localport=3262]
3: new Socket: Socket[addr=/10.1.12.155,port=445,localport=3263]
jcifs.smb.SmbException: The system cannot find the path specified.
  at jcifs.smb.SmbTransport.checkStatus(SmbTransport.java:542)
  at jcifs.smb.SmbTransport.send(SmbTransport.java:642)
  at jcifs.smb.SmbSession.send(SmbSession.java:239)
  at jcifs.smb.SmbTree.send(SmbTree.java:109)
  at jcifs.smb.SmbFile.send(SmbFile.java:718)
  at jcifs.smb.SmbFile.open0(SmbFile.java:923)
  at jcifs.smb.SmbFile.open(SmbFile.java:940)
  at jcifs.smb.SmbFileInputStream.<init>(SmbFileInputStream.java:70)
  at jcifs.smb.SmbFileInputStream.<init>(SmbFileInputStream.java:62)
  at com.ucb.ntlm.main(ntlm.java:20)
********************

What could be the reason?

Thanks a lot,
Benoit

Benoit Coppens • Senior Consultant
UCB <http://www.ucb-group.com/>  - IT Global Medical Information
Chemin du Foriest - 1420 Braine-l'Alleud - Belgium •  (  +32 2 386 25 71 •  7  +32 2 386 32 44 •  *   benoit.coppens at ucb-group.com
All4IT <http://www.all4it.com/> 
Drève Richelle 161 - 1410 Waterloo - Belgium •  (  +32 2 609 51 20 •  7  +32 2 609 51 38 •  *  bcoppens at all4it.com
P  Please consider your environmental responsibility before printing this email!
 
--------------------------------------------------------

Legal Notice: This electronic mail and its attachments are intended solely for the person(s) to whom they are addressed and contain information which is confidential or otherwise protected from disclosure, except for the purpose for which they are intended. Dissemination, distribution, or reproduction by anyone other than the intended recipients is prohibited and may be illegal. If you are not an intended recipient, please immediately inform the sender and return the electronic mail and its attachments and destroy any copies which may be in your possession. UCB screens electronic mails for viruses but does not warrant that this electronic mail is free of any viruses. UCB accepts no liability for any damage caused by any virus transmitted by this electronic mail. (Ref: #*UG1107)
--------------------------------------------------------


More information about the jcifs mailing list