[jcifs] The network name cannot be found error
Eric Glass
eric.glass at gmail.com
Thu Jul 22 08:45:16 GMT 2004
On Wed, 21 Jul 2004 21:34:27 -0400 (EDT), Michael B Allen
<mba2000 at ioplex.com> wrote:
> Pitre, Russell said:
> > Hello All-
> >
> > We are using the jcifs filter for our intranet authentication. It's
> > been working great, but all of sudden this afternoon we started seeing
> > the error you see below. Nothing has change with the intranet code. We
> > are using 2000 Active Directory and Tomcat 5.0.24. I'm pretty sure the
> > error is coming the Domain Controller but I'm not entirely sure what to
> > look for. I went through the event logs but have not found anything
> > that stands out. Any ideas?
>
> This means that share jCIFS is trying to access was not found. By default
> jCIFS tries to connect to IPC$. If you view the domain controller in
> Network Neighborhood what happends? Do you see IPC$ listed?
>
IPC$ is often not displayed when browsing in Network Neighborhood (may
depend on client OS); you could try the following:
import jcifs.Config;
import jcifs.smb.SmbFile;
public class ListShares {
public static void main(String[] args) throws Exception {
Config.setProperty("jcifs.smb.client.username", args[0]);
Config.setProperty("jcifs.smb.client.password", args[1]);
SmbFile[] shares = new SmbFile("smb://172.20.95.14/").listFiles();
for (int i = 0; i < shares.length; i++) {
System.out.println(shares[i]);
}
}
}
Stick your jCIFS parameters from web.xml into a .properties file, and run:
java -Djcifs.properties=myparams.properties ListShares username password
If "smb://172.20.95.14/IPC$/" is listed, then everything should be
working; if you get errors, or IPC$ isn't listed, that may point to
your problem.
Eric
More information about the jcifs
mailing list