ManagerBase error on Tomcat 6.0.16

2008-11-10 Thread Henri Gomez
Hi to all,

Under heavly load (about 500k/requests by day), I see this error about
30 times last week on a Tomcat 6.0.16 (with libtcnative 1.1.14 on a
Suse SLES 10)

WARNING: Exception processing manager
[EMAIL PROTECTED] background
process
Throwable occurred: java.lang.ArrayIndexOutOfBoundsException
at java.util.AbstractCollection.toArray(Unknown Source)
at 
org.apache.catalina.session.ManagerBase.findSessions(ManagerBase.java:873)
at 
org.apache.catalina.session.ManagerBase.processExpires(ManagerBase.java:676)
at 
org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:667)
at 
org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1316)
at 
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
at 
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
at 
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
at 
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
at java.lang.Thread.run(Thread.java:735)
7 nov. 2008 16:18:21 org.apache.catalina.core.ContainerBase backgroundProcess

WARNING: Exception processing manager
[EMAIL PROTECTED] background
process
Throwable occurred: java.lang.IllegalMonitorStateException
at 
java.util.concurrent.locks.ReentrantLock$Sync.tryRelease(ReentrantLock.java:140)
at 
java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1188)
at 
java.util.concurrent.locks.ReentrantLock.unlock(ReentrantLock.java:444)
at 
java.util.concurrent.ConcurrentHashMap$Segment.remove(ConcurrentHashMap.java:555)
at 
java.util.concurrent.ConcurrentHashMap.remove(ConcurrentHashMap.java:936)
at org.apache.catalina.session.ManagerBase.remove(ManagerBase.java:885)
at 
org.apache.catalina.session.StandardSession.expire(StandardSession.java:743)
at 
org.apache.catalina.session.StandardSession.isValid(StandardSession.java:592)
at 
org.apache.catalina.session.ManagerBase.processExpires(ManagerBase.java:682)
at 
org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:667)
at 
org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1316)
at 
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
at 
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
at 
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
at 
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
at java.lang.Thread.run(Thread.java:735)


Did some of you see the same behaviour ?

Regards

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 46177] New: Cookie Values are cut off

2008-11-10 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46177

   Summary: Cookie Values are cut off
   Product: Tomcat 5
   Version: 5.5.27
  Platform: PC
OS/Version: Windows Vista
Status: NEW
  Severity: normal
  Priority: P2
 Component: Unknown
AssignedTo: dev@tomcat.apache.org
ReportedBy: [EMAIL PROTECTED]


Hello,

I have the following Problem:

I set a Cookie with a value such as (without the quotes):
[EMAIL 
PROTECTED]|SESSIONID=0B626AB7E5DA538D12BE296F90126BED|EXPIRES=1226326772293|KEY=key1|HASH=vXGIbxWxumu+9caKlGxdaA==
This is the cookies value only.

Setting and reading of this cookie works fine on Tomcat 5.5.25 and 6.0.18.

If i use Tomcat 5.5.26 or 5.5.27 the Cookies value is cut off after the first
= character, so all my application receives is (without the quotes)
USERID

What confuses me is: if it only worked due to a Bug in 5.5.25 then why would it
work in 6.0.18 again which afaik has the same Bugs fixed which were fixed in
the version Jump from 5.5.25 to 5.5.26 .

Is this a Bug or am i trying to do something which isn't allowed due to
security constraints.

Best Regards


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 46169] mod_jk extension use_server_errors not working

2008-11-10 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46169





--- Comment #5 from Sebastian Hilbig [EMAIL PROTECTED]  2008-11-10 01:44:22 
PST ---
(In reply to comment #3)
 You can test the patch, it is small and I committed it right now as revision
 r712207 ( https://svn.apache.org/viewcvs.cgi?view=revrev=712207 ).
 
 Will be part of 1.2.28.

I just integrated and tested the patch and it works as expected.

 Nevertheless consider upgrading to httpd 2.2 ;)

We're not only considering but already planning the upgrade :)
But that will take some time and we needed to integrate Tomcat sooner, so
thanks a lot for the quick response and patch!


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r712701 - in /tomcat/trunk/modules/jdbc-pool: .classpath java/org/apache/tomcat/jdbc/pool/PoolProperties.java test/org/apache/tomcat/jdbc/test/DefaultTestCase.java test/org/apache/tomcat/j

2008-11-10 Thread fhanik
Author: fhanik
Date: Mon Nov 10 09:09:40 2008
New Revision: 712701

URL: http://svn.apache.org/viewvc?rev=712701view=rev
Log:
Added test case to test two concurrent datasources, fixed the flag to turn on 
the sweeper

Added:

tomcat/trunk/modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/TwoDataSources.java
Modified:
tomcat/trunk/modules/jdbc-pool/.classpath

tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PoolProperties.java

tomcat/trunk/modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/DefaultTestCase.java

Modified: tomcat/trunk/modules/jdbc-pool/.classpath
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/.classpath?rev=712701r1=712700r2=712701view=diff
==
--- tomcat/trunk/modules/jdbc-pool/.classpath (original)
+++ tomcat/trunk/modules/jdbc-pool/.classpath Mon Nov 10 09:09:40 2008
@@ -3,9 +3,9 @@
classpathentry kind=src path=java/
classpathentry kind=src path=test/
classpathentry kind=con 
path=org.eclipse.jdt.launching.JRE_CONTAINER/
-   classpathentry kind=var 
path=TOMCAT_LIBS_BASE/tomcat6-deps/dbcp/tomcat-dbcp.jar/
-   classpathentry kind=var path=TOMCAT_LIBS_BASE/
classpathentry combineaccessrules=false kind=src 
path=/tomcat-trunk/
classpathentry kind=con 
path=org.eclipse.jdt.junit.JUNIT_CONTAINER/3/
+   classpathentry kind=var 
path=TOMCAT_LIBS_BASE/tomcat6-deps/dbcp/tomcat-dbcp.jar/
+   classpathentry kind=lib path=mysql-connector-java-5.1.6-bin.jar/
classpathentry kind=output path=bin/
 /classpath

Modified: 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PoolProperties.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PoolProperties.java?rev=712701r1=712700r2=712701view=diff
==
--- 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PoolProperties.java
 (original)
+++ 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PoolProperties.java
 Mon Nov 10 09:09:40 2008
@@ -391,7 +391,7 @@
 public boolean isPoolSweeperEnabled() {
 boolean result = getTimeBetweenEvictionRunsMillis()0;
 result = result  (isRemoveAbandoned()  
getRemoveAbandonedTimeout()0);
-result = result  (isTestWhileIdle()  getValidationQuery()!=null);
+result = result || (isTestWhileIdle()  getValidationQuery()!=null);
 return result;
 }
 }

Modified: 
tomcat/trunk/modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/DefaultTestCase.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/DefaultTestCase.java?rev=712701r1=712700r2=712701view=diff
==
--- 
tomcat/trunk/modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/DefaultTestCase.java
 (original)
+++ 
tomcat/trunk/modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/DefaultTestCase.java
 Mon Nov 10 09:09:40 2008
@@ -39,7 +39,8 @@
 super(name);
 }
 
-protected void init() throws Exception {
+public DataSourceProxy createDefaultDataSource() {
+DataSourceProxy datasource = null;
 PoolProperties p = new DefaultProperties();
 p.setJmxEnabled(false);
 p.setTestWhileIdle(false);
@@ -57,6 +58,11 @@
 p.setRemoveAbandoned(false);
 datasource = new org.apache.tomcat.jdbc.pool.DataSourceProxy();
 datasource.setPoolProperties(p);
+return datasource;
+}
+
+protected void init() throws Exception {
+this.datasource = createDefaultDataSource();
 }
 
 protected void transferProperties() {
@@ -92,6 +98,7 @@
 
 
 protected void tearDown() throws Exception {
+try {datasource.close();}catch(Exception ignore){}
 datasource = null;
 tDatasource = null;
 System.gc();

Added: 
tomcat/trunk/modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/TwoDataSources.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/TwoDataSources.java?rev=712701view=auto
==
--- 
tomcat/trunk/modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/TwoDataSources.java
 (added)
+++ 
tomcat/trunk/modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/TwoDataSources.java
 Mon Nov 10 09:09:40 2008
@@ -0,0 +1,53 @@
+package org.apache.tomcat.jdbc.test;
+
+import java.sql.Connection;
+
+import org.apache.tomcat.jdbc.pool.DataSourceProxy;
+
+public class TwoDataSources extends DefaultTestCase {
+
+public TwoDataSources(String name) {
+super(name);
+}
+
+public void testTwoDataSources() throws Exception {
+DataSourceProxy d1 = this.createDefaultDataSource();
+DataSourceProxy d2 = this.createDefaultDataSource();
+  

svn commit: r712702 - /tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PoolProperties.java

2008-11-10 Thread fhanik
Author: fhanik
Date: Mon Nov 10 09:14:41 2008
New Revision: 712702

URL: http://svn.apache.org/viewvc?rev=712702view=rev
Log:
Last bit of my ego goes away

Modified:

tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PoolProperties.java

Modified: 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PoolProperties.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PoolProperties.java?rev=712702r1=712701r2=712702view=diff
==
--- 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PoolProperties.java
 (original)
+++ 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PoolProperties.java
 Mon Nov 10 09:14:41 2008
@@ -50,7 +50,7 @@
 protected int removeAbandonedTimeout = 60;
 protected boolean logAbandoned = false;
 protected int loginTimeout = 1;
-protected String name = Filip Connection Pool[+(poolCounter++)+];
+protected String name = Tomcat Connection Pool[+(poolCounter++)+];
 protected String password;
 protected String username;
 protected long validationInterval = 3;



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 46177] Cookie Values are cut off

2008-11-10 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46177


Mark Thomas [EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID




--- Comment #1 from Mark Thomas [EMAIL PROTECTED]  2008-11-10 07:34:25 PST ---
This is a question for the users list - or just search the archives.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Fwd: Re: TC patches as discussed]

2008-11-10 Thread Rainer Jung

Mark Thomas wrote:

http://people.apache.org/~markt/patches/2008-10-31-tc4-wininstaller.patch


Can you explain a bit the motivation for all the path changes (including 
the sub directory in the target path and adding *.* to the source)?


I might then well be able to vote for the second one too.

Regards,

Rainer

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Fwd: Re: TC patches as discussed]

2008-11-10 Thread Mark Thomas
Rainer Jung wrote:
 Mark Thomas wrote:
 http://people.apache.org/~markt/patches/2008-10-31-tc4-wininstaller.patch

 
 Can you explain a bit the motivation for all the path changes (including
 the sub directory in the target path and adding *.* to the source)?

File -r common matches common/*.* and */common/*.*

File -r common/*.* matches only common/*.*

Because we use common/*.* as a pattern you have to set the directory first
to make sure stuff gets expanded to the right place.

The problem with the current pattern is we include stuff we shouldn't form
other random directories that happen to include the root directory name in
their path.

Mark



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



NTLMAuthenticator for Apache Tomcat 6.0.18 (Intranet within a Microsoft domain)

2008-11-10 Thread Christophe Dupriez
Hi!

I wanted to:
* centralize the parameterization of user authentication at the container level;
* have a simple NTLM authentication for intranet users;
* be able to run Tomcat in a Microsoft Active Directory network where the 
server is secured (absolutely no login allowed to regular users)

There is a Microsoft specification (bug?) by which all LDAP binds are 
evaluated on the Domain Server (like if the user was attempting to login on the 
Domain Server).
It would be better to have binds evaluated as if they were originating from the 
LDAP client machine (the Tomcat Server).

To circumvent this, I have been obliged to remove the binding (the password 
checking) but to ensure that it is NTLM (and nothing else) which provides the 
username.
The users are therefore automatically logged with the username used to log on 
their PC.

The attached patch is for current Apache Tomcat sources (6.0.18).

It adds:
An NTLM Authenticator: nothing to configure except in the web.xml of each 
application:
   login-config
   auth-methodNTLM/auth-method
   realm-nameThisIsApassword/realm-name
   /login-config
The realm-name is the password which ensures that authentication is done by 
NTLM and no other method.
A very long password is strongly recommended.
A modified JNDI Realm with new parameters:
preAuthenticatedPassword=ThisIsApassword
This to suppress password checking if preAuthenticatedPassword is provided.
userIdentification=userPrincipalName provides a standardized username, 
whatever the retrieved user name (case of complex userSearch patterns)
userNamePrefix and userNameSuffix
This to suppress a prefix and/or a suffix from username before returning it to 
the application: good to suppress domain identification, etc.
When you user complex userSearch pattern, this can be very useful. Example:
userSearch=(|(sAMAccountName={0})([EMAIL PROTECTED])(userPrincipalName={0}))
userIdentification=userPrincipalName userNamePrefix=domain\ 
userNameSuffix=@domain.com

Hopes this can be useful to the community!

Please do not hesitate to ask me if something can be done to make this 
contribution perennial.

Wishing you a very nice day,

Christophe Dupriez
Centre Antipoisons - Antigifcentrum
C/o Hôpital Central de la Base Reine Astrid
   Rue Bruyn - 1120 Bruxelles - Belgique
tel 32-(0)2.264.96.36 fax 32-(0)2.264.96.46-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

DO NOT REPLY [Bug 42446] Condition is likely to fail in org.apache.tomcat.util.digester.Digester

2008-11-10 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=42446


Mark Thomas [EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #2 from Mark Thomas [EMAIL PROTECTED]  2008-11-10 14:56:18 PST ---
This was fixed in r711500 ( 
https://svn.apache.org/viewcvs.cgi?view=revrev=711500 ) and will be included 
in 6.0.19 onwards.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r712864 - /tomcat/trunk/RELEASE-PLAN-6.0.txt

2008-11-10 Thread markt
Author: markt
Date: Mon Nov 10 15:03:48 2008
New Revision: 712864

URL: http://svn.apache.org/viewvc?rev=712864view=rev
Log:
Remove out of date file from trunk

Removed:
tomcat/trunk/RELEASE-PLAN-6.0.txt


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 46179] New: apr ssl client authentication

2008-11-10 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46179

   Summary: apr ssl client authentication
   Product: Tomcat Native
   Version: 1.1.14
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: major
  Priority: P2
 Component: Library
AssignedTo: dev@tomcat.apache.org
ReportedBy: [EMAIL PROTECTED]


Created an attachment (id=22852)
 -- (https://issues.apache.org/bugzilla/attachment.cgi?id=22852)
config file and keys/certificates

i am trying to use ssl client authentication together with apr. I have followed
the instructions contained in apr manual but no success.
When I try access server with the browser (get the prompt for user cert and
submit it), i get the error:

  An error occurred during a connection to rzuem5008u.jap2.ch:8443.
  SSL peer was unable to negotiate an acceptable set of security parameters.
  (Error code: ssl_error_handshake_failure_alert)

When I try to access the server with:
  openssl s_client -msg  -CAfile /home/rejap/certs/REtest-RootCA.pem -cert
/home/rejap/certs/0D.pem  -state -connect rzuem5008u.jap2.ch:8443
it produces the following error:
--- snip, snip ---
 SSL_connect:SSLv3 write client certificate A
 TLS 1.0 Handshake [length 0086], ClientKeyExchange
10 00 00 82 00 80 7b a6 c2 cf 5e a1 44 60 1c 5d
 ...
71 06 75 4b 06 c4
SSL_connect:SSLv3 write client key exchange A
 TLS 1.0 Handshake [length 0106], CertificateVerify
0f 00 01 02 01 00 4a f4 64 74 56 b4 d0 51 b1 27
...
2b 90 55 46 fd c4
SSL_connect:SSLv3 write certificate verify A
 TLS 1.0 ChangeCipherSpec [length 0001]
01
SSL_connect:SSLv3 write change cipher spec A
 TLS 1.0 Handshake [length 0010], Finished
14 00 00 0c 70 b5 b4 08 35 3a ae 15 d3 28 2c e4
SSL_connect:SSLv3 write finished A
SSL_connect:SSLv3 flush data
 TLS 1.0 Alert [length 0002], fatal decrypt_error
02 33
SSL3 alert read:fatal:decrypt error
SSL_connect:failed in SSLv3 read finished A
18383:error:1409441B:SSL routines:SSL3_READ_BYTES:tlsv1 alert decrypt
error:s3_pkt.c:1053:SSL alert number 51
18383:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake
failure:s23_lib.c:188:


The server.xml is all default except:
Connector port=8443 protocol=HTTP/1.1 SSLEnabled=true
   maxThreads=150 scheme=https secure=true
   sslProtocol=TLSv1
   SSLCertificateFile=/home/rejap/app/certs/rzuem5008u.crt
   SSLCertificateKeyFile=/home/rejap/app/certs/rzuem5008u.key
   SSLCertificateChainFile=/home/rejap/app/certs/cacert.pem

   SSLVerifyClient=require
   SSLVerifyDepth=10
   SSLCACertificateFile=/home/rejap/app/certs/all-cacerts.pem
   / 

Content of the certificate files:

rzuem5008u.crt - server certificate, signed by CA1
rzuem5008u.key - server private key
cacert.pem - CA1 certificate signed by ROOT
all-cacerts.pem - CA1 certificated (signed by ROOT) followed by ROOT (self
signed)

client sends the user certificate (0D.pem) singned by CA1
client has the ROOT certificate added to the trust 

If I turn off the verify client (take out last 3 directives from config) the
server auth works ok.
I have verified the certs (chains) with apache server. I did parallel setup
with the same certs/keys and it appears to work.
I have verified the certs with the tomcat without native. Everything is tip
top.

I tried to switch to sslv3. I got similar but not exactly the same error. 

verions:
tomcat 6.0.18
apr 1.2.11-1 (ubuntu)
openssl 0.9.8g-4ubuntu3.3
java version 1.6.0_07

Pawel


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: NTLMAuthenticator for Apache Tomcat 6.0.18 (Intranet within a Microsoft domain)

2008-11-10 Thread David Jencks

I'm a little confused about your goals

On Nov 10, 2008, at 11:41 AM, Christophe Dupriez wrote:


Hi Tomcat Developpers!

I wanted to:
* centralize the parameterization of user authentication at the  
container level;


What do you mean by this and how is this expressed?


* have a simple NTLM authentication for intranet users;
* be able to run Tomcat in a Microsoft Active Directory network  
where the server is secured (absolutely no login allowed to regular  
users)


Do you mean that you want intranet users to have their local MAD login  
propagated automatically to the tomcat server with  no explicit tomcat  
login required?  If so the official way to support this is via  
the JASPI spec (jsr 196) and (IIUC) a SPNEGO server authentication  
module such as that at http://spnego.ocean.net.au/ (jboss might have  
another one???)


At this point tomcat does not have  a jaspi implementation although I  
expect it to be a part of javaee 6, and I'm mostly interested in  
trying to understand what you are trying to do rather than suggesting  
an implementation strategy.


thanks
david jencks



There is a Microsoft “specification” (bug?) by which all LDAP binds  
are evaluated on the Domain Server (like if the user was attempting  
to login on the Domain Server).
It would be better to have binds evaluated as if they were  
originating from the LDAP client machine (the Tomcat Server).


To circumvent this, I have been obliged to remove the binding (the  
password checking) but to ensure that it is NTLM (and nothing else)  
which provides the username.
The users are therefore automatically logged with the username used  
to log on their PC.


The attached patch is for current Apache Tomcat sources (6.0.18).

It adds:
An NTLM Authenticator: nothing to configure except in the web.xml of  
each application:

   login-config
   auth-methodNTLM/auth-method
   realm-nameThisIsApassword/realm-name
   /login-config
The realm-name is the “password” which ensures that authentication  
is done by NTLM and no other method.

A very long password is strongly recommended.
A modified JNDI Realm with new parameters:
preAuthenticatedPassword=”ThisIsApassword”
This to suppress password checking if preAuthenticatedPassword is  
provided.
userIdentification=”userPrincipalName” provides a standardized  
username, whatever the retrieved user name (case of complex  
userSearch patterns)

userNamePrefix and userNameSuffix
This to suppress a prefix and/or a suffix from username before  
returning it to the application: good to suppress domain  
identification, etc.
When you user complex userSearch pattern, this can be very useful.  
Example:
userSearch=(|(sAMAccountName={0})([EMAIL PROTECTED]) 
(userPrincipalName={0}))
userIdentification=userPrincipalName userNamePrefix=”domain\” [EMAIL PROTECTED] 
”


Hopes this can be useful to the community!

Please do not hesitate to ask me if something can be done to make  
this contribution perennial.


Wishing you a very nice day,

Christophe Dupriez
Centre Antipoisons - Antigifcentrum
C/o Hôpital Central de la Base Reine Astrid
   Rue Bruyn - 1120 Bruxelles - Belgique
tel 32-(0)2.264.96.36 fax 32-(0)2.264.96.46
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




DO NOT REPLY [Bug 46183] New: about jvm dump file EXCEPTION_ACCESS_VIOLATION (0xc0000005)

2008-11-10 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46183

   Summary: about jvm dump file EXCEPTION_ACCESS_VIOLATION
(0xc005)
   Product: Tomcat 5
   Version: 5.5.23
  Platform: PC
OS/Version: Windows Server 2003
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: [EMAIL PROTECTED]


Hi folks,
Well, Unfortunately We are facing some issue which cause a Tomcat service is
down in the following environment.
OS : Windows Server 2003 R2 ( https://svn.apache.org/viewcvs.cgi?view=revrev=2 
) SP2
TOMCAT version=5.5.23
Java version=1.5.0_12

We try to find the cause using attached dump file which generated the one. but
not sure why this issue happen in sometime(about once a month) 

Could anyone know what could be wrong? i am baz, did you get to solve this same
problem?
Thanks in advance...

---following a jvm dump file

#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# EXCEPTION_ACCESS_VIOLATION (0xc005) at pc=0x7c97be3e, pid=3608, tid=5976
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_12-b04 mixed mode, sharing)
# Problematic frame:
# C [ntdll.dll+0x2be3e]
#





T H R E A D


Current thread (0x02d88850): JavaThread http-8080-Processor18 daemon
[_thread_in_native, id=5976]

siginfo: ExceptionCode=0xc005, reading address 0xfff8

Registers:
EAX=0x0380, EBX=0x, ECX=0x037f, EDX=0x
ESP=0x0383f068, EBP=0x0383f074, ESI=0x00570178, EDI=0x0080
EIP=0x7c97be3e, EFLAGS=0x00010206

Top of Stack: (sp=0x0383f068)
0x0383f068: 0057 0581 02fb9000 0383f098
0x0383f078: 7c97b561 00570178 0581 02fb9000
0x0383f088: 0057 02f8 02f8 0380
0x0383f098: 0383f0e0 7c97ba81 0581 00fb9000
0x0383f0a8: 0581 0057 02fb9000 
0x0383f0b8: 0c08 02fbb000 0383f0dc 02f8
0x0383f0c8:   02fb8e70 
0x0383f0d8:  0181 0383f1c4 7c97b646 

Instructions: (pc=0x7c97be3e)
0x7c97be2e: 57 64 8b 14 8a 83 c2 08 3b f2 0f 84 d5 fe ff ff
0x7c97be3e: 0f b7 5a f8 3b 5d 0c 73 0b 8b 12 3b f2 75 f1 e9 

Stack: [0x0380,0x0384), sp=0x0383f068, free space=252k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [ntdll.dll+0x2be3e]
C [ntdll.dll+0x2b561]
C [ntdll.dll+0x2ba81]
C [ntdll.dll+0x2b646]
C [MSVCRT.dll+0x1cef6]
C [net.dll+0x6a86]
J java.net.SocketInputStream.socketRead0(Ljava/io/FileDescriptor;[BIII)I
J java.net.SocketInputStream.read([BII)I
J org.apache.coyote.http11.InternalInputBuffer.fill()Z
J org.apache.coyote.http11.InternalInputBuffer.parseRequestLine()V
J
org.apache.coyote.http11.Http11Processor.process(Ljava/io/InputStream;Ljava/io/OutputStream;)V
j
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Lorg/apache/tomcat/util/net/TcpConnection;[Ljava/lang/Object;)V+113
j
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(Ljava/net/Socket;Lorg/apache/tomcat/util/net/TcpConnection;[Ljava/lang/Object;)V+45
j
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt([Ljava/lang/Object;)V+102
j org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run()V+167
j java.lang.Thread.run()V+11
v ~StubRoutines::call_stub
V [jvm.dll+0x87599]
V [jvm.dll+0xdfbb2]
V [jvm.dll+0x8746a]
V [jvm.dll+0x871c7]
V [jvm.dll+0xa2048]
V [jvm.dll+0x1110d8]
V [jvm.dll+0x1110a6]
C [MSVCRT.dll+0x2b530]
C [kernel32.dll+0x24829]

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
J java.net.SocketInputStream.socketRead0(Ljava/io/FileDescriptor;[BIII)I
J java.net.SocketInputStream.read([BII)I
J org.apache.coyote.http11.InternalInputBuffer.fill()Z
J org.apache.coyote.http11.InternalInputBuffer.parseRequestLine()V
J
org.apache.coyote.http11.Http11Processor.process(Ljava/io/InputStream;Ljava/io/OutputStream;)V
j
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Lorg/apache/tomcat/util/net/TcpConnection;[Ljava/lang/Object;)V+113
j
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(Ljava/net/Socket;Lorg/apache/tomcat/util/net/TcpConnection;[Ljava/lang/Object;)V+45
j
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt([Ljava/lang/Object;)V+102
j org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run()V+167
j java.lang.Thread.run()V+11
v ~StubRoutines::call_stub





P R O C E S S


Java Threads: ( = current thread )
0x02ee7820 JavaThread File Reaper daemon [_thread_blocked, id=4744]
0x02e23958 JavaThread TP-Monitor daemon [_thread_blocked, id=6000]
0x033159e8 JavaThread TP-Processor4 daemon [_thread_in_native, id=7532]