[SECURITY] Tomcat 7 ignores @ServletSecurity annotations

2011-03-09 Thread Mark Thomas
The fix in Tomcat 7.0.10 was incomplete. @SecurityAnnotations are still
ignored when there are no security constraints defined in web.xml (a
typical use case).

There will be a Tomcat 7.0.11 release shortly to address this. In the
meantime, the workaround of specifying at least one security constraint
in web.xml can be used to trigger the scanning of @SecurityAnnotations.

Mark
on behalf of the Apache Tomcat security team


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



Re: [SECURITY] Tomcat 7 ignores @ServletSecurity annotations

2011-03-09 Thread Mark Thomas
On 09/03/2011 10:48, Mark Thomas wrote:
 The fix in Tomcat 7.0.10 was incomplete. @SecurityAnnotations are still
 ignored when there are no security constraints defined in web.xml (a
 typical use case).

This was missed by the unit tests due to the way I configured the
authenticator. I have a fix already and I'll add a unit test explicitly
for this before I commit it.

My current plan is as follows:
- add the unit test and fix for this issue
- fix any low hanging fruit in the Tomcat 7 open bug list
- run the unit tests and the TCK
- assuming they pass, tag the release
- call a vote

I hope to complete this today.

For obvious reasons, I'd like the vote to complete as quickly as possible.

Mark

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



svn commit: r1079739 - /tomcat/trunk/webapps/docs/changelog.xml

2011-03-09 Thread markt
Author: markt
Date: Wed Mar  9 10:56:40 2011
New Revision: 1079739

URL: http://svn.apache.org/viewvc?rev=1079739view=rev
Log:
This was only a partial fix.

Modified:
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1079739r1=1079738r2=1079739view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Wed Mar  9 10:56:40 2011
@@ -104,7 +104,8 @@
 the codeThreadLocalLeakPreventionListener/code is enabled. (markt) 
 
   /fix
   fix
-CVE-2011-1088: Donapos;t ignore @ServletSecurity annotations. (markt)
+CVE-2011-1088: Partial fix. Donapos;t ignore @ServletSecurity
+annotations. (markt)
   /fix
 /changelog
   /subsection



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



Re: [SECURITY] Tomcat 7 ignores @ServletSecurity annotations

2011-03-09 Thread Henri Gomez
2011/3/9 Mark Thomas ma...@apache.org:
 On 09/03/2011 10:48, Mark Thomas wrote:
 The fix in Tomcat 7.0.10 was incomplete. @SecurityAnnotations are still
 ignored when there are no security constraints defined in web.xml (a
 typical use case).

 This was missed by the unit tests due to the way I configured the
 authenticator. I have a fix already and I'll add a unit test explicitly
 for this before I commit it.

 My current plan is as follows:
 - add the unit test and fix for this issue
 - fix any low hanging fruit in the Tomcat 7 open bug list
 - run the unit tests and the TCK
 - assuming they pass, tag the release
 - call a vote

 I hope to complete this today.

 For obvious reasons, I'd like the vote to complete as quickly as possible.

My +1 for this

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



DO NOT REPLY [Bug 50883] StackOverflowError

2011-03-09 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50883

--- Comment #3 from Ashish dashashishku...@gmail.com 2011-03-09 06:04:14 EST 
---
Also one more observation is : We never got such error before we upgraded our
application from Tomcat 6.0.18 to Tomcat 6.0.29

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

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



svn commit: r1079752 - in /tomcat/trunk: java/org/apache/catalina/startup/ test/org/apache/catalina/core/ test/webapp-3.0-servletsecurity/ test/webapp-3.0-servletsecurity/WEB-INF/ webapps/docs/

2011-03-09 Thread markt
Author: markt
Date: Wed Mar  9 11:16:48 2011
New Revision: 1079752

URL: http://svn.apache.org/viewvc?rev=1079752view=rev
Log:
CVE-2011-1088
Complete the fix for this issue. The optimisation not to configure an 
authenticator of there were no security constraints meant that in that case 
@ServletSecurity annotations had no effect. The unit tests did not pick this up 
since they added an authenticator directly.
Add an explicit unit test for this scenario.

Added:
tomcat/trunk/test/webapp-3.0-servletsecurity/
tomcat/trunk/test/webapp-3.0-servletsecurity/WEB-INF/
tomcat/trunk/test/webapp-3.0-servletsecurity/WEB-INF/web.xml   (with props)
Modified:
tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
tomcat/trunk/test/org/apache/catalina/core/TestStandardWrapper.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java?rev=1079752r1=1079751r2=1079752view=diff
==
--- tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java Wed Mar  9 
11:16:48 2011
@@ -366,10 +366,7 @@ public class ContextConfig
  */
 protected synchronized void authenticatorConfig() {
 
-// Does this Context require an Authenticator?
-SecurityConstraint constraints[] = context.findConstraints();
-if ((constraints == null) || (constraints.length == 0))
-return;
+// Always need an authenticator to support @ServletSecurity annotations
 LoginConfig loginConfig = context.getLoginConfig();
 if (loginConfig == null) {
 loginConfig = DUMMY_LOGIN_CONFIG;

Modified: tomcat/trunk/test/org/apache/catalina/core/TestStandardWrapper.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/core/TestStandardWrapper.java?rev=1079752r1=1079751r2=1079752view=diff
==
--- tomcat/trunk/test/org/apache/catalina/core/TestStandardWrapper.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/core/TestStandardWrapper.java Wed Mar 
 9 11:16:48 2011
@@ -125,6 +125,24 @@ public class TestStandardWrapper extends
 doTestSecurityAnnotationsAddServlet(true);
 }
 
+public void testSecurityAnnotationsNoWebXmlConstraints() throws Exception {
+// Setup Tomcat instance
+Tomcat tomcat = getTomcatInstance();
+
+File appDir = new File(test/webapp-3.0-servletsecurity);
+tomcat.addWebapp(null, , appDir.getAbsolutePath());
+
+tomcat.start();
+
+ByteChunk bc = new ByteChunk();
+int rc;
+rc = getUrl(http://localhost:; + getPort() + /,
+bc, null, null);
+
+assertNull(bc.toString());
+assertEquals(403, rc);
+}
+
 private void doTestSecurityAnnotationsAddServlet(boolean useCreateServlet)
 throws Exception {
 

Added: tomcat/trunk/test/webapp-3.0-servletsecurity/WEB-INF/web.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/webapp-3.0-servletsecurity/WEB-INF/web.xml?rev=1079752view=auto
==
--- tomcat/trunk/test/webapp-3.0-servletsecurity/WEB-INF/web.xml (added)
+++ tomcat/trunk/test/webapp-3.0-servletsecurity/WEB-INF/web.xml Wed Mar  9 
11:16:48 2011
@@ -0,0 +1,48 @@
+?xml version=1.0 encoding=ISO-8859-1?
+!--
+  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.
+--
+web-app xmlns=http://java.sun.com/xml/ns/javaee;
+  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
+  xsi:schemaLocation=http://java.sun.com/xml/ns/javaee
+  http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd;
+  version=3.0  
+
+  !--
+WARNING:
+For the unit tests to work correctly, no security constraints may be
+configured in the web.xml. A login-config section is permitted but not
+necessary for the tests. Adding a login-config would require changing the
+return code checked in the 

svn commit: r1079755 - in /tomcat/trunk: conf/catalina.policy webapps/docs/changelog.xml

2011-03-09 Thread markt
Author: markt
Date: Wed Mar  9 11:38:38 2011
New Revision: 1079755

URL: http://svn.apache.org/viewvc?rev=1079755view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50854
Add additional permissions required by the Manager application when running 
under a security Manager and support a shared Manager installation when 
$CATALINA_HOME != CATALINA_BASE.

Modified:
tomcat/trunk/conf/catalina.policy
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/conf/catalina.policy
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/conf/catalina.policy?rev=1079755r1=1079754r2=1079755view=diff
==
--- tomcat/trunk/conf/catalina.policy (original)
+++ tomcat/trunk/conf/catalina.policy Wed Mar  9 11:38:38 2011
@@ -187,11 +187,24 @@ grant {
 
 
 // The Manager application needs access to the following packages to support 
the
-// session display functionality
+// session display functionality. These settings support the following
+// configurations:
+// - default CATALINA_HOME == CATALINA_BASE
+// - CATALINA_HOME != CATALINA_BASE, per instance Manager in CATALINA_BASE
+// - CATALINA_HOME != CATALINA_BASE, shared Manager in CATALINA_HOME
 grant codeBase file:${catalina.base}/webapps/manager/- {
 permission java.lang.RuntimePermission 
accessClassInPackage.org.apache.catalina;
+permission java.lang.RuntimePermission 
accessClassInPackage.org.apache.catalina.ha.session;
 permission java.lang.RuntimePermission 
accessClassInPackage.org.apache.catalina.manager;
 permission java.lang.RuntimePermission 
accessClassInPackage.org.apache.catalina.manager.util;
+permission java.lang.RuntimePermission 
accessClassInPackage.org.apache.catalina.util;
+};
+grant codeBase file:${catalina.home}/webapps/manager/- {
+permission java.lang.RuntimePermission 
accessClassInPackage.org.apache.catalina;
+permission java.lang.RuntimePermission 
accessClassInPackage.org.apache.catalina.ha.session;
+permission java.lang.RuntimePermission 
accessClassInPackage.org.apache.catalina.manager;
+permission java.lang.RuntimePermission 
accessClassInPackage.org.apache.catalina.manager.util;
+permission java.lang.RuntimePermission 
accessClassInPackage.org.apache.catalina.util;
 };
 
 // You can assign additional permissions to particular web applications by

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1079755r1=1079754r2=1079755view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Wed Mar  9 11:38:38 2011
@@ -30,7 +30,7 @@
 author email=kkoli...@apache.orgKonstantin Kolinko/author
 author email=p...@apache.orgPeter Rossbach/author
 author email=kfuj...@apache.orgKeiichi Fujino/author
-author email=t...@apache.orgTim Whittington/author
+author email=t...@apache.orgTim Whittington/author   
 author email=mt...@apache.orgMladen Turk/author
 author email=schu...@apache.orgChristopher Schultz/author
 author email=slaur...@apache.orgSylvain Laurent/author
@@ -69,6 +69,11 @@
 to make request data swallowing configurable for requests
 that are too large. (rjung)
   /add
+  fix
+bug50854/bug: Add additional permissions required by the Manager
+application when running under a security Manager and support a shared
+Manager installation when $CATALINA_HOME != CATALINA_BASE. (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



DO NOT REPLY [Bug 50854] Additional catalina.policy entries for when Security Manager enabled, for session display functionality

2011-03-09 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50854

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

   What|Removed |Added

  Component|Manager |Manager application
Version|unspecified |6.0.32
Product|Tomcat 7|Tomcat 6
   Target Milestone|--- |default

--- Comment #1 from Mark Thomas ma...@apache.org 2011-03-09 06:39:22 EST ---
Thanks for the report.

This has been fixed in trunk and will be included in 7.0.11 onwards.

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

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



svn commit: r1079769 - in /tomcat/trunk: java/org/apache/catalina/core/StandardWrapper.java java/org/apache/catalina/startup/ContextConfig.java test/webapp-3.0/WEB-INF/web.xml

2011-03-09 Thread markt
Author: markt
Date: Wed Mar  9 12:20:58 2011
New Revision: 1079769

URL: http://svn.apache.org/viewvc?rev=1079769view=rev
Log:
CVE-2011-1088
Fix unit test failures

Modified:
tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java
tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
tomcat/trunk/test/webapp-3.0/WEB-INF/web.xml

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java?rev=1079769r1=1079768r2=1079769view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java Wed Mar  9 
12:20:58 2011
@@ -1145,9 +1145,14 @@ public class StandardWrapper extends Con
 // Calling this twice isn't harmful so no syncs
 servletSecurityAnnotationScanRequired = false;
 
+Context ctxt = (Context) getParent();
+
+if (ctxt.getIgnoreAnnotations()) {
+return;
+}
+
 ServletSecurity secAnnotation =
 servlet.getClass().getAnnotation(ServletSecurity.class);
-Context ctxt = (Context) getParent();
 if (secAnnotation != null) {
 ctxt.addServletSecurity(
 new ApplicationServletRegistration(this, ctxt),

Modified: tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java?rev=1079769r1=1079768r2=1079769view=diff
==
--- tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java Wed Mar  9 
12:20:58 2011
@@ -366,11 +366,16 @@ public class ContextConfig
  */
 protected synchronized void authenticatorConfig() {
 
-// Always need an authenticator to support @ServletSecurity annotations
 LoginConfig loginConfig = context.getLoginConfig();
 if (loginConfig == null) {
-loginConfig = DUMMY_LOGIN_CONFIG;
-context.setLoginConfig(loginConfig);
+if (context.getIgnoreAnnotations())  {
+return;
+} else {
+// Not metadata-complete, need an authenticator to support
+// @ServletSecurity annotations
+loginConfig = DUMMY_LOGIN_CONFIG;
+context.setLoginConfig(loginConfig);
+}
 }
 
 // Has an authenticator been configured already?

Modified: tomcat/trunk/test/webapp-3.0/WEB-INF/web.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/webapp-3.0/WEB-INF/web.xml?rev=1079769r1=1079768r2=1079769view=diff
==
--- tomcat/trunk/test/webapp-3.0/WEB-INF/web.xml (original)
+++ tomcat/trunk/test/webapp-3.0/WEB-INF/web.xml Wed Mar  9 12:20:58 2011
@@ -113,4 +113,7 @@
 
url-pattern/testStandardWrapper/securityAnnotationsMetaDataPriority/url-pattern
  
   /servlet-mapping
 
+  login-config
+auth-methodBASIC/auth-method
+  /login-config
 /web-app
\ No newline at end of file



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



DO NOT REPLY [Bug 50900] New: EL converts NULL-values of wrapper-classes to the default-value of their unboxed counterparts

2011-03-09 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50900

   Summary: EL converts NULL-values of wrapper-classes to the
default-value of their unboxed counterparts
   Product: Tomcat 7
   Version: 7.0.10
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: Jasper
AssignedTo: dev@tomcat.apache.org
ReportedBy: gerdo...@arcor.de


JSF2 application:

At least for version 7.0.10 it seems not possible to submit NULL-values for
java-built-in-wrappers like Byte/Integer etc, even if
javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is set to TRUE

This behavior can easily reproduced with any (session-scoped) bean that holds
some property of the above mentioned type.

It is very unlikely that Hardware or OS has any influence in this respect,
'cause this problem doesn't occur with the EL2.2-implementation from SUN, which
i had used formerly for tomcat 6.0.x-branch

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

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



DO NOT REPLY [Bug 50900] EL converts NULL-values of wrapper-classes to the default-value of their unboxed counterparts

2011-03-09 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50900

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

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID

--- Comment #1 from Mark Thomas ma...@apache.org 2011-03-09 07:59:02 EST ---
This is specification mandated behaviour. It can be over-ridden with
-Dorg.apache.el.parser.COERCE_TO_ZERO=false

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

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



svn commit: r1079781 - in /tomcat/trunk: res/welcome.bin.html res/welcome.main.html webapps/docs/changelog.xml webapps/docs/extras.xml

2011-03-09 Thread markt
Author: markt
Date: Wed Mar  9 13:05:05 2011
New Revision: 1079781

URL: http://svn.apache.org/viewvc?rev=1079781view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50893
Additional information for extras package

Modified:
tomcat/trunk/res/welcome.bin.html
tomcat/trunk/res/welcome.main.html
tomcat/trunk/webapps/docs/changelog.xml
tomcat/trunk/webapps/docs/extras.xml

Modified: tomcat/trunk/res/welcome.bin.html
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/res/welcome.bin.html?rev=1079781r1=1079780r2=1079781view=diff
==
--- tomcat/trunk/res/welcome.bin.html (original)
+++ tomcat/trunk/res/welcome.bin.html Wed Mar  9 13:05:05 2011
@@ -64,13 +64,27 @@ RELEASE-NOTES and the RUNNING.txt file i
 wrapper and the compiled APR/native library for use with 64-bit JVMs on
 Itanium 64-bit Windows platforms./dd
   dtapache-tomcat-[version]-deployer.zip or .tar.gz/dt
-ddThe standalone Tomcat Web Application Deployer./dd
+ddThe standalone
+a 
href=http://tomcat.apache.org/tomcat-@VERSION_MAJOR_MINOR@-doc/deployer-howto.html;
+Tomcat Web Application Deployer/a./dd
   dtapache-tomcat-[version]-fulldocs.tar.gz/dt
 ddThe Tomcat documentation bundle, including complete javadocs./dd
 /dl/dd
 dtbbin/extras//b/dt
-ddAdditional components. See
-  a 
href=http://tomcat.apache.org/tomcat-@VERSION_MAJOR_MINOR@-doc/extras.html;documentation/a./dd
+dddl
+  dttomcat-juli-adapters.jar  tomcat-juli.jar/dt
+ddFull commons-logging implementation. See the a
+
href=http://tomcat.apache.org/tomcat-@VERSION_MAJOR_MINOR@-doc/logging.html;
+logging documentation/a for more information./dd
+  dtcatalina-ws.jar/dt
+ddWeb Services support (JSR 109). See the a
+
href=http://tomcat.apache.org/tomcat-@VERSION_MAJOR_MINOR@-doc/extras.html;
+extras documentation/a for more information./dd
+  dtcatalina-jmx-remote.jar/dt
+ddJMX Remote Lifecycle Listener. See the a
+
href=http://tomcat.apache.org/tomcat-@VERSION_MAJOR_MINOR@-doc/config/listeners.html;
+listeners documentation/a for details./dd
+/dl/dd  
 dtbsrc//b/dt
 dddl
   dtapache-tomcat-[version].zip or .tar.gz/dt

Modified: tomcat/trunk/res/welcome.main.html
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/res/welcome.main.html?rev=1079781r1=1079780r2=1079781view=diff
==
--- tomcat/trunk/res/welcome.main.html (original)
+++ tomcat/trunk/res/welcome.main.html Wed Mar  9 13:05:05 2011
@@ -64,13 +64,27 @@ RELEASE-NOTES and the RUNNING.txt file i
 wrapper and the compiled APR/native library for use with 64-bit JVMs on
 Itanium 64-bit Windows platforms./dd
   dtapache-tomcat-[version]-deployer.zip or .tar.gz/dt
-ddThe standalone Tomcat Web Application Deployer./dd
+ddThe standalone
+a 
href=http://tomcat.apache.org/tomcat-@VERSION_MAJOR_MINOR@-doc/deployer-howto.html;
+Tomcat Web Application Deployer/a./dd
   dtapache-tomcat-[version]-fulldocs.tar.gz/dt
 ddThe Tomcat documentation bundle, including complete javadocs./dd
 /dl/dd
 dtbbin/extras//b/dt
-ddAdditional components. See
-  a 
href=http://tomcat.apache.org/tomcat-@VERSION_MAJOR_MINOR@-doc/extras.html;documentation/a./dd
+dddl
+  dttomcat-juli-adapters.jar  tomcat-juli.jar/dt
+ddFull commons-logging implementation. See the a
+
href=http://tomcat.apache.org/tomcat-@VERSION_MAJOR_MINOR@-doc/logging.html;
+logging documentation/a for more information./dd
+  dtcatalina-ws.jar/dt
+ddWeb Services support (JSR 109). See the a
+
href=http://tomcat.apache.org/tomcat-@VERSION_MAJOR_MINOR@-doc/extras.html;
+extras documentation/a for more information./dd
+  dtcatalina-jmx-remote.jar/dt
+ddJMX Remote Lifecycle Listener. See the a
+
href=http://tomcat.apache.org/tomcat-@VERSION_MAJOR_MINOR@-doc/config/listeners.html;
+listeners documentation/a for details./dd
+/dl/dd  
 dtbsrc//b/dt
 dddl
   dtapache-tomcat-[version].zip or .tar.gz/dt

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1079781r1=1079780r2=1079781view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Wed Mar  9 13:05:05 2011
@@ -74,6 +74,10 @@
 application when running under a security Manager and support a shared
 Manager installation when $CATALINA_HOME != CATALINA_BASE. (markt)
   /fix
+  fix
+bug50893/bug: Add additional information to the download README for
+the extras components. (markt)
+  /fix
 /changelog
   /subsection
   subsection name=Coyote

Modified: tomcat/trunk/webapps/docs/extras.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/extras.xml?rev=1079781r1=1079780r2=1079781view=diff

DO NOT REPLY [Bug 50893] Extras etc documentation not easy to find

2011-03-09 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50893

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

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #1 from Mark Thomas ma...@apache.org 2011-03-09 08:05:19 EST ---
Additional links added. Will be in 7.0.11 onwards.

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

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



DO NOT REPLY [Bug 50883] StackOverflowError

2011-03-09 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50883

--- Comment #4 from Ashish dashashishku...@gmail.com 2011-03-09 08:39:38 EST 
---
Hi Mark sorry for sharing the information in multiple chunk.

From the org.apache.catalina.core.ApplicationDispatcher.java from the invoke
method is there any chance that the following lines of code may not execute and
we may be getting an ServletRequestWrapper object leading to the recursion.

ApplicationDispatcher.java(Line No : 722 to 725)
// Unwrap request/response if needed
// See Bugzilla 30949
unwrapRequest(state);
unwrapResponse(state);

Thanks 
Ashish

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

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



Re: Some remarks and observations from implementing disable swallowAbortedUploads

2011-03-09 Thread Mark Thomas
On 09/03/2011 05:41, Rainer Jung wrote:
 Hi all,
 
 some things I noticed while implementing the new switch:
 
 - o.a.c.connector.Request and Response hav methods finishRequest() resp.
 finishResponse(). The mehod in the request seems not to be called.
 Although that's not a big issue, because the omplementation is empty,
 one would run into trouble when starting to add code to it (at least I
 wondered why it wasn't working)

That looks like an oversight.

 - Should we keep the swallow default in TC 7 (default is do swallow,
 i.e. read all of the remaining bytes, thereby keeping the thread busy
 for a possibly long time but also keeping browsers happy which will
 otherwise most likely not read the response). I'd say keep swallowing
 but had the impression that Mark is more concerned about it and prefers
 the do not swallow default.

I thought the default was do not swallow. The important thing is that
this patch doesn't change the default.

From a performance point of view, I think do not swallow and close the
connection is the right thing to do.

 - Domain and path of the session cookie are listed in config/context.xml
 as configurable per context. The name is not listed, although the setter
 is there and the value is respected in ApplicationSessionCookieConfig.
 Is this an oversight? Should I add the name to the context parameter
 list in the docs?

Yep, that is an oversight. If you could add it that would be great.

Mark

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



svn commit: r1079801 - in /tomcat/trunk: java/org/apache/jasper/compiler/ELFunctionMapper.java webapps/docs/changelog.xml

2011-03-09 Thread markt
Author: markt
Date: Wed Mar  9 13:52:07 2011
New Revision: 1079801

URL: http://svn.apache.org/viewvc?rev=1079801view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50895
Don't initialize classes during compilation

Modified:
tomcat/trunk/java/org/apache/jasper/compiler/ELFunctionMapper.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/jasper/compiler/ELFunctionMapper.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/ELFunctionMapper.java?rev=1079801r1=1079800r2=1079801view=diff
==
--- tomcat/trunk/java/org/apache/jasper/compiler/ELFunctionMapper.java 
(original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/ELFunctionMapper.java Wed Mar  
9 13:52:07 2011
@@ -312,7 +312,7 @@ public class ELFunctionMapper {
 }
 
 try {
-clazz = Class.forName(className, true, tccl);
+clazz = Class.forName(className, false, tccl);
 } catch (ClassNotFoundException e) {
 throw new JasperException(e);
 }

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1079801r1=1079800r2=1079801view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Wed Mar  9 13:52:07 2011
@@ -94,6 +94,10 @@
 Correct possible threading issue in JSP compilation when development
 mode is used. (markt)
   /fix
+  fix
+bug50895/bug: Donapos;t initialize classes created during the
+compilation stage. (markt)
+  /fix
 /changelog
   /subsection
 /section



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



DO NOT REPLY [Bug 50895] JSP compiler initializes classes during compile which can result in failures

2011-03-09 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50895

--- Comment #4 from Mark Thomas ma...@apache.org 2011-03-09 08:52:28 EST ---
Yep, that is a really ugly example but I take the point.

Fixed in 7.0.x and will be included in 7.0.11 onwards.

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

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



Re: Some remarks and observations from implementing disable swallowAbortedUploads

2011-03-09 Thread Rainer Jung

On 09.03.2011 14:46, Mark Thomas wrote:

On 09/03/2011 05:41, Rainer Jung wrote:

Hi all,

some things I noticed while implementing the new switch:

- o.a.c.connector.Request and Response hav methods finishRequest() resp.
finishResponse(). The mehod in the request seems not to be called.
Although that's not a big issue, because the omplementation is empty,
one would run into trouble when starting to add code to it (at least I
wondered why it wasn't working)


That looks like an oversight.


Any idea about a good place from where to call? finishResponse is called 
from CoyoteAdapter and CometEventImpl. At least we could call 
request.finishRequest() form inside response.finishResponse().



- Should we keep the swallow default in TC 7 (default is do swallow,
i.e. read all of the remaining bytes, thereby keeping the thread busy
for a possibly long time but also keeping browsers happy which will
otherwise most likely not read the response). I'd say keep swallowing
but had the impression that Mark is more concerned about it and prefers
the do not swallow default.


I thought the default was do not swallow. The important thing is that
this patch doesn't change the default.


Terminology: AbstractInputBuffer has a flag called swallowInput, which 
is true by default. True means: read additional data after the end of 
the response (drain the connection). This default is not changed.


Our new config item is called swallowAbortedUploads, again default is 
true, i.e. drain the connection until no more data. Unchanged from 
before the patch.



 From a performance point of view, I think do not swallow and close the
connection is the right thing to do.


OK, so that's something the admin or dev has to enable explicitely via 
the config.



- Domain and path of the session cookie are listed in config/context.xml
as configurable per context. The name is not listed, although the setter
is there and the value is respected in ApplicationSessionCookieConfig.
Is this an oversight? Should I add the name to the context parameter
list in the docs?


Yep, that is an oversight. If you could add it that would be great.


Will do.

Regards,

Rainer

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



svn commit: r1079806 - /tomcat/trunk/webapps/docs/config/context.xml

2011-03-09 Thread rjung
Author: rjung
Date: Wed Mar  9 14:07:53 2011
New Revision: 1079806

URL: http://svn.apache.org/viewvc?rev=1079806view=rev
Log:
Add forgotten attribute sessionCookieName to context config docs.

Modified:
tomcat/trunk/webapps/docs/config/context.xml

Modified: tomcat/trunk/webapps/docs/config/context.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/context.xml?rev=1079806r1=1079805r2=1079806view=diff
==
--- tomcat/trunk/webapps/docs/config/context.xml (original)
+++ tomcat/trunk/webapps/docs/config/context.xml Wed Mar  9 14:07:53 2011
@@ -333,6 +333,14 @@
 used./p
   /attribute
   
+  attribute name=sessionCookieName required=false
+pThe name to be used for all session cookies created for this
+context. If set, this overrides any name set by the web application.
+If not set, the value specified by the web application, if any, will be
+used, or the name codeJSESSIONID/code if the web application does
+not explicitly set one./p
+  /attribute
+  
   attribute name=sessionCookiePath required=false
 pThe path to be used for all session cookies created for this
 context. If set, this overrides any path set by the web application.



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



Re: [SECURITY] Tomcat 7 ignores @ServletSecurity annotations

2011-03-09 Thread Mark Thomas
On 09/03/2011 11:00, Henri Gomez wrote:
 2011/3/9 Mark Thomas ma...@apache.org:
 On 09/03/2011 10:48, Mark Thomas wrote:
 The fix in Tomcat 7.0.10 was incomplete. @SecurityAnnotations are still
 ignored when there are no security constraints defined in web.xml (a
 typical use case).

 This was missed by the unit tests due to the way I configured the
 authenticator. I have a fix already and I'll add a unit test explicitly
 for this before I commit it.


FYI...

 My current plan is as follows:
 - add the unit test and fix for this issue
Done.
 - fix any low hanging fruit in the Tomcat 7 open bug list
Done.
 - run the unit tests and the TCK
Found some problems. Fixing now...

 - assuming they pass, tag the release
 - call a vote

Mark

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



svn commit: r1079819 - /tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java

2011-03-09 Thread markt
Author: markt
Date: Wed Mar  9 14:48:29 2011
New Revision: 1079819

URL: http://svn.apache.org/viewvc?rev=1079819view=rev
Log:
Fix some test failures.
Don't use load() since that creates a whole bunch of edge cases that need to be 
handled.

Modified:
tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java?rev=1079819r1=1079818r2=1079819view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java Wed Mar  9 
14:48:29 2011
@@ -1089,7 +1089,7 @@ public class StandardWrapper extends Con
 }
 }
 
-processServletSecurityAnnotation(servlet);
+processServletSecurityAnnotation(servlet.getClass());
 
 // Special handling for ContainerServlet instances
 if ((servlet instanceof ContainerServlet) 
@@ -1129,19 +1129,26 @@ public class StandardWrapper extends Con
 
 /**
  * {@inheritDoc}
+ * @throws ClassNotFoundException 
  */
 @Override
 public void servletSecurityAnnotationScan() throws ServletException {
 if (instance == null) {
-load();
+Class? clazz = null;
+try {
+clazz = getParentClassLoader().loadClass(getServletClass());
+processServletSecurityAnnotation(clazz);
+} catch (ClassNotFoundException e) {
+// Safe to ignore. No class means no annotations to process
+}
 } else {
 if (servletSecurityAnnotationScanRequired) {
-processServletSecurityAnnotation(instance);
+processServletSecurityAnnotation(instance.getClass());
 }
 }
 }
 
-private void processServletSecurityAnnotation(Servlet servlet) {
+private void processServletSecurityAnnotation(Class? clazz) {
 // Calling this twice isn't harmful so no syncs
 servletSecurityAnnotationScanRequired = false;
 
@@ -1152,7 +1159,7 @@ public class StandardWrapper extends Con
 }
 
 ServletSecurity secAnnotation =
-servlet.getClass().getAnnotation(ServletSecurity.class);
+clazz.getAnnotation(ServletSecurity.class);
 if (secAnnotation != null) {
 ctxt.addServletSecurity(
 new ApplicationServletRegistration(this, ctxt),



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



DO NOT REPLY [Bug 50700] Context parameters are being overridden with parameters from the web application deployment descriptor

2011-03-09 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50700

Oliver oli...@vdb.de changed:

   What|Removed |Added

 CC||oli...@vdb.de

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

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



svn commit: r1079822 - /tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java

2011-03-09 Thread markt
Author: markt
Date: Wed Mar  9 15:00:07 2011
New Revision: 1079822

URL: http://svn.apache.org/viewvc?rev=1079822view=rev
Log:
Fix TCK test failure under a security Manager

Modified:
tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java

Modified: tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java?rev=1079822r1=1079821r2=1079822view=diff
==
--- tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/security/SecurityClassLoad.java Wed 
Mar  9 15:00:07 2011
@@ -40,6 +40,7 @@ public final class SecurityClassLoad {
 loadCorePackage(loader);
 loadCoyotePackage(loader);
 loadLoaderPackage(loader);
+loadRealmPackage(loader);
 loadSessionPackage(loader);
 loadUtilPackage(loader);
 loadJavaxPackage(loader);
@@ -105,6 +106,14 @@ public final class SecurityClassLoad {
 }
 
 
+private static final void loadRealmPackage(ClassLoader loader)
+throws Exception {
+final String basePackage = org.apache.catalina.realm.;
+loader.loadClass
+(basePackage + LockOutRealm$LockRecord);
+}
+
+
 private static final void loadSessionPackage(ClassLoader loader)
 throws Exception {
 final String basePackage = org.apache.catalina.session.;



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



svn commit: r1079839 - /tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java

2011-03-09 Thread markt
Author: markt
Date: Wed Mar  9 15:34:51 2011
New Revision: 1079839

URL: http://svn.apache.org/viewvc?rev=1079839view=rev
Log:
Better overriding support

Modified:
tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java?rev=1079839r1=1079838r2=1079839view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java Wed Mar  9 
15:34:51 2011
@@ -1133,7 +1133,7 @@ public class StandardWrapper extends Con
  */
 @Override
 public void servletSecurityAnnotationScan() throws ServletException {
-if (instance == null) {
+if (getServlet() == null) {
 Class? clazz = null;
 try {
 clazz = getParentClassLoader().loadClass(getServletClass());
@@ -1143,7 +1143,7 @@ public class StandardWrapper extends Con
 }
 } else {
 if (servletSecurityAnnotationScanRequired) {
-processServletSecurityAnnotation(instance.getClass());
+processServletSecurityAnnotation(getServlet().getClass());
 }
 }
 }



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



svn commit: r1079840 - /tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java

2011-03-09 Thread markt
Author: markt
Date: Wed Mar  9 15:35:18 2011
New Revision: 1079840

URL: http://svn.apache.org/viewvc?rev=1079840view=rev
Log:
Fix some unit test failures

Modified:
tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java

Modified: tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java?rev=1079840r1=1079839r2=1079840view=diff
==
--- tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java Wed Mar  9 
15:35:18 2011
@@ -759,6 +759,14 @@ public class Tomcat {
 public boolean isUnavailable() {
 return false;   
 }
+@Override
+public Servlet getServlet() {
+return existing;
+}
+@Override
+public String getServletClass() {
+return existing.getClass().getName();
+}
 }
 
 /**



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



Re: Where do we stand with maven publishing?

2011-03-09 Thread Filip Hanik - Dev Lists

On 03/05/2011 09:49 AM, Henri Gomez wrote:

And what about jdbc pool on Maven Central ?
   

I want to, but it needs to pass a release first

Filip

2011/3/4 Filip Hanik - Dev Listsdevli...@hanik.com:
   

Where do we stand with publishing Tomcat jars/artifacts to a Maven
repository.
I see that the mvn-pub.xml has been updated, but I don't see where the
source JARs are generated from.



best
Filip

-
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


   



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



svn commit: r1079891 - in /tomcat/trunk/java/org/apache/catalina: ha/session/DeltaSession.java session/StandardSession.java

2011-03-09 Thread rjung
Author: rjung
Date: Wed Mar  9 17:09:50 2011
New Revision: 1079891

URL: http://svn.apache.org/viewvc?rev=1079891view=rev
Log:
Session attributes were only partially changed from Hashtable to 
ConcurrentHashMap.

Modified:
tomcat/trunk/java/org/apache/catalina/ha/session/DeltaSession.java
tomcat/trunk/java/org/apache/catalina/session/StandardSession.java

Modified: tomcat/trunk/java/org/apache/catalina/ha/session/DeltaSession.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/session/DeltaSession.java?rev=1079891r1=1079890r2=1079891view=diff
==
--- tomcat/trunk/java/org/apache/catalina/ha/session/DeltaSession.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/ha/session/DeltaSession.java Wed Mar  
9 17:09:50 2011
@@ -28,6 +28,7 @@ import java.io.Serializable;
 import java.security.Principal;
 import java.util.ArrayList;
 import java.util.Hashtable;
+import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
@@ -674,7 +675,7 @@ public class DeltaSession extends Standa
 if (log.isDebugEnabled()) 
log.debug(sm.getString(deltaSession.readSession, id));
 
 // Deserialize the attribute count and attribute values
-if (attributes == null) attributes = new HashtableString, Object();
+if (attributes == null) attributes = new ConcurrentHashMapString, 
Object();
 int n = ( (Integer) stream.readObject()).intValue();
 boolean isValidSave = isValid;
 isValid = true;

Modified: tomcat/trunk/java/org/apache/catalina/session/StandardSession.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/StandardSession.java?rev=1079891r1=1079890r2=1079891view=diff
==
--- tomcat/trunk/java/org/apache/catalina/session/StandardSession.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/session/StandardSession.java Wed Mar  
9 17:09:50 2011
@@ -1578,7 +1578,7 @@ public class StandardSession implements 
 
 // Deserialize the attribute count and attribute values
 if (attributes == null)
-attributes = new HashtableString, Object();
+attributes = new ConcurrentHashMapString, Object();
 int n = ((Integer) stream.readObject()).intValue();
 boolean isValidSave = isValid;
 isValid = true;



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



Re: [VOTE] Release jdbc-pool 1.1.0.1

2011-03-09 Thread Filip Hanik - Dev Lists

ping! jdbc-pool needs a bit vote tlc

On 03/03/2011 12:24 PM, Filip Hanik - Dev Lists wrote:

Source and Binary Packages
http://people.apache.org/~fhanik/jdbc-pool/v1.1.0.1/

Tag
http://svn.apache.org/repos/asf/tomcat/tags/JDBC_POOL_1_1_0_1/

Documentation
http://people.apache.org/~fhanik/jdbc-pool/jdbc-pool.html

The proposed 1.1.0.1 release is:

[ ] Broken - do not release
[ ] Alpha  - go ahead and release as 1.1.0.1 Alpha
[ ] Beta   - go ahead and release as 1.1.0.1 Beta
[ ] Stable - go ahead and release as 1.1.0.1 Stable

best
Filip

-
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



svn commit: r1079903 - /tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java

2011-03-09 Thread markt
Author: markt
Date: Wed Mar  9 17:27:02 2011
New Revision: 1079903

URL: http://svn.apache.org/viewvc?rev=1079903view=rev
Log:
Speed up unit tests on Linux

Modified:
tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java

Modified: tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java?rev=1079903r1=1079902r2=1079903view=diff
==
--- tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java (original)
+++ tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java Wed Mar  
9 17:27:02 2011
@@ -133,6 +133,7 @@ public abstract class TomcatBaseTest ext
 if (protocol.contains(Apr)) {
 StandardServer server = (StandardServer) tomcat.getServer();
 AprLifecycleListener listener = new AprLifecycleListener();
+listener.setSSLRandomSeed(/dev/urandom);
 server.addLifecycleListener(listener);
 connector.setAttribute(pollerThreadCount, Integer.valueOf(1));
 }



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



svn commit: r1079917 - /tomcat/trunk/test/org/apache/catalina/connector/TestMaxConnections.java

2011-03-09 Thread markt
Author: markt
Date: Wed Mar  9 18:30:07 2011
New Revision: 1079917

URL: http://svn.apache.org/viewvc?rev=1079917view=rev
Log:
Try and make test pass more reliably. This works an 8-core Windows box and a 
1-core Linux VM

Modified:
tomcat/trunk/test/org/apache/catalina/connector/TestMaxConnections.java

Modified: 
tomcat/trunk/test/org/apache/catalina/connector/TestMaxConnections.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/connector/TestMaxConnections.java?rev=1079917r1=1079916r2=1079917view=diff
==
--- tomcat/trunk/test/org/apache/catalina/connector/TestMaxConnections.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/connector/TestMaxConnections.java Wed 
Mar  9 18:30:07 2011
@@ -130,7 +130,7 @@ public class TestMaxConnections extends 
 @Override
 protected void service(HttpServletRequest req, HttpServletResponse 
resp) throws ServletException, IOException {
 try {
-Thread.sleep(TestMaxConnections.soTimeout/2);
+Thread.sleep(TestMaxConnections.soTimeout*4/5);
 }catch (InterruptedException x) {
 
 }



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



svn commit: r1079930 - in /tomcat/trunk: java/org/apache/catalina/core/StandardService.java webapps/docs/changelog.xml

2011-03-09 Thread markt
Author: markt
Date: Wed Mar  9 18:49:02 2011
New Revision: 1079930

URL: http://svn.apache.org/viewvc?rev=1079930view=rev
Log:
Fix exception destroying a stopped connector.

Modified:
tomcat/trunk/java/org/apache/catalina/core/StandardService.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardService.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardService.java?rev=1079930r1=1079929r2=1079930view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/StandardService.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardService.java Wed Mar  9 
18:49:02 2011
@@ -304,7 +304,7 @@ public class StandardService extends Lif
 }
 if (j  0)
 return;
-if (getState().isAvailable()) {
+if (connectors[j].getState().isAvailable()) {
 try {
 connectors[j].stop();
 } catch (LifecycleException e) {

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1079930r1=1079929r2=1079930view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Wed Mar  9 18:49:02 2011
@@ -78,6 +78,10 @@
 bug50893/bug: Add additional information to the download README for
 the extras components. (markt)
   /fix
+  fix
+Calling codestop()/code and then codedestroy()/code on a
+connector in correctly triggered an exception. (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



svn commit: r1079934 - /tomcat/trunk/test/org/apache/tomcat/util/net/TestXxxEndpoint.java

2011-03-09 Thread markt
Author: markt
Date: Wed Mar  9 19:01:08 2011
New Revision: 1079934

URL: http://svn.apache.org/viewvc?rev=1079934view=rev
Log:
Fix typo

Modified:
tomcat/trunk/test/org/apache/tomcat/util/net/TestXxxEndpoint.java

Modified: tomcat/trunk/test/org/apache/tomcat/util/net/TestXxxEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/util/net/TestXxxEndpoint.java?rev=1079934r1=1079933r2=1079934view=diff
==
--- tomcat/trunk/test/org/apache/tomcat/util/net/TestXxxEndpoint.java (original)
+++ tomcat/trunk/test/org/apache/tomcat/util/net/TestXxxEndpoint.java Wed Mar  
9 19:01:08 2011
@@ -40,7 +40,7 @@ public class TestXxxEndpoint extends Tom
 tomcat.start();
 
 tomcat.getConnector().stop();
-// This will should throw an Exception
+// This should throw an Exception
 Exception e = null;
 ServerSocket s = null;
 try {



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



DO NOT REPLY [Bug 50903] New: Current keep-alive request processed after connector.stop()

2011-03-09 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50903

   Summary: Current keep-alive request processed after
connector.stop()
   Product: Tomcat 7
   Version: trunk
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: Connectors
AssignedTo: dev@tomcat.apache.org
ReportedBy: ma...@apache.org


When the connector is stopped, if a connection is in a keep-alive state the
next request received by that connection will be processed and then the
connection will be closed. When the request is received, it should be rejected.

Outstanding questions:
- What return code (if any) should be sent back to the client?
- If the reading of a request starts before the connector is stopped, should
that request be allowed to complete or should it be rejected?

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

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



DO NOT REPLY [Bug 50903] Current keep-alive request processed after connector.stop()

2011-03-09 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50903

--- Comment #1 from Mark Thomas ma...@apache.org 2011-03-09 14:36:33 EST ---
Created an attachment (id=26755)
 -- (https://issues.apache.org/bugzilla/attachment.cgi?id=26755)
Basic patch - needs work

This patch provides an idea of how this might be tackled. This will stop and
request where the request has not been completely read. This is probably not
the ideal approach.

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

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



DO NOT REPLY [Bug 50904] New: cannot configure manager as per documentation

2011-03-09 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50904

   Summary: cannot configure manager as per documentation
   Product: Tomcat 6
   Version: 6.0.32
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: Documentation
AssignedTo: dev@tomcat.apache.org
ReportedBy: bfet...@gmail.com


Following the documentation for Tomcat 6 on the tomcat web site (also in
webapps/docs/ in 6.0.32), I cannot configure the manager as manager-gui (this
is a tc 7 feature, but listed in tc 6 docs).  

Starting from a clean tomcat download, I modified manager.xml in
conf/Catalina/localhost as per directions (substituting correct full path for
docBase), and modified conf/tomcat-users.xml to contain
  role rolename=manager-gui/
  user name=mui password=mytomcat roles=manager-gui /

If I try to open http://localhost:8080/manager/list, I get a 403 Access Denied
error.  

If I use the previous manager configuration, e.g. 
  role rolename=manager/
  user name=mui password=mytomcat roles=manager /

then it works.  Note the webapps/manager/WEB-INF/web.xml file has manager-gui
defined, but the manager-gui role doesn't seem to work.  

The only other mods I made were to create a little script called bin/runcat.sh
to start tomcat using jsvc as per setup instructions, and to copy a few .war
files into webapps/ to test the server, which works just fine.  Also I'm using
RedHat 5 (RHEL 5.5).  I logged in as a non-privileged user (e.g. not root), and
installed and ran tomcat as root.  Is running tc as root a bad idea?  

I'm not sure if this is a bug in documentation, or in the manager webapp.

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

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



DO NOT REPLY [Bug 50895] JSP compiler initializes classes during compile which can result in failures

2011-03-09 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50895

--- Comment #5 from Andy Wang do...@moonteeth.com 2011-03-09 14:53:44 EST ---
Thanks.  Any plans to put this into 6.0?  We're patching 6.0.32 to deal with
this, so not a huge deal.  Just want to know if we should expect to continue
maintaining this change ourselves for 6.0.

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

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



DO NOT REPLY [Bug 50895] JSP compiler initializes classes during compile which can result in failures

2011-03-09 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50895

--- Comment #6 from Mark Thomas ma...@apache.org 2011-03-09 15:18:26 EST ---
It will go into 6. I have my hands full with 7 at the moment but someone (maybe
me, maybe someone else) will propose this for backport.

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

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



DO NOT REPLY [Bug 50904] cannot configure manager as per documentation

2011-03-09 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50904

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

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID

--- Comment #1 from Mark Thomas ma...@apache.org 2011-03-09 15:19:21 EST ---
This works. Most likely, you have left the comment markers in the
tomcat-users.xml file. The users list is the place to seek help.

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

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



[Tomcat Wiki] Update of PoweredBy by Rimuhosting

2011-03-09 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on Tomcat Wiki for change 
notification.

The PoweredBy page has been changed by Rimuhosting.
The comment on this change is: adding RImuhosting.
http://wiki.apache.org/tomcat/PoweredBy?action=diffrev1=322rev2=323

--

  
  === Oxxus.net ===
  {{http://www.oxxus.net/images/oxxuslogo2.gif}} 
[[http://www.oxxus.net|Oxxus.net Tomcat Hosting]] - Offers latest Tomcat 6 
hosting services on private JVM.
+ 
+ === RimuHosting.com ===
+ 
{{http://blog.rimuhosting.com/wp-content/themes/rimuhosting/images/logo2.png}} 
[[http://www.rimuhosting.com|RimuHosting.com VPS with Tomcat Web Hosting]] - 
provides a VPS and support for you to host your Tomcat the way you want.
+ 
  
  === RSHosting.co.uk ===
  {{http://www.rshosting.co.uk/images/logo3.jpg}} 
[[http://www.rshosting.co.uk|RSHosting.co.uk UK Tomcat Web Hosting]] - provides 
Tomcat Web Hosting on our Linux and Windows servers in UK.

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



DO NOT REPLY [Bug 50906] New: Chunked encoding not terminated with native library

2011-03-09 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50906

   Summary: Chunked encoding not terminated with native library
   Product: Tomcat 7
   Version: 7.0.8
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: Connectors
AssignedTo: dev@tomcat.apache.org
ReportedBy: ch...@blaze.io


I'm using Tomcat 7.0.8 on Ubuntu 10.10.

When using the APR based Tomcat Native Library (libtcnative), responses from
Tomcat are being sent with a chunked encoding, but the 0 terminating the
chunked response isn't sent until exactly 1 minute later.

The response is being written to an
org.apache.catalina.connector.CoyoteOutputStream. The following calls are made:
out.write(resp);
out.flush();
out.close();

If I just remove the libtcnative-1.so, so that Tomcat loads without using it,
then the response still uses chunked encoding, but the terminating 0 is sent
immediately, with the rest of the response.

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

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



svn commit: r1080040 - in /tomcat/trunk: java/org/apache/tomcat/util/net/AprEndpoint.java webapps/docs/changelog.xml

2011-03-09 Thread markt
Author: markt
Date: Wed Mar  9 22:36:55 2011
New Revision: 1080040

URL: http://svn.apache.org/viewvc?rev=1080040view=rev
Log:
Fix Async with APR and TCP_DEFER_ACCEPT

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=1080040r1=1080039r2=1080040view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Wed Mar  9 
22:36:55 2011
@@ -760,7 +760,8 @@ public class AprEndpoint extends Abstrac
 if (running) {
 SocketWrapperLong wrapper =
 new SocketWrapperLong(Long.valueOf(socket));
-getExecutor().execute(new SocketWithOptionsProcessor(wrapper));
+getExecutor().execute(
+new SocketWithOptionsProcessor(wrapper, null));
 }
 } catch (RejectedExecutionException x) {
 log.warn(Socket processing request was rejected for:+socket,x);
@@ -1641,9 +1642,13 @@ public class AprEndpoint extends Abstrac
 protected class SocketWithOptionsProcessor implements Runnable {
 
 protected SocketWrapperLong socket = null;
+protected SocketStatus status = null;
+
 
-public SocketWithOptionsProcessor(SocketWrapperLong socket) {
+public SocketWithOptionsProcessor(SocketWrapperLong socket,
+SocketStatus status) {
 this.socket = socket;
+this.status = status;
 }
 
 @Override
@@ -1660,17 +1665,30 @@ public class AprEndpoint extends Abstrac
 }
 } else {
 // Process the request from this socket
-if (!setSocketOptions(socket.getSocket().longValue())
-|| handler.process(socket) == 
Handler.SocketState.CLOSED) {
+if (!setSocketOptions(socket.getSocket().longValue())) {
 // Close socket and pool
 destroySocket(socket.getSocket().longValue());
 socket = null;
 }
+// Process the request from this socket
+Handler.SocketState state = 
(status==null)?handler.process(socket):handler.asyncDispatch(socket, status);
+if (state == Handler.SocketState.CLOSED) {
+// Close socket and pool
+destroySocket(socket.getSocket().longValue());
+socket = null;
+} else if (state == Handler.SocketState.LONG) {
+socket.access();
+if (socket.async) {
+waitingRequests.add(socket);
+}
+} else if (state == Handler.SocketState.ASYNC_END) {
+socket.access();
+SocketProcessor proc = new SocketProcessor(socket, 
SocketStatus.OPEN);
+getExecutor().execute(proc);
+}
 }
 }
-
 }
-
 }
 
 

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1080040r1=1080039r2=1080040view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Wed Mar  9 22:36:55 2011
@@ -90,6 +90,11 @@
 bug48208/bug: Allow the configuration of a custom trust manager for
 use in CLIENT-CERT authentication. (markt)
   /add
+  fix
+Fix issues that prevented asynchronous servlets from working when used
+with the HTTP APR connector on platforms that support TCP_DEFER_ACCEPT.
+(martk)
+  /fix
 /changelog
   /subsection
   subsection name=Jasper



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



Re: svn commit: r1080040 - in /tomcat/trunk: java/org/apache/tomcat/util/net/AprEndpoint.java webapps/docs/changelog.xml

2011-03-09 Thread Mark Thomas
On 09/03/2011 22:36, ma...@apache.org wrote:
 Author: markt
 Date: Wed Mar  9 22:36:55 2011
 New Revision: 1080040
 
 URL: http://svn.apache.org/viewvc?rev=1080040view=rev
 Log:
 Fix Async with APR and TCP_DEFER_ACCEPT

Who ever it was that reported async unit test failures (Rainer?) that I
blamed on the APR/native code, I apologise. It was indeed all my fault.

Mark

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



Re: [VOTE] Release jdbc-pool 1.1.0.1

2011-03-09 Thread Keiichi Fujino
2011/3/4 Filip Hanik - Dev Lists devli...@hanik.com:
 Source and Binary Packages
 http://people.apache.org/~fhanik/jdbc-pool/v1.1.0.1/

 Tag
 http://svn.apache.org/repos/asf/tomcat/tags/JDBC_POOL_1_1_0_1/

 Documentation
 http://people.apache.org/~fhanik/jdbc-pool/jdbc-pool.html

 The proposed 1.1.0.1 release is:

 [ ] Broken - do not release
 [ ] Alpha  - go ahead and release as 1.1.0.1 Alpha
 [ ] Beta   - go ahead and release as 1.1.0.1 Beta
 [X] Stable - go ahead and release as 1.1.0.1 Stable

I tested jdbc-pool with simple applications.
And it works well.

However, when setting removeAbandoned=true, NPE is thrown out.
It seems to occur when the Abandoned processing and SQL execution
processing are executed at the same time.
The synchronization of the Pool-Cleaner thread might not work
correctly though I am not checking the code.

The following are logs.
=localhost.2011-03-10.log
Mar 10, 2011 1:24:23 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [jdbc] in context with path
[/test] threw exception
java.lang.NullPointerException
at 
org.apache.tomcat.jdbc.pool.ProxyConnection.invoke(ProxyConnection.java:125)
at $Proxy9.prepareStatement(Unknown Source)
at jdbc_pool.JDBCPoolServlet.doGet(JDBCPoolServlet.java:32)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:394)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:243)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)
at 
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
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:619)
=

-- 
Keiichi.Fujino

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



Re: [VOTE] Release jdbc-pool 1.1.0.1

2011-03-09 Thread Eiji Takahashi
Hi developers.

I encountered the same issue, too.
I got following exception.
-
java.lang.NullPointerException
at 
org.apache.tomcat.jdbc.pool.interceptor.StatementCache$CachedStatement.closeInvoked(StatementCache.java:224)
at 
org.apache.tomcat.jdbc.pool.interceptor.StatementDecoratorInterceptor$StatementProxy.invoke(StatementDecoratorInterceptor.java:226)
at $Proxy1.close(Unknown Source)
at test.PoolTestServlet.doPost(PoolTestServlet.java:30)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:306)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at 
org.apache.catalina.ha.tcp.ReplicationValve.invoke(ReplicationValve.java:354)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:108)
at 
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:558)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:379)
at 
org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:283)
at 
org.apache.coyote.ajp.AjpAprProtocol$AjpConnectionHandler.process(AjpAprProtocol.java:209)
at 
org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1671)
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)
---
When the busy connection reaches abandoned time-out, PoolCleaner calls
ConnectionPool#abandon() for this connection.
And, reset all Interceptors that is relevant to this connection. In
the case of StatementCache, null is set to cacheSize and pcon.
As a result, when CachedStatement.closeInvoked is executed,
cacheSize.get() causes NPE.
I think that other Interceptors also have same issue.

I thought several solutions for this issue.
(1) Prevent NPE at each Interceptors.
(2) Create new interceptor for handling NPE, and set this interceptor
to top of interceptor chain.
- In this interceptor, change RuntimeException to SQLException.

I think that (2) is better than (1), because (2) doesn't depend on
design of each Interceptors.


On Thu, Mar 10, 2011 at 2:09 PM, Keiichi Fujino kfuj...@apache.org wrote:
 2011/3/4 Filip Hanik - Dev Lists devli...@hanik.com:
 Source and Binary Packages
 http://people.apache.org/~fhanik/jdbc-pool/v1.1.0.1/

 Tag
 http://svn.apache.org/repos/asf/tomcat/tags/JDBC_POOL_1_1_0_1/

 Documentation
 http://people.apache.org/~fhanik/jdbc-pool/jdbc-pool.html

 The proposed 1.1.0.1 release is:

 [ ] Broken - do not release
 [ ] Alpha  - go ahead and release as 1.1.0.1 Alpha
 [ ] Beta   - go ahead and release as 1.1.0.1 Beta
 [X] Stable - go ahead and release as 1.1.0.1 Stable

 I tested jdbc-pool with simple applications.
 And it works well.

 However, when setting removeAbandoned=true, NPE is thrown out.
 It seems to occur when the Abandoned processing and SQL execution
 processing are executed at the same time.
 The synchronization of the Pool-Cleaner thread might not work
 correctly though I am not checking the code.

 The following are logs.
 =localhost.2011-03-10.log
 Mar 10, 2011 1:24:23 PM org.apache.catalina.core.StandardWrapperValve invoke
 SEVERE: Servlet.service() for servlet [jdbc] in context with path
 [/test] threw exception
 java.lang.NullPointerException
    at 
 org.apache.tomcat.jdbc.pool.ProxyConnection.invoke(ProxyConnection.java:125)
    at $Proxy9.prepareStatement(Unknown Source)
    at jdbc_pool.JDBCPoolServlet.doGet(JDBCPoolServlet.java:32)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
    at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
    at 
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
    at 
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
    at 
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
    at