[jcifs] jcifs v 1.2.6 cant connect to samba 2.0.7 again

Mike Mercier mmercier at gmail.com
Fri Oct 28 18:49:57 GMT 2005


Hello,

Using similar code as before:

package cifstest;

import jcifs.smb.SmbFile;
import jcifs.smb.SmbException;
import java.net.MalformedURLException;
/**
*
* @author Administrator
*/
public class Main {

/** Creates a new instance of Main */
public Main() {
}

/**
* @param args the command line arguments
*/
public static void main(String[] args) {
System.setProperty("jcifs.util.loglevel", "3");
SmbFile theFile;
try {
theFile = new SmbFile(args[0]);
if (theFile.exists()) {
System.out.println("Found " + theFile.getPath());
}
if (theFile.isDirectory()) {
System.out.println(theFile.getPath() + " is a directory");
}
} catch (SmbException e) {
System.out.println(e.getClass() + " " + e.getMessage());
} catch (MalformedURLException e) {
System.out.println(e.getClass() + " " + e.getMessage());
}
}
}

I found a copy of 1.2.4 on my machine (src only, no jar file).

Add 1.2.4 source to the project, and remove jcifs-1.2.6.jar from lib\ext and
project and above application works successfully.

Remove source (1.2.4) from project, add 1.2.6 to lib\ext and as a library,
or add 1.2.6 as src and the application fails.

Typical failure output:
java.net.SocketTimeoutException: Receive timed out
at java.net.PlainDatagramSocketImpl.receive0(Native Method)
at java.net.PlainDatagramSocketImpl.receive(Unknown Source)
at java.net.DatagramSocket.receive(Unknown Source)
at jcifs.netbios.NameServiceClient.run(NameServiceClient.java:184)
at java.lang.Thread.run(Unknown Source)
class jcifs.smb.SmbException
session established ok with xxxxxxxx/xxx.xxx.xxx.xxx
New data read: Transport1[xxxxxxxx/xxx.xxx.xxx.xx:139]
00000: FF 53 4D 42 72 00 00 00 00 88 01 00 00 00 00 00 | SMBr...........|
00010: 00 00 00 00 00 00 00 00 00 00 7C 0F 00 00 01 00 |..........|.....|

byteCount=10 but readBytesWireFormat returned 9

on server, the log file contains:
[2005/10/28 10:50:40, 0] lib/util_sock.c:read_socket_data(477)
read_socket_data: recv failure for 4. Error = Connection reset by peer

Has something changed since 1.2.4?

Thanks,
Mike
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the jcifs mailing list