[Bug 55233] [websocket] Problem reading many subsequent binary messages

2013-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55233

--- Comment #2 from Stoyan Boshev s.bos...@gmail.com ---
With the updated code the error messages are always the same:

Connection closed: Buffer overflow. [16,916] bytes to write into a [8,192] byte
buffer that already contained [0] bytes.
Connection closed: Buffer overflow. [16,916] bytes to write into a [8,192] byte
buffer that already contained [0] bytes.
Connection closed: Buffer overflow. [16,916] bytes to write into a [8,192] byte
buffer that already contained [0] bytes.
Connection closed: Buffer overflow. [16,916] bytes to write into a [8,192] byte
buffer that already contained [0] bytes.
...

-- 
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 55238] New: [websocket] NPE in clearHandler(WsRemoteEndpointImplServer.java:156)

2013-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55238

Bug ID: 55238
   Summary: [websocket] NPE in
clearHandler(WsRemoteEndpointImplServer.java:156)
   Product: Tomcat 8
   Version: trunk
  Hardware: PC
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: nick...@gmail.com

-- 
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 55238] [websocket] NPE in clearHandler(WsRemoteEndpointImplServer.java:156)

2013-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55238

Niki Dokovski nick...@gmail.com changed:

   What|Removed |Added

 OS||All

--- Comment #1 from Niki Dokovski nick...@gmail.com ---
Under load the clearHandler method can be invoked twice, where the first time
the handler is cleared leading to NPE on second call.

-- 
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 55238] [websocket] NPE in clearHandler(WsRemoteEndpointImplServer.java:156)

2013-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55238

--- Comment #2 from Niki Dokovski nick...@gmail.com ---
Created attachment 30577
  -- https://issues.apache.org/bugzilla/attachment.cgi?id=30577action=edit
NPE exception

stacktrace

-- 
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 55238] [websocket] NPE in clearHandler(WsRemoteEndpointImplServer.java:156)

2013-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55238

--- Comment #3 from Niki Dokovski nick...@gmail.com ---
Created attachment 30578
  -- https://issues.apache.org/bugzilla/attachment.cgi?id=30578action=edit
WsRemoteEndpointImplServer patch

-- 
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 55215] Improvements to sample log4j configuration

2013-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55215

Brian Burch br...@pingtoo.com changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |---

--- Comment #3 from Brian Burch br...@pingtoo.com ---
When I was working through the install instructions, I was puzzled by the
instruction to put the log4j version of tomcat-juli.jar into a directory called
bin in ${CATALINA_BASE}. It took me a while to figure out. I checked
catalina.properties and confirmed the path was not specified for the
common.loader. I then found some relevant comments in class-loader-howto.html.
When I looked at the logic in catalina.sh, all became clear.

I suppose a tomcat expert would know about this already, but it might not be so
obvious to everyone else. My proposed change would help someone configuring
global log4j to see why /bin is not a typo, understand something important
and move on quickly with confidence.

-- 
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 55215] Improvements to sample log4j configuration

2013-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55215

--- Comment #4 from Brian Burch br...@pingtoo.com ---
Created attachment 30579
  -- https://issues.apache.org/bugzilla/attachment.cgi?id=30579action=edit
patch to clarify use of ${CATALINA_BASE}/bin

-- 
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: r1502174 - /tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMessageHandlerWholeBase.java

2013-07-11 Thread markt
Author: markt
Date: Thu Jul 11 10:08:14 2013
New Revision: 1502174

URL: http://svn.apache.org/r1502174
Log:
Don't swallow original exception

Modified:

tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMessageHandlerWholeBase.java

Modified: 
tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMessageHandlerWholeBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMessageHandlerWholeBase.java?rev=1502174r1=1502173r2=1502174view=diff
==
--- 
tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMessageHandlerWholeBase.java
 (original)
+++ 
tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMessageHandlerWholeBase.java
 Thu Jul 11 10:08:14 2013
@@ -79,7 +79,7 @@ public abstract class PojoMessageHandler
 try {
 result = method.invoke(pojo, parameters);
 } catch (IllegalAccessException | InvocationTargetException e) {
-throw new IllegalArgumentException();
+throw new IllegalArgumentException(e);
 }
 processResult(result);
 }



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



svn commit: r1502175 - /tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java

2013-07-11 Thread markt
Author: markt
Date: Thu Jul 11 10:09:48 2013
New Revision: 1502175

URL: http://svn.apache.org/r1502175
Log:
Avoid NPE when sending buffered data from the server (there is no mask in this 
case).

Modified:
tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java

Modified: 
tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java?rev=1502175r1=1502174r2=1502175view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java 
Thu Jul 11 10:09:48 2013
@@ -675,10 +675,14 @@ public abstract class WsRemoteEndpointIm
 
 // Write the payload
 while (payload.hasRemaining()  outputBuffer.hasRemaining()) {
-outputBuffer.put(
-(byte) (payload.get() ^ (mask[maskIndex++]  0xFF)));
-if (maskIndex  3) {
-maskIndex = 0;
+if (mask == null) {
+outputBuffer.put(payload.get());
+} else {
+outputBuffer.put(
+(byte) (payload.get() ^ (mask[maskIndex++]  
0xFF)));
+if (maskIndex  3) {
+maskIndex = 0;
+}
 }
 }
 if (payload.hasRemaining()) {



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



svn commit: r1502176 - in /tomcat/trunk/java/org/apache/tomcat/websocket: AsyncChannelWrapperSecure.java ReadBufferOverflowException.java WsFrameClient.java

2013-07-11 Thread markt
Author: markt
Date: Thu Jul 11 10:11:56 2013
New Revision: 1502176

URL: http://svn.apache.org/r1502176
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55233
Fixed buffer overflow error when a client needs to unwrap more encrypted data 
than the read buffer has space for.
The fix is to increase the read buffer to the current maximum size of output 
expected by the SSL engine.

Added:

tomcat/trunk/java/org/apache/tomcat/websocket/ReadBufferOverflowException.java  
 (with props)
Modified:
tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java
tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameClient.java

Modified: 
tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java?rev=1502176r1=1502175r2=1502176view=diff
==
--- 
tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java 
(original)
+++ 
tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java 
Thu Jul 11 10:11:56 2013
@@ -293,13 +293,17 @@ public class AsyncChannelWrapperSecure i
 // partial data on the next read
 } else if (s == Status.BUFFER_OVERFLOW) {
 // Not enough space in the destination buffer to
-// store all of the data
-throw new IOException(sm.getString(
-asyncChannelWrapperSecure.readOverflow,
-Integer.valueOf( sslEngine.getSession().
-getApplicationBufferSize()),
-Integer.valueOf(dest.limit()),
-Integer.valueOf(dest.position(;
+// store all of the data. We could use a bytes read
+// value of -bufferSizeRequired to signal the new
+// buffer size required but an explicit exception 
is
+// clearer.
+if (reading.compareAndSet(true, false)) {
+throw new 
ReadBufferOverflowException(sslEngine.
+
getSession().getApplicationBufferSize());
+} else {
+future.fail(new 
IllegalStateException(sm.getString(
+
asyncChannelWrapperSecure.wrongStateRead)));
+}
 } else {
 // Status.CLOSED - unexpected
 throw new IllegalStateException(sm.getString(

Added: 
tomcat/trunk/java/org/apache/tomcat/websocket/ReadBufferOverflowException.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/ReadBufferOverflowException.java?rev=1502176view=auto
==
--- 
tomcat/trunk/java/org/apache/tomcat/websocket/ReadBufferOverflowException.java 
(added)
+++ 
tomcat/trunk/java/org/apache/tomcat/websocket/ReadBufferOverflowException.java 
Thu Jul 11 10:11:56 2013
@@ -0,0 +1,34 @@
+/*
+ * 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.websocket;
+
+import java.io.IOException;
+
+public class ReadBufferOverflowException extends IOException {
+
+private static final long serialVersionUID = 1L;
+
+private final int minBufferSize;
+
+public ReadBufferOverflowException(int minBufferSize) {
+this.minBufferSize = minBufferSize;
+}
+
+public int getMinBufferSize() {
+return minBufferSize;
+}
+}

Propchange: 
tomcat/trunk/java/org/apache/tomcat/websocket/ReadBufferOverflowException.java
--
svn:eol-style = native

Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameClient.java
URL: 

svn commit: r1502180 - in /tomcat/trunk: java/org/apache/tomcat/util/descriptor/ java/org/apache/tomcat/util/descriptor/web/ test/org/apache/catalina/realm/ test/org/apache/jasper/servlet/

2013-07-11 Thread kkolinko
Author: kkolinko
Date: Thu Jul 11 10:25:02 2013
New Revision: 1502180

URL: http://svn.apache.org/r1502180
Log:
svn:eol-style=native

Modified:
tomcat/trunk/java/org/apache/tomcat/util/descriptor/LocalStrings.properties 
  (props changed)

tomcat/trunk/java/org/apache/tomcat/util/descriptor/LocalStrings_es.properties  
 (props changed)
tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/Constants.java   
(props changed)

tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/NamingResources.java   
(props changed)
tomcat/trunk/test/org/apache/catalina/realm/TesterServletSecurity01.java   
(props changed)
tomcat/trunk/test/org/apache/jasper/servlet/TestJspCServletContext.java   
(props changed)

Propchange: 
tomcat/trunk/java/org/apache/tomcat/util/descriptor/LocalStrings.properties
--
svn:eol-style = native

Propchange: 
tomcat/trunk/java/org/apache/tomcat/util/descriptor/LocalStrings_es.properties
--
svn:eol-style = native

Propchange: 
tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/Constants.java
--
svn:eol-style = native

Propchange: 
tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/NamingResources.java
--
svn:eol-style = native

Propchange: 
tomcat/trunk/test/org/apache/catalina/realm/TesterServletSecurity01.java
--
svn:eol-style = native

Propchange: 
tomcat/trunk/test/org/apache/jasper/servlet/TestJspCServletContext.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: r1502181 - /tomcat/trunk/test/org/apache/tomcat/websocket/

2013-07-11 Thread markt
Author: markt
Date: Thu Jul 11 10:25:06 2013
New Revision: 1502181

URL: http://svn.apache.org/r1502181
Log:
Add a test case for bug 55233 that also uncovered a couple of bugs in the 
batching code.

Added:
tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java 
  (with props)
tomcat/trunk/test/org/apache/tomcat/websocket/TesterFirehoseServer.java   
(with props)
tomcat/trunk/test/org/apache/tomcat/websocket/TesterMessageCountClient.java
  - copied, changed from r1502156, 
tomcat/trunk/test/org/apache/tomcat/websocket/TesterSingleMessageClient.java
Removed:
tomcat/trunk/test/org/apache/tomcat/websocket/TesterSingleMessageClient.java
Modified:
tomcat/trunk/test/org/apache/tomcat/websocket/TestWsPingPongMessages.java
tomcat/trunk/test/org/apache/tomcat/websocket/TestWsRemoteEndpoint.java
tomcat/trunk/test/org/apache/tomcat/websocket/TestWsSubprotocols.java
tomcat/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java

Added: 
tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java?rev=1502181view=auto
==
--- tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java 
(added)
+++ tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java 
Thu Jul 11 10:25:06 2013
@@ -0,0 +1,88 @@
+/*
+ *  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.websocket;
+
+import java.net.URI;
+import java.util.List;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+import javax.websocket.ClientEndpointConfig;
+import javax.websocket.ContainerProvider;
+import javax.websocket.Session;
+import javax.websocket.WebSocketContainer;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import org.apache.catalina.Context;
+import org.apache.catalina.servlets.DefaultServlet;
+import org.apache.catalina.startup.Tomcat;
+import org.apache.catalina.startup.TomcatBaseTest;
+import org.apache.tomcat.util.descriptor.web.ApplicationListener;
+import org.apache.tomcat.util.net.TesterSupport;
+import org.apache.tomcat.websocket.TesterMessageCountClient.BasicText;
+import 
org.apache.tomcat.websocket.TesterMessageCountClient.TesterProgrammaticEndpoint;
+
+public class TestWebSocketFrameClient extends TomcatBaseTest {
+
+@Test
+public void testConnectToServerEndpointSSL() throws Exception {
+
+Tomcat tomcat = getTomcatInstance();
+// Must have a real docBase - just use temp
+Context ctx =
+tomcat.addContext(, System.getProperty(java.io.tmpdir));
+ctx.addApplicationListener(new ApplicationListener(
+TesterFirehoseServer.Config.class.getName(), false));
+Tomcat.addServlet(ctx, default, new DefaultServlet());
+ctx.addServletMapping(/, default);
+
+TesterSupport.initSsl(tomcat);
+
+tomcat.start();
+
+WebSocketContainer wsContainer =
+ContainerProvider.getWebSocketContainer();
+ClientEndpointConfig clientEndpointConfig =
+ClientEndpointConfig.Builder.create().build();
+clientEndpointConfig.getUserProperties().put(
+WsWebSocketContainer.SSL_TRUSTSTORE_PROPERTY,
+test/org/apache/tomcat/util/net/ca.jks);
+Session wsSession = wsContainer.connectToServer(
+TesterProgrammaticEndpoint.class,
+clientEndpointConfig,
+new URI(wss://localhost: + getPort() +
+TesterFirehoseServer.Config.PATH));
+CountDownLatch latch =
+new CountDownLatch(TesterFirehoseServer.MESSAGE_COUNT);
+BasicText handler = new BasicText(latch);
+wsSession.addMessageHandler(handler);
+wsSession.getBasicRemote().sendText(Hello);
+
+// Ignore the latch result as the message count test below will tell us
+// if the right number of messages arrived
+handler.getLatch().await(10, TimeUnit.SECONDS);
+
+ListString messages = 

[Bug 54022] CometEvent.END event is not sent on a suspended socket disconnect when running with Tomcat Native (tcnative-1.dll) on Windows Vista / Windows Server 2008 or newer.

2013-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54022

chenzero chenz...@netease.com changed:

   What|Removed |Added

 CC||chenz...@netease.com

--- Comment #3 from chenzero chenz...@netease.com ---
Created attachment 30580
  -- https://issues.apache.org/bugzilla/attachment.cgi?id=30580action=edit
a test comet servlet

a basic CometProcessor servlet(Test1.java), I found that the CometEvent END is
not fired.only BEGIN event is fired. (tested on the lastest tomcat 7.0.42)

please use a browser to access the servlet, and the code attached.
I am confused on when will the END event will be fired ? 

Thanks and sorry if post in the wrong place.(my email is in black list of
apache maillist)

-- 
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-trunk

2013-07-11 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/4650

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

Buildslave for this Build: bb-vm_ubuntu

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

BUILD FAILED: failed compile_1

sincerely,
 -The Buildbot





Re: buildbot failure in ASF Buildbot on tomcat-trunk

2013-07-11 Thread Konstantin Kolinko
2013/7/11  build...@apache.org:
 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/4650

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

 Buildslave for this Build: bb-vm_ubuntu

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

 BUILD FAILED: failed compile_1



The only failing test is org.apache.tomcat.websocket.TestWebSocketFrameClient

With BIO:
[[[

Testcase: testConnectToServerEndpointSSL took 13.539 sec
FAILED
expected:10 but was:44898
junit.framework.AssertionFailedError: expected:10 but was:44898
at 
org.apache.tomcat.websocket.TestWebSocketFrameClient.testConnectToServerEndpointSSL(TestWebSocketFrameClient.java:82)
]]]

With NIO:
[[[

Testcase: testConnectToServerEndpointSSL took 13.631 sec
FAILED
expected:10 but was:45741
junit.framework.AssertionFailedError: expected:10 but was:45741
at 
org.apache.tomcat.websocket.TestWebSocketFrameClient.testConnectToServerEndpointSSL(TestWebSocketFrameClient.java:82)
]]]

Best regards,
Konstantin Kolinko

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



[Bug 55240] New: [websocket] SOE in NioEndpoint

2013-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55240

Bug ID: 55240
   Summary: [websocket] SOE in NioEndpoint
   Product: Tomcat 8
   Version: trunk
  Hardware: PC
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: nick...@gmail.com

Created attachment 30581
  -- https://issues.apache.org/bugzilla/attachment.cgi?id=30581action=edit
StackOverflowError

websocket load test reveals StackOverflowError in NioEndpoint

-- 
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



Couple of question about javax.el.BeanELResolver

2013-07-11 Thread Violeta Georgieva
Hi,

I have the following question about:

1. Method setValue
There is some mismatch in the javadoc. In the method description there is
the following statement:

If the property exists but does not have a setter, then a
PropertyNotFoundException is thrown.

But the throws clause states:

PropertyNotWritableException - if this resolver was constructed in
read-only mode, or if there is no setter for the property.

Our implementation currently throws PropertyNotFoundException.
I'm going to change it to throw PropertyNotWritableException.
What do you think?

Also I'm going to report a bug for this against the spec.

2. Method isReadOnly
There is not explicit statement what should be returned in case
base/property are null.
However there is statement that:

If this resolver was constructed in read-only mode, this method will
always return true.

What do you think about this change:

@@ -195,7 +195,7 @@
 throw new NullPointerException();
 }
 if (base == null || property == null) {
-return false;
+return readOnly;
 }

 context.setPropertyResolved(base, property);

Thanks
Violeta


[Bug 55241] New: maxConnections for BIO connector leads to acceptor stop

2013-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55241

Bug ID: 55241
   Summary: maxConnections for BIO connector leads to acceptor
stop
   Product: Tomcat 7
   Version: 7.0.34
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: Connectors
  Assignee: dev@tomcat.apache.org
  Reporter: kudryas...@gmail.com

It looks like issue #53173 is not fixed completely. Recently we had a similar
issue under Tomcat 7.0.34 / BIO connector when Acceptor thread hung forever on
LimitLatch:

http-bio-63.215.91.155-8443-Acceptor-0 daemon prio=10 tid=0x01656800
nid=0x540c waiting on condition [0x7fb64aa2f000]
   java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for  0x000763e49970 (a
org.apache.tomcat.util.threads.LimitLatch$Sync)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:834)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:994)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1303)
at
org.apache.tomcat.util.threads.LimitLatch.countUpOrAwait(LimitLatch.java:115)
at
org.apache.tomcat.util.net.AbstractEndpoint.countUpOrAwaitConnection(AbstractEndpoint.java:718)
at
org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java:210)
at java.lang.Thread.run(Thread.java:722)

Tomcat is run with maxThreads=1000 and maxConnections=1000
This can be reproduced via the following scenario in our environment:
1. Start tcpkill in the following way to kill the connection from client to
Tomcat for requests larger than 2000:
tcpkill host host and port 8185 and greater 2000
2. Access Tomcat several times. As soon as the number of ClientAbortException
errors reaches the number of threads (or connections), Acceptor thread blocks
in WAITING state and Tomcat stops accepting new connections

-- 
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: Couple of question about javax.el.BeanELResolver

2013-07-11 Thread Konstantin Kolinko
2013/7/11 Violeta Georgieva miles...@gmail.com:
 Hi,

 I have the following question about:

 1. Method setValue
 There is some mismatch in the javadoc. In the method description there is
 the following statement:

 If the property exists but does not have a setter, then a
 PropertyNotFoundException is thrown.

 But the throws clause states:

 PropertyNotWritableException - if this resolver was constructed in
 read-only mode, or if there is no setter for the property.

 Our implementation currently throws PropertyNotFoundException.
 I'm going to change it to throw PropertyNotWritableException.
 What do you think?

 Also I'm going to report a bug for this against the spec.


The javadoc at http://docs.oracle.com/javaee/7/api/javax/el/BeanELResolver.html
 says:

If this resolver was constructed in read-only mode, this method will
always throw PropertyNotWritableException.

I think it is what should actually happen. It is also easier to check
a boolean property either than use reflection to lookup whether a
property exists. I see no specification bug here.

 2. Method isReadOnly
 There is not explicit statement what should be returned in case
 base/property are null.
 However there is statement that:

 If this resolver was constructed in read-only mode, this method will
 always return true.


The same as for ResourceBundleELResolver. (That resolver is inherently
read-only but you recently changed it to return false in a similar
method).

The return value does not matter if the property has not been marked
as resolved. The docs require the caller to ignore the return value in
such a case.


 What do you think about this change:

 @@ -195,7 +195,7 @@
  throw new NullPointerException();
  }
  if (base == null || property == null) {
 -return false;
 +return readOnly;
  }

  context.setPropertyResolved(base, property);


Best regards,
Konstantin Kolinko

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



Re: Couple of question about javax.el.BeanELResolver

2013-07-11 Thread Mark Thomas
On 11/07/2013 13:49, Violeta Georgieva wrote:
 Hi,
 
 I have the following question about:
 
 1. Method setValue
 There is some mismatch in the javadoc. In the method description there is
 the following statement:
 
 If the property exists but does not have a setter, then a
 PropertyNotFoundException is thrown.
 
 But the throws clause states:
 
 PropertyNotWritableException - if this resolver was constructed in
 read-only mode, or if there is no setter for the property.
 
 Our implementation currently throws PropertyNotFoundException.
 I'm going to change it to throw PropertyNotWritableException.
 What do you think?

On balance, PropertyNotWritableException seems the better option in this
case.

 Also I'm going to report a bug for this against the spec.

+1.

 2. Method isReadOnly
 There is not explicit statement what should be returned in case
 base/property are null.
 However there is statement that:
 
 If this resolver was constructed in read-only mode, this method will
 always return true.
 
 What do you think about this change:
 
 @@ -195,7 +195,7 @@
  throw new NullPointerException();
  }
  if (base == null || property == null) {
 -return false;
 +return readOnly;
  }

If base != null and property == null my reading of the javadoc is a
PropertyNotFoundException should be thrown.

Generally, I think there needs to be a tightening up of language
throughout the EL Javadoc. I'm not sure how best to raise this with the
EG. A bug per ambiguity could be a lot of bugs but I suspect a single
bug won't result in the issue being fully addressed. Maybe one bug per
class is the way to go and list all the ambiguities in the Javadoc for
that class.

Mark


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



Re: Couple of question about javax.el.BeanELResolver

2013-07-11 Thread Violeta Georgieva
2013/7/11 Konstantin Kolinko wrote:

 2013/7/11 Violeta Georgieva miles...@gmail.com:
  Hi,
 
  I have the following question about:
 
  1. Method setValue
  There is some mismatch in the javadoc. In the method description there
is
  the following statement:
 
  If the property exists but does not have a setter, then a
  PropertyNotFoundException is thrown.
 
  But the throws clause states:
 
  PropertyNotWritableException - if this resolver was constructed in
  read-only mode, or if there is no setter for the property.
 
  Our implementation currently throws PropertyNotFoundException.
  I'm going to change it to throw PropertyNotWritableException.
  What do you think?
 
  Also I'm going to report a bug for this against the spec.
 

 The javadoc at
http://docs.oracle.com/javaee/7/api/javax/el/BeanELResolver.html
  says:

 If this resolver was constructed in read-only mode, this method will
 always throw PropertyNotWritableException.

 I think it is what should actually happen. It is also easier to check
 a boolean property either than use reflection to lookup whether a
 property exists. I see no specification bug here.

There is no bug in the specification, but in the javadoc.
I meant to open a bug to ask for a consistent javadoc.

  2. Method isReadOnly
  There is not explicit statement what should be returned in case
  base/property are null.
  However there is statement that:
 
  If this resolver was constructed in read-only mode, this method will
  always return true.
 

 The same as for ResourceBundleELResolver. (That resolver is inherently
 read-only but you recently changed it to return false in a similar
 method).

 The return value does not matter if the property has not been marked
 as resolved. The docs require the caller to ignore the return value in
 such a case.

I agree.


svn commit: r1502232 - /tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java

2013-07-11 Thread markt
Author: markt
Date: Thu Jul 11 14:20:21 2013
New Revision: 1502232

URL: http://svn.apache.org/r1502232
Log:
Give test longer to complete as it appears to need more time on CI system.

Modified:
tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java

Modified: 
tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java?rev=1502232r1=1502231r2=1502232view=diff
==
--- tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java 
(original)
+++ tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java 
Thu Jul 11 14:20:21 2013
@@ -76,7 +76,7 @@ public class TestWebSocketFrameClient ex
 
 // Ignore the latch result as the message count test below will tell us
 // if the right number of messages arrived
-handler.getLatch().await(10, TimeUnit.SECONDS);
+handler.getLatch().await(60, TimeUnit.SECONDS);
 
 ListString messages = handler.getMessages();
 Assert.assertEquals(



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



Re: Couple of question about javax.el.BeanELResolver

2013-07-11 Thread Violeta Georgieva
2013/7/11 Mark Thomas wrote:

 On 11/07/2013 13:49, Violeta Georgieva wrote:
  Hi,
 
  I have the following question about:
 
  1. Method setValue
  There is some mismatch in the javadoc. In the method description there
is
  the following statement:
 
  If the property exists but does not have a setter, then a
  PropertyNotFoundException is thrown.
 
  But the throws clause states:
 
  PropertyNotWritableException - if this resolver was constructed in
  read-only mode, or if there is no setter for the property.
 
  Our implementation currently throws PropertyNotFoundException.
  I'm going to change it to throw PropertyNotWritableException.
  What do you think?

 On balance, PropertyNotWritableException seems the better option in this
 case.

  Also I'm going to report a bug for this against the spec.

 +1.

thanks


  2. Method isReadOnly
  There is not explicit statement what should be returned in case
  base/property are null.
  However there is statement that:
 
  If this resolver was constructed in read-only mode, this method will
  always return true.
 
  What do you think about this change:
 
  @@ -195,7 +195,7 @@
   throw new NullPointerException();
   }
   if (base == null || property == null) {
  -return false;
  +return readOnly;
   }

 If base != null and property == null my reading of the javadoc is a
 PropertyNotFoundException should be thrown.

you are right on a second reading this should throw exception


 Generally, I think there needs to be a tightening up of language
 throughout the EL Javadoc. I'm not sure how best to raise this with the
 EG. A bug per ambiguity could be a lot of bugs but I suspect a single
 bug won't result in the issue being fully addressed. Maybe one bug per
 class is the way to go and list all the ambiguities in the Javadoc for
 that class.

 Mark


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



svn commit: r1502237 - /tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContextResources.java

2013-07-11 Thread markt
Author: markt
Date: Thu Jul 11 14:38:55 2013
New Revision: 1502237

URL: http://svn.apache.org/r1502237
Log:
Confirm proxy resources are not cached when context has caching disabled.

Modified:

tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContextResources.java

Modified: 
tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContextResources.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContextResources.java?rev=1502237r1=1502236r2=1502237view=diff
==
--- 
tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContextResources.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContextResources.java
 Thu Jul 11 14:38:55 2013
@@ -25,6 +25,7 @@ import java.net.URL;
 import java.util.Arrays;
 import java.util.List;
 
+import javax.naming.directory.DirContext;
 import javax.servlet.ServletContext;
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServlet;
@@ -34,6 +35,7 @@ import javax.servlet.http.HttpServletRes
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
+import org.junit.Assert;
 import org.junit.Test;
 
 import org.apache.catalina.Context;
@@ -45,6 +47,7 @@ import org.apache.catalina.startup.Const
 import org.apache.catalina.startup.ContextConfig;
 import org.apache.catalina.startup.Tomcat;
 import org.apache.catalina.startup.TomcatBaseTest;
+import org.apache.naming.resources.ProxyDirContext;
 import org.apache.tomcat.util.buf.ByteChunk;
 
 public class TestStandardContextResources extends TomcatBaseTest {
@@ -225,6 +228,36 @@ public class TestStandardContextResource
 presourceE.jsp in the web application/p);
 }
 
+
+@Test
+public void testResourceCaching() throws Exception {
+Tomcat tomcat = getTomcatInstance();
+
+File appDir = new File(test/webapp-3.0-fragments);
+// app dir is relative to server home
+StandardContext ctx = (StandardContext) tomcat.addWebapp(
+null, /test, appDir.getAbsolutePath());
+ctx.setCachingAllowed(false);
+
+tomcat.start();
+
+DirContext resources = ctx.getResources();
+
+Assert.assertTrue(resources instanceof ProxyDirContext);
+
+ProxyDirContext proxyResources = (ProxyDirContext) resources;
+
+// Caching should be disabled
+Assert.assertNull(proxyResources.getCache());
+
+ctx.stop();
+ctx.start();
+
+// Caching should still be disabled
+Assert.assertNull(proxyResources.getCache());
+}
+
+
 /**
  * A servlet that prints the requested resource. The path to the requested
  * resource is passed as a parameter, codepath/code.



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



[Bug 55233] [websocket] Problem reading many subsequent binary messages

2013-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55233

--- Comment #4 from Stoyan Boshev s.bos...@gmail.com ---
I have rerun the tests. Everything is working fine now.

Mark, thanks a lot for your prompt reaction and fixes!

-- 
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

2013-07-11 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/4651

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

Buildslave for this Build: bb-vm_ubuntu

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

Build succeeded!

sincerely,
 -The Buildbot





[Bug 48208] allow to configure a custom client certificate Trust Manager in server.xml per connector attribute trustManagerClassName

2013-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48208

--- Comment #16 from Ralf Hauser hau...@acm.org ---
in tomcat 7, trustManagerClassName of
http://tomcat.apache.org/tomcat-7.0-doc/config/http.html#SSL%20Support will no
longer be dealt with in JSSESocketFactory.java but at least as of version
TOMCAT_7_0_28, this is now in AbstractEndpoint.java

http://svn.apache.org/viewvc/tomcat/tc7.0.x/tags/TOMCAT_7_0_28/java/org/apache/tomcat/util/net/AbstractEndpoint.java?view=markup

-- 
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: r1502246 - /tomcat/trunk/webapps/docs/logging.xml

2013-07-11 Thread markt
Author: markt
Date: Thu Jul 11 15:27:31 2013
New Revision: 1502246

URL: http://svn.apache.org/r1502246
Log:
Add some clarification

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

Modified: tomcat/trunk/webapps/docs/logging.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/logging.xml?rev=1502246r1=1502245r2=1502246view=diff
==
--- tomcat/trunk/webapps/docs/logging.xml (original)
+++ tomcat/trunk/webapps/docs/logging.xml Thu Jul 11 15:27:31 2013
@@ -495,9 +495,10 @@ log4j.logger.org.apache.catalina.core.Co
 /ul
 /li
 
-lipIf you are running Tomcat with separate $CATALINA_HOME and
-$CATALINA_BASE and want to configure to use log4j in a single
-$CATALINA_BASE only:/p
+lipIf you are running Tomcat with separate
+code$CATALINA_HOME/code and code$CATALINA_BASE/code and want to
+configure to use log4j in a single code$CATALINA_BASE/code 
only:/p
+
 ul
   liCreate code$CATALINA_BASE/bin/code and
   code$CATALINA_BASE/lib/code directories if they do not exist.
@@ -513,6 +514,14 @@ log4j.logger.org.apache.catalina.core.Co
   code$CATALINA_BASE/conf/catalina.policy/code file to adjust
   it to using a different copy of tomcat-juli.jar./li
 /ul
+
+pNote: This works because libraries, if they exist in
+code$CATALINA_BASE/code, are loaded in preference to the same
+library in code$CATALINA_HOME/code./p
+
+pNote: tomcat-juli.jar is loaded from code$CATALINA_BASE/code/bin
+not code$CATALINA_BASE/code/lib as it is loaded as part of the
+bootstrap process and all the bootstrap classes are loaded from 
bin./p
 /li
 
 lipDelete code$CATALINA_BASE/conf/logging.properties/code to



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



[Bug 55215] Improvements to sample log4j configuration

2013-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55215

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

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution|--- |FIXED

--- Comment #5 from Mark Thomas ma...@apache.org ---
Further clarificartion added but with different, expanded wording.

-- 
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: r1502249 - /tomcat/trunk/java/javax/el/ELClass.java

2013-07-11 Thread kkolinko
Author: kkolinko
Date: Thu Jul 11 15:35:39 2013
New Revision: 1502249

URL: http://svn.apache.org/r1502249
Log:
Add specification name to version number

Modified:
tomcat/trunk/java/javax/el/ELClass.java

Modified: tomcat/trunk/java/javax/el/ELClass.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/el/ELClass.java?rev=1502249r1=1502248r2=1502249view=diff
==
--- tomcat/trunk/java/javax/el/ELClass.java (original)
+++ tomcat/trunk/java/javax/el/ELClass.java Thu Jul 11 15:35:39 2013
@@ -17,7 +17,7 @@
 package javax.el;
 
 /**
- * @since 3.0
+ * @since EL 3.0
  */
 public class ELClass {
 



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



svn commit: r1502254 - /tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java

2013-07-11 Thread markt
Author: markt
Date: Thu Jul 11 15:58:31 2013
New Revision: 1502254

URL: http://svn.apache.org/r1502254
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55228
Allow applications to set the Date header.

Modified:
tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java

Modified: 
tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java?rev=1502254r1=1502253r2=1502254view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java Thu 
Jul 11 15:58:31 2013
@@ -1429,8 +1429,12 @@ public abstract class AbstractHttp11Proc
 }
 }
 
-// Add date header
-
headers.setValue(Date).setString(FastHttpDateFormat.getCurrentDate());
+// Add date header unless application has already set one (e.g. in a
+// Caching Filter)
+if (headers.getValue(Date) == null) {
+headers.setValue(Date).setString(
+FastHttpDateFormat.getCurrentDate());
+}
 
 // FIXME: Add transfer encoding header
 



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



svn commit: r1502258 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/coyote/http11/AbstractHttp11Processor.java webapps/docs/changelog.xml

2013-07-11 Thread markt
Author: markt
Date: Thu Jul 11 16:03:08 2013
New Revision: 1502258

URL: http://svn.apache.org/r1502258
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55228
Allow applications to set the Date header.

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

tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

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

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java?rev=1502258r1=1502257r2=1502258view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java 
(original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java 
Thu Jul 11 16:03:08 2013
@@ -1454,8 +1454,12 @@ public abstract class AbstractHttp11Proc
 }
 }
 
-// Add date header
-
headers.setValue(Date).setString(FastHttpDateFormat.getCurrentDate());
+// Add date header unless application has already set one (e.g. in a
+// Caching Filter)
+if (headers.getValue(Date) == null) {
+headers.setValue(Date).setString(
+FastHttpDateFormat.getCurrentDate());
+}
 
 // FIXME: Add transfer encoding header
 

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=1502258r1=1502257r2=1502258view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Thu Jul 11 16:03:08 2013
@@ -79,6 +79,14 @@
   /fix
 /changelog
   /subsection
+  subsection name=Coyote
+changelog
+  fix
+bug55228/bug: Allow web applications to set a HTTP Date header.
+(markt)
+  /fix
+/changelog
+  /subsection
   subsection name=Jasper
 changelog
   fix



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



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

2013-07-11 Thread markt
Author: markt
Date: Thu Jul 11 16:04:28 2013
New Revision: 1502260

URL: http://svn.apache.org/r1502260
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=1502260r1=1502259r2=1502260view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Thu Jul 11 16:04:28 2013
@@ -89,6 +89,12 @@ PATCHES PROPOSED TO BACKPORT:
   +1: markt
   -1:
 
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55228
+  Allow applications to set an HTTP date header
+  http://svn.apache.org/r1502258
+  +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 55206] webresource tests fail when run on working copy

2013-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55206

Jeremy Boynes jboy...@apache.org changed:

   What|Removed |Added

 Status|RESOLVED|CLOSED

-- 
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 55205] test/webapp web.xml does not validate

2013-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55205

Jeremy Boynes jboy...@apache.org changed:

   What|Removed |Added

 Status|RESOLVED|CLOSED

-- 
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 55204] Incorrect namespace URI test webapp

2013-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55204

Jeremy Boynes jboy...@apache.org changed:

   What|Removed |Added

 Status|RESOLVED|CLOSED

-- 
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 55211] Test tld descriptors do not validate

2013-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55211

Jeremy Boynes jboy...@apache.org changed:

   What|Removed |Added

 Status|RESOLVED|CLOSED

-- 
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 55228] AbstractHttp11Processor overwrites Date header, even when set by application

2013-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55228

--- Comment #5 from Mark Thomas ma...@apache.org ---
Fair enough.

This has been fixed for trunk and 7.0.x and will be included in 7.0.43 onwards.

The fix has been 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 55218] Upgrade Digester to be based on DefaultHandler2 and use LexicalHandler to detect publicId

2013-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55218

Jeremy Boynes jboy...@apache.org changed:

   What|Removed |Added

 Status|RESOLVED|CLOSED

-- 
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 55217] Common EntityResolver that can be used by Catalina and Jasper

2013-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55217

Jeremy Boynes jboy...@apache.org changed:

   What|Removed |Added

 Status|RESOLVED|CLOSED

-- 
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 55231] NPE and incorrect version detection in JspC

2013-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55231

Jeremy Boynes jboy...@apache.org changed:

   What|Removed |Added

 Status|RESOLVED|CLOSED

-- 
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: r1502265 - /tomcat/trunk/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java

2013-07-11 Thread markt
Author: markt
Date: Thu Jul 11 16:14:59 2013
New Revision: 1502265

URL: http://svn.apache.org/r1502265
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55238
Avoid possible NPE.
Patch by Niki Dokovski.
Also added a check to onTimeout() to save creating an Exception unnecessarily

Modified:

tomcat/trunk/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java

Modified: 
tomcat/trunk/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java?rev=1502265r1=1502264r2=1502265view=diff
==
--- 
tomcat/trunk/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java
 (original)
+++ 
tomcat/trunk/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java
 Thu Jul 11 16:14:59 2013
@@ -142,7 +142,9 @@ public class WsRemoteEndpointImplServer 
 
 
 protected void onTimeout() {
-clearHandler(new SocketTimeoutException());
+if (handler != null) {
+clearHandler(new SocketTimeoutException());
+}
 close();
 }
 
@@ -150,10 +152,12 @@ public class WsRemoteEndpointImplServer 
 private void clearHandler(Throwable t) {
 SendHandler sh = handler;
 handler = null;
-if (t == null) {
-sh.onResult(new SendResult());
-} else {
-sh.onResult(new SendResult(t));
+if (sh != null) {
+if (t == null) {
+sh.onResult(new SendResult());
+} else {
+sh.onResult(new SendResult(t));
+}
 }
 }
 }



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



[Bug 55238] [websocket] NPE in clearHandler(WsRemoteEndpointImplServer.java:156)

2013-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55238

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

   What|Removed |Added

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

--- Comment #4 from Mark Thomas ma...@apache.org ---
Thanks for the report and the patch. This has been fixed in trunk.

-- 
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-trunk

2013-07-11 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/4653

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

Buildslave for this Build: bb-vm_ubuntu

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

BUILD FAILED: failed compile_1

sincerely,
 -The Buildbot





[Bug 55144] NIO connection locked when trying to release it

2013-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55144

--- Comment #6 from Pavel pavel.re...@gmail.com ---
Missed that question :)

I'm not sure how can I check the timeout for one of the locked threads... (I
can't reproduce it locally)

I did check the timeout for atmosphere threads and it looks normal (uses the
timeout I've set in tomcat conf)

Do you have a temp workaround in the meanwhile ? It causes tomcat to crash
(keeps opening more and more threads)

-- 
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 55243] New: Add special search string for nested roles

2013-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55243

Bug ID: 55243
   Summary: Add special search string for nested roles
   Product: Tomcat 8
   Version: trunk
  Hardware: All
OS: All
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: felix.schumac...@internetallee.de

Created attachment 30582
  -- https://issues.apache.org/bugzilla/attachment.cgi?id=30582action=edit
add possibility for different search strings for first time role search and
nested roles search

Add a extra configuration parameter for JNDIRealm to enable a different search
string for nested roles search, than for first time roles search.

Travis Bowen asked on the mailing list for such a feature (see
http://mail-archives.apache.org/mod_mbox/tomcat-users/201307.mbox/%3cof4fb3a7f7.cd8c08ae-on87257ba3.00761a31-07257ba3.00774...@us.ibm.com%3E).

-- 
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

2013-07-11 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/4654

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

Buildslave for this Build: bb-vm_ubuntu

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

Build succeeded!

sincerely,
 -The Buildbot





svn commit: r1502304 - in /tomcat/trunk/java/org/apache: coyote/http11/upgrade/ tomcat/util/net/

2013-07-11 Thread markt
Author: markt
Date: Thu Jul 11 18:08:17 2013
New Revision: 1502304

URL: http://svn.apache.org/r1502304
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55240
Prevent looping after Poller stop and ensure that streams for upgraded 
connections are closed if possible.

Modified:
tomcat/trunk/java/org/apache/coyote/http11/upgrade/AbstractProcessor.java
tomcat/trunk/java/org/apache/coyote/http11/upgrade/AprProcessor.java
tomcat/trunk/java/org/apache/coyote/http11/upgrade/BioProcessor.java
tomcat/trunk/java/org/apache/coyote/http11/upgrade/LocalStrings.properties
tomcat/trunk/java/org/apache/coyote/http11/upgrade/NioProcessor.java
tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

Modified: 
tomcat/trunk/java/org/apache/coyote/http11/upgrade/AbstractProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/upgrade/AbstractProcessor.java?rev=1502304r1=1502303r2=1502304view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/upgrade/AbstractProcessor.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/upgrade/AbstractProcessor.java 
Thu Jul 11 18:08:17 2013
@@ -26,6 +26,7 @@ import javax.servlet.http.WebConnection;
 
 import org.apache.coyote.Processor;
 import org.apache.coyote.Request;
+import org.apache.juli.logging.Log;
 import org.apache.tomcat.util.net.AbstractEndpoint.Handler.SocketState;
 import org.apache.tomcat.util.net.SSLSupport;
 import org.apache.tomcat.util.net.SocketStatus;
@@ -37,6 +38,7 @@ public abstract class AbstractProcessor
 
 protected static final StringManager sm =
 StringManager.getManager(Constants.Package);
+protected abstract Log getLog();
 
 private final HttpUpgradeHandler httpUpgradeHandler;
 private final AbstractServletInputStream upgradeServletInputStream;
@@ -93,6 +95,20 @@ public abstract class AbstractProcessor
 upgradeServletInputStream.onDataAvailable();
 } else if (status == SocketStatus.OPEN_WRITE) {
 upgradeServletOutputStream.onWritePossible();
+} else if (status == SocketStatus.STOP) {
+try {
+upgradeServletInputStream.close();
+} catch (IOException ioe) {
+getLog().debug(sm.getString(
+abstractProcessor.isCloseFail, ioe));
+}
+try {
+upgradeServletOutputStream.close();
+} catch (IOException ioe) {
+getLog().debug(sm.getString(
+abstractProcessor.osCloseFail, ioe));
+}
+return SocketState.CLOSED;
 } else {
 // Unexpected state
 return SocketState.CLOSED;

Modified: tomcat/trunk/java/org/apache/coyote/http11/upgrade/AprProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/upgrade/AprProcessor.java?rev=1502304r1=1502303r2=1502304view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/upgrade/AprProcessor.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/upgrade/AprProcessor.java Thu 
Jul 11 18:08:17 2013
@@ -18,12 +18,18 @@ package org.apache.coyote.http11.upgrade
 
 import javax.servlet.http.HttpUpgradeHandler;
 
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
 import org.apache.tomcat.jni.Socket;
 import org.apache.tomcat.util.net.AprEndpoint;
 import org.apache.tomcat.util.net.SocketWrapper;
 
 public class AprProcessor extends AbstractProcessorLong {
 
+private static final Log log = LogFactory.getLog(AprProcessor.class);
+@Override
+protected Log getLog() {return log;}
+
 private static final int INFINITE_TIMEOUT = -1;
 
 public AprProcessor(SocketWrapperLong wrapper,

Modified: tomcat/trunk/java/org/apache/coyote/http11/upgrade/BioProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/upgrade/BioProcessor.java?rev=1502304r1=1502303r2=1502304view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/upgrade/BioProcessor.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/upgrade/BioProcessor.java Thu 
Jul 11 18:08:17 2013
@@ -21,10 +21,16 @@ import java.net.Socket;
 
 import javax.servlet.http.HttpUpgradeHandler;
 
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
 import org.apache.tomcat.util.net.SocketWrapper;
 
 public class BioProcessor extends AbstractProcessorSocket {
 
+private static final Log log = LogFactory.getLog(BioProcessor.class);
+@Override
+protected Log getLog() {return log;}
+
 private static final int INFINITE_TIMEOUT = 0;
 
 public BioProcessor(SocketWrapperSocket wrapper,

Modified: 

[Bug 55240] [websocket] SOE in NioEndpoint

2013-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55240

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

   What|Removed |Added

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

--- Comment #1 from Mark Thomas ma...@apache.org ---
Thanks for the report. I believe I have fixed the issue in trunk. Do let us
know if that is not that case.

-- 
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 55144] NIO connection locked when trying to release it

2013-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55144

--- Comment #7 from Pavel pavel.re...@gmail.com ---
See this new dump - I'm also seeing gzip in the stacktrace - maybe it's
contributing to the problem.

CleanResourceTask id=81 idx=0x154 tid=220556 prio=5 alive, interrupted,
blocked, native_blocked, daemon
-- Blocked trying to get lock:
org/apache/coyote/http11/InternalNioOutputBuffer@0x0001D9CAC6E8[thin lock]
at jrockit/vm/Threads.sleep(I)V(Native Method)
at jrockit/vm/Locks.waitForThinRelease(Locks.java:955)[optimized]
at jrockit/vm/Locks.monitorEnterSecondStageHard(Locks.java:1083)[optimized]
at jrockit/vm/Locks.monitorEnterSecondStage(Locks.java:1005)[optimized]
at
org/apache/coyote/http11/InternalNioOutputBuffer.addToBB(InternalNioOutputBuffer.java:208)[inlined]
at
org/apache/coyote/http11/InternalNioOutputBuffer.access$000(InternalNioOutputBuffer.java:41)[inlined]
at
org/apache/coyote/http11/InternalNioOutputBuffer$SocketOutputBuffer.doWrite(InternalNioOutputBuffer.java:268)[optimized]
at
org/apache/coyote/http11/filters/ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:117)[optimized]
at
org/apache/coyote/http11/filters/GzipOutputFilter$FakeOutputStream.write(GzipOutputFilter.java:177)[optimized]
at java/util/zip/GZIPOutputStream.finish(GZIPOutputStream.java:91)
at
org/apache/coyote/http11/filters/FlushableGZIPOutputStream.finish(FlushableGZIPOutputStream.java:84)
^-- Holding lock:
org/apache/coyote/http11/filters/FlushableGZIPOutputStream@0x0001D9CF1698[thin
lock]
at
org/apache/coyote/http11/filters/GzipOutputFilter.end(GzipOutputFilter.java:141)
at
org/apache/coyote/http11/AbstractOutputBuffer.endRequest(AbstractOutputBuffer.java:310)
at
org/apache/coyote/http11/InternalNioOutputBuffer.endRequest(InternalNioOutputBuffer.java:120)
at
org/apache/coyote/http11/AbstractHttp11Processor.action(AbstractHttp11Processor.java:752)[optimized]
at org/apache/coyote/Response.action(Response.java:173)[inlined]
at org/apache/coyote/Response.finish(Response.java:279)[inlined]
at
org/apache/catalina/connector/OutputBuffer.close(OutputBuffer.java:313)[optimized]
at org/apache/catalina/connector/Response.finishResponse(Response.java:512)
at
org/apache/catalina/connector/CometEventImpl.close(CometEventImpl.java:96)
at
org/atmosphere/container/Tomcat7CometSupport.bz51881(Tomcat7CometSupport.java:178)[optimized]
at
org/atmosphere/container/Tomcat7CometSupport.action(Tomcat7CometSupport.java:209)
at
org/atmosphere/container/Tomcat7CometSupport.action(Tomcat7CometSupport.java:47)
at
org/atmosphere/cpr/AtmosphereResourceImpl.resume(AtmosphereResourceImpl.java:323)[optimized]
at
com/fx/tasks/CleanResourceTask.resumeOldResources(CleanResourceTask.java:124)[optimized]
at com/fx/tasks/CleanResourceTask.access$400(CleanResourceTask.java:26)
at com/fx/tasks/CleanResourceTask$2.run(CleanResourceTask.java:78)
at java/lang/Thread.run(Thread.java:662)
at jrockit/vm/RNI.c2java(J)V(Native Method)
-- end of trace

Atmosphere-Shared-AsyncOp-593 id=1499 idx=0x1738 tid=209140 prio=5 alive,
parked, native_blocked, daemon
at jrockit/vm/Locks.park0(J)V(Native Method)
at jrockit/vm/Locks.park(Locks.java:2230)[optimized]
at jrockit/proxy/sun/misc/Unsafe.park(Unsafe.java:616)[inlined]
at
java/util/concurrent/locks/LockSupport.parkNanos(LockSupport.java:196)[inlined]
at
java/util/concurrent/locks/AbstractQueuedSynchronizer.doAcquireSharedNanos(AbstractQueuedSynchronizer.java:1011)[inlined]
at
java/util/concurrent/locks/AbstractQueuedSynchronizer.tryAcquireSharedNanos(AbstractQueuedSynchronizer.java:1303)[inlined]
at
java/util/concurrent/CountDownLatch.await(CountDownLatch.java:253)[inlined]
at
org/apache/tomcat/util/net/NioEndpoint$KeyAttachment.awaitLatch(NioEndpoint.java:1577)[inlined]
at
org/apache/tomcat/util/net/NioEndpoint$KeyAttachment.awaitWriteLatch(NioEndpoint.java:1580)[inlined]
at
org/apache/tomcat/util/net/NioBlockingSelector.write(NioBlockingSelector.java:109)[optimized]
at
org/apache/tomcat/util/net/NioSelectorPool.write(NioSelectorPool.java:174)[optimized]
at
org/apache/coyote/http11/InternalNioOutputBuffer.writeToSocket(InternalNioOutputBuffer.java:163)[inlined]
at
org/apache/coyote/http11/InternalNioOutputBuffer.flushBuffer(InternalNioOutputBuffer.java:242)[inlined]
at
org/apache/coyote/http11/InternalNioOutputBuffer.flush(InternalNioOutputBuffer.java:94)[optimized]
^-- Holding lock:
org/apache/coyote/http11/InternalNioOutputBuffer@0x0001D9CAC6E8[thin lock]
at
org/apache/coyote/http11/AbstractHttp11Processor.action(AbstractHttp11Processor.java:793)[optimized]
at org/apache/coyote/Response.action(Response.java:173)[inlined]
at
org/apache/catalina/connector/OutputBuffer.doFlush(OutputBuffer.java:359)[inlined]
at
org/apache/catalina/connector/OutputBuffer.flush(OutputBuffer.java:326)[inlined]
at

[Bug 55144] NIO connection locked when trying to release it

2013-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55144

--- Comment #8 from Mark Thomas ma...@apache.org ---
If you can take a thread dump then you should be able to take a heap dump as
well. You can then load the heap dump into a profiler and take a look at the
current value of the timeout. Knowing the timeout value is key to figuring out
where to go next with this.

-- 
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: r1502349 - /tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java

2013-07-11 Thread markt
Author: markt
Date: Thu Jul 11 20:23:00 2013
New Revision: 1502349

URL: http://svn.apache.org/r1502349
Log:
Expose the current connection count over JMX

Modified:
tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java

Modified: tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java?rev=1502349r1=1502348r2=1502349view=diff
==
--- tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java Thu Jul 11 
20:23:00 2013
@@ -270,6 +270,11 @@ public abstract class AbstractProtocol i
 endpoint.setMaxHeaderCount(maxHeaderCount);
 }
 
+public long getConnectionCount() {
+return endpoint.getConnectionCount();
+}
+
+
 // -- Public 
methods
 
 public synchronized int getNameIndex() {



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



svn commit: r1502351 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/coyote/AbstractProtocol.java webapps/docs/changelog.xml

2013-07-11 Thread markt
Author: markt
Date: Thu Jul 11 20:24:38 2013
New Revision: 1502351

URL: http://svn.apache.org/r1502351
Log:
Expose the current connection count over JMX

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

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

Modified: tomcat/tc7.0.x/trunk/java/org/apache/coyote/AbstractProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/AbstractProtocol.java?rev=1502351r1=1502350r2=1502351view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/coyote/AbstractProtocol.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/coyote/AbstractProtocol.java Thu Jul 
11 20:24:38 2013
@@ -250,6 +250,11 @@ public abstract class AbstractProtocol i
 endpoint.setMaxHeaderCount(maxHeaderCount);
 }
 
+public long getConnectionCount() {
+return endpoint.getConnectionCount();
+}
+
+
 // -- Public 
methods
 
 public synchronized int getNameIndex() {

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=1502351r1=1502350r2=1502351view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Thu Jul 11 20:24:38 2013
@@ -85,6 +85,10 @@
 bug55228/bug: Allow web applications to set a HTTP Date header.
 (markt)
   /fix
+  add
+Expose the current connection count for each protocol handler via JMX.
+(markt)
+  /add
 /changelog
   /subsection
   subsection name=Jasper



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



[Bug 55241] maxConnections for BIO connector leads to acceptor stop

2013-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55241

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

   What|Removed |Added

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

--- Comment #1 from Mark Thomas ma...@apache.org ---
I have tested this with the latest Tomcat 7.0.x code and with trunk on both
Windows and Linux and am unable to reproduce it.

If you still see this issue with the latest 7.0.x release feel free to re-open
this issue but you'll need to add enough information for the issue to be
reproduced.

What might help is if you have a stack trace of the ClientAbortException as
reported by Tomcat as it might show a code path where the socket isn't getting
removed from the count once it closes.

-- 
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 55244] New: JspC throws ClassNotFoundException from Digester

2013-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55244

Bug ID: 55244
   Summary: JspC throws ClassNotFoundException from Digester
   Product: Tomcat 8
   Version: trunk
  Hardware: PC
OS: Mac OS X 10.4
Status: NEW
  Severity: normal
  Priority: P2
 Component: Jasper
  Assignee: dev@tomcat.apache.org
  Reporter: jboy...@apache.org

Created attachment 30583
  -- https://issues.apache.org/bugzilla/attachment.cgi?id=30583action=edit
log file from ant run

When run from Ant, the jasper task ia unable to location descriptor classes
used in an ObjectCreateRule.

The Digester does not have a classloader configured and is configured to use
the TCCL but that is Ant's classloader and not the task's.

-- 
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 55245] New: Add test cases for JspC

2013-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55245

Bug ID: 55245
   Summary: Add test cases for JspC
   Product: Tomcat 8
   Version: trunk
  Hardware: PC
OS: Mac OS X 10.4
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: Jasper
  Assignee: dev@tomcat.apache.org
  Reporter: jboy...@apache.org

The test suite should include tests for the JspC Ant task

-- 
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 55246] New: Delegate TLD processing for listeners to the JSP engine

2013-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55246

Bug ID: 55246
   Summary: Delegate TLD processing for listeners to the JSP
engine
   Product: Tomcat 8
   Version: trunk
  Hardware: All
OS: All
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: jboy...@apache.org

Per Servlet 3.1, section 8.3: Previously, a web container had to scan TLD
resources for any listener declarations. With Servlet 3.0 and later versions,
this responsibility may be delegated to the JSP container.

-- 
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 55247] New: JspC does not use settings from web fragments

2013-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55247

Bug ID: 55247
   Summary: JspC does not use settings from web fragments
   Product: Tomcat 8
   Version: trunk
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: Jasper
  Assignee: dev@tomcat.apache.org
  Reporter: jboy...@apache.org

JspC does not merge in the contents of web-fragment.xml files present in web
fragment jars. As such jsp-config defined in those descriptors is not
applied.

-- 
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 55244] JspC throws ClassNotFoundException from Digester

2013-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55244

--- Comment #1 from Jeremy Boynes jboy...@apache.org ---
Created attachment 30584
  -- https://issues.apache.org/bugzilla/attachment.cgi?id=30584action=edit
patch to set Digester classloader from JspC

Allow JspC's JspCServletContext to set the ClassLoader the Digester should use,
but don't impact use of WebXmlParser from other places.

-- 
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 55249] New: JspC compiles tag files even if compile options is false

2013-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55249

Bug ID: 55249
   Summary: JspC compiles tag files even if compile options is
false
   Product: Tomcat 8
   Version: trunk
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: Jasper
  Assignee: dev@tomcat.apache.org
  Reporter: jboy...@apache.org

JspC has a option compile which determines if the generated .java should be
compiled to .class files. This flag is not honoured when a tag file is
referenced from a JSP. The generated Java is always generated even if this flag
is false.

-- 
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 55250] New: JspC does not initialize tldLocationsCache resulting in NPE

2013-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55250

Bug ID: 55250
   Summary: JspC does not initialize tldLocationsCache resulting
in NPE
   Product: Tomcat 8
   Version: trunk
  Hardware: PC
OS: Mac OS X 10.4
Status: NEW
  Severity: normal
  Priority: P2
 Component: Jasper
  Assignee: dev@tomcat.apache.org
  Reporter: jboy...@apache.org

Change in how ServletContext was created missed initialization of
tldLocationsCache

-- 
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 55250] JspC does not initialize tldLocationsCache resulting in NPE

2013-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55250

--- Comment #1 from Jeremy Boynes jboy...@apache.org ---
Created attachment 30585
  -- https://issues.apache.org/bugzilla/attachment.cgi?id=30585action=edit
patch to initialize it

-- 
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 55245] Add test cases for JspC

2013-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55245

--- Comment #1 from Jeremy Boynes jboy...@apache.org ---
Pre-compiling test/webapp with JspC fails because some tests (e.g. for 47331)
use invalid JSP syntax which causes JspC to fail.

Suggest a new webapp-jspc for use in testing.

-- 
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 55251] New: JspC fails silently if directory for generated web.xml does not exist

2013-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55251

Bug ID: 55251
   Summary: JspC fails silently if directory for generated web.xml
does not exist
   Product: Tomcat 8
   Version: trunk
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: Jasper
  Assignee: dev@tomcat.apache.org
  Reporter: jboy...@apache.org

If the file specified for webXml (via call to setWebXml) cannot be created (for
example if the directory does not exist), then JspC fails silently.

-- 
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 55245] Add test cases for JspC

2013-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55245

--- Comment #2 from Jeremy Boynes jboy...@apache.org ---
Created attachment 30586
  -- https://issues.apache.org/bugzilla/attachment.cgi?id=30586action=edit
Patch with basic test case

Simple initial test case that runs JspC against webapp-*

-- 
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 55252] New: Separate Ant and command-line wrappers for JspC

2013-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55252

Bug ID: 55252
   Summary: Separate Ant and command-line wrappers for JspC
   Product: Tomcat 8
   Version: trunk
  Hardware: All
OS: All
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: Jasper
  Assignee: dev@tomcat.apache.org
  Reporter: jboy...@apache.org

JspC is currently both an Ant task and a main() class that can be invoked from
a command line. By refactoring into individual classes each can be integrated
better with that mode of invocation. 

For example, the Ant version could accept filesets indicating which JSP files
to compile allowing use of Ant's mechanisms for creating filesets (with
exclusions). This could also be used to supply the content of the webapp's
parent classloader as a classpath rather than as a simple String.

To do this I would propose keeping JspC as the name of the class for the
command line version and adding a JspCTask for use with Ant as for Ant the
actual class name is defined in catalina.tasks properties file.

-- 
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