1
Vote

jna version (v3) kills tomcat when authenticating some IE users

description

Some users when using IE always cause tomcat to crash with a message as shown below - hs_err.log file is attached.
 
The same user using Firefox does not cause the error. Also the error does not occur on the first request in a session - it typically is many calls later. I can see from the error stack trace that the problem is linked to a call to AuthenticationUtil.finalize().
 
The same error occurs on jdk1.5 & 1.6. I am working with the context parameter onlyntlm set on.
 
I resolved the problem by moving to fr.doume.v2 and the associated .Net2.0 service instead of fr.doume.v3.
 
 
<from TC logs>

An unexpected error has been detected by HotSpot Virtual Machine:

EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0ca52e2c, pid=4444, tid=2296

Java VM: Java HotSpot(TM) Client VM (1.5.0_07-b03 mixed mode)

Problematic frame:

C [jna38097.dll+0x2e2c]

An error report file with more information is saved as hs_err_pid4444.log

file attachments

comments

doumeguerin wrote Mar 13, 2011 at 10:37 PM

Can you test with this version?
I changed the code: I added Sspibis.java. The definition of the SecHandle used two Pointers (A pointer is 32bits on x86 and 64bits on x64). Now the definition uses 2 ULONG_PTR like in the Windows headers files: so they are not Pointers.

doumeguerin wrote Mar 13, 2011 at 10:44 PM

Hello,
Is IE running on the same workstation than tomcat?
Is the user a member of a Windows domain?
Are the two computers member of the AD forest?

Is it better with the new version?

Dominique

wrote Mar 14, 2011 at 6:36 AM

doumeguerin wrote Mar 14, 2011 at 6:36 AM

Helo,
I added the class SSPAuthShadow that is serializable. SSPAuthentication is now a transient member of SSPAuthShadow. So, I send testbis.zip (version with jna).

Dominique

wrote Mar 14, 2011 at 6:37 AM

johnwilliams wrote Mar 14, 2011 at 11:24 AM

Dominique,

Which versions of jna.jar & platform.jar were used for building testbis.zip jars - I am having class compatibility problems with v3.2.5. - also a recompile fails with many errors, eg no class com.sun.jna.win32.W32APIOptions...

Answers to your other questions:
Is IE running on the same workstation than tomcat?
No
Is the user a member of a Windows domain?
Yes - many authentications are successful - then suddenly TC dies
Are the two computers member of the AD forest?
No forest - single AD

doumeguerin wrote Mar 14, 2011 at 12:49 PM

I use 3.2.7 of jna. (http://java.net/projects/jna/downloads/directory/3.2.7)
I will give 3 sources (tomcat55,tomcat6 and tomcat7).
The code is too different for tomcat 7. I wrote a little (very little) preprocessor (//#if , //#else, //#endif) to have only version for the 3 targets. So, you cannot compile.

Dominique

Dominique

wrote Mar 14, 2011 at 1:18 PM

doumeguerin wrote Mar 14, 2011 at 1:18 PM

The Version of jna used is in the file jna.zip
The founded version on the site jna.net is too new.

Dominique

johnwilliams wrote Mar 14, 2011 at 1:46 PM

The code provided in testbis.zip has FIXED the problem - well done!
I used jna3.2.7 without a problem.

wrote Feb 14, 2013 at 6:57 PM