[jcifs] Problem using jCIFS NTLM HTTP Authentication for Single Sign-on

Ellery Crane ecrane at bear-code.com
Fri May 11 17:03:10 GMT 2007

Ah, thanks for mentioning that- some research suggests that the  
problem actually is a bug in Java for some versions of Linux; it was  
throwing null pointers instead of UnknownHostExceptions, so it wasn't  
obvious what was happening. I needed to add the linux box's hostname  
to /etc/hosts so that it could find itself with  
InetAddress.getLocalHost().  Doing that fixed the problem, and the  
single sign on now works as it should.  Thanks!

Here's the page mentioning the bug in question, in case anyone else  
ever bumps into this:


On May 11, 2007, at 11:47 AM, Michael B Allen wrote:

> On Fri, 11 May 2007 08:57:01 -0400
> Ellery Crane <ecrane at bear-code.com> wrote:
>> I'm attempting to debug a problem with our implementation of jCIFS.
>> We're using OpenCms, and have a module written to incorporate the
>> NTLM HTTP Authentication filter in the jCIFS library to accomplish
>> single sign-on for Windows users with accounts in Active Directory.
>> OpenCMS is being run on a linux server. When OpenCMS is being run on
>> the same Windows server as Active Directory, single sign-on works
>> perfectly. However, when OpenCms is on the linux server, attempts to
>> use the single sign-on functionality cause internal server errors:
>> When the transparent sign-on page is accessed, the page displays an
>> error:
>> A server error occured!
>> Server error 500
>> Internal Server Error
>> The server encountered an unexpected condition which prevented it
>> from fulfilling the request.
>> Checking the tomcat logs reveals that the following error occurs the
>> first time that the transparent login page is accessed:
>> May 7, 2007 9:54:56 AM org.apache.catalina.core.StandardWrapperValve
>> invoke
>> SEVERE: Servlet.service() for servlet OpenCmsServlet threw exception
>> java.lang.NullPointerException
>>          at jcifs.netbios.NbtAddress.<clinit>(NbtAddress.java:199)
>>          at jcifs.UniAddress.<clinit>(UniAddress.java:62)
> From looking at this code it looks like InetAddress.getLocalHost(); is
> returning null for some reason. That would be an environmental problem
> (although the code should print an error indicating such rather than
> generating an exception - I'll add this to The List).
> Mike
> -- 
> Michael B Allen
> PHP Active Directory Kerberos SSO
> http://www.ioplex.com/

Ellery Crane - Bear Code
85 Granite Shed Lane - Unit 1
Montpelier, Vermont  05602
+1 802-225-1331

-------------- next part --------------
HTML attachment scrubbed and removed

More information about the jcifs mailing list