svn commit: r1346336 - /tomcat/tc6.0.x/trunk/STATUS.txt

2012-06-05 Thread kkolinko
Author: kkolinko
Date: Tue Jun  5 10:35:06 2012
New Revision: 1346336

URL: http://svn.apache.org/viewvc?rev=1346336view=rev
Log:
vote and proposal

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1346336r1=1346335r2=1346336view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Jun  5 10:35:06 2012
@@ -117,6 +117,18 @@ PATCHES PROPOSED TO BACKPORT:
   -1:
   rjung: Isn't this only fixing the regression introduced by 52858 (BZ 53138)
   but 52858 will be again unfixed?
+  -1: kkolinko: unless r1340218 is backported as well (I agree with rjung's
+  concern). Proposed below.
+
+ Additional patch:
+  kkolinko: Regarding r1340218: Note, that reg argument in all existing
+  calls to processSendfile() is always true. The actual change in this
+  revision is registering for OP_WRITE regardless of the value of
+  attachment.interestOps()
+  http://svn.apache.org/viewvc?view=revisionrevision=1340218 (fix BZ 53138)
+  http://svn.apache.org/viewvc?view=revisionrevision=1342468 (cleanup)
+  +1: kkolinko
+  -1:
   
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=52918
   Add WebSocket support to Tomcat 6



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 53119] java.nio.BufferOverflowException in AjpAprProcessor.output() when AJP client disconnects

2012-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53119

--- Comment #3 from Konstantin Kolinko knst.koli...@gmail.com ---
Created attachment 28890
  -- https://issues.apache.org/bugzilla/attachment.cgi?id=28890action=edit
2012-06-05_tc6_53119_AjpAprProcessor.patch

Backport of r1344253 to be proposed for 6.0. The patched method name is
different, but code is the same.

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1346341 - /tomcat/tc6.0.x/trunk/STATUS.txt

2012-06-05 Thread kkolinko
Author: kkolinko
Date: Tue Jun  5 11:06:01 2012
New Revision: 1346341

URL: http://svn.apache.org/viewvc?rev=1346341view=rev
Log:
proposal

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1346341r1=1346340r2=1346341view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Jun  5 11:06:01 2012
@@ -167,7 +167,19 @@ PATCHES PROPOSED TO BACKPORT:
   http://people.apache.org/~kkolinko/patches/2012-06-02_tc6_recycle.patch
   +1: kkolinko
   -1:
-  
+
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53119
+  Prevent buffer overflow errors being reported when a
+  client disconnects before the response has been fully written from an
+  AJP connection using the APR/native connector.
+  (Make sure the buffer is cleared on write error to prevent possible
+  overflow if it is written to again before the connection is closed).
+  https://issues.apache.org/bugzilla/attachment.cgi?id=28890
+  It is backport of r1344253
+  +1: kkolinko
+  -1:
+
+
 PATCHES/ISSUES THAT ARE STALLED
 
 * Backport JSP unloading patch (BZ48358).



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1346365 - /tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java

2012-06-05 Thread kkolinko
Author: kkolinko
Date: Tue Jun  5 12:13:07 2012
New Revision: 1346365

URL: http://svn.apache.org/viewvc?rev=1346365view=rev
Log:
For https://issues.apache.org/bugzilla/show_bug.cgi?id=53119
Port r1344253 to AjpNioProcessor

Prevent possible overflow exception with buffer in AjpNioProcessor.output() if 
it is called again after the previous write failed with IOException.

This is based on review of the issue fixed by r1344253. I see several reasons 
why it is hard to observe in Nio, but it is easy to prevent this issue. An 
overflow exception is bad because it is RuntimeException and is generally 
unexpected. This change:
- avoids writing to the buffer if att == null
- always clears the buffer. Note that Buffer.clear() method is rather 
lightweight one.

Modified:
tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java

Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java?rev=1346365r1=1346364r2=1346365view=diff
==
--- tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java Tue Jun  5 
12:13:07 2012
@@ -276,14 +276,16 @@ public class AjpNioProcessor extends Abs
 @Override
 protected void output(byte[] src, int offset, int length)
 throws IOException {
+
+NioEndpoint.KeyAttachment att = 
(NioEndpoint.KeyAttachment)socket.getAttachment(false);
+if ( att == null ) throw new IOException(Key must be cancelled);
+
 ByteBuffer writeBuffer = socket.getBufHandler() .getWriteBuffer();
 
 writeBuffer.put(src, offset, length);
 
 writeBuffer.flip();
 
-NioEndpoint.KeyAttachment att = 
(NioEndpoint.KeyAttachment)socket.getAttachment(false);
-if ( att == null ) throw new IOException(Key must be cancelled);
 long writeTimeout = att.getTimeout();
 Selector selector = null;
 try {
@@ -294,9 +296,9 @@ public class AjpNioProcessor extends Abs
 try {
 pool.write(writeBuffer, socket, selector, writeTimeout, true);
 }finally {
+writeBuffer.clear();
 if ( selector != null ) pool.put(selector);
 }
-writeBuffer.clear();
 }
 
 



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1346366 - /tomcat/tc7.0.x/trunk/STATUS.txt

2012-06-05 Thread kkolinko
Author: kkolinko
Date: Tue Jun  5 12:17:27 2012
New Revision: 1346366

URL: http://svn.apache.org/viewvc?rev=1346366view=rev
Log:
Create STATUS file for Tomcat 7.

Added:
tomcat/tc7.0.x/trunk/STATUS.txt   (with props)

Added: tomcat/tc7.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/STATUS.txt?rev=1346366view=auto
==
--- tomcat/tc7.0.x/trunk/STATUS.txt (added)
+++ tomcat/tc7.0.x/trunk/STATUS.txt Tue Jun  5 12:17:27 2012
@@ -0,0 +1,31 @@
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the License); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an AS IS BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+
+ =
+ Apache Tomcat 7.0 Patch Proposals
+ =
+
+
+RELEASE SHOWSTOPPERS:
+
+
+PATCHES ACCEPTED TO BACKPORT:
+  [ start all new proposals below, under PATCHES PROPOSED. ]
+
+PATCHES PROPOSED TO BACKPORT:
+  [ New proposals should be added at the end of the list ]
+

Propchange: tomcat/tc7.0.x/trunk/STATUS.txt
--
svn:eol-style = native

Propchange: tomcat/tc7.0.x/trunk/STATUS.txt
--
svn:mime-type = text/plain



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1346367 - /tomcat/tc7.0.x/trunk/STATUS.txt

2012-06-05 Thread kkolinko
Author: kkolinko
Date: Tue Jun  5 12:20:55 2012
New Revision: 1346367

URL: http://svn.apache.org/viewvc?rev=1346367view=rev
Log:
proposal

Modified:
tomcat/tc7.0.x/trunk/STATUS.txt

Modified: tomcat/tc7.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/STATUS.txt?rev=1346367r1=1346366r2=1346367view=diff
==
--- tomcat/tc7.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc7.0.x/trunk/STATUS.txt Tue Jun  5 12:20:55 2012
@@ -29,3 +29,12 @@ PATCHES ACCEPTED TO BACKPORT:
 PATCHES PROPOSED TO BACKPORT:
   [ New proposals should be added at the end of the list ]
 
+* For https://issues.apache.org/bugzilla/show_bug.cgi?id=53119
+  Prevent possible overflow exception with buffer in
+  AjpNioProcessor.output() if it is called again after previous write
+  failed with IOException.
+  I have not observed it, but it is from analogy with AjpAprProcessor fix
+  in r1344253.
+  http://svn.apache.org/viewvc?view=revisionrevision=1346365
+  +1: kkolinko
+  -1:



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 53119] java.nio.BufferOverflowException in AjpAprProcessor.output() when AJP client disconnects

2012-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53119

--- Comment #4 from Konstantin Kolinko knst.koli...@gmail.com ---
Regarding review of r1344253 and porting it to other processor implementations
http://tomcat.markmail.org/thread/d4mzx52gj3omchrr

The question of whether repeated call to *processor#output(..) could fail
because of insufficient cleanup from previous failed call.

- AjpProcessor:
There is nothing to clean up. It just uses passed byte[] array as is.

- AjpNioProcessor:
Improved in r1346365 in trunk, proposed for 7.0.

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: svn commit: r1344253 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/coyote/ajp/AjpAprProcessor.java webapps/docs/changelog.xml

2012-06-05 Thread Konstantin Kolinko
2012/6/4 Mark Thomas ma...@apache.org:
 On 04/06/2012 07:41, Konstantin Kolinko wrote:
 2012/5/30  ma...@apache.org:
 Author: markt
 Date: Wed May 30 13:35:55 2012
 New Revision: 1344253

 URL: http://svn.apache.org/viewvc?rev=1344253view=rev
 Log:
 Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53119
 Make sure the buffer is cleared on any error to prevent any possible 
 overflow if it is written to again before the connection is closed.
 I can't reproduce the error with the provided test case but based on code 
 inspection this should fix it.

 Modified:
    tomcat/tc7.0.x/trunk/   (props changed)
    tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java
    tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

 Propchange: tomcat/tc7.0.x/trunk/
 --
  Merged /tomcat/trunk:r1344250

 Modified: 
 tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java
 URL: 
 http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java?rev=1344253r1=1344252r2=1344253view=diff
 ==
 --- tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java 
 (original)
 +++ tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java 
 Wed May 30 13:35:55 2012
 @@ -288,6 +288,9 @@ public class AjpAprProcessor extends Abs

         if (outputBuffer.position()  0) {
             if ((socketRef != 0)  Socket.sendbb(socketRef, 0, 
 outputBuffer.position())  0) {
 +                // There are no re-tries so clear the buffer to prevent a
 +                // possible overflow if the buffer is used again. BZ53119.
 +                outputBuffer.clear();
                 throw new 
 IOException(sm.getString(ajpprocessor.failedsend));
             }
             outputBuffer.clear();


 Looks good. Backport to 6.0?

 I haven't looked at the 6.0.x code to see if the exact same code path is
 possible but a back port wouldn't do any harm in this case and is
 probably quicker than working out if the issue can occur.


Proposed for 6.0. I had to prepare a patch, because affected code is
located in different method.

 AjpNioProcessor#output(byte[], int, int) seems to have the same issue.

 I'm not sure. The OP that saw the error with APR/native could not
 recreate it with NIO or BIO. That said, looking at the code there are
 certainly a few ways the write buffer can't be cleared. The worst case
 is an error message in the logs so I a not too concerned at this point.


I commented in bugzilla and fixed for NIO in trunk.
I proposed for 7.0 instead of applying immediately because the issue
is hard to observe and I think the change is worth reviewing.

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1346376 - in /tomcat/trunk/java/org/apache/catalina: core/DefaultInstanceManager.java deploy/NamingResources.java startup/WebAnnotationSet.java util/Introspection.java

2012-06-05 Thread kkolinko
Author: kkolinko
Date: Tue Jun  5 13:00:08 2012
New Revision: 1346376

URL: http://svn.apache.org/viewvc?rev=1346376view=rev
Log:
Review r1345367.
Rename new public API method added in r1345367 so that the name were less 
ambiguous.

Modified:
tomcat/trunk/java/org/apache/catalina/core/DefaultInstanceManager.java
tomcat/trunk/java/org/apache/catalina/deploy/NamingResources.java
tomcat/trunk/java/org/apache/catalina/startup/WebAnnotationSet.java
tomcat/trunk/java/org/apache/catalina/util/Introspection.java

Modified: tomcat/trunk/java/org/apache/catalina/core/DefaultInstanceManager.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/DefaultInstanceManager.java?rev=1346376r1=1346375r2=1346376view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/DefaultInstanceManager.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/core/DefaultInstanceManager.java Tue 
Jun  5 13:00:08 2012
@@ -337,7 +337,7 @@ public class DefaultInstanceManager impl
 // Resource injection only if JNDI is enabled
 if (injections != null 
 Introspection.isValidSetter(method)) {
-String fieldName = Introspection.getName(method);
+String fieldName = 
Introspection.getPropertyName(method);
 if (injections.containsKey(fieldName)) {
 annotations.add(new AnnotationCacheEntry(
 method.getName(),
@@ -624,7 +624,7 @@ public class DefaultInstanceManager impl
 lookedupResource = context.lookup(normalizedName);
 } else {
 lookedupResource = context.lookup(
-clazz.getName() + / + Introspection.getName(method));
+clazz.getName() + / + 
Introspection.getPropertyName(method));
 }
 
 synchronized (method) {

Modified: tomcat/trunk/java/org/apache/catalina/deploy/NamingResources.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/deploy/NamingResources.java?rev=1346376r1=1346375r2=1346376view=diff
==
--- tomcat/trunk/java/org/apache/catalina/deploy/NamingResources.java (original)
+++ tomcat/trunk/java/org/apache/catalina/deploy/NamingResources.java Tue Jun  
5 13:00:08 2012
@@ -1214,7 +1214,7 @@ public class NamingResources extends Lif
 if (methods != null  methods.length  0) {
 for (Method method : methods) {
 if (Introspection.isValidSetter(method) 
-Introspection.getName(method).equals(name)) {
+Introspection.getPropertyName(method).equals(name)) {
 return method.getParameterTypes()[0];
 }
 }

Modified: tomcat/trunk/java/org/apache/catalina/startup/WebAnnotationSet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/WebAnnotationSet.java?rev=1346376r1=1346375r2=1346376view=diff
==
--- tomcat/trunk/java/org/apache/catalina/startup/WebAnnotationSet.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/startup/WebAnnotationSet.java Tue Jun 
 5 13:00:08 2012
@@ -288,7 +288,7 @@ public class WebAnnotationSet {
 }
 
 String defaultName = classClass.getName() + SEPARATOR +
-Introspection.getName(method);
+Introspection.getPropertyName(method);
 
 String defaultType =
 (method.getParameterTypes()[0]).getCanonicalName();

Modified: tomcat/trunk/java/org/apache/catalina/util/Introspection.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/util/Introspection.java?rev=1346376r1=1346375r2=1346376view=diff
==
--- tomcat/trunk/java/org/apache/catalina/util/Introspection.java (original)
+++ tomcat/trunk/java/org/apache/catalina/util/Introspection.java Tue Jun  5 
13:00:08 2012
@@ -39,12 +39,12 @@ public class Introspection {
 
 
 /**
- * Extract the Java Bean field name from the setter name.
+ * Extract the Java Bean property name from the setter name.
  *
  * Note: This method assumes that the method name has already been checked
  *   for correctness.
  */
-public static String getName(Method setter) {
+public static String getPropertyName(Method setter) {
 return Introspector.decapitalize(setter.getName().substring(3));
 }
 



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, 

svn commit: r1346377 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/core/ java/org/apache/catalina/deploy/ java/org/apache/catalina/startup/ java/org/apache/catalina/util/

2012-06-05 Thread kkolinko
Author: kkolinko
Date: Tue Jun  5 13:05:49 2012
New Revision: 1346377

URL: http://svn.apache.org/viewvc?rev=1346377view=rev
Log:
Merged revision 1346376 from tomcat/trunk:
Review of r1345367.
Rename new public API method added in r1345367 so that the name were less 
ambiguous.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)

tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/DefaultInstanceManager.java
tomcat/tc7.0.x/trunk/java/org/apache/catalina/deploy/NamingResources.java
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/WebAnnotationSet.java
tomcat/tc7.0.x/trunk/java/org/apache/catalina/util/Introspection.java

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1346376

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/DefaultInstanceManager.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/DefaultInstanceManager.java?rev=1346377r1=1346376r2=1346377view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/DefaultInstanceManager.java 
(original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/DefaultInstanceManager.java 
Tue Jun  5 13:05:49 2012
@@ -338,7 +338,7 @@ public class DefaultInstanceManager impl
 // Resource injection only if JNDI is enabled
 if (injections != null 
 Introspection.isValidSetter(method)) {
-String fieldName = Introspection.getName(method);
+String fieldName = 
Introspection.getPropertyName(method);
 if (injections.containsKey(fieldName)) {
 annotations.add(new AnnotationCacheEntry(
 method.getName(),
@@ -625,7 +625,7 @@ public class DefaultInstanceManager impl
 lookedupResource = context.lookup(normalizedName);
 } else {
 lookedupResource = context.lookup(
-clazz.getName() + / + Introspection.getName(method));
+clazz.getName() + / + 
Introspection.getPropertyName(method));
 }
 
 synchronized (method) {

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/deploy/NamingResources.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/deploy/NamingResources.java?rev=1346377r1=1346376r2=1346377view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/deploy/NamingResources.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/deploy/NamingResources.java 
Tue Jun  5 13:05:49 2012
@@ -1224,7 +1224,7 @@ public class NamingResources extends Lif
 if (methods != null  methods.length  0) {
 for (Method method : methods) {
 if (Introspection.isValidSetter(method) 
-Introspection.getName(method).equals(name)) {
+Introspection.getPropertyName(method).equals(name)) {
 return method.getParameterTypes()[0];
 }
 }

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/WebAnnotationSet.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/WebAnnotationSet.java?rev=1346377r1=1346376r2=1346377view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/WebAnnotationSet.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/WebAnnotationSet.java 
Tue Jun  5 13:05:49 2012
@@ -288,7 +288,7 @@ public class WebAnnotationSet {
 }
 
 String defaultName = classClass.getName() + SEPARATOR +
-Introspection.getName(method);
+Introspection.getPropertyName(method);
 
 String defaultType =
 (method.getParameterTypes()[0]).getCanonicalName();

Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/util/Introspection.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/util/Introspection.java?rev=1346377r1=1346376r2=1346377view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/util/Introspection.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/util/Introspection.java Tue 
Jun  5 13:05:49 2012
@@ -39,12 +39,12 @@ public class Introspection {
 
 
 /**
- * Extract the Java Bean field name from the setter name.
+ * Extract the Java Bean property name from the setter name.
  *
  * Note: This method assumes that the method name has already 

RE: Tomcat 7 code policy (was: Re: svn commit: r1345848)

2012-06-05 Thread Filip Hanik (mailing lists)


 -Original Message-
 From: Konstantin Kolinko [mailto:knst.koli...@gmail.com]
 Sent: Monday, June 04, 2012 3:50 PM
 To: Tomcat Developers List
 Subject: Re: Tomcat 7 code policy (was: Re: svn commit: r1345848)
 
 2012/6/5 Konstantin Kolinko knst.koli...@gmail.com:
 
  For that reason, I'd like us to be more conscious about our commits
 on v7 and start looking at v7 as bug fixes and stabilization as the
 primary drivers for commits.
 
  Stabilization usually means that we stop fixing bugs in stable
  version besides easy ones and allow them in trunk only. It is not what
  I want for 7.0 now.
 
  There is no expected date for Tomcat 8, and if the date is too far
  (e.g. further than 9 months) it would be too late for most problems
  that users are reporting.
 
 
 What do people think about introducing a STATUS file in 7.0,
 but not yet switching to full RTC policy?
 
 I mean let the author decide and propose his change for review if he
 deems it is too risky to commit immediately, or is worth reviewing.
 E.g. if
 
 a) the change is too complex,
 b) touches many components,
 c) touches core pieces of Tomcat.
 
 
 I do not think 7.0 will benefit from slow RTC of Tomcat 6,  but there
 are some patches that are worth a review, and having a formal STATUS
 file approach is better that random discussions on dev@.
 
 One notable benefit of the STATUS file is that the change is proposed
 when it is ready for review.
[Filip Hanik] 

I think the STATUS file is slowly becoming obsolete. If we instead adopted
git, and used features like those available on github where you can create a
merge request, you'd have everything in one place, and nothing was lost.
 
My only point with the original post was to slow down the zero value commits
in Tomcat 7, as people start to rely on it for production grade, we should
treat it the same. I think it's too early for RTC, but it's too late for
refactoring in that branch too. Balance is the key.

Filip

 
 
 Best regards,
 Konstantin Kolinko
 
 -
 To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: dev-h...@tomcat.apache.org



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



buildbot failure in ASF Buildbot on tomcat-7-trunk

2012-06-05 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-7-trunk while 
building ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-7-trunk/builds/624

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/tc7.0.x/trunk] 1346377
Blamelist: kkolinko

BUILD FAILED: failed compile_1

sincerely,
 -The Buildbot




-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1346404 - /tomcat/trunk/test/org/apache/tomcat/util/buf/TestCharChunk.java

2012-06-05 Thread kkolinko
Author: kkolinko
Date: Tue Jun  5 14:58:20 2012
New Revision: 1346404

URL: http://svn.apache.org/viewvc?rev=1346404view=rev
Log:
Test for method CharChunk.indexOf() that was added in r1336870. The test passes 
successfully.

Added:
tomcat/trunk/test/org/apache/tomcat/util/buf/TestCharChunk.java   (with 
props)

Added: tomcat/trunk/test/org/apache/tomcat/util/buf/TestCharChunk.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/util/buf/TestCharChunk.java?rev=1346404view=auto
==
--- tomcat/trunk/test/org/apache/tomcat/util/buf/TestCharChunk.java (added)
+++ tomcat/trunk/test/org/apache/tomcat/util/buf/TestCharChunk.java Tue Jun  5 
14:58:20 2012
@@ -0,0 +1,42 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the License); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an AS IS BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.tomcat.util.buf;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+/**
+ * Test cases for {@link CharChunk}.
+ */
+public class TestCharChunk {
+
+@Test
+public void testEndsWith() {
+CharChunk cc = new CharChunk();
+assertFalse(cc.endsWith(test));
+cc.setChars(xxtestxx.toCharArray(), 2, 4);
+assertTrue(cc.endsWith());
+assertTrue(cc.endsWith(t));
+assertTrue(cc.endsWith(st));
+assertTrue(cc.endsWith(test));
+assertFalse(cc.endsWith(x));
+assertFalse(cc.endsWith(xxtest));
+}
+}

Propchange: tomcat/trunk/test/org/apache/tomcat/util/buf/TestCharChunk.java
--
svn:eol-style = native



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 53341] Unable to build tomcat-connectors in centos 5.6

2012-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53341

--- Comment #2 from Christopher Schultz ch...@christopherschultz.net ---
(In reply to comment #0)
 cd native/
 ./configure --with-apxs2=/usr/local/apache/bin/apxs
 --with-apache=/usr/local/src/httpd-2.4.2

It's probably worth noting that the --with-apxs2 option is not recognized by
the configure script. You are looking for --with-apxs (note the lack of a 2
at the end of the option). I have recently built mod_jk 1.2.37 on Debian Linux
using the documented build process and had no problems with it.

If you continue to have difficulties, please post to the Tomcat users' list
because Bugzilla is not intended to be a support forum.

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1346510 - in /tomcat/trunk: java/org/apache/catalina/core/StandardContext.java java/org/apache/tomcat/util/http/mapper/Mapper.java test/org/apache/tomcat/util/http/mapper/TestMapperContex

2012-06-05 Thread markt
Author: markt
Date: Tue Jun  5 18:17:58 2012
New Revision: 1346510

URL: http://svn.apache.org/viewvc?rev=1346510view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53356
Add support for an explicit mapping of a servlet to the context root

Added:

tomcat/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperContextRoot.java
Modified:
tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
tomcat/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardContext.java?rev=1346510r1=1346509r2=1346510view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Tue Jun  5 
18:17:58 2012
@@ -5957,6 +5957,9 @@ public class StandardContext extends Con
 if (urlPattern.indexOf('\n') = 0 || urlPattern.indexOf('\r') = 0) {
 return (false);
 }
+if (urlPattern.equals()) {
+return true;
+}
 if (urlPattern.startsWith(*.)) {
 if (urlPattern.indexOf('/')  0) {
 checkUnusualURLPattern(urlPattern);

Modified: tomcat/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java?rev=1346510r1=1346509r2=1346510view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java Tue Jun  5 
18:17:58 2012
@@ -393,7 +393,13 @@ public final class Mapper {
 context.defaultWrapper = newWrapper;
 } else {
 // Exact wrapper
-newWrapper.name = path;
+if (path.length() == 0) {
+// Special case for the Context Root mapping which is
+// treated as an exact match
+newWrapper.name = /;
+} else {
+newWrapper.name = path;
+}
 Wrapper[] oldWrappers = context.exactWrappers;
 Wrapper[] newWrappers =
 new Wrapper[oldWrappers.length + 1];
@@ -1026,8 +1032,16 @@ public final class Mapper {
 int pos = find(wrappers, path);
 if ((pos != -1)  (path.equals(wrappers[pos].name))) {
 mappingData.requestPath.setString(wrappers[pos].name);
-mappingData.wrapperPath.setString(wrappers[pos].name);
 mappingData.wrapper = wrappers[pos].object;
+if (path.equals(/)) {
+// Special handling for Context Root mapped servlet
+mappingData.pathInfo.setString(/);
+mappingData.wrapperPath.recycle();
+// This seems wrong but it is what the spec says...
+mappingData.contextPath.recycle();
+} else {
+mappingData.wrapperPath.setString(wrappers[pos].name);
+}
 }
 }
 

Added: 
tomcat/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperContextRoot.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperContextRoot.java?rev=1346510view=auto
==
--- 
tomcat/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperContextRoot.java 
(added)
+++ 
tomcat/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperContextRoot.java 
Tue Jun  5 18:17:58 2012
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the License); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.tomcat.util.http.mapper;
+
+import java.io.IOException;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import org.apache.catalina.Context;
+import 

svn commit: r1346512 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/core/StandardContext.java java/org/apache/tomcat/util/http/mapper/Mapper.java test/org/apache/tomcat/util/http/mapper/TestM

2012-06-05 Thread markt
Author: markt
Date: Tue Jun  5 18:20:24 2012
New Revision: 1346512

URL: http://svn.apache.org/viewvc?rev=1346512view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53356
Add support for an explicit mapping of a servlet to the context root

Added:

tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperContextRoot.java
  - copied unchanged from r1346510, 
tomcat/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperContextRoot.java
Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1346510

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java?rev=1346512r1=1346511r2=1346512view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java Tue 
Jun  5 18:20:24 2012
@@ -6082,6 +6082,9 @@ public class StandardContext extends Con
 if (urlPattern.indexOf('\n') = 0 || urlPattern.indexOf('\r') = 0) {
 return (false);
 }
+if (urlPattern.equals()) {
+return true;
+}
 if (urlPattern.startsWith(*.)) {
 if (urlPattern.indexOf('/')  0) {
 checkUnusualURLPattern(urlPattern);

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java?rev=1346512r1=1346511r2=1346512view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java 
Tue Jun  5 18:20:24 2012
@@ -393,7 +393,13 @@ public final class Mapper {
 context.defaultWrapper = newWrapper;
 } else {
 // Exact wrapper
-newWrapper.name = path;
+if (path.length() == 0) {
+// Special case for the Context Root mapping which is
+// treated as an exact match
+newWrapper.name = /;
+} else {
+newWrapper.name = path;
+}
 Wrapper[] oldWrappers = context.exactWrappers;
 Wrapper[] newWrappers =
 new Wrapper[oldWrappers.length + 1];
@@ -1026,8 +1032,16 @@ public final class Mapper {
 int pos = find(wrappers, path);
 if ((pos != -1)  (path.equals(wrappers[pos].name))) {
 mappingData.requestPath.setString(wrappers[pos].name);
-mappingData.wrapperPath.setString(wrappers[pos].name);
 mappingData.wrapper = wrappers[pos].object;
+if (path.equals(/)) {
+// Special handling for Context Root mapped servlet
+mappingData.pathInfo.setString(/);
+mappingData.wrapperPath.recycle();
+// This seems wrong but it is what the spec says...
+mappingData.contextPath.recycle();
+} else {
+mappingData.wrapperPath.setString(wrappers[pos].name);
+}
 }
 }
 

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1346512r1=1346511r2=1346512view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Tue Jun  5 18:20:24 2012
@@ -206,6 +206,10 @@
 bug53354/bug: Correctly handle code@WebFilter/code annotations
 that do not include a mapping. (markt)
   /fix
+  fix
+bug53356/bug: Add support for servlets mapped explicitly to the
+context root of a web application. (markt)
+  /fix
 /changelog
   /subsection
   subsection name=Coyote



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 53356] Mapping a servlet to the applicatio​n's context root results in IAE

2012-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53356

Mark Thomas ma...@apache.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #2 from Mark Thomas ma...@apache.org ---
Thanks for the report. Fixed in trunk and 7.0.x and will be included in 7.0.28
onwards.

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 53359] Request for Aliases or Alias as element inside Context

2012-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53359

Mark Thomas ma...@apache.org changed:

   What|Removed |Added

 OS||All

--- Comment #1 from Mark Thomas ma...@apache.org ---
I'd rather avoid adding that option since it adds complexity to the code I'd
rather not have. What if we ensured that white-space was trimmed so you could
use something like:
aliases=/pathA=C:/pathA,
 /pathB=C:/some/other/path,
 /special=C:/here/be/dragons

Thoughts?

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: svn commit: r1346510 - in /tomcat/trunk: java/org/apache/catalina/core/StandardContext.java java/org/apache/tomcat/util/http/mapper/Mapper.java test/org/apache/tomcat/util/http/mapper/TestMapperCo

2012-06-05 Thread Konstantin Kolinko
2012/6/5  ma...@apache.org:
 Author: markt
 Date: Tue Jun  5 18:17:58 2012
 New Revision: 1346510

 URL: http://svn.apache.org/viewvc?rev=1346510view=rev
 Log:
 Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53356
 Add support for an explicit mapping of a servlet to the context root

 Added:
    
 tomcat/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperContextRoot.java

svn:eol-style is missing

 Modified:
    tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
    tomcat/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java


Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: svn commit: r1346510 - in /tomcat/trunk: java/org/apache/catalina/core/StandardContext.java java/org/apache/tomcat/util/http/mapper/Mapper.java test/org/apache/tomcat/util/http/mapper/TestMapperCo

2012-06-05 Thread Mark Thomas
On 05/06/2012 19:29, Konstantin Kolinko wrote:
 2012/6/5  ma...@apache.org:
 Author: markt
 Date: Tue Jun  5 18:17:58 2012
 New Revision: 1346510

 URL: http://svn.apache.org/viewvc?rev=1346510view=rev
 Log:
 Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53356
 Add support for an explicit mapping of a servlet to the context root

 Added:

 tomcat/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperContextRoot.java
 
 svn:eol-style is missing

Thanks. I am still using git on my laptop (given up on git with desktop
and need to get around to reconfiguring Eclipse on my laptop) and I did
the original commit via git. I'll get that fixed now.

Mark

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1346514 - /tomcat/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperContextRoot.java

2012-06-05 Thread markt
Author: markt
Date: Tue Jun  5 18:32:46 2012
New Revision: 1346514

URL: http://svn.apache.org/viewvc?rev=1346514view=rev
Log:
Fix eol

Modified:

tomcat/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperContextRoot.java 
  (props changed)

Propchange: 
tomcat/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperContextRoot.java
--
svn:eol-style = native



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1346516 - in /tomcat/tc7.0.x/trunk: ./ test/org/apache/tomcat/util/http/mapper/TestMapperContextRoot.java

2012-06-05 Thread markt
Author: markt
Date: Tue Jun  5 18:34:37 2012
New Revision: 1346516

URL: http://svn.apache.org/viewvc?rev=1346516view=rev
Log:
Fix eol

Modified:
tomcat/tc7.0.x/trunk/   (props changed)

tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperContextRoot.java
   (props changed)

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1346514

Propchange: 
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperContextRoot.java
--
svn:eol-style = native



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1346519 - /tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java

2012-06-05 Thread kkolinko
Author: kkolinko
Date: Tue Jun  5 18:44:55 2012
New Revision: 1346519

URL: http://svn.apache.org/viewvc?rev=1346519view=rev
Log:
Review of r1298986 (r1298983)
Update comments
Update for one field name variant used by Apache Harmony. Maybe it will be 
relevant one day.
Do not test Method and Field handles for null, as NoSuch(Method|Field)Exception 
is thrown instead of null value

Modified:
tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java

Modified: tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java?rev=1346519r1=1346518r2=1346519view=diff
==
--- tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java Tue Jun 
 5 18:44:55 2012
@@ -2254,6 +2254,8 @@ public class WebappClassLoader
 }
 
 // TimerThread can be stopped safely so treat separately
+// java.util.TimerThread in Sun/Oracle JDK
+// java.util.Timer$TimerImpl in Apache Harmony and in 
IBM JDK
 if 
(thread.getClass().getName().startsWith(java.util.Timer) 
 clearReferencesStopTimerThreads) {
 clearReferencesStopTimerThread(thread);
@@ -2278,27 +2280,36 @@ public class WebappClassLoader
 // shutting down the executor
 try {
 
-Field targetField = null;
-try {
-targetField = 
thread.getClass().getDeclaredField(target);
-}catch (NoSuchFieldException nfe){
-targetField = 
thread.getClass().getDeclaredField(runnable);
+// Runnable wrapped by Thread
+// target in Sun/Oracle JDK
+// runnable in IBM JDK
+// action in Apache Harmony
+Object target = null;
+for (String fieldName : new String[] { target,
+runnable, action }) {
+try {
+Field targetField = thread.getClass()
+.getDeclaredField(fieldName);
+targetField.setAccessible(true);
+target = targetField.get(thread);
+break;
+} catch (NoSuchFieldException nfe) {
+continue;
+}
 }
-if (null != targetField){
-targetField.setAccessible(true);
-Object target = targetField.get(thread);
-
-if (target != null 
-target.getClass().getCanonicalName() != 
null
- 
target.getClass().getCanonicalName().equals(
-
java.util.concurrent.ThreadPoolExecutor.Worker)) {
-Field executorField =
-
target.getClass().getDeclaredField(this$0);
-executorField.setAccessible(true);
-Object executor = executorField.get(target);
-if (executor instanceof ThreadPoolExecutor) {
-((ThreadPoolExecutor) 
executor).shutdownNow();
-}
+
+// java.util.concurrent code is in public domain,
+// so all implementations are similar
+if (target != null 
+target.getClass().getCanonicalName() != null
+ target.getClass().getCanonicalName().equals(
+
java.util.concurrent.ThreadPoolExecutor.Worker)) {
+Field executorField =
+target.getClass().getDeclaredField(this$0);
+executorField.setAccessible(true);
+Object executor = executorField.get(target);
+if (executor instanceof ThreadPoolExecutor) {
+((ThreadPoolExecutor) executor).shutdownNow();
 }
 }
 } catch (SecurityException e) {
@@ -2362,9 +2373,12 @@ public class WebappClassLoader
 private void clearReferencesStopTimerThread(Thread thread) {
 
 // Need to get references to:
-// - newTasksMayBeScheduled field
+// in Sun/Oracle JDK:
+// 

[Bug 52850] Various miscellaneous fixes to Tomcat Memory Leak Detection code

2012-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52850

--- Comment #11 from Konstantin Kolinko knst.koli...@gmail.com ---
Created attachment 28893
  -- https://issues.apache.org/bugzilla/attachment.cgi?id=28893action=edit
2012-06-05_tc6_52850_WebappClassLoader.patch

Backport of this fix to 6.0, based on r1298986 and r1346519

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



buildbot success in ASF Buildbot on tomcat-trunk

2012-06-05 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-trunk while 
building ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-trunk/builds/3038

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/trunk] 1346519
Blamelist: kkolinko,markt

Build succeeded!

sincerely,
 -The Buildbot





[Bug 53281] Tomcat returns garbage data with HTTP/0.9 200 OK header when SSL port is accessed using http

2012-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53281

--- Comment #2 from Christopher Schultz ch...@christopherschultz.net ---
Apache httpd does do something like this; not sure if it's possible using JSSE:

$ telnet my.secure.site.com 443
Trying 208.85.173.131...
Connected to my.secure.site.com.
Escape character is '^]'.
GET /

blah
!DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN
htmlhead
title400 Bad Request/title
/headbody
h1Bad Request/h1
pYour browser sent a request that this server could not understand.br /
Reason: You're speaking plain HTTP to an SSL-enabled server port.br /
Instead use the HTTPS scheme to access this URL, please.br /
blockquoteHint: a
href=https://my.secure.site.com/;bhttps://my.secure.site.com//b/a/blockquote/p
hr
addressApache/2.2 Server at my.secure.site.com Port 443/address
/body/html
Connection closed by foreign host.

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: svn commit: r1346510 - in /tomcat/trunk: java/org/apache/catalina/core/StandardContext.java java/org/apache/tomcat/util/http/mapper/Mapper.java test/org/apache/tomcat/util/http/mapper/TestMapperCo

2012-06-05 Thread Konstantin Kolinko
2012/6/5  ma...@apache.org:
 Author: markt
 Date: Tue Jun  5 18:17:58 2012
 New Revision: 1346510

 URL: http://svn.apache.org/viewvc?rev=1346510view=rev
 Log:
 Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53356
 Add support for an explicit mapping of a servlet to the context root

 Added:
    
 tomcat/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperContextRoot.java
 Modified:
    tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
    tomcat/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java


 @@ -1026,8 +1032,16 @@ public final class Mapper {
         int pos = find(wrappers, path);
         if ((pos != -1)  (path.equals(wrappers[pos].name))) {
             mappingData.requestPath.setString(wrappers[pos].name);
 -            mappingData.wrapperPath.setString(wrappers[pos].name);
             mappingData.wrapper = wrappers[pos].object;
 +            if (path.equals(/)) {
 +                // Special handling for Context Root mapped servlet
 +                mappingData.pathInfo.setString(/);
 +                mappingData.wrapperPath.recycle();
 +                // This seems wrong but it is what the spec says...
 +                mappingData.contextPath.recycle();
 +            } else {
 +                mappingData.wrapperPath.setString(wrappers[pos].name);
 +            }
         }
     }

 --- 
 tomcat/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperContextRoot.java
  (added)
 +++ 
 tomcat/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperContextRoot.java
  Tue Jun  5 18:17:58 2012
 @@ -0,0 +1,79 @@
 +    private static class Bug53356Servlet extends HttpServlet {
 +
 +        private static final long serialVersionUID = 1L;
 +
 +        @Override
 +        protected void doGet(HttpServletRequest req, HttpServletResponse 
 resp)
 +                throws ServletException, IOException {
 +            // Confirm behaviour as per Servler 12.2
 +            boolean pass = /.equals(req.getPathInfo());
 +            if (pass) {
 +                pass = (req.getServletPath() == null);
 +            }
 +            if (pass) {
 +                pass = (req.getContextPath() == null);
 +            }
 +

Looking into Servlet spec 3.0 rev.a chapter 12.2.

It says that contextPath and servletPath are empty string (),  but
the code above expects nulls.

Regarding contextPath being :
It is surely strange, as

1. it contradicts other places like 3.5  (definition of Context Path
and famous equation of requestURI = contextPath + servletPath +
pathInfo ).

2. There is also ServletContext.getContextPath() that provides the
correct information.

3. Though looking at Javadoc [3], it says that
HttpServletRequest.getContextPath() may be different with
ServletContext.getContextPath(), but it does not mention this special
servlet mapping as a case.

[3] 
http://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpServletRequest.html#getContextPath%28%29

I wonder if it was ever raised with the EG.
It is worth mentioning the chapter number (12.2) in the comment in Mapper.java

I suspect that this feature is not covered by official tests, because
otherwise we would have had to deal with it earlier.

So maybe we should respect ch.3.5 here, instead of 12.2?

 +            resp.setContentType(text/plain);
 +            if (pass) {
 +                resp.getWriter().write(OK);
 +            } else {
 +                resp.getWriter().write(FAIL);
 +            }
 +        }
 +    }
 +}


Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1346561 - /tomcat/tc6.0.x/trunk/STATUS.txt

2012-06-05 Thread kkolinko
Author: kkolinko
Date: Tue Jun  5 20:09:59 2012
New Revision: 1346561

URL: http://svn.apache.org/viewvc?rev=1346561view=rev
Log:
proposal

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1346561r1=1346560r2=1346561view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Jun  5 20:09:59 2012
@@ -179,6 +179,13 @@ PATCHES PROPOSED TO BACKPORT:
   +1: kkolinko
   -1:
 
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=52850
+  Extend memory leak prevention and detection code to
+  work with IBM as well as Oracle JVMs. Based on patch provided by Rohit 
Kelapure.
+  https://issues.apache.org/bugzilla/attachment.cgi?id=28893
+  +1: kkolinko
+  -1:
+
 
 PATCHES/ISSUES THAT ARE STALLED
 



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 52850] Various miscellaneous fixes to Tomcat Memory Leak Detection code

2012-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52850

--- Comment #12 from Konstantin Kolinko knst.koli...@gmail.com ---
Proposed for 6.0

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: svn commit: r1346510 - in /tomcat/trunk: java/org/apache/catalina/core/StandardContext.java java/org/apache/tomcat/util/http/mapper/Mapper.java test/org/apache/tomcat/util/http/mapper/TestMapperCo

2012-06-05 Thread Mark Thomas
On 05/06/2012 20:57, Konstantin Kolinko wrote:
 2012/6/5  ma...@apache.org:
 Author: markt
 Date: Tue Jun  5 18:17:58 2012
 New Revision: 1346510


 --- 
 tomcat/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperContextRoot.java
  (added)
 +++ 
 tomcat/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperContextRoot.java
  Tue Jun  5 18:17:58 2012
 @@ -0,0 +1,79 @@
 +private static class Bug53356Servlet extends HttpServlet {
 +
 +private static final long serialVersionUID = 1L;
 +
 +@Override
 +protected void doGet(HttpServletRequest req, HttpServletResponse 
 resp)
 +throws ServletException, IOException {
 +// Confirm behaviour as per Servler 12.2
 +boolean pass = /.equals(req.getPathInfo());
 +if (pass) {
 +pass = (req.getServletPath() == null);
 +}
 +if (pass) {
 +pass = (req.getContextPath() == null);
 +}
 +
 
 Looking into Servlet spec 3.0 rev.a chapter 12.2.
 
 It says that contextPath and servletPath are empty string (),  but
 the code above expects nulls.

I'll get that fixed. I mis-read the spec.

 Regarding contextPath being :
 It is surely strange, as
 
 1. it contradicts other places like 3.5  (definition of Context Path
 and famous equation of requestURI = contextPath + servletPath +
 pathInfo ).
 
 2. There is also ServletContext.getContextPath() that provides the
 correct information.
 
 3. Though looking at Javadoc [3], it says that
 HttpServletRequest.getContextPath() may be different with
 ServletContext.getContextPath(), but it does not mention this special
 servlet mapping as a case.
 
 [3] 
 http://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpServletRequest.html#getContextPath%28%29
 
 I wonder if it was ever raised with the EG.

Not that I am aware of.

 It is worth mentioning the chapter number (12.2) in the comment in Mapper.java
 
 I suspect that this feature is not covered by official tests, because
 otherwise we would have had to deal with it earlier.

Correct. I'm not surprised.

 So maybe we should respect ch.3.5 here, instead of 12.2?

Until the EG says otherwise, I think we should go with 12.2

Mark

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 53050] org.apache.catalina.session.ManagerBase has issues with update the seed (initialized to System.currentTimeMillis()), since only the 32 least significant bits are changed by the XOR.

2012-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53050

--- Comment #2 from Konstantin Kolinko knst.koli...@gmail.com ---
Created attachment 28894
  -- https://issues.apache.org/bugzilla/attachment.cgi?id=28894action=edit
2012-06-05_tc6_53050_ManagerBase.patch

Patch to be proposed for Tomcat 6.0

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 53050] org.apache.catalina.session.ManagerBase has issues with update the seed (initialized to System.currentTimeMillis()), since only the 32 least significant bits are changed by the XOR.

2012-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53050

--- Comment #3 from Konstantin Kolinko knst.koli...@gmail.com ---
Created attachment 28895
  -- https://issues.apache.org/bugzilla/attachment.cgi?id=28895action=edit
2012-06-05_tc55_53050_ManagerBase.patch

Patch to be proposed for Tomcat 5.5

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1346580 - in /tomcat: tc5.5.x/trunk/STATUS.txt tc6.0.x/trunk/STATUS.txt

2012-06-05 Thread kkolinko
Author: kkolinko
Date: Tue Jun  5 20:55:41 2012
New Revision: 1346580

URL: http://svn.apache.org/viewvc?rev=1346580view=rev
Log:
proposals

Modified:
tomcat/tc5.5.x/trunk/STATUS.txt
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc5.5.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/STATUS.txt?rev=1346580r1=1346579r2=1346580view=diff
==
--- tomcat/tc5.5.x/trunk/STATUS.txt (original)
+++ tomcat/tc5.5.x/trunk/STATUS.txt Tue Jun  5 20:55:41 2012
@@ -44,3 +44,11 @@ PATCHES PROPOSED TO BACKPORT:
   (r1342797 in Tomcat 7)
   +1: kkolinko
   -1:
+
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53050
+  Fix XOR arithmetics and charset issue when calculating entropy to
+  initialize random numbers generator in session manager. Based on
+  proposal by Andras Rozsa.
+  https://issues.apache.org/bugzilla/attachment.cgi?id=28895
+  +1: kkolinko
+  -1:

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1346580r1=1346579r2=1346580view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Jun  5 20:55:41 2012
@@ -186,6 +186,14 @@ PATCHES PROPOSED TO BACKPORT:
   +1: kkolinko
   -1:
 
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53050
+  Fix XOR arithmetics and charset issue when calculating entropy to
+  initialize random numbers generator in session manager. Based on
+  proposal by Andras Rozsa.
+  https://issues.apache.org/bugzilla/attachment.cgi?id=28894
+  +1: kkolinko
+  -1:
+
 
 PATCHES/ISSUES THAT ARE STALLED
 



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1346581 - in /tomcat/trunk: java/org/apache/tomcat/util/http/mapper/Mapper.java test/org/apache/tomcat/util/http/mapper/TestMapperContextRoot.java

2012-06-05 Thread markt
Author: markt
Date: Tue Jun  5 20:56:27 2012
New Revision: 1346581

URL: http://svn.apache.org/viewvc?rev=1346581view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53356
Additional fix. Correct context  servlet paths

Modified:
tomcat/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java

tomcat/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperContextRoot.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java?rev=1346581r1=1346580r2=1346581view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java Tue Jun  5 
20:56:27 2012
@@ -1036,9 +1036,9 @@ public final class Mapper {
 if (path.equals(/)) {
 // Special handling for Context Root mapped servlet
 mappingData.pathInfo.setString(/);
-mappingData.wrapperPath.recycle();
+mappingData.wrapperPath.setString();
 // This seems wrong but it is what the spec says...
-mappingData.contextPath.recycle();
+mappingData.contextPath.setString();
 } else {
 mappingData.wrapperPath.setString(wrappers[pos].name);
 }

Modified: 
tomcat/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperContextRoot.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperContextRoot.java?rev=1346581r1=1346580r2=1346581view=diff
==
--- 
tomcat/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperContextRoot.java 
(original)
+++ 
tomcat/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperContextRoot.java 
Tue Jun  5 20:56:27 2012
@@ -62,10 +62,10 @@ public class TestMapperContextRoot exten
 // Confirm behaviour as per Servler 12.2
 boolean pass = /.equals(req.getPathInfo());
 if (pass) {
-pass = (req.getServletPath() == null);
+pass = .equals(req.getServletPath());
 }
 if (pass) {
-pass = (req.getContextPath() == null);
+pass = .equals(req.getContextPath());
 }
 
 resp.setContentType(text/plain);



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 53050] org.apache.catalina.session.ManagerBase has issues with update the seed (initialized to System.currentTimeMillis()), since only the 32 least significant bits are changed by the XOR.

2012-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53050

--- Comment #4 from Konstantin Kolinko knst.koli...@gmail.com ---
Proposed for 6.0 and 5.5.

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1346584 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/util/http/mapper/Mapper.java test/org/apache/tomcat/util/http/mapper/TestMapperContextRoot.java

2012-06-05 Thread markt
Author: markt
Date: Tue Jun  5 20:57:16 2012
New Revision: 1346584

URL: http://svn.apache.org/viewvc?rev=1346584view=rev
Log:
Additional fix. Correct context  servlet paths

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java

tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperContextRoot.java

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1346581

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java?rev=1346584r1=1346583r2=1346584view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java 
Tue Jun  5 20:57:16 2012
@@ -1036,9 +1036,9 @@ public final class Mapper {
 if (path.equals(/)) {
 // Special handling for Context Root mapped servlet
 mappingData.pathInfo.setString(/);
-mappingData.wrapperPath.recycle();
+mappingData.wrapperPath.setString();
 // This seems wrong but it is what the spec says...
-mappingData.contextPath.recycle();
+mappingData.contextPath.setString();
 } else {
 mappingData.wrapperPath.setString(wrappers[pos].name);
 }

Modified: 
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperContextRoot.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperContextRoot.java?rev=1346584r1=1346583r2=1346584view=diff
==
--- 
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperContextRoot.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperContextRoot.java
 Tue Jun  5 20:57:16 2012
@@ -62,10 +62,10 @@ public class TestMapperContextRoot exten
 // Confirm behaviour as per Servler 12.2
 boolean pass = /.equals(req.getPathInfo());
 if (pass) {
-pass = (req.getServletPath() == null);
+pass = .equals(req.getServletPath());
 }
 if (pass) {
-pass = (req.getContextPath() == null);
+pass = .equals(req.getContextPath());
 }
 
 resp.setContentType(text/plain);



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1346587 - /tomcat/tc6.0.x/trunk/STATUS.txt

2012-06-05 Thread markt
Author: markt
Date: Tue Jun  5 21:04:19 2012
New Revision: 1346587

URL: http://svn.apache.org/viewvc?rev=1346587view=rev
Log:
Withdrawn

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1346587r1=1346586r2=1346587view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Jun  5 21:04:19 2012
@@ -77,12 +77,6 @@ PATCHES PROPOSED TO BACKPORT:
   -0: markt - https://issues.apache.org/bugzilla/show_bug.cgi?id=52579#c8
   -1: 
 
-* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=52723
-  Correct theoretical resource leak in StandardManager
-  http://svn.apache.org/viewvc?rev=1299036view=rev
-  +1: markt, fhanik, kkolinko
-  -1:
-
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=52830
   Lookups using javax.naming.Name fail
   http://svn.apache.org/viewvc?rev=1298635view=rev



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1346588 - /tomcat/tc6.0.x/trunk/STATUS.txt

2012-06-05 Thread markt
Author: markt
Date: Tue Jun  5 21:06:11 2012
New Revision: 1346588

URL: http://svn.apache.org/viewvc?rev=1346588view=rev
Log:
Vote

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1346588r1=1346587r2=1346588view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Jun  5 21:06:11 2012
@@ -149,7 +149,7 @@ PATCHES PROPOSED TO BACKPORT:
   full GC every hour.
   http://svn.apache.org/viewvc?view=revisionrevision=1343895
   (r1343897 in TC7)
-  +1: kkolinko, kfujino
+  +1: kkolinko, kfujino, markt
   -1:
 
 * For https://issues.apache.org/bugzilla/show_bug.cgi?id=52055



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1346590 - /tomcat/tc6.0.x/trunk/STATUS.txt

2012-06-05 Thread markt
Author: markt
Date: Tue Jun  5 21:08:37 2012
New Revision: 1346590

URL: http://svn.apache.org/viewvc?rev=1346590view=rev
Log:
Vote

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1346590r1=1346589r2=1346590view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Jun  5 21:08:37 2012
@@ -89,7 +89,7 @@ PATCHES PROPOSED TO BACKPORT:
 
   Additional patch:
   http://svn.apache.org/viewvc?rev=1304468view=rev
-  +1: kkolinko
+  +1: kkolinko, markt
   -1:
 
 * https://issues.apache.org/bugzilla/show_bug.cgi?id=52811



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1346596 - /tomcat/tc6.0.x/trunk/STATUS.txt

2012-06-05 Thread schultz
Author: schultz
Date: Tue Jun  5 21:19:05 2012
New Revision: 1346596

URL: http://svn.apache.org/viewvc?rev=1346596view=rev
Log:
Votes

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1346596r1=1346595r2=1346596view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Jun  5 21:19:05 2012
@@ -149,7 +149,7 @@ PATCHES PROPOSED TO BACKPORT:
   full GC every hour.
   http://svn.apache.org/viewvc?view=revisionrevision=1343895
   (r1343897 in TC7)
-  +1: kkolinko, kfujino, markt
+  +1: kkolinko, kfujino, markt, schultz
   -1:
 
 * For https://issues.apache.org/bugzilla/show_bug.cgi?id=52055
@@ -170,22 +170,24 @@ PATCHES PROPOSED TO BACKPORT:
   overflow if it is written to again before the connection is closed).
   https://issues.apache.org/bugzilla/attachment.cgi?id=28890
   It is backport of r1344253
-  +1: kkolinko
+  +1: kkolinko, schultz
   -1:
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=52850
   Extend memory leak prevention and detection code to
   work with IBM as well as Oracle JVMs. Based on patch provided by Rohit 
Kelapure.
   https://issues.apache.org/bugzilla/attachment.cgi?id=28893
-  +1: kkolinko
+  +1: kkolinko, schultz
   -1:
+  
+  schultz: it seems reasonable also to back-port the removal of null-checking 
due to use of NoSuch(Field|Method)Exception
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53050
   Fix XOR arithmetics and charset issue when calculating entropy to
   initialize random numbers generator in session manager. Based on
   proposal by Andras Rozsa.
   https://issues.apache.org/bugzilla/attachment.cgi?id=28894
-  +1: kkolinko
+  +1: kkolinko, schultz
   -1:
 
 



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1346599 - /tomcat/tc5.5.x/trunk/STATUS.txt

2012-06-05 Thread schultz
Author: schultz
Date: Tue Jun  5 21:25:25 2012
New Revision: 1346599

URL: http://svn.apache.org/viewvc?rev=1346599view=rev
Log:
Votes

Modified:
tomcat/tc5.5.x/trunk/STATUS.txt

Modified: tomcat/tc5.5.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/STATUS.txt?rev=1346599r1=1346598r2=1346599view=diff
==
--- tomcat/tc5.5.x/trunk/STATUS.txt (original)
+++ tomcat/tc5.5.x/trunk/STATUS.txt Tue Jun  5 21:25:25 2012
@@ -42,7 +42,7 @@ PATCHES PROPOSED TO BACKPORT:
   recycled.
   http://svn.apache.org/viewvc?rev=1342795view=rev
   (r1342797 in Tomcat 7)
-  +1: kkolinko
+  +1: kkolinko, schultz
   -1:
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53050
@@ -50,5 +50,5 @@ PATCHES PROPOSED TO BACKPORT:
   initialize random numbers generator in session manager. Based on
   proposal by Andras Rozsa.
   https://issues.apache.org/bugzilla/attachment.cgi?id=28895
-  +1: kkolinko
+  +1: kkolinko, schultz
   -1:



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



buildbot failure in ASF Buildbot on tomcat-trunk

2012-06-05 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-trunk while building 
ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-trunk/builds/3039

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/trunk] 1346581
Blamelist: markt

BUILD FAILED: failed compile_1

sincerely,
 -The Buildbot





svn commit: r1346617 - in /tomcat/trunk/java/org/apache/catalina/session: ManagerBase.java TooManyActiveSessionsException.java

2012-06-05 Thread schultz
Author: schultz
Date: Tue Jun  5 21:46:21 2012
New Revision: 1346617

URL: http://svn.apache.org/viewvc?rev=1346617view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53230
Changed exception type thrown when session manager exceeds active session limit.

Added:

tomcat/trunk/java/org/apache/catalina/session/TooManyActiveSessionsException.java
   (with props)
Modified:
tomcat/trunk/java/org/apache/catalina/session/ManagerBase.java

Modified: tomcat/trunk/java/org/apache/catalina/session/ManagerBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/ManagerBase.java?rev=1346617r1=1346616r2=1346617view=diff
==
--- tomcat/trunk/java/org/apache/catalina/session/ManagerBase.java (original)
+++ tomcat/trunk/java/org/apache/catalina/session/ManagerBase.java Tue Jun  5 
21:46:21 2012
@@ -613,8 +613,9 @@ public abstract class ManagerBase extend
 if ((maxActiveSessions = 0) 
 (getActiveSessions() = maxActiveSessions)) {
 rejectedSessions++;
-throw new IllegalStateException(
-sm.getString(managerBase.createSession.ise));
+throw new TooManyActiveSessionsException(
+sm.getString(managerBase.createSession.ise),
+maxActiveSessions);
 }
 
 // Recycle or create a Session instance

Added: 
tomcat/trunk/java/org/apache/catalina/session/TooManyActiveSessionsException.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/TooManyActiveSessionsException.java?rev=1346617view=auto
==
--- 
tomcat/trunk/java/org/apache/catalina/session/TooManyActiveSessionsException.java
 (added)
+++ 
tomcat/trunk/java/org/apache/catalina/session/TooManyActiveSessionsException.java
 Tue Jun  5 21:46:21 2012
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the License); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.catalina.session;
+
+/**
+ * An exception that indicates the maximum number of active sessions has been
+ * reached and the server is refusing to create any new sessions.
+ */
+public class TooManyActiveSessionsException
+extends IllegalStateException
+{
+private static final long serialVersionUID = 1L;
+
+/**
+ * The maximum number of active sessions the server will tolerate.
+ */
+private final int maxActiveSessions;
+
+/**
+ * Creates a new TooManyActiveSessionsException.
+ * 
+ * @param message A description for the exception.
+ * @param maxActive The maximum number of active sessions allowed by the
+ *  session manager.
+ */
+public TooManyActiveSessionsException(String message,
+  int maxActive)
+{
+super(message);
+
+maxActiveSessions = maxActive;
+}
+
+/**
+ * Gets the maximum number of sessions allowed by the session manager.
+ *
+ * @return The maximum number of sessions allowed by the session manager.
+ */
+public int getMaxActiveSessions()
+{
+return maxActiveSessions;
+}
+}

Propchange: 
tomcat/trunk/java/org/apache/catalina/session/TooManyActiveSessionsException.java
--
svn:eol-style = native



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 53012] Ant Jasper task does not name including file when included file has compile error

2012-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53012

Mark Thomas ma...@apache.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WORKSFORME

--- Comment #2 from Mark Thomas ma...@apache.org ---
Tested with 6.0.x, 7.0.x and trunk and in all cases the error message points to
the including file, not the included file.

If you still see this error then before re-opening this issue please provide
the simplest test case (should be no more than one build.xml, one jsp file and
one jspf file in a zipped directory structure) that demonstrates the issue.

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: svn commit: r1346596 - /tomcat/tc6.0.x/trunk/STATUS.txt

2012-06-05 Thread Konstantin Kolinko
2012/6/6  schu...@apache.org:
 Author: schultz
 Date: Tue Jun  5 21:19:05 2012
 New Revision: 1346596

 URL: http://svn.apache.org/viewvc?rev=1346596view=rev
 Log:
 Votes

 Modified:
    tomcat/tc6.0.x/trunk/STATUS.txt



  * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=52850
   Extend memory leak prevention and detection code to
   work with IBM as well as Oracle JVMs. Based on patch provided by Rohit 
 Kelapure.
   https://issues.apache.org/bugzilla/attachment.cgi?id=28893
 -  +1: kkolinko
 +  +1: kkolinko, schultz
   -1:
 +
 +  schultz: it seems reasonable also to back-port the removal of 
 null-checking due to use of NoSuch(Field|Method)Exception

Can you be more specific?  All those removals should already be in the patch.

In more detail:
- The patch is r1298986 + r1346519
- The null checks that I removed in r1346519 were all in the code
added in r1298986.  So maybe that is why they are not visible in this
proposal.

If you are saying about backporting r1346519 to 7.0,  I'll do it.

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1346635 - /tomcat/trunk/java/org/apache/catalina/ant/antlib.xml

2012-06-05 Thread markt
Author: markt
Date: Tue Jun  5 22:34:19 2012
New Revision: 1346635

URL: http://svn.apache.org/viewvc?rev=1346635view=rev
Log:
Remove unused file

Removed:
tomcat/trunk/java/org/apache/catalina/ant/antlib.xml


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1346638 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/ant/antlib.xml

2012-06-05 Thread markt
Author: markt
Date: Tue Jun  5 22:38:53 2012
New Revision: 1346638

URL: http://svn.apache.org/viewvc?rev=1346638view=rev
Log:
Remove unused file

Removed:
tomcat/tc7.0.x/trunk/java/org/apache/catalina/ant/antlib.xml
Modified:
tomcat/tc7.0.x/trunk/   (props changed)

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1346635



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: svn commit: r1346638 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/ant/antlib.xml

2012-06-05 Thread Konstantin Kolinko
2012/6/6  ma...@apache.org:
 Author: markt
 Date: Tue Jun  5 22:38:53 2012
 New Revision: 1346638

 URL: http://svn.apache.org/viewvc?rev=1346638view=rev
 Log:
 Remove unused file

 Removed:
    tomcat/tc7.0.x/trunk/java/org/apache/catalina/ant/antlib.xml
 Modified:
tomcat/tc7.0.x/trunk/   (props changed)

 Propchange: tomcat/tc7.0.x/trunk/
 --
  Merged /tomcat/trunk:r1346635


Please explain, why do you think that this file is unused?

Documentation:
http://ant.apache.org/manual/Types/antlib.html

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: svn commit: r1346638 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/ant/antlib.xml

2012-06-05 Thread Mark Thomas
On 05/06/2012 23:42, Konstantin Kolinko wrote:
 2012/6/6  ma...@apache.org:
 Author: markt
 Date: Tue Jun  5 22:38:53 2012
 New Revision: 1346638

 URL: http://svn.apache.org/viewvc?rev=1346638view=rev
 Log:
 Remove unused file

 Removed:
tomcat/tc7.0.x/trunk/java/org/apache/catalina/ant/antlib.xml
 Modified:
tomcat/tc7.0.x/trunk/   (props changed)

 Propchange: tomcat/tc7.0.x/trunk/
 --
  Merged /tomcat/trunk:r1346635
 
 
 Please explain, why do you think that this file is unused?

Because:
- it is not referenced anywhere in the code base
- it does not include JspC
- all our code examples (including the docs) use catalina.tasks to do
the same thing

What makes you think it is used?

Mark

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1346644 - /tomcat/trunk/java/org/apache/jasper/JspC.java

2012-06-05 Thread markt
Author: markt
Date: Tue Jun  5 22:56:40 2012
New Revision: 1346644

URL: http://svn.apache.org/viewvc?rev=1346644view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53032
Modify JspC to extend o.a.tools.ant.Task so it works with name spaces
The main change is that execute() no longer throws JasperException so it 
matches the signature for Task.execute(). This required a small change to main()

Modified:
tomcat/trunk/java/org/apache/jasper/JspC.java

Modified: tomcat/trunk/java/org/apache/jasper/JspC.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/JspC.java?rev=1346644r1=1346643r2=1346644view=diff
==
--- tomcat/trunk/java/org/apache/jasper/JspC.java (original)
+++ tomcat/trunk/java/org/apache/jasper/JspC.java Tue Jun  5 22:56:40 2012
@@ -56,7 +56,8 @@ import org.apache.jasper.servlet.JspCSer
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 import org.apache.tools.ant.AntClassLoader;
-import org.apache.tools.ant.Project;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
 import org.apache.tools.ant.util.FileUtils;
 
 /**
@@ -91,7 +92,7 @@ import org.apache.tools.ant.util.FileUti
  * @author Costin Manolache
  * @author Yoav Shapira
  */
-public class JspC implements Options {
+public class JspC extends Task implements Options {
 
 public static final String DEFAULT_IE_CLASS_ID =
 clsid:8AD9C840-044E-11D1-B3E9-00805F499D93;
@@ -164,7 +165,6 @@ public class JspC implements Options {
 protected String targetClassName;
 protected String uriBase;
 protected String uriRoot;
-protected Project project;
 protected int dieLevel;
 protected boolean helpNeeded = false;
 protected boolean compile = false;
@@ -263,6 +263,11 @@ public class JspC implements Options {
 if (jspc.dieLevel != NO_DIE_LEVEL) {
 System.exit(jspc.dieLevel);
 }
+} catch (BuildException je) {
+System.err.println(je);
+if (jspc.dieLevel != NO_DIE_LEVEL) {
+System.exit(jspc.dieLevel);
+}
 }
 }
 }
@@ -778,25 +783,6 @@ public class JspC implements Options {
 }
 
 /**
- * Sets the Ant project.
- *
- * @param theProject The project
- */
-public void setProject(final Project theProject) {
-project = theProject;
-}
-
-/**
- * Returns the project: may be codenull/code if not running
- * inside an Ant project.
- *
- * @return The project
- */
-public Project getProject() {
-return project;
-}
-
-/**
  * Base dir for the webapp. Used to generate class names and resolve
  * includes.
  */
@@ -1274,7 +1260,8 @@ public class JspC implements Options {
  *
  * @throws JasperException If an error occurs
  */
-public void execute() throws JasperException {
+@Override
+public void execute() {
 if(log.isDebugEnabled()) {
 log.debug(execute() starting for  + pages.size() +  pages.);
 }
@@ -1349,7 +1336,7 @@ public class JspC implements Options {
 }
 
 } catch (IOException ioe) {
-throw new JasperException(ioe);
+throw new BuildException(ioe);
 
 } catch (JasperException je) {
 Throwable rootCause = je;
@@ -1360,7 +1347,7 @@ public class JspC implements Options {
 if (rootCause != je) {
 rootCause.printStackTrace();
 }
-throw je;
+throw new BuildException(je);
 } finally {
 if (loader != null) {
 LogFactory.release(loader);



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1346646 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/jasper/JspC.java webapps/docs/changelog.xml

2012-06-05 Thread markt
Author: markt
Date: Tue Jun  5 23:00:27 2012
New Revision: 1346646

URL: http://svn.apache.org/viewvc?rev=1346646view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53032
Modify JspC to extend o.a.tools.ant.Task so it works with name spaces
The main change is that execute() no longer throws JasperException so it 
matches the signature for Task.execute(). This required a small change to main()

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/jasper/JspC.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1346644

Modified: tomcat/tc7.0.x/trunk/java/org/apache/jasper/JspC.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/jasper/JspC.java?rev=1346646r1=1346645r2=1346646view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/jasper/JspC.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/jasper/JspC.java Tue Jun  5 23:00:27 
2012
@@ -56,7 +56,8 @@ import org.apache.jasper.servlet.JspCSer
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 import org.apache.tools.ant.AntClassLoader;
-import org.apache.tools.ant.Project;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
 import org.apache.tools.ant.util.FileUtils;
 
 /**
@@ -91,7 +92,7 @@ import org.apache.tools.ant.util.FileUti
  * @author Costin Manolache
  * @author Yoav Shapira
  */
-public class JspC implements Options {
+public class JspC extends Task implements Options {
 
 public static final String DEFAULT_IE_CLASS_ID =
 clsid:8AD9C840-044E-11D1-B3E9-00805F499D93;
@@ -164,7 +165,6 @@ public class JspC implements Options {
 protected String targetClassName;
 protected String uriBase;
 protected String uriRoot;
-protected Project project;
 protected int dieLevel;
 protected boolean helpNeeded = false;
 protected boolean compile = false;
@@ -263,6 +263,11 @@ public class JspC implements Options {
 if (jspc.dieLevel != NO_DIE_LEVEL) {
 System.exit(jspc.dieLevel);
 }
+} catch (BuildException je) {
+System.err.println(je);
+if (jspc.dieLevel != NO_DIE_LEVEL) {
+System.exit(jspc.dieLevel);
+}
 }
 }
 }
@@ -778,25 +783,6 @@ public class JspC implements Options {
 }
 
 /**
- * Sets the Ant project.
- *
- * @param theProject The project
- */
-public void setProject(final Project theProject) {
-project = theProject;
-}
-
-/**
- * Returns the project: may be codenull/code if not running
- * inside an Ant project.
- *
- * @return The project
- */
-public Project getProject() {
-return project;
-}
-
-/**
  * Base dir for the webapp. Used to generate class names and resolve
  * includes.
  */
@@ -1274,7 +1260,8 @@ public class JspC implements Options {
  *
  * @throws JasperException If an error occurs
  */
-public void execute() throws JasperException {
+@Override
+public void execute() {
 if(log.isDebugEnabled()) {
 log.debug(execute() starting for  + pages.size() +  pages.);
 }
@@ -1349,7 +1336,7 @@ public class JspC implements Options {
 }
 
 } catch (IOException ioe) {
-throw new JasperException(ioe);
+throw new BuildException(ioe);
 
 } catch (JasperException je) {
 Throwable rootCause = je;
@@ -1360,7 +1347,7 @@ public class JspC implements Options {
 if (rootCause != je) {
 rootCause.printStackTrace();
 }
-throw je;
+throw new BuildException(je);
 } finally {
 if (loader != null) {
 LogFactory.release(loader);

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1346646r1=1346645r2=1346646view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Tue Jun  5 23:00:27 2012
@@ -262,6 +262,15 @@
   /add
 /changelog
   /subsection
+  subsection name=Jasper
+changelog
+  fix
+bug53032/bug: Modify codeJspC/code so it extends
+codeorg.apache.tools.ant.Task/code enabling it to work with 
features
+such as namespaces within build.xml files. (markt)
+  /fix
+/changelog
+  /subsection
   subsection name=Cluster
 changelog
   fix



-
To unsubscribe, 

svn commit: r1346648 - /tomcat/tc6.0.x/trunk/STATUS.txt

2012-06-05 Thread markt
Author: markt
Date: Tue Jun  5 23:02:14 2012
New Revision: 1346648

URL: http://svn.apache.org/viewvc?rev=1346648view=rev
Log:
Proposal

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1346648r1=1346647r2=1346648view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Jun  5 23:02:14 2012
@@ -190,6 +190,12 @@ PATCHES PROPOSED TO BACKPORT:
   +1: kkolinko, schultz
   -1:
 
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53032
+  Make JspC extend o.a.tools.ant.Task so it works with namespaces
+  http://svn.apache.org/viewvc?rev=1346644view=rev
+  +1: markt
+  -1:
+
 
 PATCHES/ISSUES THAT ARE STALLED
 



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 53032] Ant Jasper task fails to run when using XML namespaces; no output; no errors

2012-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53032

--- Comment #3 from Mark Thomas ma...@apache.org ---
Confirmed. Extending Task does fix this.

I'm not convinced that it makes sense to separate the Ant task and JspC. While
the current approach isn't the one I'd select if starting from a clean sheet, I
don't see a compelling argument to change it now.

Fixed in trunk and 7.0.x and will be included in 7.0.28 onwards.

Proposed for 6.0.x

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 53047] JDBCRealm allRolesMode=authOnly still needs role table

2012-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53047

--- Comment #6 from Mark Thomas ma...@apache.org ---
It isn't quite that simple. The application may still make a call to
isUserInRole().

There may well be a special case for each realm if all of the following are
true:
- AUTH_ONLY_MODE or STRICT_AUTH_ONLY_MODE
- the Realm uses separate attributes to define the role store
- the role store attributes are undefined

In this case, there is no need to look up the roles although an INFO log
message on Realm start just to remind the admin what is going on wouldn't hurt.

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: svn commit: r1346638 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/ant/antlib.xml

2012-06-05 Thread Konstantin Kolinko
2012/6/6 Mark Thomas ma...@apache.org:
 On 05/06/2012 23:42, Konstantin Kolinko wrote:
 2012/6/6  ma...@apache.org:
 Author: markt
 Date: Tue Jun  5 22:38:53 2012
 New Revision: 1346638

 URL: http://svn.apache.org/viewvc?rev=1346638view=rev
 Log:
 Remove unused file

 Removed:
    tomcat/tc7.0.x/trunk/java/org/apache/catalina/ant/antlib.xml
 Modified:
    tomcat/tc7.0.x/trunk/   (props changed)

 Propchange: tomcat/tc7.0.x/trunk/
 --
  Merged /tomcat/trunk:r1346635


 Please explain, why do you think that this file is unused?

 Because:
 - it is not referenced anywhere in the code base

It should not be referenced. We do not bundle Ant with Tomcat.

 - it does not include JspC

Those tasks are related to server management. You do not need to
precompile JSPs for that.

It can be solved by adding the two missing tasks.

 - all our code examples (including the docs) use catalina.tasks to do
 the same thing

Though we do not directly use
  org/apache/catalina/ant/antlib.xml

we certainly do use the one here:
  org/apache/catalina/ant/jmx/antlib.xml

The latter one is mentioned in the docs:
http://tomcat.apache.org/tomcat-7.0-doc/monitoring.html

I would also say that antlib sounds like a more modern approach.

Anyway I am -1 on removing this file from stable versions. It may
break systems and I do not see what problem this removal solves.

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



buildbot success in ASF Buildbot on tomcat-7-trunk

2012-06-05 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-7-trunk while 
building ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-7-trunk/builds/629

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/tc7.0.x/trunk] 1346646
Blamelist: markt

Build succeeded!

sincerely,
 -The Buildbot





Re: svn commit: r1346638 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/ant/antlib.xml

2012-06-05 Thread Mark Thomas
On 06/06/2012 00:22, Konstantin Kolinko wrote:
 2012/6/6 Mark Thomas ma...@apache.org:
 On 05/06/2012 23:42, Konstantin Kolinko wrote:
 2012/6/6  ma...@apache.org:
 Author: markt
 Date: Tue Jun  5 22:38:53 2012
 New Revision: 1346638

 URL: http://svn.apache.org/viewvc?rev=1346638view=rev
 Log:
 Remove unused file

 Removed:
tomcat/tc7.0.x/trunk/java/org/apache/catalina/ant/antlib.xml
 Modified:
tomcat/tc7.0.x/trunk/   (props changed)

 Propchange: tomcat/tc7.0.x/trunk/
 --
  Merged /tomcat/trunk:r1346635


 Please explain, why do you think that this file is unused?

 Because:
 - it is not referenced anywhere in the code base
 
 It should not be referenced. We do not bundle Ant with Tomcat.
 
 - it does not include JspC
 
 Those tasks are related to server management. You do not need to
 precompile JSPs for that.
 
 It can be solved by adding the two missing tasks.
 
 - all our code examples (including the docs) use catalina.tasks to do
 the same thing
 
 Though we do not directly use
   org/apache/catalina/ant/antlib.xml
 
 we certainly do use the one here:
   org/apache/catalina/ant/jmx/antlib.xml
 
 The latter one is mentioned in the docs:
 http://tomcat.apache.org/tomcat-7.0-doc/monitoring.html
 
 I would also say that antlib sounds like a more modern approach.
 
 Anyway I am -1 on removing this file from stable versions. It may
 break systems and I do not see what problem this removal solves.

The problem it solves is unnecessary duplication leading to additional
maintenance effort and bugs when they get out of sync. I don't see the
point of having two files that do the same thing. I don't particularly
care whether we keep catalina.tasks or antlib.xml. I just deleted the
one we weren't using anywhere and hadn't documented anywhere.

I can restore the file in 7.0.x easily enough.

If you prefer antlib.xml to catalina.tasks then I have no objection to
you making antlib.xml the standard in 8.0.x onwards as long as the
documentation is updated to that effect as well.

Mark

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1346674 - /tomcat/tc7.0.x/trunk/java/org/apache/catalina/ant/antlib.xml

2012-06-05 Thread markt
Author: markt
Date: Tue Jun  5 23:57:15 2012
New Revision: 1346674

URL: http://svn.apache.org/viewvc?rev=1346674view=rev
Log:
Restore deleted file

Added:
tomcat/tc7.0.x/trunk/java/org/apache/catalina/ant/antlib.xml   (props 
changed)
  - copied unchanged from r1346637, 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/ant/antlib.xml

Propchange: tomcat/tc7.0.x/trunk/java/org/apache/catalina/ant/antlib.xml
--
svn:eol-style = native

Propchange: tomcat/tc7.0.x/trunk/java/org/apache/catalina/ant/antlib.xml
--
svn:keywords = Author Date Id Revision

Propchange: tomcat/tc7.0.x/trunk/java/org/apache/catalina/ant/antlib.xml
--
--- svn:mergeinfo (added)
+++ svn:mergeinfo Tue Jun  5 23:57:15 2012
@@ -0,0 +1 @@
+/tomcat/trunk/java/org/apache/catalina/ant/antlib.xml:1156115-1157160,1157162-1157859,1157862-1157942,1157945-1160347,1160349-1163716,1163718-1166689,1166691-1174340,1174342-1175596,1175598-1175611,1175613-1175932,1175934-1177783,1177785-1177980,1178006-1180720,1180722-1183094,1183096-1187753,1187755,1187775,1187801,1187806,1187809,1187826-1188312,1188314-1188401,1188646-1188840,1188842-1190176,1190178-1195223,1195225-1195953,1195955,1195957-1201238,1201240-1203345,1203347-1206623,1206625-1208046,1208073,1208096,1208114,1208145,1208772,1209194-1212125,1212127-1220291,1220293,1220295-1221321,1221323-1222328,1222332-1222401,1222405-1222795,1222850-1222950,1222969-1225326,1225328-1225463,1225465,1225627,1225629-1226534,1226536-1228908,1228911-1228923,1228927-1229532,1229534-1230766,1230768-1231625,1231627-1233414,1233419-1235207,1235209-1237425,1237427,1237429-1237977,1237981,1237985,1237995,1238070,1238073,1239024-1239048,1239050-1239062,1239135,1239256,1239258-1239485,1239785
 
-1240046,1240101,1240106,1240109,1240112,1240114,1240116,1240118,1240121,1240329,1240474-1240850,1240857,1241087,1241160,1241408-1241822,1241908-1241909,1241912-1242110,1242371-1292130,1292134-1292458,1292464-1292670,1292672-1292776,1292780-1293392,1293397-1297017,1297019-1297963,1297965-1299820,1300108,1300111-1300460,1300520-1300948,1300997,1301006,1301280,1302332,1302348,1302608-1302610,1302649,1302837,1303138,1303163,1303338,1303521,1303587,1303698,1303803,1303852,1304011,1304035,1304037,1304135,1304249,1304253,1304260,1304271,1304275,1304468,1304895,1304930-1304932,1305194,1305943,1305965,1306556,1306579-1306580,1307084,1307310,1307511-1307512,1307579,1307591,1307597,1310636,1310639-1310640,1310642,1310701,1311212,1311995,1327617,1327670,1331766,1333161,1333173,1333827,1334787,1335026,1335257,1335547,1335692,1335711,1335731,1336515,1336813,1336864,1336868,1336884,1337419,1337426,1337546,1337572,1337591-1337595,1337643,1337707,1337719,1337734,1337741,1337745,1338151-1338
 
154,1338178,1342315,1342320,1342476,1342498,1342503,1342795,1342805,1343044-1343046,1343335,1343394,1343400,1343629,1343708,1343718,1343895,1344063,1344068,1344250,1344266,1344515,1344528,1344612,1344629,1344725,1344868,1344890,1344893,1344896,1344901,1345020,1345029,1345039,1345287-1345290,1345294,1345309,1345325,1345357,1345367,1345579-1345580,1345582,1345688,1345699,1345704,1345731-1345732,1345737,1345744,1345752,1345754,1345779,1345781,1345846,1346107,1346376,1346510,1346514,1346581



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: buildbot failure in ASF Buildbot on tomcat-trunk

2012-06-05 Thread Mark Thomas
On 05/06/2012 22:37, build...@apache.org wrote:
 The Buildbot has detected a new failure on builder tomcat-trunk while 
 building ASF Buildbot.
 Full details are available at:
  http://ci.apache.org/builders/tomcat-trunk/builds/3039
 
 Buildbot URL: http://ci.apache.org/
 
 Buildslave for this Build: bb-vm_ubuntu
 
 Build Reason: scheduler
 Build Source Stamp: [branch tomcat/trunk] 1346581
 Blamelist: markt

I now have access to the host where this build runs and can repeat the
failure easily. I intend to investigate further over the next few days
with a view to identifying the root cause and hopefully fixing it.

Mark


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1346675 - in /tomcat/tc7.0.x/trunk: java/org/apache/catalina/session/ManagerBase.java java/org/apache/catalina/session/TooManyActiveSessionsException.java webapps/docs/changelog.xml

2012-06-05 Thread schultz
Author: schultz
Date: Tue Jun  5 23:59:01 2012
New Revision: 1346675

URL: http://svn.apache.org/viewvc?rev=1346675view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53230
Changed exception type thrown when session manager exceeds active session limit.

Added:

tomcat/tc7.0.x/trunk/java/org/apache/catalina/session/TooManyActiveSessionsException.java
  - copied unchanged from r1346617, 
tomcat/trunk/java/org/apache/catalina/session/TooManyActiveSessionsException.java
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/catalina/session/ManagerBase.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/session/ManagerBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/session/ManagerBase.java?rev=1346675r1=1346674r2=1346675view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/session/ManagerBase.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/session/ManagerBase.java Tue 
Jun  5 23:59:01 2012
@@ -635,8 +635,9 @@ public abstract class ManagerBase extend
 if ((maxActiveSessions = 0) 
 (getActiveSessions() = maxActiveSessions)) {
 rejectedSessions++;
-throw new IllegalStateException(
-sm.getString(managerBase.createSession.ise));
+throw new TooManyActiveSessionsException(
+sm.getString(managerBase.createSession.ise),
+maxActiveSessions);
 }
 
 // Recycle or create a Session instance

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1346675r1=1346674r2=1346675view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Tue Jun  5 23:59:01 2012
@@ -210,6 +210,12 @@
 bug53356/bug: Add support for servlets mapped explicitly to the
 context root of a web application. (markt)
   /fix
+  fix
+bug53230/bug: Changed ManagerBase to throw
+TooManyActiveSessionsException instead of IllegalStateException
+when the maximum number of sessions has been exceeded and a new
+session will not be created. (schultz)
+  /fix
 /changelog
   /subsection
   subsection name=Coyote



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 53230] Allow custom error mapping when Manager's maxActiveSessions is exceeded

2012-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53230

Christopher Schultz ch...@christopherschultz.net changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #1 from Christopher Schultz ch...@christopherschultz.net ---
ManagerBase now throws o.a.c.session.TooManyActiveSessionsException, which is a
subclass of IllegalStateException.

Fixed in trunk and 7.0.x. Will be included in 7.0.28.

Proposed for Tomcat 6.0.x.

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1346677 - /tomcat/tc6.0.x/trunk/STATUS.txt

2012-06-05 Thread schultz
Author: schultz
Date: Wed Jun  6 00:03:39 2012
New Revision: 1346677

URL: http://svn.apache.org/viewvc?rev=1346677view=rev
Log:
Proposal

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1346677r1=1346676r2=1346677view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Jun  6 00:03:39 2012
@@ -196,6 +196,12 @@ PATCHES PROPOSED TO BACKPORT:
   +1: markt
   -1:
 
+* Backport fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=53230
+  Change ManagerBase to throw TooManyActiveSessionsException instead of
+  IllegalStateException to allow for custom error page.
+  http://svn.apache.org/viewvc?view=revisionrevision=1346675
+  +1: schultz
+  -1:
 
 PATCHES/ISSUES THAT ARE STALLED
 



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 53359] Request for Aliases or Alias as element inside Context

2012-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53359

--- Comment #2 from Esmond Pitt esmond.p...@bigpond.com ---
That's OK by me but is it legal XML?

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1346679 - /tomcat/tc6.0.x/trunk/STATUS.txt

2012-06-05 Thread schultz
Author: schultz
Date: Wed Jun  6 00:05:00 2012
New Revision: 1346679

URL: http://svn.apache.org/viewvc?rev=1346679view=rev
Log:
Vote

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1346679r1=1346678r2=1346679view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Jun  6 00:05:00 2012
@@ -193,7 +193,7 @@ PATCHES PROPOSED TO BACKPORT:
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53032
   Make JspC extend o.a.tools.ant.Task so it works with namespaces
   http://svn.apache.org/viewvc?rev=1346644view=rev
-  +1: markt
+  +1: markt, schultz
   -1:
 
 * Backport fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=53230



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1346683 - /tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/echo/EchoMessage.java

2012-06-05 Thread schultz
Author: schultz
Date: Wed Jun  6 00:26:15 2012
New Revision: 1346683

URL: http://svn.apache.org/viewvc?rev=1346683view=rev
Log:
Clean-up: avoid NPE and immediate catch when init parameter does not exist. 
Also do not assign default value unless necessary.

Modified:

tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/echo/EchoMessage.java

Modified: 
tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/echo/EchoMessage.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/echo/EchoMessage.java?rev=1346683r1=1346682r2=1346683view=diff
==
--- 
tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/echo/EchoMessage.java 
(original)
+++ 
tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/echo/EchoMessage.java 
Wed Jun  6 00:26:15 2012
@@ -42,11 +42,17 @@ public class EchoMessage extends WebSock
 
 public int getInitParameterIntValue(String name, int defaultValue) {
 String val = this.getInitParameter(name);
-int result = defaultValue;
-try {
-result = Integer.parseInt(val);
-}catch (Exception x) {
+int result;
+if(null != val) {
+try {
+result = Integer.parseInt(val);
+}catch (Exception x) {
+result = defaultValue;
+}
+} else {
+result = defaultValue;
 }
+
 return result;
 }
 



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1346684 - /tomcat/tc7.0.x/trunk/webapps/examples/WEB-INF/classes/websocket/echo/EchoMessage.java

2012-06-05 Thread schultz
Author: schultz
Date: Wed Jun  6 00:28:01 2012
New Revision: 1346684

URL: http://svn.apache.org/viewvc?rev=1346684view=rev
Log:
Clean-up: avoid NPE and immediate catch when init parameter does not exist. 
Also do not assign default value unless necessary.

Modified:

tomcat/tc7.0.x/trunk/webapps/examples/WEB-INF/classes/websocket/echo/EchoMessage.java
   (contents, props changed)

Modified: 
tomcat/tc7.0.x/trunk/webapps/examples/WEB-INF/classes/websocket/echo/EchoMessage.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/examples/WEB-INF/classes/websocket/echo/EchoMessage.java?rev=1346684r1=1346683r2=1346684view=diff
==
--- 
tomcat/tc7.0.x/trunk/webapps/examples/WEB-INF/classes/websocket/echo/EchoMessage.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/webapps/examples/WEB-INF/classes/websocket/echo/EchoMessage.java
 Wed Jun  6 00:28:01 2012
@@ -42,11 +42,17 @@ public class EchoMessage extends WebSock
 
 public int getInitParameterIntValue(String name, int defaultValue) {
 String val = this.getInitParameter(name);
-int result = defaultValue;
-try {
-result = Integer.parseInt(val);
-}catch (Exception x) {
+int result;
+if(null != val) {
+try {
+result = Integer.parseInt(val);
+}catch (Exception x) {
+result = defaultValue;
+}
+} else {
+result = defaultValue;
 }
+
 return result;
 }
 

Propchange: 
tomcat/tc7.0.x/trunk/webapps/examples/WEB-INF/classes/websocket/echo/EchoMessage.java
--
--- svn:mergeinfo (added)
+++ svn:mergeinfo Wed Jun  6 00:28:01 2012
@@ -0,0 +1 @@
+/tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/echo/EchoMessage.java:1156115-1157160,1157162-1157859,1157862-1157942,1157945-1160347,1160349-1163716,1163718-1166689,1166691-1174340,1174342-1175596,1175598-1175611,1175613-1175932,1175934-1177783,1177785-1177980,1178006-1180720,1180722-1183094,1183096-1187753,1187755,1187775,1187801,1187806,1187809,1187826-1188312,1188314-1188401,1188646-1188840,1188842-1190176,1190178-1195223,1195225-1195953,1195955,1195957-1201238,1201240-1203345,1203347-1206623,1206625-1208046,1208073,1208096,1208114,1208145,1208772,1209194-1212125,1212127-1220291,1220293,1220295-1221321,1221323-1222328,1222332-1222401,1222405-1222795,1222850-1222950,1222969-1225326,1225328-1225463,1225465,1225627,1225629-1226534,1226536-1228908,1228911-1228923,1228927-1229532,1229534-1230766,1230768-1231625,1231627-1233414,1233419-1235207,1235209-1237425,1237427,1237429-1237977,1237981,1237985,1237995,1238070,1238073,1239024-1239048,1239050-1239062,1239135,123925
 
6,1239258-1239485,1239785-1240046,1240101,1240106,1240109,1240112,1240114,1240116,1240118,1240121,1240329,1240474-1240850,1240857,1241087,1241160,1241408-1241822,1241908-1241909,1241912-1242110,1242371-1292130,1292134-1292458,1292464-1292670,1292672-1292776,1292780-1293392,1293397-1297017,1297019-1297963,1297965-1299820,1300108,1300111-1300460,1300520-1300948,1300997,1301006,1301280,1302332,1302348,1302608-1302610,1302649,1302837,1303138,1303163,1303338,1303521,1303587,1303698,1303803,1303852,1304011,1304035,1304037,1304135,1304249,1304253,1304260,1304271,1304275,1304468,1304895,1304930-1304932,1305194,1305943,1305965,1306556,1306579-1306580,1307084,1307310,1307511-1307512,1307579,1307591,1307597,1310636,1310639-1310640,1310642,1310701,1311212,1311995,1327617,1327670,1331766,1333161,1333173,1333827,1334787,1335026,1335257,1335547,1335692,1335711,1335731,1336515,1336813,1336864,1336868,1336884,1337419,1337426,1337546,1337572,1337591-1337595,1337643,1337707,1337719,1337734,133
 
7741,1337745,1338151-1338154,1338178,1342315,1342320,1342476,1342498,1342503,1342795,1342805,1343044-1343046,1343335,1343394,1343400,1343629,1343708,1343718,1343895,1344063,1344068,1344250,1344266,1344515,1344528,1344612,1344629,1344725,1344868,1344890,1344893,1344896,1344901,1345020,1345029,1345039,1345287-1345290,1345294,1345309,1345325,1345357,1345367,1345579-1345580,1345582,1345688,1345699,1345704,1345731-1345732,1345737,1345744,1345752,1345754,1345779,1345781,1345846,1346107,1346376,1346510,1346514,1346617,1346683



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 53366] New: Running with SecurityManager: protected/index.jsp returns blank page when it is the first page accessed

2012-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53366

  Priority: P2
Bug ID: 53366
  Assignee: dev@tomcat.apache.org
   Summary: Running with SecurityManager: protected/index.jsp
returns blank page when it is the first page accessed
  Severity: minor
Classification: Unclassified
OS: Windows XP
  Reporter: knst.koli...@gmail.com
  Hardware: PC
Status: NEW
   Version: 7.0.27
 Component: Catalina
   Product: Tomcat 7

eproducible in 7.0.27 and in current 7.0.x.

To reproduce:
1. Start catalina.bat start -security
2. Go to
[1] http://localhost:8080/examples/jsp/security/protected/index.jsp

3. Expected result: Display login form.
Actual result:
 Blank page. Access log shows:
127.0.0.1 - - [06/Jun/2012:04:35:23 +0400] GET
/examples/jsp/security/protected/index.jsp HTTP/1.1 200 -

That is, response code is 200, count of bytes is '-'.


If I stay on [1] and keep refreshing it, the problem persists.

But if I visit [2], then [1] starts to work. I suspect that some class needs to
be preloaded.

[2] http://localhost:8080/examples/

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 53367] New: Database failure may cause pool to hang

2012-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53367

  Priority: P2
Bug ID: 53367
  Assignee: dev@tomcat.apache.org
   Summary: Database failure may cause pool to hang
  Severity: critical
Classification: Unclassified
  Reporter: fha...@apache.org
  Hardware: PC
Status: NEW
   Version: unspecified
 Component: jdbc-pool
   Product: Tomcat Modules

during the 
 con.connect(); 
call in the method 

protected PooledConnection borrowConnection(long now, PooledConnection con,
String username, String password) in ConnectionPool.java

There is no counting down the size of the pool. This means, if a connection
failure happens here, the pool size remains the same. This means that 'size'
will show the pool as full, but in reality the pool is empty

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1346691 - in /tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool: ConnectionPool.java PooledConnection.java

2012-06-05 Thread fhanik
Author: fhanik
Date: Wed Jun  6 01:02:41 2012
New Revision: 1346691

URL: http://svn.apache.org/viewvc?rev=1346691view=rev
Log:
https://issues.apache.org/bugzilla/show_bug.cgi?id=53367
Avoid pool hanging when database fails


Modified:

tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java

tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PooledConnection.java

Modified: 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java?rev=1346691r1=1346690r2=1346691view=diff
==
--- 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
 (original)
+++ 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
 Wed Jun  6 01:02:41 2012
@@ -750,7 +750,19 @@ public class ConnectionPool {
 
 if (!con.isDiscarded()  !con.isInitialized()) {
 //attempt to connect
-con.connect();
+try {
+con.connect();
+} catch (Exception x) {
+release(con);
+setToNull = true;
+if (x instanceof SQLException) {
+throw (SQLException)x;
+} else {
+SQLException ex  = new SQLException(x.getMessage());
+ex.initCause(x);
+throw ex;
+}
+}
 }
 
 if (usercheck) {

Modified: 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PooledConnection.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PooledConnection.java?rev=1346691r1=1346690r2=1346691view=diff
==
--- 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PooledConnection.java
 (original)
+++ 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PooledConnection.java
 Wed Jun  6 01:02:41 2012
@@ -238,10 +238,14 @@ public class PooledConnection {
 protected void connectUsingDriver() throws SQLException {
 
 try {
-if (driver==null)
+if (driver==null) {
+if (log.isDebugEnabled()) {
+log.debug(Instantiating driver using class: 
+poolProperties.getDriverClassName()+ [url=+poolProperties.getUrl()+]);
+}
 driver = (java.sql.Driver) 
Class.forName(poolProperties.getDriverClassName(),
  true, 
PooledConnection.class.getClassLoader()
  ).newInstance();
+}
 } catch (java.lang.Exception cn) {
 if (log.isDebugEnabled()) {
 log.debug(Unable to instantiate JDBC driver., cn);



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 53367] Database failure may cause pool to hang

2012-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53367

Filip Hanik fha...@apache.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
 OS||All

--- Comment #1 from Filip Hanik fha...@apache.org ---
Fixed in r1346691

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



buildbot failure in ASF Buildbot on tomcat-7-trunk

2012-06-05 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-7-trunk while 
building ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-7-trunk/builds/631

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/tc7.0.x/trunk] 1346684
Blamelist: schultz

BUILD FAILED: failed compile_1

sincerely,
 -The Buildbot





Re: svn commit: r1346596 - /tomcat/tc6.0.x/trunk/STATUS.txt

2012-06-05 Thread Christopher Schultz
Konstantin,

On 6/5/12 6:28 PM, Konstantin Kolinko wrote:
 2012/6/6  schu...@apache.org:
 Author: schultz
 Date: Tue Jun  5 21:19:05 2012
 New Revision: 1346596

 URL: http://svn.apache.org/viewvc?rev=1346596view=rev
 Log:
 Votes

 Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

 
 
  * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=52850
   Extend memory leak prevention and detection code to
   work with IBM as well as Oracle JVMs. Based on patch provided by Rohit 
 Kelapure.
   https://issues.apache.org/bugzilla/attachment.cgi?id=28893
 -  +1: kkolinko
 +  +1: kkolinko, schultz
   -1:
 +
 +  schultz: it seems reasonable also to back-port the removal of 
 null-checking due to use of NoSuch(Field|Method)Exception
 
 Can you be more specific?  All those removals should already be in the patch.
 
 In more detail:
 - The patch is r1298986 + r1346519
 - The null checks that I removed in r1346519 were all in the code
 added in r1298986.  So maybe that is why they are not visible in this
 proposal.

I think what I was looking at was old line 2209 and new line 2225 in
https://issues.apache.org/bugzilla/attachment.cgi?id=28893action=diff
where there is a null-check against target. At first glance, that
looked like a Field but now I see that it is an Object whose field is
being fetched.

So it looks like I spoke too soon without reading enough.

Apologies for the noise. I will remove the comment from STATUS.txt.

-chris



signature.asc
Description: OpenPGP digital signature


svn commit: r1346693 - in /tomcat/tc7.0.x/trunk: modules/ webapps/docs/changelog.xml

2012-06-05 Thread fhanik
Author: fhanik
Date: Wed Jun  6 01:13:06 2012
New Revision: 1346693

URL: http://svn.apache.org/viewvc?rev=1346693view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53367

Modified:
tomcat/tc7.0.x/trunk/modules/   (props changed)
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/modules/
--
--- svn:externals (original)
+++ svn:externals Wed Jun  6 01:13:06 2012
@@ -1 +1 @@
-^/tomcat/trunk/modules/jdbc-pool@1342500 jdbc-pool
+^/tomcat/trunk/modules/jdbc-pool@1346691 jdbc-pool

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1346693r1=1346692r2=1346693view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Wed Jun  6 01:13:06 2012
@@ -319,6 +319,10 @@
   /subsection
   subsection name=jdbc-pool
 changelog
+  update
+bug53367/bug (rev1346691/rev):
+Prevent pool from hanging during database failure (fhanik)
+  /update  
   add
 bug53254/bug (rev1340160/rev):
 Add in the ability to purge connections from the pool (fhanik)



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 53368] New: Running with SecurityManager: WebSocket examples need accessClassInPackage permission

2012-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53368

  Priority: P2
Bug ID: 53368
  Assignee: dev@tomcat.apache.org
   Summary: Running with SecurityManager: WebSocket examples need
accessClassInPackage permission
  Severity: minor
Classification: Unclassified
OS: Windows XP
  Reporter: knst.koli...@gmail.com
  Hardware: PC
Status: NEW
   Version: 7.0.27
 Component: Catalina
   Product: Tomcat 7

WebSocket examples fail to work if Tomcat 7 is run with SecurityManager
enabled.

They start to work correctly with the following change the policy file:

Index: catalina.policy
===
--- catalina.policy (revision 1346679)
+++ catalina.policy (working copy)
@@ -188,6 +188,7 @@

 // Applications using Comet need to be able to access this package
 permission java.lang.RuntimePermission
accessClassInPackage.org.apache.catalina.comet;
+permission java.lang.RuntimePermission
accessClassInPackage.org.apache.catalina.websocket;
 };


Steps to reproduce:
1. Start catalina.bat start -security

2. Go to Echo websocket example:
http://localhost:8080/examples/websocket/echo.html

3. Click (.) streams, then click [Connect] button.

Expected: The following message in console area:
Info: WebSocket connection opened.

Actual: The following message is printed:
Info: WebSocket connection closed.


The following exception is written to catalina*.log:
[[[
06.06.2012 4:54:20 org.apache.catalina.loader.WebappClassLoader findClass
WARNING: WebappClassLoader.findClassInternal(websocket.echo.EchoStream)
security exception: access denied (java.lang.RuntimePermission
accessClassInPackage.org.apache.catalina.websocket)
java.security.AccessControlException: access denied
(java.lang.RuntimePermission
accessClassInPackage.org.apache.catalina.websocket)
at
java.security.AccessControlContext.checkPermission(AccessControlContext.java:374)
at
java.security.AccessController.checkPermission(AccessController.java:546)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
at java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1512)
at java.lang.ClassLoader$1.run(ClassLoader.java:330)
at java.security.AccessController.doPrivileged(Native Method)
at java.lang.ClassLoader.checkPackageAccess(ClassLoader.java:328)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2889)
at
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1170)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1678)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556)
at
org.apache.catalina.core.StandardWrapper.servletSecurityAnnotationScan(StandardWrapper.java:1215)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:461)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:573)
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
]]]

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 53359] Request for Aliases or Alias as element inside Context

2012-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53359

--- Comment #3 from Christopher Schultz ch...@christopherschultz.net ---
There is no prohibition of any kind of whitespace (except maybe form-feed?) in
an attribute value. You only need to escape the standard  and  plus 
characters.

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1346695 - /tomcat/tc6.0.x/trunk/STATUS.txt

2012-06-05 Thread schultz
Author: schultz
Date: Wed Jun  6 01:22:11 2012
New Revision: 1346695

URL: http://svn.apache.org/viewvc?rev=1346695view=rev
Log:
Removed comment.

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1346695r1=1346694r2=1346695view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Jun  6 01:22:11 2012
@@ -179,8 +179,6 @@ PATCHES PROPOSED TO BACKPORT:
   https://issues.apache.org/bugzilla/attachment.cgi?id=28893
   +1: kkolinko, schultz
   -1:
-  
-  schultz: it seems reasonable also to back-port the removal of null-checking 
due to use of NoSuch(Field|Method)Exception
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53050
   Fix XOR arithmetics and charset issue when calculating entropy to



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 53366] Running with SecurityManager: protected/index.jsp returns blank page when it is the first page accessed

2012-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53366

--- Comment #1 from Konstantin Kolinko knst.koli...@gmail.com ---
I turned on fine logging for coyote, catalina and tomcat.

There are no stacktraces being printed.

The first notable difference between failed run with -security and
successful run without -security is that in the failed run I see

FINE: loadClass(javax.servlet.jsp.SkipPageException, false)

while on successful run I see no such class being loaded.


The second is that on successful run I see debug messages from
 org.apache.tomcat.util.buf.UEncoder
while on failed one I do not see them.

Looking into generated Java code, login_jsp.java,  I see the following block:

[[[
try {
  response.setContentType(text/html);
  pageContext = _jspxFactory.getPageContext(this, request, response,
  null, true, 8192, true);
  _jspx_page_context = pageContext;
  application = pageContext.getServletContext();
  config = pageContext.getServletConfig();
  session = pageContext.getSession();
  out = pageContext.getOut();
  _jspx_out = out;

  out.write(\r\n);
  out.write(html\r\n);
  out.write(head\r\n);
  out.write(titleLogin Page for Examples/title\r\n);
  out.write(body bgcolor=\white\\r\n);
  out.write(form method=\POST\ action=');
  out.print( response.encodeURL(j_security_check) );
  (...)
} catch (java.lang.Throwable t) {
  if (!(t instanceof javax.servlet.jsp.SkipPageException)){
out = _jspx_out;
if (out != null  out.getBufferSize() != 0)
  try { out.clearBuffer(); } catch (java.io.IOException e) {}
if (_jspx_page_context != null)
_jspx_page_context.handlePageException(t);
  }
} finally {
  _jspxFactory.releasePageContext(_jspx_page_context);
}
]]]


So, two conclusions:
1. The failure occurs above response.encodeURL(j_security_check) call.
2. I suspect that _jspx_page_context is null.  In that case the Throwable in
the catch block is silently swallowed.

This effect reminds me bug 48097,
https://issues.apache.org/bugzilla/show_bug.cgi?id=48097#c7

I think if (_jspx_page_context is null) we could write something to debug
logging, as these issues keep occurring and seeing a stacktrace should help.

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 53281] Tomcat returns garbage data with HTTP/0.9 200 OK header when SSL port is accessed using http

2012-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53281

--- Comment #3 from saurabh saurabhsul...@yahoo.co.in ---
Yes, Apache httpd does that. But I haven't been able to produce the same
behavior using JSSE in Apache Tomcat.

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 53370] New: Tomcat site - fix date in vulnerability pages for CVE-2009-0781

2012-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53370

  Priority: P2
Bug ID: 53370
  Assignee: dev@tomcat.apache.org
   Summary: Tomcat site - fix date in vulnerability pages for
CVE-2009-0781
  Severity: minor
Classification: Unclassified
OS: All
  Reporter: supera...@gmail.com
  Hardware: All
Status: NEW
   Version: unspecified
 Component: Documentation
   Product: Tomcat 6

14:04] gdfgdf http://svn.apache.org/viewvc?view=revisionrevision=1045265
[14:05] gdfgdf CVE-2009-0781 was made public 06 Mar 2009, not 03 Jun 2009
[14:11] pucko file a bug
[14:15] gdfgdf I was about to, but I didn't think it was that critical
[14:16] pucko then flag it as a minor. or leave a mail in the mailinglist I
guess.
[14:17] gdfgdf up to you, whatever you prefer. How is feedback for the
website usually given?
[14:24] pucko no idea. never done it myself, I think it's Mark who usually
does it. but he seems not to be online atm

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[GUMP@vmgump]: Project tomcat-trunk-validate (in module tomcat-trunk) failed

2012-06-05 Thread Bill Barker
To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at gene...@gump.apache.org.

Project tomcat-trunk-validate has an issue affecting its community integration.
This issue affects 1 projects,
 and has been outstanding for 5 runs.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- tomcat-trunk-validate :  Tomcat 8.x, a web server implementing Java 
Servlet 3.1,
...


Full details are available at:

http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-validate/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Dependency on checkstyle exists, no need to add for property 
checkstyle.jar.
 -INFO- Failed with reason build failed



The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-validate/gump_work/build_tomcat-trunk_tomcat-trunk-validate.html
Work Name: build_tomcat-trunk_tomcat-trunk-validate (Type: Build)
Work ended in a state of : Failed
Elapsed: 30 secs
Command Line: /usr/lib/jvm/java-6-openjdk/bin/java -Djava.awt.headless=true 
-Dbuild.sysclasspath=only org.apache.tools.ant.Main 
-Dgump.merge=/srv/gump/public/gump/work/merge.xml 
-Dcheckstyle.jar=/srv/gump/public/workspace/checkstyle/target/checkstyle-5.6-SNAPSHOT.jar
 -Dexecute.validate=true validate 
[Working Directory: /srv/gump/public/workspace/tomcat-trunk]
CLASSPATH: 
/usr/lib/jvm/java-6-openjdk/lib/tools.jar:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/checkstyle/target/checkstyle-5.6-SNAPSHOT.jar:/srv/gump/public/workspace/apache-commons/beanutils/dist/commons-beanutils-06062012.jar:/srv/gump/public/workspace/apache-commons/cli/target/commons-cli-1.3-SNAPSHOT.jar:/srv/gump/public/workspace/apache-commons/exec/target/commons-exec-1.1.1-SNAPSHOT.jar:/srv/gump/public/workspace/apache-commons/validator/dist/commons-validator-06062012.jar:/srv/gump/public/workspace/junit/dist/junit-06062012.jar:/srv/gump
 
/public/workspace/junit/dist/junit-dep-06062012.jar:/srv/gump/public/workspace/google-guava/guava/target/guava-12.0-SNAPSHOT.jar:/srv/gump/public/workspace/apache-commons/logging/target/commons-logging-06062012.jar:/srv/gump/public/workspace/apache-commons/logging/target/commons-logging-api-06062012.jar:/srv/gump/public/workspace/commons-collections-3.x/target/commons-collections-3.3-SNAPSHOT.jar:/srv/gump/packages/antlr/antlr-3.1.3.jar:/srv/gump/public/workspace/jdom/build/jdom.jar:/srv/gump/public/workspace/velocity-engine/bin/velocity-06062012.jar:/srv/gump/public/workspace/velocity-engine/bin/velocity-06062012-dep.jar:/srv/gump/packages/javamail-1.4/mail.jar:/srv/gump/packages/javamail-1.4/lib/mailapi.jar:/srv/gump/packages/jaf-1.1ea/activation.jar
-
Buildfile: /srv/gump/public/workspace/tomcat-trunk/build.xml

download-validate:

proxyflags:

setproxy:

testexist:
 [echo] Testing  for 
/srv/gump/public/workspace/checkstyle/target/checkstyle-5.6-SNAPSHOT.jar

downloadzip:

validate:
[mkdir] Created dir: 
/srv/gump/public/workspace/tomcat-trunk/output/res/checkstyle
[checkstyle] Running Checkstyle 5.6-SNAPSHOT on 2278 files
[checkstyle] 
/srv/gump/public/workspace/tomcat-trunk/java/org/apache/catalina/session/TooManyActiveSessionsException.java:35:
 Line matches the illegal pattern '\s+$'.
[checkstyle] 
/srv/gump/public/workspace/tomcat-trunk/java/org/apache/catalina/session/TooManyActiveSessionsException.java:44:
 Line matches the illegal pattern '\s+$'.
[checkstyle] 
/srv/gump/public/workspace/tomcat-trunk/java/org/apache/catalina/session/TooManyActiveSessionsException.java:47:
 Line matches the illegal pattern '\s+$'.

BUILD FAILED
/srv/gump/public/workspace/tomcat-trunk/build.xml:458: Got 3 errors and 0 
warnings.

Total time: 30 seconds
-

To subscribe to this information via syndicated feeds:
- RSS: 
http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-validate/rss.xml
- Atom: 
http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-validate/atom.xml

== Gump Tracking Only ===
Produced by Apache Gump(TM) version 2.3.
Gump Run 54060006062012, vmgump.apache.org:vmgump:54060006062012
Gump E-mail Identifier (unique within run) #39.

--
Apache Gump
http://gump.apache.org/ 

[Bug 53359] Request for Aliases or Alias as element inside Context

2012-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53359

--- Comment #4 from Esmond Pitt esmond.p...@bigpond.com ---
In that case Mark Thomas's solution is perfect. I would have thought you needed
to trim the whitespace anyway, to allow spaces after the commas as per many
programming habits ;-)

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[GUMP@vmgump]: Project tomcat-tc7.0.x-test (in module tomcat-7.0.x) failed

2012-06-05 Thread Bill Barker
To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at gene...@gump.apache.org.

Project tomcat-tc7.0.x-test has an issue affecting its community integration.
This issue affects 1 projects,
 and has been outstanding for 4 runs.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- tomcat-tc7.0.x-test :  Tomcat 7.x, a web server implementing Java Servlet 
3.0,
...


Full details are available at:

http://vmgump.apache.org/gump/public/tomcat-7.0.x/tomcat-tc7.0.x-test/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Dependency on tomcat-tc7.0.x-dbcp exists, no need to add for property 
tomcat-dbcp-src.jar.
 -DEBUG- Dependency on commons-daemon exists, no need to add for property 
commons-daemon.native.src.tgz.
 -DEBUG- Dependency on commons-daemon exists, no need to add for property 
tomcat-native.tar.gz.
 -DEBUG- Dependency on tomcat-tc7.0.x-dbcp exists, no need to add for property 
tomcat-dbcp.home.
 -INFO- Failed with reason build failed
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-7.0.x/output/build/logs



The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-7.0.x/tomcat-tc7.0.x-test/gump_work/build_tomcat-7.0.x_tomcat-tc7.0.x-test.html
Work Name: build_tomcat-7.0.x_tomcat-tc7.0.x-test (Type: Build)
Work ended in a state of : Failed
Elapsed: 23 mins 8 secs
Command Line: /usr/lib/jvm/java-6-openjdk/bin/java -Djava.awt.headless=true 
-Dbuild.sysclasspath=only org.apache.tools.ant.Main 
-Dgump.merge=/srv/gump/public/gump/work/merge.xml 
-Djunit.jar=/srv/gump/public/workspace/junit/dist/junit-06062012.jar 
-Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-06062012-native-src.tar.gz
 
-Dtomcat-native.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-06062012-native-src.tar.gz
 -Dexamples.sources.skip=true 
-Dtomcat-dbcp.home=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps 
-Djdt.jar=/srv/gump/packages/eclipse/plugins/org.eclipse.jdt.core_3.4.2/jdtcore.jar
 
-Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-06062012.jar
 
-Dtomcat-dbcp-src.jar=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps/tomcat-dbcp-src.jar
 -Dtest.accesslog=true 
-Dcommons-pool.home=/srv/gump/public/workspace/commons-pool-1.x 
-Dcommons-dbcp.home=/
 srv/gump/public/workspace/commons-dbcp-1.x 
-Dtomcat-dbcp.jar=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps/tomcat-dbcp-06062012.jar
 test 
[Working Directory: /srv/gump/public/workspace/tomcat-7.0.x]
CLASSPATH: 
/usr/lib/jvm/java-6-openjdk/lib/tools.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-7.0.x/output/testclasses:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/servlet-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/outp
 
ut/build/lib/jsp-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/el-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina-ant.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/tomcat-coyote.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/jasper.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/jasper-el.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina-tribes.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina-ha.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/tomcat-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/tomcat-util.jar:/srv/gump/packages/eclipse/plugins/org.eclipse.jdt.core_3.4.2/jdtcore.jar:/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps/tomcat-dbcp-06062012.jar:/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-06062012.jar:/srv/gump/
 public/workspace/junit/dist/junit-06062012.jar
-
[junit] at 

[Bug 53047] JDBCRealm allRolesMode=authOnly still needs role table

2012-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53047

--- Comment #7 from Dennis Verbeek dverb...@hotmail.com ---
(In reply to comment #6)
 It isn't quite that simple. The application may still make a call to
 isUserInRole().

I suggest we define the result of that call as:
AUTH_ONLY_MODE = true
STRICT_AUTH_ONLY_MODE = false

 
 There may well be a special case for each realm if all of the following are
 true:
 - AUTH_ONLY_MODE or STRICT_AUTH_ONLY_MODE
 - the Realm uses separate attributes to define the role store
 - the role store attributes are undefined

Huh? #3 conflicts with #2.

 In this case, there is no need to look up the roles although an INFO log
 message on Realm start just to remind the admin what is going on wouldn't
 hurt.

Why create log messages if it is configured not to use the roles table?

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[GUMP@vmgump]: Project tomcat-trunk-test (in module tomcat-trunk) failed

2012-06-05 Thread Bill Barker
To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at gene...@gump.apache.org.

Project tomcat-trunk-test has an issue affecting its community integration.
This issue affects 1 projects,
 and has been outstanding for 17 runs.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- tomcat-trunk-test :  Tomcat 8.x, a web server implementing Java Servlet 
3.1,
...


Full details are available at:

http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Dependency on tomcat-trunk-dbcp exists, no need to add for property 
tomcat-dbcp-src.jar.
 -DEBUG- Dependency on commons-daemon exists, no need to add for property 
commons-daemon.native.src.tgz.
 -DEBUG- Dependency on commons-daemon exists, no need to add for property 
tomcat-native.tar.gz.
 -DEBUG- Dependency on tomcat-trunk-dbcp exists, no need to add for property 
tomcat-dbcp.home.
 -INFO- Failed with reason build failed
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-trunk/output/build/logs



The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test/gump_work/build_tomcat-trunk_tomcat-trunk-test.html
Work Name: build_tomcat-trunk_tomcat-trunk-test (Type: Build)
Work ended in a state of : Failed
Elapsed: 23 mins
Command Line: /usr/lib/jvm/java-6-openjdk/bin/java -Djava.awt.headless=true 
-Dbuild.sysclasspath=only org.apache.tools.ant.Main 
-Dgump.merge=/srv/gump/public/gump/work/merge.xml 
-Djunit.jar=/srv/gump/public/workspace/junit/dist/junit-06062012.jar 
-Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-06062012-native-src.tar.gz
 
-Dtomcat-native.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-06062012-native-src.tar.gz
 -Dexamples.sources.skip=true 
-Dtomcat-dbcp.home=/srv/gump/public/workspace/tomcat-trunk/tomcat-deps 
-Djdt.jar=/srv/gump/packages/eclipse/plugins/org.eclipse.jdt.core_3.4.2/jdtcore.jar
 
-Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-06062012.jar
 
-Dtomcat-dbcp-src.jar=/srv/gump/public/workspace/tomcat-trunk/tomcat-deps/tomcat-dbcp-src.jar
 -Dtest.accesslog=true 
-Dcommons-pool.home=/srv/gump/public/workspace/commons-pool-1.x 
-Dcommons-dbcp.home=/
 srv/gump/public/workspace/commons-dbcp-1.x 
-Dtomcat-dbcp.jar=/srv/gump/public/workspace/tomcat-trunk/tomcat-deps/tomcat-dbcp-06062012.jar
 test 
[Working Directory: /srv/gump/public/workspace/tomcat-trunk]
CLASSPATH: 
/usr/lib/jvm/java-6-openjdk/lib/tools.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-trunk/output/testclasses:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/servlet-api.jar:/srv/gump/public/workspace/tomcat-trunk/outp
 
ut/build/lib/jsp-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/el-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-ant.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-coyote.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jasper.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jasper-el.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-tribes.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-ha.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-jni.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-util.jar:/srv/gump/packages/javamail-1.4/mail.jar:/srv/gump/packages/javamail-1.4/lib/mailapi.jar:/srv/gump/packages/jaf-1.1ea/activation.jar:/srv/gump/packages/eclipse/plugins/org