[jcifs] UnknownHostException

jbaker-cifs at javasystemsolutions.com jbaker-cifs at javasystemsolutions.com
Thu Nov 2 13:17:35 GMT 2006


Hello,

Following on from my earlier mail, I'm looking at the source:

http://jcifs.samba.org/src/src/jcifs/netbios/NameServiceClient.java

As I'd like to know what's causing this:

- Servlet.service() for servlet HomeServlet threw exception
java.net.UnknownHostException: MYCOMPANY
        at 
jcifs.netbios.NameServiceClient.getAllByName(NameServiceClient.java:292)
        at jcifs.netbios.NbtAddress.getAllByName(NbtAddress.java:454)
        at jcifs.smb.SmbSession.getChallengeForDomain(SmbSession.java:95)
        at jcifs.http.NtlmHttpFilter.negotiate(NtlmHttpFilter.java:150)
        at jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:114)
        at

So consider the getAllByName method. I think it could do with some extra 
logging before the exception is thrown at the end (perhaps just to say "I've 
given up doing whatever ...") - right now, the exception could be coming from 
two places. But given this:

            try {
                send( request, response, RETRY_TIMEOUT );
            } catch( IOException ioe ) {
                if( log.level > 1 )
                    ioe.printStackTrace( log );
                throw new UnknownHostException( name.name );
            }

Prints the stack trace to the log, that can not be the cause as we can't see 
it in the logs. That just leaves the final line of the method.

What is the purpose of this method? UnknownHostException seems a little 
misleading as we're discussing a domain..


John


More information about the jcifs mailing list