[jcifs] Strange error: BYFP0001

darren.taft at bt.com darren.taft at bt.com
Wed Sep 20 20:08:52 GMT 2006


> > java.net.UnknownHostException: BYFP0001
> > <snip>
> >
> > Anyone got any idea where BYFP0001 is coming from?  It's certainly not a
> > path on our network.
>
> Double check your code. JCIFS is being told that it's a hostname. If
> it's not a hostname then your code is wrong. If it is a hostname then
> your name resolution isn't configured properly.

There's no room for error in the code.  See at the end of this email.
 
I'm a bit confused how the debug information correctly shows the name and then IP address resolution, and then the next thing I know it's complaining about BYFP0001.
 
Querying my WINS server for ICORE-RYLCR-68 gives me the answer I'd expect, and BYFP0001 fails to return a result.  Any idea why it would choose to ignore the results it had already obtained?
 
darren
 
 
 
<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ page import="jcifs.smb.*"%>
<%@ page import="jcifs.smb.NtlmPasswordAuthentication"%>
<pre>
<%
 try {
  System.setErr(new PrintStream(response.getOutputStream()));
  System.setProperty("jcifs.util.loglevel","3");
  System.setProperty("jcifs.resolveOrder","WINS,DNS");
  System.setProperty("jcifs.netbios.wins","10.240.5.7");
  System.setProperty("jcifs.netbios.hostname","test_server");
  NtlmPasswordAuthentication auth = null;
  auth = new NtlmPasswordAuthentication( "IUSER", "803244205", "password" );
  String path = "smb://ICORE-RYLCR-68/ngd/002/803244205/";
  out.println("\n\npath: " + path + "\n\n");
  SmbFile file2 = new SmbFile( path, auth );
  SmbFile[] files2 = file2.listFiles();
  for( int j = 0; j < files2.length; j++ ) {
   out.println(files2[j].getName());
  }
 }
 catch (Exception e) {
  out.println("ERROR: " + e.toString());
 }
%>
</pre>


More information about the jcifs mailing list