[jcifs] Problem with jcifs + Tomcat + Active Directory

Vircos info at vircos.nl
Wed Jul 16 08:00:56 GMT 2008


We  do experience the same problem, however the solution mentioned does not
work for us.
Any ideas?


Ossie Moore wrote:
> 
> I solved this issue. I found that if I edit the
> %TOMCAT_HOME%/config/context.xml file and uncomment the option that
> causes Tomcat to *not* persist sessions across restarts, things work
> fine. I do not know if this is a problem for the Tomcat group, the
> JCIFS group or if I should be doing something different but this
> course of action resolves the issue.
> 
> Ossie
> 
> On Fri, Jun 13, 2008 at 10:49 AM, Ossie Moore
> <jcifs.exposes.email.address at gmail.com> wrote:
>> SUMMARY OF PROBLEM:
>>
>> If I *restart* Tomcat, Authentication only works for the first user to
>> connect to the Tomcat application. All subsequent user authentication
>> attempts fail.
>>
>> If I *stop* Tomcat, delete the work directory, *start* Tomcat, all
>> works well for any number of users tested.
>>
>> If I *restart* Tomcat, Authentication only works for the first user to
>> connect. However, watching Tomcat output, if i wait for
>>   0: socket closed: Socket[addr=/192.168.1.1,port=445,localport=3759]
>> then I can login as a different, new user. But then only that user can
>> authenticate.
>>
>> QUESTIONS:
>>
>> 1. Does anyone know a work around for this issue that does not involve
>> purging the work directory?
>> 2. Does anyone know *why* this is happening?
>>
>> DETAILS (SHOULD YOU NEED THEM):
>>
>> Restarting the Tomcat server without purging the work directory
>> results in any application deployed that relies on jcifs to perform
>> authentication fails for all but the first user. The first user can
>> successfully login but no other user after that can login. They are
>> prompted for their username and password but entering the correct
>> values fails to authenticate.
>>
>> I have tried various combinations of tomcat 6.0.14 & 6.0.16 with jcifs
>> 1.2.17 and 1.2.21. I am running Java 1.6.0_05 and Windows Server 2003.
>> We are authenticating against active directory. I have also tried
>> renaming index.html to index.jsp.
>>
>> EXAMPLE WEB APP USED TO CONFIRM PROBLEM:
>>
>> My example web application consists of the following files:
>>
>>   test-webapp\index.html
>>   test-webapp\WEB-INF\lib\jcifs-1.2.21.jar
>>   test-webapp\web.xml
>>
>> Contets of test-webapp\index.html :
>>
>>   <html><body>it worked!</body></html>
>>
>> Contents of web.xml: (username, password, domain and ip altered here
>> for obvious reasons)
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xmlns="http://java.sun.com/xml/ns/javaee"
>> xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
>> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
>> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID"
>> version="2.5">
>>  <display-name>test-webapp</display-name>
>>  <filter>
>>    <filter-name>NtlmHttpFilter</filter-name>
>>    <filter-class>jcifs.http.NtlmHttpFilter</filter-class>
>>    <init-param>
>>      <param-name>jcifs.http.domainController</param-name>
>>      <param-value>192.168.1.1</param-value>
>>    </init-param>
>>    <init-param>
>>      <param-name>jcifs.smb.client.domain</param-name>
>>      <param-value>MYDOMAIN</param-value>
>>    </init-param>
>>    <init-param>
>>      <param-name>jcifs.smb.client.username</param-name>
>>      <param-value>usernamehere</param-value>
>>    </init-param>
>>    <init-param>
>>      <param-name>jcifs.smb.client.password</param-name>
>>      <param-value>supersecretpassword</param-value>
>>    </init-param>
>>  </filter>
>>  <filter-mapping>
>>    <filter-name>NtlmHttpFilter</filter-name>
>>    <url-pattern>/*</url-pattern>
>>  </filter-mapping>
>>  <welcome-file-list>
>>    <welcome-file>index.html</welcome-file>
>>  </welcome-file-list>
>> </web-app>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem-with-jcifs-%2B-Tomcat-%2B-Active-Directory-tp17826508p18482012.html
Sent from the Samba - jcifs mailing list archive at Nabble.com.



More information about the jcifs mailing list