[Tomcat Wiki] Update of FAQ/Logging by markt

2015-07-02 Thread Apache Wiki
Dear Wiki user,

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

The FAQ/Logging page has been changed by markt:
https://wiki.apache.org/tomcat/FAQ/Logging?action=diffrev1=23rev2=24

Comment:
Drop link to missing png

   * Prior to Tomcat 5.5, Tomcat provided a Logger element that you could 
configure and extend according to your needs.
   * Starting with Tomcat 5.5, Logger was removed and 
[[http://commons.apache.org/logging/|Apache Commons-Logging]] {{{Log}}} is used 
everywhere in Tomcat. Read the Commons-Logging documentation if you'd like to 
know how to better use and configure Tomcat's internal logging. See also 
http://tomcat.apache.org/tomcat-8.0-doc/logging.html
   * In Tomcat 7 (and also 6), the logging code is based on a set of classes 
interacting with the 
[[http://download.oracle.com/javase/6/docs/api/java/util/logging/package-summary.html|java.util.logging
 API]] (JUL), which comes with Java since version 1.4. The Tomcat startup 
script configures the JVM to use a web-application-aware implementation of the 
[[http://download.oracle.com/javase/6/docs/api/java/util/logging/LogManager.html|JUL
 LogManager]]. This Tomcat logging infrastructure is called JULI, and one can 
still distinguish its Apache Commons Logging heritage, but the complex 
configuration has been edited out and the package name changed.
- 
- {{http://public.m-plify.net/TomcatLogging.png}}
  
  Web applications can get logging service by using the Servlet API logging 
(which not recommended), the JUL interface (which ultimately goes to JULI) or 
any other preferred interface for which they furnish the jar files and the 
appropriate configuration (see the respective descriptions for 
[[http://logging.apache.org/log4j/|Log4J]], [[http://www.slf4j.org/|SLF4J]], 
[[http://logback.qos.ch/|logback]] or 
[[http://commons.apache.org/logging/|Apache Commons Logging]] for example). 
  

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



Re: Broken link report.

2015-07-02 Thread Mark Thomas
On 02/07/2015 04:23, Billson Chew wrote:
 Hi Webmaster,
 
 I'm a web developer, while checking through tomcat logging, found
 there has a broken link in page below:
 
 
 http://tomcat.apache.org/tomcat-5.5-doc/logging.html
 
 
 Broken link detected: java.util.logging.Formatter
 http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Formatter.html

Thanks for the report but we won't be fixing it.

Tomcat 5.5.x is no longer supported and all links on the Tomcat web site
to the 5.5.x docs were removed at the end of 2012. As with all
unsupported Tomcat versions, the 5.5.x docs were left in place (in case
folks were still linking to what are now very out of date docs) but they
are not maintained.

If you came to that page via the Tomcat home page, do let us know where
you found the link since all such links should have been removed. If you
came to that page via a 3rd party site it suggests that the site is
rather out of date.

Regards,

Mark



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



[Tomcat Wiki] Update of FAQ/Logging by markt

2015-07-02 Thread Apache Wiki
Dear Wiki user,

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

The FAQ/Logging page has been changed by markt:
https://wiki.apache.org/tomcat/FAQ/Logging?action=diffrev1=22rev2=23

Comment:
Correct version

  The Servlet Specification requires Servlet Containers like Tomcat to provide 
at least a rudimentary implementation of the {{{ServletContext#log}}} method. 
Tomcat provides a much richer implementation than required by the Spec, as 
follows:
  
   * Prior to Tomcat 5.5, Tomcat provided a Logger element that you could 
configure and extend according to your needs.
-  * Starting with Tomcat 5.5, Logger was removed and 
[[http://commons.apache.org/logging/|Apache Commons-Logging]] {{{Log}}} is used 
everywhere in Tomcat. Read the Commons-Logging documentation if you'd like to 
know how to better use and configure Tomcat's internal logging. See also 
http://tomcat.apache.org/tomcat-5.5-doc/logging.html
+  * Starting with Tomcat 5.5, Logger was removed and 
[[http://commons.apache.org/logging/|Apache Commons-Logging]] {{{Log}}} is used 
everywhere in Tomcat. Read the Commons-Logging documentation if you'd like to 
know how to better use and configure Tomcat's internal logging. See also 
http://tomcat.apache.org/tomcat-8.0-doc/logging.html
   * In Tomcat 7 (and also 6), the logging code is based on a set of classes 
interacting with the 
[[http://download.oracle.com/javase/6/docs/api/java/util/logging/package-summary.html|java.util.logging
 API]] (JUL), which comes with Java since version 1.4. The Tomcat startup 
script configures the JVM to use a web-application-aware implementation of the 
[[http://download.oracle.com/javase/6/docs/api/java/util/logging/LogManager.html|JUL
 LogManager]]. This Tomcat logging infrastructure is called JULI, and one can 
still distinguish its Apache Commons Logging heritage, but the complex 
configuration has been edited out and the package name changed.
  
  {{http://public.m-plify.net/TomcatLogging.png}}

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



Re: Broken link report.

2015-07-02 Thread Mark Thomas
On 02/07/2015 08:52, Billson Chew wrote:
 Hi Mark,
 
 Sure, http://tomcat.apache.org/tomcat-5.5-doc/logging.html, this
 page is fine, as you said, people still looking for outdated doc for
 existing outdated system which not planning to migrate to new tomcat.
 
 Just try to contribute to make apache doc to be better by doing this
 report.
 
 Understand that no more further maintenance, and thank you to reply.
 
 BTW, I got tomcat5.5doc link
 from: http://wiki.apache.org/tomcat/FAQ/Logging
 
 Can be search by: ://tomcat.apache.org/tomcat-5.5-doc/logging.html
 http://tomcat.apache.org/tomcat-5.5-doc/logging.html

Ah. The wiki. We must have missed that when we went looking for 5.5.
links back in 2012. I've just fixed it. Thanks.

Mark


 
 
 
 
 On Thu, Jul 2, 2015 at 3:42 PM, Mark Thomas ma...@apache.org
 mailto:ma...@apache.org wrote:
 
 On 02/07/2015 04:23, Billson Chew wrote:
  Hi Webmaster,
 
  I'm a web developer, while checking through tomcat logging, found
  there has a broken link in page below:
 
 
  http://tomcat.apache.org/tomcat-5.5-doc/logging.html
 
 
  Broken link detected: java.util.logging.Formatter

  
 http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Formatter.html
 
 Thanks for the report but we won't be fixing it.
 
 Tomcat 5.5.x is no longer supported and all links on the Tomcat web site
 to the 5.5.x docs were removed at the end of 2012. As with all
 unsupported Tomcat versions, the 5.5.x docs were left in place (in case
 folks were still linking to what are now very out of date docs) but they
 are not maintained.
 
 If you came to that page via the Tomcat home page, do let us know where
 you found the link since all such links should have been removed. If you
 came to that page via a 3rd party site it suggests that the site is
 rather out of date.
 
 Regards,
 
 Mark
 
 
 


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



[Bug 58063] Some async responses are empty when using Javamelody and Spring-webmvc

2015-07-02 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58063

--- Comment #2 from evernat ever...@free.fr ---
I did not know the async dispatcher type in filter mapping.
So, many thanks Violeta. You have removed a thorn from my side.
And this is merged in javamelody.

-- 
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: [VOTE] Release Apache Tomcat 8.0.24

2015-07-02 Thread Mark Thomas
On 01/07/2015 21:56, Mark Thomas wrote:
 The proposed Apache Tomcat 8.0.24 release is now available for voting.
 
 The main changes since 8.0.23 are:
 - Provide path parameters to POJO via per session
   javax.websocket.server.ServerEndpointConfig as they vary
   between different requests.
 
 - Various fixes to the SlowQueryReport in jdbc-pool
 
 - Various improvements to how Tomcat implements the requirements
   of SRV.10.7.2 (not loading Java SE and implemented
   specification classes from web applications
 
 There is a small collection of bug fixes, new features and
 performance improvements. For full details, see the changelog:
 http://svn.us.apache.org/repos/asf/tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml
 
 It can be obtained from:
 https://dist.apache.org/repos/dist/dev/tomcat/tomcat-8/v8.0.24/
 The Maven staging repo is:
 https://repository.apache.org/content/repositories/orgapachetomcat-1047/
 The svn tag is:
 http://svn.apache.org/repos/asf/tomcat/tc8.0.x/tags/TOMCAT_8_0_24/
 
 The proposed 8.0.24 release is:
 [ ] Broken - do not release
 [X] Stable - go ahead and release as 8.0.24

Unit tests passed on OSX, Linux and Windows for BIO, NIO, NIO2 and APR
(tc-native 1.1.33).

There was one incorrect entry in the change log but I'm happy with just
fixing that in the next release.

Mark

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



Re: [VOTE] Release Apache Tomcat 7.0.63

2015-07-02 Thread Rémy Maucherat
2015-06-30 11:01 GMT+02:00 Violeta Georgieva violet...@apache.org:

 The proposed Apache Tomcat 7.0.63 release is now available for voting.

 It can be obtained from:
 https://dist.apache.org/repos/dist/dev/tomcat/tomcat-7/v7.0.63/
 The Maven staging repo is:
 https://repository.apache.org/content/repositories/orgapachetomcat-1046/
 The svn tag is:
 http://svn.apache.org/repos/asf/tomcat/tc7.0.x/tags/TOMCAT_7_0_63/

 The proposed 7.0.63 release is:
 [ ] Broken - do not release
 [X] Stable - go ahead and release as 7.0.63 Stable

 Rémy


svn commit: r1688799 - /tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java

2015-07-02 Thread markt
Author: markt
Date: Thu Jul  2 09:50:46 2015
New Revision: 1688799

URL: http://svn.apache.org/r1688799
Log:
Missing Javadoc

Modified:
tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java

Modified: tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java?rev=1688799r1=1688798r2=1688799view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java Thu Jul  
2 09:50:46 2015
@@ -1035,6 +1035,8 @@ public class Http2UpgradeHandler extends
 /**
  * Check to see if a ping was sent recently and, if not, send one.
  *
+ * @param force Send a ping, even if one was sent recently
+ *
  * @throws IOException If an I/O issue prevents the ping from being 
sent
  */
 public void sendPing(boolean force) throws IOException {



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



Re: dev Digest 25 Jun 2015 14:12:09 -0000 Issue 8997

2015-07-02 Thread Mark Thomas
On 01/07/2015 22:54, 马旋(MA Xuan) wrote:
 Hi everyone,
 
 On Fri, Jun 26, 2015 at 12:12 AM, dev-digest-h...@tomcat.apache.org wrote:

 CodeSource location from ProtectionDomain for classes in WEB-INF/classes
 163624 by: 马旋(MA Xuan)
 
 
 Did anyone has ave look at this issue?  It has been a week, nobody
 replied, maybe there are too many distractions.

Yes, emails to the dev list do sometimes get overlooked.

 Do I need to create a ticket for this ?

Yes please.

I've taken a quick look and the issue looks valid. I'm not sure about
the proposed fix though. It is almost certainly better to correct the
value returned by getCodeBase() (fix the root cause, not one of the
symptoms).

Mark


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



Re: [Bug 57943] NioEndpoint, one poller thread died

2015-07-02 Thread Ian Luo
Hi Mark,

I am the colleague of Sun Qi who reported bug57943
https://bz.apache.org/bugzilla/show_bug.cgi?id=57943 one month ago. I
believe we managed to find out why ConcurrentModificationException happens
in our scenario.

Here’s the scenario, our application uses async servlet to write the
response back to the client. The operation we put in async servlet which
run in another thread is quite time-consuming. When the incoming traffic is
heavy, which usually happens when the instances of tomcat server reboots,
we hit this issue very easily.

When the ClientPoller thread run into timeout method (in NioEndpoint) and
execute the following code:

} else if (!ka.isAsync() || ka.getTimeout()  0) {
// Async requests with a timeout of 0 or less never timeout
long delta = now - ka.getLastAccess();
long timeout =
(ka.getTimeout()==-1)?((long)socketProperties.getSoTimeout()):(ka.getTimeout());
boolean isTimedout = delta  timeout;
if (isTimedout) {
// Prevent subsequent timeouts if the timeout event takes a
while to process
ka.access(Long.MAX_VALUE);
processSocket(ka.getChannel(), SocketStatus.TIMEOUT, true, 6);
}}

Eventually it calls processSocket(ka.getChannel()) and puts back the
NioChannel instance to the cache nioChannels for the late re-use:

if (ka!=null) ka.setComet(false);
socket.getPoller().cancelledKey(key, SocketStatus.ERROR, false);if
(running  !paused) {
nioChannels.offer(socket);}

Unfortunately in our scenarios, when QPS is greater than 1000req/sec, async
servlet threads have very large chance to start async-complete and begin to
call processSocket (in Http11NioProcessor) at the same time:

} else if (actionCode == ActionCode.ASYNC_COMPLETE) {
if (asyncStateMachine.asyncComplete()) {
((NioEndpoint)endpoint).processSocket(socketWrapper.getSocket(),
SocketStatus.OPEN_READ, true, 10);}

This leads to cache pollution in nioChannels since there’re chances to
offer the same object into the cache multiple times. When the Acceptor
thread polls the object and hands it over to the ClientPollers, the same
object could be pass into the different ClientPoller threads, then leads to
very serious problem.

You may notice the code I show here is the code from tomcat 7.0.54, and
claim the similar issue has already been addressed, but this is not true.
We noticed the similar issue was reported on Bug57340
https://bz.apache.org/bugzilla/show_bug.cgi?id=57340, and the solution
has already been checked into the later release.

But this solution is not a complete solution, in our scenario, there’s
chance to offer the duplicated object to the cache in else if clause where
the solution for Bug57340 doesn’t cover:

} else if (handshake == -1 ) {
if (key != null) {
socket.getPoller().cancelledKey(key, SocketStatus.DISCONNECT, false);
}
nioChannels.offer(socket);
socket = null;
if ( ka!=null ) keyCache.offer(ka);
ka = null;}

This is easily to understand. When handshake equals -1, one possibility is
the key passed into the doRun method is null, and when key is null, it
means some other thread has already finished processing on the same socket:

public void run() {
SelectionKey key = socket.getIOChannel().keyFor(
socket.getPoller().getSelector());

We propose the change below in order to address this issue throughly. In
this case, I think we can simply drop the object instead of offering it
since it looks there’s no other ideal way to not use lock.

} else if (handshake == -1 ) {
if (key != null) {
if (socket.getPoller().cancelledKey(key,
SocketStatus.DISCONNECT, false) != null) {
nioChannels.offer(socket);
if (ka != null) keyCache.offer(ka);
}
}
socket = null;
ka = null;

Best Regards,
-Ian.

On Fri, May 22, 2015 at 9:29 PM, bugzi...@apache.org wrote:

 https://bz.apache.org/bugzilla/show_bug.cgi?id=57943

 --- Comment #1 from Mark Thomas ma...@apache.org ---
 This is the third report we have received about this issue.

 The other two are:
 http://markmail.org/message/xgxblpk4v4ykgi5y
 http://markmail.org/message/eypk42i6gdpztkpy

 I have looked through the NIO Poller code again and I still can't see how
 this
 can be happening. I've also dug into the JRE code and I can't see any
 issues
 there either (although I'll not this has been reported on a variety of
 JVMs and
 I haven't checked the specific ones mentions).

 I think the best thing to do at this point is catch the error, log a
 warning
 and maybe ask folks to report it if they can repeat 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




Re: [VOTE] Release Apache Tomcat 8.0.24

2015-07-02 Thread Rémy Maucherat
2015-07-01 22:56 GMT+02:00 Mark Thomas ma...@apache.org:

 The proposed Apache Tomcat 8.0.24 release is now available for voting.

 The main changes since 8.0.23 are:
 - Provide path parameters to POJO via per session
   javax.websocket.server.ServerEndpointConfig as they vary
   between different requests.

 - Various fixes to the SlowQueryReport in jdbc-pool

 - Various improvements to how Tomcat implements the requirements
   of SRV.10.7.2 (not loading Java SE and implemented
   specification classes from web applications

 There is a small collection of bug fixes, new features and
 performance improvements. For full details, see the changelog:

 http://svn.us.apache.org/repos/asf/tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml

 It can be obtained from:
 https://dist.apache.org/repos/dist/dev/tomcat/tomcat-8/v8.0.24/
 The Maven staging repo is:
 https://repository.apache.org/content/repositories/orgapachetomcat-1047/
 The svn tag is:
 http://svn.apache.org/repos/asf/tomcat/tc8.0.x/tags/TOMCAT_8_0_24/

 The proposed 8.0.24 release is:
 [ ] Broken - do not release
 [X] Stable - go ahead and release as 8.0.24

 Works for me.

Rémy


Re: [VOTE] Release Apache Tomcat 8.0.24

2015-07-02 Thread Violeta Georgieva
2015-07-01 23:56 GMT+03:00 Mark Thomas ma...@apache.org:

 The proposed Apache Tomcat 8.0.24 release is now available for voting.

 The main changes since 8.0.23 are:
 - Provide path parameters to POJO via per session
   javax.websocket.server.ServerEndpointConfig as they vary
   between different requests.

 - Various fixes to the SlowQueryReport in jdbc-pool

 - Various improvements to how Tomcat implements the requirements
   of SRV.10.7.2 (not loading Java SE and implemented
   specification classes from web applications

 There is a small collection of bug fixes, new features and
 performance improvements. For full details, see the changelog:

http://svn.us.apache.org/repos/asf/tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml

 It can be obtained from:
 https://dist.apache.org/repos/dist/dev/tomcat/tomcat-8/v8.0.24/
 The Maven staging repo is:
 https://repository.apache.org/content/repositories/orgapachetomcat-1047/
 The svn tag is:
 http://svn.apache.org/repos/asf/tomcat/tc8.0.x/tags/TOMCAT_8_0_24/

 The proposed 8.0.24 release is:
 [ ] Broken - do not release
 [X] Stable - go ahead and release as 8.0.24

Checked with applications that use the new specifications features -
successful.
Tested Tomcat in OSGi environment - successful.

Regards,
Violeta

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



Re: [Bug 57943] NioEndpoint, one poller thread died

2015-07-02 Thread Christopher Schultz
Ian,

This is a nice follow-up. Could you attach it directly to the bug report
in Bugzilla, so the commentary is all in one place?

https://bz.apache.org/bugzilla/show_bug.cgi?id=57943

Thanks,
-chris

On 7/2/15 6:29 AM, Ian Luo wrote:
 Hi Mark,
 
 I am the colleague of Sun Qi who reported bug57943
 https://bz.apache.org/bugzilla/show_bug.cgi?id=57943 one month ago. I
 believe we managed to find out why ConcurrentModificationException happens
 in our scenario.
 
 Here’s the scenario, our application uses async servlet to write the
 response back to the client. The operation we put in async servlet which
 run in another thread is quite time-consuming. When the incoming traffic is
 heavy, which usually happens when the instances of tomcat server reboots,
 we hit this issue very easily.
 
 When the ClientPoller thread run into timeout method (in NioEndpoint) and
 execute the following code:
 
 } else if (!ka.isAsync() || ka.getTimeout()  0) {
 // Async requests with a timeout of 0 or less never timeout
 long delta = now - ka.getLastAccess();
 long timeout =
 (ka.getTimeout()==-1)?((long)socketProperties.getSoTimeout()):(ka.getTimeout());
 boolean isTimedout = delta  timeout;
 if (isTimedout) {
 // Prevent subsequent timeouts if the timeout event takes a
 while to process
 ka.access(Long.MAX_VALUE);
 processSocket(ka.getChannel(), SocketStatus.TIMEOUT, true, 6);
 }}
 
 Eventually it calls processSocket(ka.getChannel()) and puts back the
 NioChannel instance to the cache nioChannels for the late re-use:
 
 if (ka!=null) ka.setComet(false);
 socket.getPoller().cancelledKey(key, SocketStatus.ERROR, false);if
 (running  !paused) {
 nioChannels.offer(socket);}
 
 Unfortunately in our scenarios, when QPS is greater than 1000req/sec, async
 servlet threads have very large chance to start async-complete and begin to
 call processSocket (in Http11NioProcessor) at the same time:
 
 } else if (actionCode == ActionCode.ASYNC_COMPLETE) {
 if (asyncStateMachine.asyncComplete()) {
 ((NioEndpoint)endpoint).processSocket(socketWrapper.getSocket(),
 SocketStatus.OPEN_READ, true, 10);}
 
 This leads to cache pollution in nioChannels since there’re chances to
 offer the same object into the cache multiple times. When the Acceptor
 thread polls the object and hands it over to the ClientPollers, the same
 object could be pass into the different ClientPoller threads, then leads to
 very serious problem.
 
 You may notice the code I show here is the code from tomcat 7.0.54, and
 claim the similar issue has already been addressed, but this is not true.
 We noticed the similar issue was reported on Bug57340
 https://bz.apache.org/bugzilla/show_bug.cgi?id=57340, and the solution
 has already been checked into the later release.
 
 But this solution is not a complete solution, in our scenario, there’s
 chance to offer the duplicated object to the cache in else if clause where
 the solution for Bug57340 doesn’t cover:
 
 } else if (handshake == -1 ) {
 if (key != null) {
 socket.getPoller().cancelledKey(key, SocketStatus.DISCONNECT, false);
 }
 nioChannels.offer(socket);
 socket = null;
 if ( ka!=null ) keyCache.offer(ka);
 ka = null;}
 
 This is easily to understand. When handshake equals -1, one possibility is
 the key passed into the doRun method is null, and when key is null, it
 means some other thread has already finished processing on the same socket:
 
 public void run() {
 SelectionKey key = socket.getIOChannel().keyFor(
 socket.getPoller().getSelector());
 
 We propose the change below in order to address this issue throughly. In
 this case, I think we can simply drop the object instead of offering it
 since it looks there’s no other ideal way to not use lock.
 
 } else if (handshake == -1 ) {
 if (key != null) {
 if (socket.getPoller().cancelledKey(key,
 SocketStatus.DISCONNECT, false) != null) {
 nioChannels.offer(socket);
 if (ka != null) keyCache.offer(ka);
 }
 }
 socket = null;
 ka = null;
 
 Best Regards,
 -Ian.
 
 On Fri, May 22, 2015 at 9:29 PM, bugzi...@apache.org wrote:
 
 https://bz.apache.org/bugzilla/show_bug.cgi?id=57943

 --- Comment #1 from Mark Thomas ma...@apache.org ---
 This is the third report we have received about this issue.

 The other two are:
 http://markmail.org/message/xgxblpk4v4ykgi5y
 http://markmail.org/message/eypk42i6gdpztkpy

 I have looked through the NIO Poller code again and I still can't see how
 this
 can be happening. I've also dug into the JRE code and I can't see any
 issues
 there either (although I'll not this has been reported on a variety of
 JVMs and
 I haven't checked the specific ones mentions).

 I think the best thing to do at this point is catch the error, log a
 warning
 and maybe ask folks to report it if they can repeat it.

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

 

svn commit: r1688841 - /tomcat/trunk/build.properties.default

2015-07-02 Thread kkolinko
Author: kkolinko
Date: Thu Jul  2 15:00:47 2015
New Revision: 1688841

URL: http://svn.apache.org/r1688841
Log:
Update to Checkstyle 6.8.1

Modified:
tomcat/trunk/build.properties.default

Modified: tomcat/trunk/build.properties.default
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/build.properties.default?rev=1688841r1=1688840r2=1688841view=diff
==
--- tomcat/trunk/build.properties.default (original)
+++ tomcat/trunk/build.properties.default Thu Jul  2 15:00:47 2015
@@ -211,7 +211,7 @@ objenesis.loc=https://objenesis.googleco
 objenesis.jar=${objenesis.home}/objenesis-${objenesis.version}.jar
 
 # - Checkstyle, version 6.0 or later -
-checkstyle.version=6.7
+checkstyle.version=6.8.1
 checkstyle.home=${base.path}/checkstyle-${checkstyle.version}
 
checkstyle.loc=${base-sf.loc}/checkstyle/checkstyle/${checkstyle.version}/checkstyle-${checkstyle.version}-all.jar
 checkstyle.jar=${checkstyle.home}/checkstyle-${checkstyle.version}-all.jar



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



[Bug 58094] [7.0.63 RC] Null component Tomcat:type=Cache error messages in testsuite logs

2015-07-02 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58094

Konstantin Kolinko knst.koli...@gmail.com changed:

   What|Removed |Added

 OS||All

--- Comment #1 from Konstantin Kolinko knst.koli...@gmail.com ---
This log message is not observed during normal standalone use of Tomcat (e.g.
smoke-testing the examples webapp). So it is something specific to embedded
Tomcat configuration used by test cases.

-- 
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 58094] New: [7.0.63 RC] Null component Tomcat:type=Cache error messages in testsuite logs

2015-07-02 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58094

Bug ID: 58094
   Summary: [7.0.63 RC] Null component Tomcat:type=Cache error
messages in testsuite logs
   Product: Tomcat 7
   Version: trunk
  Hardware: PC
Status: NEW
  Severity: regression
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: knst.koli...@gmail.com

Running tests for release candidate of Tomcat 7.0.63, I see a lot of the
following messages in the logs:

some date and time org.apache.tomcat.util.modeler.Registry registerComponent
SEVERE: Null component Tomcat:type=Cache,host=localhost,context=/login

The above message is from
org.apache.catalina.authenticator.TestSSOnonLoginAndBasicAuthenticator test,
but the same message (with different context path) occurs in many test cases.
When running whole testsuite with Java 7 and all 3 connectors, the message is
found in 165 test result files out of 543.

I am running with Access Logging enabled by the following setting in
build.properties, but I think it does not matter:

test.accesslog=true


This message is absent from 7.0.62 test logs, so it is a regression in this
specific version of Tomcat 7.

Looking into Apache Gump logs, this message is present in
tomcat-tc7.0.x-test-nio results for the above mentioned test case, but absent
in tomcat-tc8.0.x-test-nio, tomcat-trunk-test-nio, so Tomcat 8 and trunk do not
have this issue.

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

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



Re: [Bug 57943] NioEndpoint, one poller thread died

2015-07-02 Thread Ian Luo
Hi Chris, Sure, just done.

Thanks,
-Ian.

On Thu, Jul 2, 2015 at 9:55 PM, Christopher Schultz 
ch...@christopherschultz.net wrote:

 Ian,

 This is a nice follow-up. Could you attach it directly to the bug report
 in Bugzilla, so the commentary is all in one place?

 https://bz.apache.org/bugzilla/show_bug.cgi?id=57943

 Thanks,
 -chris

 On 7/2/15 6:29 AM, Ian Luo wrote:
  Hi Mark,
 
  I am the colleague of Sun Qi who reported bug57943
  https://bz.apache.org/bugzilla/show_bug.cgi?id=57943 one month ago. I
  believe we managed to find out why ConcurrentModificationException
 happens
  in our scenario.
 
  Here’s the scenario, our application uses async servlet to write the
  response back to the client. The operation we put in async servlet which
  run in another thread is quite time-consuming. When the incoming traffic
 is
  heavy, which usually happens when the instances of tomcat server reboots,
  we hit this issue very easily.
 
  When the ClientPoller thread run into timeout method (in NioEndpoint) and
  execute the following code:
 
  } else if (!ka.isAsync() || ka.getTimeout()  0) {
  // Async requests with a timeout of 0 or less never timeout
  long delta = now - ka.getLastAccess();
  long timeout =
 
 (ka.getTimeout()==-1)?((long)socketProperties.getSoTimeout()):(ka.getTimeout());
  boolean isTimedout = delta  timeout;
  if (isTimedout) {
  // Prevent subsequent timeouts if the timeout event takes a
  while to process
  ka.access(Long.MAX_VALUE);
  processSocket(ka.getChannel(), SocketStatus.TIMEOUT, true, 6);
  }}
 
  Eventually it calls processSocket(ka.getChannel()) and puts back the
  NioChannel instance to the cache nioChannels for the late re-use:
 
  if (ka!=null) ka.setComet(false);
  socket.getPoller().cancelledKey(key, SocketStatus.ERROR, false);if
  (running  !paused) {
  nioChannels.offer(socket);}
 
  Unfortunately in our scenarios, when QPS is greater than 1000req/sec,
 async
  servlet threads have very large chance to start async-complete and begin
 to
  call processSocket (in Http11NioProcessor) at the same time:
 
  } else if (actionCode == ActionCode.ASYNC_COMPLETE) {
  if (asyncStateMachine.asyncComplete()) {
  ((NioEndpoint)endpoint).processSocket(socketWrapper.getSocket(),
  SocketStatus.OPEN_READ, true, 10);}
 
  This leads to cache pollution in nioChannels since there’re chances to
  offer the same object into the cache multiple times. When the Acceptor
  thread polls the object and hands it over to the ClientPollers, the same
  object could be pass into the different ClientPoller threads, then leads
 to
  very serious problem.
 
  You may notice the code I show here is the code from tomcat 7.0.54, and
  claim the similar issue has already been addressed, but this is not true.
  We noticed the similar issue was reported on Bug57340
  https://bz.apache.org/bugzilla/show_bug.cgi?id=57340, and the solution
  has already been checked into the later release.
 
  But this solution is not a complete solution, in our scenario, there’s
  chance to offer the duplicated object to the cache in else if clause
 where
  the solution for Bug57340 doesn’t cover:
 
  } else if (handshake == -1 ) {
  if (key != null) {
  socket.getPoller().cancelledKey(key, SocketStatus.DISCONNECT,
 false);
  }
  nioChannels.offer(socket);
  socket = null;
  if ( ka!=null ) keyCache.offer(ka);
  ka = null;}
 
  This is easily to understand. When handshake equals -1, one possibility
 is
  the key passed into the doRun method is null, and when key is null, it
  means some other thread has already finished processing on the same
 socket:
 
  public void run() {
  SelectionKey key = socket.getIOChannel().keyFor(
  socket.getPoller().getSelector());
 
  We propose the change below in order to address this issue throughly. In
  this case, I think we can simply drop the object instead of offering it
  since it looks there’s no other ideal way to not use lock.
 
  } else if (handshake == -1 ) {
  if (key != null) {
  if (socket.getPoller().cancelledKey(key,
  SocketStatus.DISCONNECT, false) != null) {
  nioChannels.offer(socket);
  if (ka != null) keyCache.offer(ka);
  }
  }
  socket = null;
  ka = null;
 
  Best Regards,
  -Ian.
 
  On Fri, May 22, 2015 at 9:29 PM, bugzi...@apache.org wrote:
 
  https://bz.apache.org/bugzilla/show_bug.cgi?id=57943
 
  --- Comment #1 from Mark Thomas ma...@apache.org ---
  This is the third report we have received about this issue.
 
  The other two are:
  http://markmail.org/message/xgxblpk4v4ykgi5y
  http://markmail.org/message/eypk42i6gdpztkpy
 
  I have looked through the NIO Poller code again and I still can't see
 how
  this
  can be happening. I've also dug into the JRE code and I can't see any
  issues
  there either (although I'll not this has been reported on a variety of
  JVMs and
  I haven't checked the specific 

svn commit: r1688844 - in /tomcat/tc8.0.x/trunk: ./ build.properties.default webapps/docs/changelog.xml

2015-07-02 Thread kkolinko
Author: kkolinko
Date: Thu Jul  2 15:04:47 2015
New Revision: 1688844

URL: http://svn.apache.org/r1688844
Log:
Update to Checkstyle 6.8.1

Merged r1688841 from tomcat/trunk.

Modified:
tomcat/tc8.0.x/trunk/   (props changed)
tomcat/tc8.0.x/trunk/build.properties.default
tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc8.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jul  2 15:04:47 2015
@@ -1 +1 @@
-/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886,1644890,1644892
 
,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357-1645358,1645455,1645465,1645469,1645471,1645473,1645475,1645486-1645488,1645626,1645641,1645685,1645743,1645763,1645951-1645953,1645955,1645993,1646098-1646106,1646178,1646220,1646302,1646304,1646420,1646470-1646471,1646476,1646559,1646717-1646723,1646773,1647026,1647042,1647530,1647655,1648304,1648815,1648907,1650081,1650365,1651116,1651120,1651280,1651470,1652938,1652970,1653041,1653471,1653550,1653574,1653797,1653815-1653816,1653819,1653840,1653857,1653888,1653972,1654013,1654030,1654050,1654123,1654148,1654159,1654513,1654515,1654517,1654522,1654524,1654725,1654735,1654766,1654785,1654851-1654852,1654978,1655122-1655124,1655126-1655127,1655129-1655130,1655132-1655133,1655312,1655438,1655441,1655454,168,1656087,1656299,1656319,1656331,1656345,1656350,1656590,1656648-1656650,1656657,1657041,1657054,1657374,1657492,1657510,1657565,1657580,1657584,1657586,1657589,1657592,1657607,1657609,1657682,1657
 
907,1658207,1658734,1658781,1658790,1658799,1658802,1658804,1658833,1658840,1658966,1659043,1659053,1659059,1659188-1659189,1659216,1659263,1659293,1659304,1659306-1659307,1659382,1659384,1659428,1659471,1659486,1659505,1659516,1659521,1659524,1659559,1659562,1659803,1659806,1659814,1659833,1659862,1659905,1659919,1659948,1659967,1659983-1659984,1660060,1660074,1660077,1660133,1660168,1660331-1660332,1660353,1660358,1660924,1661386,1661867,1661972,1661990,1662200,1662308-1662309,1662548,1662614,1662736,1662985,1662988-1662989,1663264,1663277,1663298,1663534,1663562,1663676,1663715,1663754,1663768,1663772,1663781,1663893,1663995,1664143,1664163,1664174,1664301,1664317,1664347,1664657,1664659,1664710,1664863-1664864,1664866,1665085,1665292,1665559,1665653,1665661,1665672,1665694,1665697,1665736,1665779,1665976-1665977,1665980-1665981,1665985-1665986,1665989,1665998,1666004,1666008,1666013,1666017,1666024,1666116,1666386-1666387,1666494,1666496,1666552,1666569,1666579,137,149,1
 
666757,1666966,1666972,1666985,1666995,1666997,1667292,1667402,1667406,1667546,1667615,1667630,1667636,1667688,1667764,1667871,1668026,1668135,1668193,1668593,1668596,1668630,1668639,1668843,1669353,1669370,1669451,1669800,1669838,1669876,1669882,1670394,1670433,1670591,1670598-1670600,1670610,1670631,1670719,1670724,1670726,1670730,1670940,1671112,1672272,1672284,1673754,1674294,1675461,1675486,1675594,1675830,1676231,1676250-1676251,1676364,1676381,1676393,1676479,1676525,1676552,1676615,1676630,1676634,1676721,1676926,1676943,1677140,1677802,1678011,1678162,1678174,1678339,1678426-1678427,1678694,1678701,1679534,1679708,1679710,1679716,1680034,1680246,1681056,1681123,1681138,1681280,1681283,1681286,1681450,1681701,1681729,1681770,1681779,1681793,1681807,1681837-1681838,1681854,1681862,1681958,1682028,1682033,1682311,1682315,1682317,1682320,1682324,1682330,1682842,1684172,1684366,1684383,1684526-1684527,1684549-1684550,1685739,1685744,1685772,1685816,1685826,1685891,1687268,168734
 0,1688563

[Bug 57943] NioEndpoint, one poller thread died

2015-07-02 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=57943

Ian Luo ian@gmail.com changed:

   What|Removed |Added

 CC||ian@gmail.com

--- Comment #4 from Ian Luo ian@gmail.com ---
Created attachment 32880
  -- https://bz.apache.org/bugzilla/attachment.cgi?id=32880action=edit
analysis for bug57943

it's in markdown format

-- 
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: r1688904 - in /tomcat/tc8.0.x/trunk: ./ java/org/apache/tomcat/util/net/NioEndpoint.java webapps/docs/changelog.xml

2015-07-02 Thread markt
Author: markt
Date: Thu Jul  2 20:38:09 2015
New Revision: 1688904

URL: http://svn.apache.org/r1688904
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=57943
Prevent the same socket being added to the cache twice.
Patch based on analysis by Ian Luo / Sun Qi

Modified:
tomcat/tc8.0.x/trunk/   (props changed)
tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc8.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jul  2 20:38:09 2015
@@ -1 +1 @@
-/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886,1644890,1644892
 
,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357-1645358,1645455,1645465,1645469,1645471,1645473,1645475,1645486-1645488,1645626,1645641,1645685,1645743,1645763,1645951-1645953,1645955,1645993,1646098-1646106,1646178,1646220,1646302,1646304,1646420,1646470-1646471,1646476,1646559,1646717-1646723,1646773,1647026,1647042,1647530,1647655,1648304,1648815,1648907,1650081,1650365,1651116,1651120,1651280,1651470,1652938,1652970,1653041,1653471,1653550,1653574,1653797,1653815-1653816,1653819,1653840,1653857,1653888,1653972,1654013,1654030,1654050,1654123,1654148,1654159,1654513,1654515,1654517,1654522,1654524,1654725,1654735,1654766,1654785,1654851-1654852,1654978,1655122-1655124,1655126-1655127,1655129-1655130,1655132-1655133,1655312,1655438,1655441,1655454,168,1656087,1656299,1656319,1656331,1656345,1656350,1656590,1656648-1656650,1656657,1657041,1657054,1657374,1657492,1657510,1657565,1657580,1657584,1657586,1657589,1657592,1657607,1657609,1657682,1657
 
907,1658207,1658734,1658781,1658790,1658799,1658802,1658804,1658833,1658840,1658966,1659043,1659053,1659059,1659188-1659189,1659216,1659263,1659293,1659304,1659306-1659307,1659382,1659384,1659428,1659471,1659486,1659505,1659516,1659521,1659524,1659559,1659562,1659803,1659806,1659814,1659833,1659862,1659905,1659919,1659948,1659967,1659983-1659984,1660060,1660074,1660077,1660133,1660168,1660331-1660332,1660353,1660358,1660924,1661386,1661867,1661972,1661990,1662200,1662308-1662309,1662548,1662614,1662736,1662985,1662988-1662989,1663264,1663277,1663298,1663534,1663562,1663676,1663715,1663754,1663768,1663772,1663781,1663893,1663995,1664143,1664163,1664174,1664301,1664317,1664347,1664657,1664659,1664710,1664863-1664864,1664866,1665085,1665292,1665559,1665653,1665661,1665672,1665694,1665697,1665736,1665779,1665976-1665977,1665980-1665981,1665985-1665986,1665989,1665998,1666004,1666008,1666013,1666017,1666024,1666116,1666386-1666387,1666494,1666496,1666552,1666569,1666579,137,149,1
 
666757,1666966,1666972,1666985,1666995,1666997,1667292,1667402,1667406,1667546,1667615,1667630,1667636,1667688,1667764,1667871,1668026,1668135,1668193,1668593,1668596,1668630,1668639,1668843,1669353,1669370,1669451,1669800,1669838,1669876,1669882,1670394,1670433,1670591,1670598-1670600,1670610,1670631,1670719,1670724,1670726,1670730,1670940,1671112,1672272,1672284,1673754,1674294,1675461,1675486,1675594,1675830,1676231,1676250-1676251,1676364,1676381,1676393,1676479,1676525,1676552,1676615,1676630,1676634,1676721,1676926,1676943,1677140,1677802,1678011,1678162,1678174,1678339,1678426-1678427,1678694,1678701,1679534,1679708,1679710,1679716,1680034,1680246,1681056,1681123,1681138,1681280,1681283,1681286,1681450,1681701,1681729,1681770,1681779,1681793,1681807,1681837-1681838,1681854,1681862,1681958,1682028,1682033,1682311,1682315,1682317,1682320,1682324,1682330,1682842,1684172,1684366,1684383,1684526-1684527,1684549-1684550,1685739,1685744,1685772,1685816,1685826,1685891,1687268,168734
 0,1688563,1688841,1688878,165,1688896

svn commit: r1688906 - /tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

2015-07-02 Thread markt
Author: markt
Date: Thu Jul  2 20:43:25 2015
New Revision: 1688906

URL: http://svn.apache.org/r1688906
Log:
Simplify
Setting socket to null is pointless
Should set ka to null

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1688906r1=1688905r2=1688906view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Thu Jul  2 
20:43:25 2015
@@ -1522,29 +1522,21 @@ public class NioEndpoint extends Abstrac
 }
 if (state == SocketState.CLOSED) {
 close(socket, key);
-socket = null;
-ka = null;
 }
 } else if (handshake == -1 ) {
 close(socket, key);
-socket = null;
-ka = null;
 } else {
 ka.getPoller().add(socket,handshake);
 }
 } catch (CancelledKeyException cx) {
-if (socket != null) {
-socket.getPoller().cancelledKey(key);
-}
+socket.getPoller().cancelledKey(key);
 } catch (VirtualMachineError vme) {
 ExceptionUtils.handleThrowable(vme);
 } catch (Throwable t) {
 log.error(, t);
-if (socket != null) {
-socket.getPoller().cancelledKey(key);
-}
+socket.getPoller().cancelledKey(key);
 } finally {
-socket = null;
+ka = null;
 status = null;
 //return to cache
 if (running  !paused) {



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



svn commit: r1688907 - /tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

2015-07-02 Thread markt
Author: markt
Date: Thu Jul  2 20:49:33 2015
New Revision: 1688907

URL: http://svn.apache.org/r1688907
Log:
Simplify
Setting socket to null is pointless
Should set ka to null

Modified:
tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

Modified: tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1688907r1=1688906r2=1688907view=diff
==
--- tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java 
(original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Thu 
Jul  2 20:49:33 2015
@@ -1469,25 +1469,24 @@ public class NioEndpoint extends Abstrac
 @Override
 public void run() {
 NioChannel socket = ka.getSocket();
-SelectionKey key = socket.getIOChannel().keyFor(
-socket.getPoller().getSelector());
 
 // Upgraded connections need to allow multiple threads to access 
the
 // connection at the same time to enable blocking IO to be used 
when
 // NIO has been configured
 if (ka.isUpgraded()  SocketStatus.OPEN_WRITE == status) {
 synchronized (ka.getWriteThreadLock()) {
-doRun(key, ka);
+doRun();
 }
 } else {
 synchronized (socket) {
-doRun(key, ka);
+doRun();
 }
 }
 }
 
-private void doRun(SelectionKey key, KeyAttachment ka) {
+private void doRun() {
 NioChannel socket = ka.getSocket();
+SelectionKey key = 
socket.getIOChannel().keyFor(socket.getPoller().getSelector());
 
 try {
 int handshake = -1;
@@ -1527,28 +1526,20 @@ public class NioEndpoint extends Abstrac
 state = handler.process(ka, status);
 }
 if (state == SocketState.CLOSED) {
-close(ka, socket, key, SocketStatus.ERROR);
-socket = null;
-ka = null;
+close(socket, key, SocketStatus.ERROR);
 }
 } else if (handshake == -1 ) {
-close(ka, socket, key, SocketStatus.DISCONNECT);
-socket = null;
-ka = null;
+close(socket, key, SocketStatus.DISCONNECT);
 } else {
 ka.getPoller().add(socket,handshake);
 }
 } catch (CancelledKeyException cx) {
-if (socket != null) {
-socket.getPoller().cancelledKey(key, null);
-}
+socket.getPoller().cancelledKey(key, null);
 } catch (OutOfMemoryError oom) {
 try {
 oomParachuteData = null;
 log.error(, oom);
-if (socket != null) {
-
socket.getPoller().cancelledKey(key,SocketStatus.ERROR);
-}
+socket.getPoller().cancelledKey(key,SocketStatus.ERROR);
 releaseCaches();
 } catch (Throwable oomt) {
 try {
@@ -1562,11 +1553,9 @@ public class NioEndpoint extends Abstrac
 ExceptionUtils.handleThrowable(vme);
 } catch (Throwable t) {
 log.error(, t);
-if (socket != null) {
-socket.getPoller().cancelledKey(key,SocketStatus.ERROR);
-}
+socket.getPoller().cancelledKey(key,SocketStatus.ERROR);
 } finally {
-socket = null;
+ka = null;
 status = null;
 //return to cache
 if (running  !paused) {
@@ -1575,8 +1564,7 @@ public class NioEndpoint extends Abstrac
 }
 }
 
-private void close(KeyAttachment ka, NioChannel socket, SelectionKey 
key,
-SocketStatus socketStatus) {
+private void close(NioChannel socket, SelectionKey key, SocketStatus 
socketStatus) {
 // Close socket and pool
 try {
 ka.setComet(false);



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



[Bug 58095] New: Empty script tag results in generated jsp having a self-closing script tag, which is invalid and results in rendering issues

2015-07-02 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58095

Bug ID: 58095
   Summary: Empty script tag results in generated jsp having a
self-closing script tag, which is invalid and
results in rendering issues
   Product: Tomcat 8
   Version: 8.0.23
  Hardware: Macintosh
OS: Mac OS X 10.1
Status: NEW
  Severity: normal
  Priority: P2
 Component: Jasper
  Assignee: dev@tomcat.apache.org
  Reporter: jones...@oildex.com

Sample:

script type=text/javascript src=/somepath/myfile.js/script

Results in the following in the generated class:

script type=text/javascript src=/somepath/myfile.js/

Since the latter is invalid HTML (script tag is not self-closing), it results
in severe page issues depending on the page content occurring below it.

The workaround is to put some non-empty body, eg:

script type=text/javascript src=/somepath/myfile.js//DONT REMOVE/script

-- 
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 58095] Empty script tag results in generated jsp having a self-closing script tag, which is invalid and results in rendering issues

2015-07-02 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58095

--- Comment #2 from jones...@oildex.com ---
TAGX and JSPX only.  Standard JSPs  Tags don't seem to exhibit this. 
Interestingly, JSP *Documents* having an extension of just jsp (rather than
jspx) don't seem to either.

Generated JSP(X)/Tag(X) = the filename_jsp(x).java that Jasper creates.

eg.)

script type=text/javascript src=/docp/js/common/common.js/script

Becomes:

out.write(script src=\/docp/js/common/common.js\
type=\text/javascript\/);

The testcase should be as simple as adding the sample snippet above to a JSP
and compiling it using Jasper.

We'll apply your recommendation to dodge this, thanks.

-- 
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: [VOTE] Release Apache Tomcat 8.0.24

2015-07-02 Thread Keiichi Fujino
2015-07-02 5:56 GMT+09:00 Mark Thomas ma...@apache.org:

 The proposed Apache Tomcat 8.0.24 release is now available for voting.

 The main changes since 8.0.23 are:
 - Provide path parameters to POJO via per session
   javax.websocket.server.ServerEndpointConfig as they vary
   between different requests.

 - Various fixes to the SlowQueryReport in jdbc-pool

 - Various improvements to how Tomcat implements the requirements
   of SRV.10.7.2 (not loading Java SE and implemented
   specification classes from web applications

 There is a small collection of bug fixes, new features and
 performance improvements. For full details, see the changelog:

 http://svn.us.apache.org/repos/asf/tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml

 It can be obtained from:
 https://dist.apache.org/repos/dist/dev/tomcat/tomcat-8/v8.0.24/
 The Maven staging repo is:
 https://repository.apache.org/content/repositories/orgapachetomcat-1047/
 The svn tag is:
 http://svn.apache.org/repos/asf/tomcat/tc8.0.x/tags/TOMCAT_8_0_24/

 The proposed 8.0.24 release is:
 [ ] Broken - do not release
 [X] Stable - go ahead and release as 8.0.24


+1
Tested on my simple handmade apps.(use BackupManager and jdbc-pool).




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

 --
 Keiichi.Fujino
  dev-h...@tomcat.apache.org

 dev-h...@tomcat.apache.org


Re: [VOTE] Release Apache Tomcat 7.0.63

2015-07-02 Thread Keiichi Fujino
2015-06-30 18:01 GMT+09:00 Violeta Georgieva violet...@apache.org:

 The proposed Apache Tomcat 7.0.63 release is now available for voting.

 It can be obtained from:
 https://dist.apache.org/repos/dist/dev/tomcat/tomcat-7/v7.0.63/
 The Maven staging repo is:
 https://repository.apache.org/content/repositories/orgapachetomcat-1046/
 The svn tag is:
 http://svn.apache.org/repos/asf/tomcat/tc7.0.x/tags/TOMCAT_7_0_63/

 The proposed 7.0.63 release is:
 [ ] Broken - do not release
 [X] Stable - go ahead and release as 7.0.63 Stable


+1
Tested on my simple handmade apps.(use BackupManager and jdbc-pool).



 Regards,
 Violeta

 --
 Keiichi.Fujino



[Bug 58096] Incorrect CodeSource location from ProtectionDomain for classes in WEB-INF/classes

2015-07-02 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58096

--- Comment #2 from Xuan MA super...@gmail.com ---
I create a new fix based on Mark's comment:

https://github.com/SuperMMX/tomcat/commit/1e5335629ca48608d59b3bc1247c853920157d46

-- 
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 57943] NioEndpoint, one poller thread died

2015-07-02 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=57943

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

   What|Removed |Added

  Attachment #32880|text/markdown   |text/plain
  mime type||

-- 
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 57943] NioEndpoint, one poller thread died

2015-07-02 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=57943

--- Comment #5 from Christopher Schultz ch...@christopherschultz.net ---
Comment on attachment 32880
  -- https://bz.apache.org/bugzilla/attachment.cgi?id=32880
analysis for bug57943

Ian's comment, not as an attachment, and therefore much more readable, is:

I am the colleague of Sun Qi who reported
[bug57943](https://bz.apache.org/bugzilla/show_bug.cgi?id=57943) one month ago.
I believe we managed to find out why ConcurrentModificationException happens in
our scenario.

Here's the scenario, our application uses async servlet to write the response
back to the client. The operation we put in async servlet which run in another
thread is quite time-consuming. When the incoming traffic is heavy, which
usually happens when the instances of tomcat server reboots, we hit this issue
very easily. 

When the ClientPoller thread run into timeout method (in NioEndpoint) and
execute the following code:

```java
} else if (!ka.isAsync() || ka.getTimeout()  0) {
// Async requests with a timeout of 0 or less never timeout
long delta = now - ka.getLastAccess();
long timeout =
(ka.getTimeout()==-1)?((long)socketProperties.getSoTimeout()):(ka.getTimeout());
boolean isTimedout = delta  timeout;
if (isTimedout) {
// Prevent subsequent timeouts if the timeout event takes a while to
process
ka.access(Long.MAX_VALUE);
processSocket(ka.getChannel(), SocketStatus.TIMEOUT, true, 6);
}
}
```

Eventually it calls `processSocket(ka.getChannel())` and puts back the
NioChannel instance to the cache `nioChannels` for the late re-use:

```java
if (ka!=null) ka.setComet(false);
socket.getPoller().cancelledKey(key, SocketStatus.ERROR, false);
if (running  !paused) {
nioChannels.offer(socket);
}
```

Unfortunately in our scenarios, when QPS is greater than 1000req/sec, async
servlet threads have very large chance to start async-complete and begin to
call `processSocket` (in Http11NioProcessor) at the same time:

```java
} else if (actionCode == ActionCode.ASYNC_COMPLETE) {
if (asyncStateMachine.asyncComplete()) {
((NioEndpoint)endpoint).processSocket(socketWrapper.getSocket(),
SocketStatus.OPEN_READ, true, 10);
}
```

This leads to cache pollution in `nioChannels` since there're chances to offer
the same object into the cache multiple times. When the Acceptor thread polls
the object and hands it over to the ClientPollers, the same object could be
pass into the different ClientPoller threads, then leads to very serious
problem.

You may notice the code I show here is the code from tomcat 7.0.54, and claim
the similar issue has already been addressed, but this is not true. We noticed
the similar issue was reported on
[Bug57340](https://bz.apache.org/bugzilla/show_bug.cgi?id=57340), and the
solution has already been checked into the later release.

But this solution is not a complete solution, in our scenario, there's chance
to offer the duplicated object to the cache in `else if` clause where the
solution for Bug57340 doesn't cover:

```java
} else if (handshake == -1 ) {
if (key != null) {
socket.getPoller().cancelledKey(key, SocketStatus.DISCONNECT, false);
}
nioChannels.offer(socket);
socket = null;
if ( ka!=null ) keyCache.offer(ka);
ka = null;
}
```

This is easily to understand. When handshake equals -1, one possibility is the
`key` passed into the doRun method is `null`, and when `key` is null, it means
some other thread has already finished processing on the same socket:

```java
public void run() {
SelectionKey key = socket.getIOChannel().keyFor(
socket.getPoller().getSelector());
```

We propose the change below in order to address this issue throughly. In this
case, I think we can simply drop the object instead of offering it since it
looks there's no other ideal way to not use lock.

```java
} else if (handshake == -1 ) {
if (key != null) {
if (socket.getPoller().cancelledKey(key, SocketStatus.DISCONNECT,
false) != null) {
nioChannels.offer(socket);
if (ka != null) keyCache.offer(ka);
}
}
socket = null;
ka = null;
```

-- 
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: [VOTE] Release Apache Tomcat 7.0.63

2015-07-02 Thread Christopher Schultz
Violetta,

On 6/30/15 5:01 AM, Violeta Georgieva wrote:
 The proposed Apache Tomcat 7.0.63 release is now available for voting.
 
 It can be obtained from:
 https://dist.apache.org/repos/dist/dev/tomcat/tomcat-7/v7.0.63/
 The Maven staging repo is:
 https://repository.apache.org/content/repositories/orgapachetomcat-1046/
 The svn tag is:
 http://svn.apache.org/repos/asf/tomcat/tc7.0.x/tags/TOMCAT_7_0_63/
 
 The proposed 7.0.63 release is:
 [ ] Broken - do not release
 [X] Stable - go ahead and release as 7.0.63 Stable

I have not tested this release with any application, just built
everything and ran all unit tests (BIO, NIO, APR).

Specifics:

* Environment
*  Java (build): java version 1.6.0_45 Java(TM) SE Runtime
Environment (build 1.6.0_45-b06) Java HotSpot(TM) 64-Bit Server VM
(build 20.45-b01, mixed mode)
*  Java (test): java version 1.7.0_79 Java(TM) SE Runtime
Environment (build 1.7.0_79-b15) Java HotSpot(TM) 64-Bit Server VM
(build 24.79-b02, mixed mode)
*  OS:   Linux 2.6.32-312-ec2 x86_64
*  cc:   cc (Debian 4.7.2-5) 4.7.2
*  make: GNU Make 3.81
*  OpenSSL:  OpenSSL 1.0.1e 11 Feb 2013
*  APR:  1.4.6
*
* Valid MD5 signature for apache-tomcat-7.0.63.zip
* Valid GPG signature for apache-tomcat-7.0.63.zip
* Valid MD5 signature for apache-tomcat-7.0.63.tar.gz
* Valid GPG signature for apache-tomcat-7.0.63.tar.gz
* Valid MD5 signature for apache-tomcat-7.0.63.exe
* Valid GPG signature for apache-tomcat-7.0.63.exe
* Valid MD5 signature for apache-tomcat-7.0.63-src.zip
* Valid GPG signature for apache-tomcat-7.0.63-src.zip
* Valid MD5 signature for apache-tomcat-7.0.63-src.tar.gz
* Valid GPG signature for apache-tomcat-7.0.63-src.tar.gz
*
* Binary Zip and tarball: Same
* Source Zip and tarball: Same
*
* Building dependencies returned: 0
* tcnative builds cleanly
* Tomcat builds cleanly
* Junit Tests: FAILED
*
* Tests that failed:
(NOTE: I expect all of these to fail due to lack of multicast support)
TEST-org.apache.catalina.core.TestAsyncContextImpl.NIO.txt
TEST-org.apache.catalina.session.TestStandardSession.APR.txt
TEST-org.apache.catalina.session.TestStandardSession.BIO.txt
TEST-org.apache.catalina.session.TestStandardSession.NIO.txt
TEST-org.apache.catalina.tribes.group.TestGroupChannelMemberArrival.APR.txt
TEST-org.apache.catalina.tribes.group.TestGroupChannelMemberArrival.BIO.txt
TEST-org.apache.catalina.tribes.group.TestGroupChannelMemberArrival.NIO.txt
TEST-org.apache.catalina.tribes.group.TestGroupChannelSenderConnections.APR.txt
TEST-org.apache.catalina.tribes.group.TestGroupChannelSenderConnections.BIO.txt
TEST-org.apache.catalina.tribes.group.TestGroupChannelSenderConnections.NIO.txt
TEST-org.apache.catalina.tribes.group.TestGroupChannelStartStop.APR.txt
TEST-org.apache.catalina.tribes.group.TestGroupChannelStartStop.BIO.txt
TEST-org.apache.catalina.tribes.group.TestGroupChannelStartStop.NIO.txt
TEST-org.apache.catalina.tribes.group.interceptors.TestNonBlockingCoordinator.APR.txt
TEST-org.apache.catalina.tribes.group.interceptors.TestNonBlockingCoordinator.BIO.txt
TEST-org.apache.catalina.tribes.group.interceptors.TestNonBlockingCoordinator.NIO.txt
TEST-org.apache.catalina.tribes.group.interceptors.TestOrderInterceptor.APR.txt
TEST-org.apache.catalina.tribes.group.interceptors.TestOrderInterceptor.BIO.txt
TEST-org.apache.catalina.tribes.group.interceptors.TestOrderInterceptor.NIO.txt
TEST-org.apache.catalina.tribes.group.interceptors.TestTcpFailureDetector.APR.txt
TEST-org.apache.catalina.tribes.group.interceptors.TestTcpFailureDetector.BIO.txt
TEST-org.apache.catalina.tribes.group.interceptors.TestTcpFailureDetector.NIO.txt



signature.asc
Description: OpenPGP digital signature


Re: JASPIC Implementation pointers

2015-07-02 Thread Mark Thomas
On 02/07/2015 17:23, Fjodor Vershinin wrote:
 Hi, all!
 Some update on JASPIC state.
 Yesterday and today I was working on FORM authentication module
 implementation.
 I've ported old code to new module, got it to work, and then ported
 integration test to ensure, that my refactoring's will not broke something.
 Then I have split huge method into smaller ones in order to maintain code
 readability, and for better understanding of FORM authentication process.
 Also, I have finished BASIC authentication integration test, just to have a
 rest from FORM authentication.
 Currently I have a bunch of commits in my personal repository
 https://github.com/fjodorver/tomcat/tree/feature/form_auth, but I think a
 lot of them must be squashed. I'll provide these commits as patches in
 couple hours.
 
 What about problems, I have one with Principal caching in session.
 There are possibility to enable/disable Principal's caching in old
 implementation. This feature can be handled using getter/setter
 setCache/getCache in AuthenicatorBase, and it's enabled by default. I am
 curious about this thing, how it can be controlled by user, and is it very
 important feature?

As with any of the Authenticator Valve configuration options, the user
has to explicitly add the Valve to their web application. Tomcat then
won't add one based on the web.xml configuration.

 I'm not sure about that, because this option is used only once - in
 DigestAuthenicatior. In all other places Principal caching is enabled.
 Could somebody provide additional information on this? If this option is
 important, it can be implemented by simply passing configuration settings
 using options HashMap directly from ContextConfig. If it's not, then it can
 make our life much easier.

The feature is important and needs to be retained.

We can change the way users have to configure it. For example, we could
say they have to use programmatic configuration via the standard JASPIC
interfaces if they want to use non-default settings.

 Other problem is that I am actively using tomcat's internal stuff in
 authentication modules.

As far as I am aware, that is absolutely fine.

 Arjan, could you confirm, is that acceptable? For
 example using catalina's Request instead of HttpServletRequest, catalina's
 context and so on.

Assume that this is OK unless someone claims otherwise. If they do then
we'll need to look into those claims.

Mark

 
 Thanks,
 Fjodor
 
 2015-06-30 0:56 GMT+03:00 Mark Thomas ma...@apache.org:
 
 On 29/06/2015 22:46, Fjodor Vershinin wrote:
 Hi, all!
 My update for previous week:
 1) Some JASPIC architecture refactoring
 2) Implemented both BASIC and DIGEST authentication modules
 3) Added integration test for DIGEST module
 4) Fixed some small bugs and issues
 5) Updated javadocs

 What about current status, I started working on FORM authentication
 module
 on Friday, however, I have faced some problems.
 FORM authentication mechanism looks harder than BASIC/DIGEST for me, at
 least when I looked at current implementation, so I had spent Friday and
 Monday digging FORM authentication specifications and FormAuthenticator
 class. I have some commits prepared but they are in very-very draft stage
 now, so I'd not pushed them yet.
 Also, I tried to start working on BASIC integration test, but FORM
 authentication looks like priority now.

 I agree with your assessment of the priority.

 I need to see progress on a daily basis - even if it isn't in a state
 that you are happy with. You could put it in a different branch or if
 you really don't want to make it public, e-mail me the diffs.

 I'm all for you working things out on your own but I need to see where
 you are heading. If you are heading in completely the wrong direction it
 will be better for you and the GSoC project if we catch that earlier
 rather than later.

 Let me know if I can help at all with the FORM module.

 Mark


 -
 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: r1688854 - in /tomcat/tc7.0.x/trunk: java/org/apache/catalina/core/StandardContext.java webapps/docs/changelog.xml

2015-07-02 Thread remm
Author: remm
Date: Thu Jul  2 16:13:38 2015
New Revision: 1688854

URL: http://svn.apache.org/r1688854
Log:
58094: Fix error log when attempting to register a non existing resource cache 
for non cached resources (unregistration doesn't log anything).

Modified:
tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java?rev=1688854r1=1688853r2=1688854view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java Thu 
Jul  2 16:13:38 2015
@@ -5168,7 +5168,7 @@ public class StandardContext extends Con
 }
 }
 // Register the cache in JMX
-if (isCachingAllowed()) {
+if (isCachingAllowed()  proxyDirContext.getCache() != null) {
 String contextName = getName();
 if (!contextName.startsWith(/)) {
 contextName = / + contextName;

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=1688854r1=1688853r2=1688854view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Thu Jul  2 16:13:38 2015
@@ -65,6 +65,11 @@
 ANT for web application deployment. Based on a patch provided by Lukasz
 Jader. (violetagg)
   /fix
+  fix
+bug58094/bug: Fix cosmetic error log when using non standard
+non cacheable resources, like with the empty resources used in some
+tests. (remm)
+  /fix
 /changelog
   /subsection
 /section



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



Re: JASPIC Implementation pointers

2015-07-02 Thread Fjodor Vershinin
Hi, all!
Some update on JASPIC state.
Yesterday and today I was working on FORM authentication module
implementation.
I've ported old code to new module, got it to work, and then ported
integration test to ensure, that my refactoring's will not broke something.
Then I have split huge method into smaller ones in order to maintain code
readability, and for better understanding of FORM authentication process.
Also, I have finished BASIC authentication integration test, just to have a
rest from FORM authentication.
Currently I have a bunch of commits in my personal repository
https://github.com/fjodorver/tomcat/tree/feature/form_auth, but I think a
lot of them must be squashed. I'll provide these commits as patches in
couple hours.

What about problems, I have one with Principal caching in session.
There are possibility to enable/disable Principal's caching in old
implementation. This feature can be handled using getter/setter
setCache/getCache in AuthenicatorBase, and it's enabled by default. I am
curious about this thing, how it can be controlled by user, and is it very
important feature?
I'm not sure about that, because this option is used only once - in
DigestAuthenicatior. In all other places Principal caching is enabled.
Could somebody provide additional information on this? If this option is
important, it can be implemented by simply passing configuration settings
using options HashMap directly from ContextConfig. If it's not, then it can
make our life much easier.
Other problem is that I am actively using tomcat's internal stuff in
authentication modules. Arjan, could you confirm, is that acceptable? For
example using catalina's Request instead of HttpServletRequest, catalina's
context and so on.

Thanks,
Fjodor

2015-06-30 0:56 GMT+03:00 Mark Thomas ma...@apache.org:

 On 29/06/2015 22:46, Fjodor Vershinin wrote:
  Hi, all!
  My update for previous week:
  1) Some JASPIC architecture refactoring
  2) Implemented both BASIC and DIGEST authentication modules
  3) Added integration test for DIGEST module
  4) Fixed some small bugs and issues
  5) Updated javadocs
 
  What about current status, I started working on FORM authentication
 module
  on Friday, however, I have faced some problems.
  FORM authentication mechanism looks harder than BASIC/DIGEST for me, at
  least when I looked at current implementation, so I had spent Friday and
  Monday digging FORM authentication specifications and FormAuthenticator
  class. I have some commits prepared but they are in very-very draft stage
  now, so I'd not pushed them yet.
  Also, I tried to start working on BASIC integration test, but FORM
  authentication looks like priority now.

 I agree with your assessment of the priority.

 I need to see progress on a daily basis - even if it isn't in a state
 that you are happy with. You could put it in a different branch or if
 you really don't want to make it public, e-mail me the diffs.

 I'm all for you working things out on your own but I need to see where
 you are heading. If you are heading in completely the wrong direction it
 will be better for you and the GSoC project if we catch that earlier
 rather than later.

 Let me know if I can help at all with the FORM module.

 Mark


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




-- 
Thanks,
Fjodor


[Bug 58094] [7.0.63 RC] Null component Tomcat:type=Cache error messages in testsuite logs

2015-07-02 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58094

--- Comment #2 from Remy Maucherat r...@apache.org ---
I see no way this is a regression. It's just the cache that is null, probably
because the resources is not the usual BaseDirContext and so the cache is null.
It's harmless and could use a null check.

-- 
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 58094] [7.0.63 RC] Null component Tomcat:type=Cache error messages in testsuite logs

2015-07-02 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58094

Remy Maucherat r...@apache.org changed:

   What|Removed |Added

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

--- Comment #3 from Remy Maucherat r...@apache.org ---
r1688854 for a fix that removed the bad logging for me. It's really specific to
the testsuite and its empty resources.

-- 
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: r1688887 - in /tomcat/tc8.0.x/trunk: ./ java/org/apache/catalina/valves/AbstractAccessLogValve.java

2015-07-02 Thread schultz
Author: schultz
Date: Thu Jul  2 19:04:51 2015
New Revision: 167

URL: http://svn.apache.org/r167
Log:
Back-port r165 to fix Javadoc typo for date/time format specifiers.

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

tomcat/tc8.0.x/trunk/java/org/apache/catalina/valves/AbstractAccessLogValve.java

Propchange: tomcat/tc8.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jul  2 19:04:51 2015
@@ -1 +1 @@
-/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886,1644890,1644892
 
,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357-1645358,1645455,1645465,1645469,1645471,1645473,1645475,1645486-1645488,1645626,1645641,1645685,1645743,1645763,1645951-1645953,1645955,1645993,1646098-1646106,1646178,1646220,1646302,1646304,1646420,1646470-1646471,1646476,1646559,1646717-1646723,1646773,1647026,1647042,1647530,1647655,1648304,1648815,1648907,1650081,1650365,1651116,1651120,1651280,1651470,1652938,1652970,1653041,1653471,1653550,1653574,1653797,1653815-1653816,1653819,1653840,1653857,1653888,1653972,1654013,1654030,1654050,1654123,1654148,1654159,1654513,1654515,1654517,1654522,1654524,1654725,1654735,1654766,1654785,1654851-1654852,1654978,1655122-1655124,1655126-1655127,1655129-1655130,1655132-1655133,1655312,1655438,1655441,1655454,168,1656087,1656299,1656319,1656331,1656345,1656350,1656590,1656648-1656650,1656657,1657041,1657054,1657374,1657492,1657510,1657565,1657580,1657584,1657586,1657589,1657592,1657607,1657609,1657682,1657
 
907,1658207,1658734,1658781,1658790,1658799,1658802,1658804,1658833,1658840,1658966,1659043,1659053,1659059,1659188-1659189,1659216,1659263,1659293,1659304,1659306-1659307,1659382,1659384,1659428,1659471,1659486,1659505,1659516,1659521,1659524,1659559,1659562,1659803,1659806,1659814,1659833,1659862,1659905,1659919,1659948,1659967,1659983-1659984,1660060,1660074,1660077,1660133,1660168,1660331-1660332,1660353,1660358,1660924,1661386,1661867,1661972,1661990,1662200,1662308-1662309,1662548,1662614,1662736,1662985,1662988-1662989,1663264,1663277,1663298,1663534,1663562,1663676,1663715,1663754,1663768,1663772,1663781,1663893,1663995,1664143,1664163,1664174,1664301,1664317,1664347,1664657,1664659,1664710,1664863-1664864,1664866,1665085,1665292,1665559,1665653,1665661,1665672,1665694,1665697,1665736,1665779,1665976-1665977,1665980-1665981,1665985-1665986,1665989,1665998,1666004,1666008,1666013,1666017,1666024,1666116,1666386-1666387,1666494,1666496,1666552,1666569,1666579,137,149,1
 
666757,1666966,1666972,1666985,1666995,1666997,1667292,1667402,1667406,1667546,1667615,1667630,1667636,1667688,1667764,1667871,1668026,1668135,1668193,1668593,1668596,1668630,1668639,1668843,1669353,1669370,1669451,1669800,1669838,1669876,1669882,1670394,1670433,1670591,1670598-1670600,1670610,1670631,1670719,1670724,1670726,1670730,1670940,1671112,1672272,1672284,1673754,1674294,1675461,1675486,1675594,1675830,1676231,1676250-1676251,1676364,1676381,1676393,1676479,1676525,1676552,1676615,1676630,1676634,1676721,1676926,1676943,1677140,1677802,1678011,1678162,1678174,1678339,1678426-1678427,1678694,1678701,1679534,1679708,1679710,1679716,1680034,1680246,1681056,1681123,1681138,1681280,1681283,1681286,1681450,1681701,1681729,1681770,1681779,1681793,1681807,1681837-1681838,1681854,1681862,1681958,1682028,1682033,1682311,1682315,1682317,1682320,1682324,1682330,1682842,1684172,1684366,1684383,1684526-1684527,1684549-1684550,1685739,1685744,1685772,1685816,1685826,1685891,1687268,168734
 0,1688563,1688841

svn commit: r1688889 - /tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/AccessLogValve.java

2015-07-02 Thread schultz
Author: schultz
Date: Thu Jul  2 19:06:52 2015
New Revision: 169

URL: http://svn.apache.org/r169
Log:
Back-port an adaptation of r165 to fix Javadoc typo for date/time format 
specifiers.

Modified:
tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/AccessLogValve.java

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/AccessLogValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/AccessLogValve.java?rev=169r1=168r2=169view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/AccessLogValve.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/AccessLogValve.java 
Thu Jul  2 19:06:52 2015
@@ -83,7 +83,6 @@ import org.apache.tomcat.util.buf.B2CCon
  * lib%s/b - HTTP status code of the response
  * lib%S/b - User session ID
  * lib%t/b - Date and time, in Common Log Format format
- * lib%t{format}/b - Date and time, in any format supported by 
SimpleDateFormat
  * lib%u/b - Remote user that was authenticated
  * lib%U/b - Requested URL path
  * lib%v/b - Local server name
@@ -1431,7 +1430,7 @@ public class AccessLogValve extends Valv
 }
 
 /**
- * write date and time, in configurable format (default CLF) - %t or 
%t{format}
+ * write date and time, in configurable format (default CLF) - %t or 
%{format}t
  */
 protected class DateAndTimeElement implements AccessLogElement {
 



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



svn commit: r1688878 - in /tomcat/trunk/java/org/apache/catalina/webresources: AbstractArchiveResourceSet.java AbstractResourceSet.java

2015-07-02 Thread markt
Author: markt
Date: Thu Jul  2 18:40:23 2015
New Revision: 1688878

URL: http://svn.apache.org/r1688878
Log:
Pull up manifest

Modified:

tomcat/trunk/java/org/apache/catalina/webresources/AbstractArchiveResourceSet.java
tomcat/trunk/java/org/apache/catalina/webresources/AbstractResourceSet.java

Modified: 
tomcat/trunk/java/org/apache/catalina/webresources/AbstractArchiveResourceSet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/webresources/AbstractArchiveResourceSet.java?rev=1688878r1=1688877r2=1688878view=diff
==
--- 
tomcat/trunk/java/org/apache/catalina/webresources/AbstractArchiveResourceSet.java
 (original)
+++ 
tomcat/trunk/java/org/apache/catalina/webresources/AbstractArchiveResourceSet.java
 Thu Jul  2 18:40:23 2015
@@ -37,21 +37,12 @@ public abstract class AbstractArchiveRes
 private final HashMapString,JarEntry jarFileEntries = new HashMap();
 private URL baseUrl;
 private String baseUrlString;
-private Manifest manifest;
 
 private JarFile archive = null;
 private final Object archiveLock = new Object();
 private long archiveUseCount = 0;
 
 
-protected final void setManifest(Manifest manifest) {
-this.manifest = manifest;
-}
-
-protected final Manifest getManifest() {
-return manifest;
-}
-
 protected final void setBaseUrl(URL baseUrl) {
 this.baseUrl = baseUrl;
 if (baseUrl == null) {
@@ -250,7 +241,7 @@ public abstract class AbstractArchiveRes
 if (jarEntry == null) {
 return new EmptyResource(root, path);
 } else {
-return createArchiveResource(jarEntry, path, manifest);
+return createArchiveResource(jarEntry, path, 
getManifest());
 }
 }
 } else {

Modified: 
tomcat/trunk/java/org/apache/catalina/webresources/AbstractResourceSet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/webresources/AbstractResourceSet.java?rev=1688878r1=1688877r2=1688878view=diff
==
--- tomcat/trunk/java/org/apache/catalina/webresources/AbstractResourceSet.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/webresources/AbstractResourceSet.java 
Thu Jul  2 18:40:23 2015
@@ -16,6 +16,8 @@
  */
 package org.apache.catalina.webresources;
 
+import java.util.jar.Manifest;
+
 import org.apache.catalina.LifecycleException;
 import org.apache.catalina.LifecycleState;
 import org.apache.catalina.WebResourceRoot;
@@ -32,6 +34,7 @@ public abstract class AbstractResourceSe
 private String webAppMount;
 private boolean classLoaderOnly;
 private boolean staticOnly;
+private Manifest manifest;
 
 
 protected static final StringManager sm =
@@ -111,6 +114,14 @@ public abstract class AbstractResourceSe
 this.staticOnly = staticOnly;
 }
 
+protected final void setManifest(Manifest manifest) {
+this.manifest = manifest;
+}
+
+protected final Manifest getManifest() {
+return manifest;
+}
+
 
 // Lifecycle 
methods
 @Override



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



Re: access log valve with custom format

2015-07-02 Thread Romain Manni-Bucau
Thanks! Yes  now there is AbstractAccessLogValve but was not in v7.


Romain Manni-Bucau
@rmannibucau https://twitter.com/rmannibucau |  Blog
http://rmannibucau.wordpress.com | Github https://github.com/rmannibucau |
LinkedIn https://www.linkedin.com/in/rmannibucau | Tomitriber
http://www.tomitribe.com

2015-07-02 12:00 GMT-07:00 Christopher Schultz ch...@christopherschultz.net
:

 Romain,

 On 7/2/15 2:54 PM, Christopher Schultz wrote:
  Romain,
 
  On 7/2/15 2:46 PM, Romain Manni-Bucau wrote:
  access log valve documents you can use %t{simple date format}:
 
   * lib%t{format}/b - Date and time, in any format supported by
  SimpleDateFormat
 
  but actually the way the parsing is done (checked on 7.0.61 but seems
 the
  same code on dev ones - 7 and 8) it is %{format}t
 
  typo?
 
  Which document are you looking at?
 
 
  http://tomcat.apache.org/tomcat-7.0-doc/config/valve.html
  and
  http://tomcat.apache.org/tomcat-8.0-doc/config/valve.html
 
  both agree that %{xxx}t is the right pattern to use.

 Aah, it's in AbstractAccessLogValve. Yes, it's a typo in the Javadoc.

 I've fixed trunk in r165. I'll back-port to Tomcat 8, 7.

 -chris




access log valve with custom format

2015-07-02 Thread Romain Manni-Bucau
Hi guys,

access log valve documents you can use %t{simple date format}:

 * lib%t{format}/b - Date and time, in any format supported by
SimpleDateFormat

but actually the way the parsing is done (checked on 7.0.61 but seems the
same code on dev ones - 7 and 8) it is %{format}t

typo?

Romain Manni-Bucau
@rmannibucau https://twitter.com/rmannibucau |  Blog
http://rmannibucau.wordpress.com | Github https://github.com/rmannibucau |
LinkedIn https://www.linkedin.com/in/rmannibucau | Tomitriber
http://www.tomitribe.com


Re: access log valve with custom format

2015-07-02 Thread Christopher Schultz
Romain,

On 7/2/15 2:46 PM, Romain Manni-Bucau wrote:
 access log valve documents you can use %t{simple date format}:
 
  * lib%t{format}/b - Date and time, in any format supported by
 SimpleDateFormat
 
 but actually the way the parsing is done (checked on 7.0.61 but seems the
 same code on dev ones - 7 and 8) it is %{format}t
 
 typo?

Which document are you looking at?


http://tomcat.apache.org/tomcat-7.0-doc/config/valve.html
and
http://tomcat.apache.org/tomcat-8.0-doc/config/valve.html

both agree that %{xxx}t is the right pattern to use.

-chris



signature.asc
Description: OpenPGP digital signature


Re: access log valve with custom format

2015-07-02 Thread Romain Manni-Bucau
the javadoc:
https://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/valves/AccessLogValve.html


Romain Manni-Bucau
@rmannibucau https://twitter.com/rmannibucau |  Blog
http://rmannibucau.wordpress.com | Github https://github.com/rmannibucau |
LinkedIn https://www.linkedin.com/in/rmannibucau | Tomitriber
http://www.tomitribe.com

2015-07-02 11:54 GMT-07:00 Christopher Schultz ch...@christopherschultz.net
:

 Romain,

 On 7/2/15 2:46 PM, Romain Manni-Bucau wrote:
  access log valve documents you can use %t{simple date format}:
 
   * lib%t{format}/b - Date and time, in any format supported by
  SimpleDateFormat
 
  but actually the way the parsing is done (checked on 7.0.61 but seems the
  same code on dev ones - 7 and 8) it is %{format}t
 
  typo?

 Which document are you looking at?


 http://tomcat.apache.org/tomcat-7.0-doc/config/valve.html
 and
 http://tomcat.apache.org/tomcat-8.0-doc/config/valve.html

 both agree that %{xxx}t is the right pattern to use.

 -chris




svn commit: r1688885 - /tomcat/trunk/java/org/apache/catalina/valves/AbstractAccessLogValve.java

2015-07-02 Thread schultz
Author: schultz
Date: Thu Jul  2 19:00:19 2015
New Revision: 165

URL: http://svn.apache.org/r165
Log:
Fix typo for date/time format specifiers.

Modified:
tomcat/trunk/java/org/apache/catalina/valves/AbstractAccessLogValve.java

Modified: 
tomcat/trunk/java/org/apache/catalina/valves/AbstractAccessLogValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/AbstractAccessLogValve.java?rev=165r1=164r2=165view=diff
==
--- tomcat/trunk/java/org/apache/catalina/valves/AbstractAccessLogValve.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/valves/AbstractAccessLogValve.java 
Thu Jul  2 19:00:19 2015
@@ -76,7 +76,6 @@ import org.apache.tomcat.util.collection
  * lib%s/b - HTTP status code of the response
  * lib%S/b - User session ID
  * lib%t/b - Date and time, in Common Log Format format
- * lib%t{format}/b - Date and time, in any format supported by 
SimpleDateFormat
  * lib%u/b - Remote user that was authenticated
  * lib%U/b - Requested URL path
  * lib%v/b - Local server name
@@ -873,7 +872,7 @@ public abstract class AbstractAccessLogV
 }
 
 /**
- * write date and time, in configurable format (default CLF) - %t or 
%t{format}
+ * write date and time, in configurable format (default CLF) - %t or 
%{format}t
  */
 protected class DateAndTimeElement implements AccessLogElement {
 



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



Re: access log valve with custom format

2015-07-02 Thread Christopher Schultz
Romain,

On 7/2/15 2:54 PM, Christopher Schultz wrote:
 Romain,
 
 On 7/2/15 2:46 PM, Romain Manni-Bucau wrote:
 access log valve documents you can use %t{simple date format}:

  * lib%t{format}/b - Date and time, in any format supported by
 SimpleDateFormat

 but actually the way the parsing is done (checked on 7.0.61 but seems the
 same code on dev ones - 7 and 8) it is %{format}t

 typo?
 
 Which document are you looking at?
 
 
 http://tomcat.apache.org/tomcat-7.0-doc/config/valve.html
 and
 http://tomcat.apache.org/tomcat-8.0-doc/config/valve.html
 
 both agree that %{xxx}t is the right pattern to use.

Aah, it's in AbstractAccessLogValve. Yes, it's a typo in the Javadoc.

I've fixed trunk in r165. I'll back-port to Tomcat 8, 7.

-chris



signature.asc
Description: OpenPGP digital signature


Re: access log valve with custom format

2015-07-02 Thread Christopher Schultz
Romain,

On 7/2/15 3:02 PM, Romain Manni-Bucau wrote:
 Thanks! Yes  now there is AbstractAccessLogValve but was not in v7.

Fixed in all 7/8/trunk.

-chris

 2015-07-02 12:00 GMT-07:00 Christopher Schultz ch...@christopherschultz.net
 :
 
 Romain,

 On 7/2/15 2:54 PM, Christopher Schultz wrote:
 Romain,

 On 7/2/15 2:46 PM, Romain Manni-Bucau wrote:
 access log valve documents you can use %t{simple date format}:

  * lib%t{format}/b - Date and time, in any format supported by
 SimpleDateFormat

 but actually the way the parsing is done (checked on 7.0.61 but seems
 the
 same code on dev ones - 7 and 8) it is %{format}t

 typo?

 Which document are you looking at?


 http://tomcat.apache.org/tomcat-7.0-doc/config/valve.html
 and
 http://tomcat.apache.org/tomcat-8.0-doc/config/valve.html

 both agree that %{xxx}t is the right pattern to use.

 Aah, it's in AbstractAccessLogValve. Yes, it's a typo in the Javadoc.

 I've fixed trunk in r165. I'll back-port to Tomcat 8, 7.

 -chris


 



signature.asc
Description: OpenPGP digital signature


svn commit: r1688896 - in /tomcat/trunk: java/org/apache/catalina/webresources/ test/org/apache/catalina/webresources/ test/webresources/dir1/META-INF/

2015-07-02 Thread markt
Author: markt
Date: Thu Jul  2 19:42:30 2015
New Revision: 1688896

URL: http://svn.apache.org/r1688896
Log:
Make the manifest of the exploded WAR available to resources extracted from 
that WAR.

Added:
tomcat/trunk/test/webresources/dir1/META-INF/
tomcat/trunk/test/webresources/dir1/META-INF/MANIFEST.MF   (with props)
Modified:
tomcat/trunk/java/org/apache/catalina/webresources/DirResourceSet.java
tomcat/trunk/java/org/apache/catalina/webresources/FileResource.java
tomcat/trunk/java/org/apache/catalina/webresources/FileResourceSet.java
tomcat/trunk/java/org/apache/catalina/webresources/LocalStrings.properties

tomcat/trunk/test/org/apache/catalina/webresources/AbstractTestResourceSet.java

Modified: tomcat/trunk/java/org/apache/catalina/webresources/DirResourceSet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/webresources/DirResourceSet.java?rev=1688896r1=1688895r2=1688896view=diff
==
--- tomcat/trunk/java/org/apache/catalina/webresources/DirResourceSet.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/webresources/DirResourceSet.java Thu 
Jul  2 19:42:30 2015
@@ -17,10 +17,12 @@
 package org.apache.catalina.webresources;
 
 import java.io.File;
+import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.Set;
+import java.util.jar.Manifest;
 
 import org.apache.catalina.LifecycleException;
 import org.apache.catalina.WebResource;
@@ -28,12 +30,16 @@ import org.apache.catalina.WebResourceRo
 import org.apache.catalina.WebResourceRoot.ResourceSetType;
 import org.apache.catalina.util.IOTools;
 import org.apache.catalina.util.ResourceSet;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
 
 /**
  * Represents a {@link org.apache.catalina.WebResourceSet} based on a 
directory.
  */
 public class DirResourceSet extends AbstractFileResourceSet {
 
+private static final Log log = LogFactory.getLog(DirResourceSet.class);
+
 /**
  * A no argument constructor is required for this to work with the 
digester.
  */
@@ -102,7 +108,7 @@ public class DirResourceSet extends Abst
 if (f.isDirectory()  path.charAt(path.length() - 1) != '/') {
 path = path + '/';
 }
-return new FileResource(root, path, f, isReadOnly());
+return new FileResource(root, path, f, isReadOnly(), 
getManifest());
 } else {
 return new EmptyResource(root, path);
 }
@@ -248,4 +254,22 @@ public class DirResourceSet extends Abst
 getBase(), File.separator, getInternalPath()));
 }
 }
+
+// Lifecycle 
methods
+@Override
+protected void initInternal() throws LifecycleException {
+super.initInternal();
+// Is this an exploded web application?
+if (getWebAppMount().equals()) {
+// Look for a manifest
+File mf = file(META-INF/MANIFEST.MF, true);
+if (mf != null  mf.isFile()) {
+try (FileInputStream fis = new FileInputStream(mf)) {
+setManifest(new Manifest(fis));
+} catch (IOException e) {
+log.warn(sm.getString(dirResourceSet.manifestFail, 
mf.getAbsolutePath()), e);
+}
+}
+}
+}
 }

Modified: tomcat/trunk/java/org/apache/catalina/webresources/FileResource.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/webresources/FileResource.java?rev=1688896r1=1688895r2=1688896view=diff
==
--- tomcat/trunk/java/org/apache/catalina/webresources/FileResource.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/webresources/FileResource.java Thu 
Jul  2 19:42:30 2015
@@ -43,9 +43,10 @@ public class FileResource extends Abstra
 private final File resource;
 private final String name;
 private final boolean readOnly;
+private final Manifest manifest;
 
 public FileResource(WebResourceRoot root, String webAppPath,
-File resource, boolean readOnly) {
+File resource, boolean readOnly, Manifest manifest) {
 super(root,webAppPath);
 this.resource = resource;
 
@@ -67,6 +68,7 @@ public class FileResource extends Abstra
 }
 
 this.readOnly = readOnly;
+this.manifest = manifest;
 }
 
 @Override
@@ -218,7 +220,7 @@ public class FileResource extends Abstra
 
 @Override
 public Manifest getManifest() {
-return null;
+return manifest;
 }
 
 @Override

Modified: 
tomcat/trunk/java/org/apache/catalina/webresources/FileResourceSet.java
URL: 

svn commit: r1688897 - in /tomcat/tc8.0.x/trunk: ./ java/org/apache/catalina/webresources/ test/org/apache/catalina/webresources/ test/webresources/dir1/META-INF/ webapps/docs/

2015-07-02 Thread markt
Author: markt
Date: Thu Jul  2 19:46:03 2015
New Revision: 1688897

URL: http://svn.apache.org/r1688897
Log:
Make the manifest of the exploded WAR available to resources extracted from 
that WAR.

Added:
tomcat/tc8.0.x/trunk/test/webresources/dir1/META-INF/
  - copied from r1688896, tomcat/trunk/test/webresources/dir1/META-INF/
Modified:
tomcat/tc8.0.x/trunk/   (props changed)

tomcat/tc8.0.x/trunk/java/org/apache/catalina/webresources/AbstractArchiveResourceSet.java

tomcat/tc8.0.x/trunk/java/org/apache/catalina/webresources/AbstractResourceSet.java

tomcat/tc8.0.x/trunk/java/org/apache/catalina/webresources/DirResourceSet.java
tomcat/tc8.0.x/trunk/java/org/apache/catalina/webresources/FileResource.java

tomcat/tc8.0.x/trunk/java/org/apache/catalina/webresources/FileResourceSet.java

tomcat/tc8.0.x/trunk/java/org/apache/catalina/webresources/LocalStrings.properties

tomcat/tc8.0.x/trunk/test/org/apache/catalina/webresources/AbstractTestResourceSet.java
tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc8.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jul  2 19:46:03 2015
@@ -1 +1 @@
-/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886,1644890,1644892
 
,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357-1645358,1645455,1645465,1645469,1645471,1645473,1645475,1645486-1645488,1645626,1645641,1645685,1645743,1645763,1645951-1645953,1645955,1645993,1646098-1646106,1646178,1646220,1646302,1646304,1646420,1646470-1646471,1646476,1646559,1646717-1646723,1646773,1647026,1647042,1647530,1647655,1648304,1648815,1648907,1650081,1650365,1651116,1651120,1651280,1651470,1652938,1652970,1653041,1653471,1653550,1653574,1653797,1653815-1653816,1653819,1653840,1653857,1653888,1653972,1654013,1654030,1654050,1654123,1654148,1654159,1654513,1654515,1654517,1654522,1654524,1654725,1654735,1654766,1654785,1654851-1654852,1654978,1655122-1655124,1655126-1655127,1655129-1655130,1655132-1655133,1655312,1655438,1655441,1655454,168,1656087,1656299,1656319,1656331,1656345,1656350,1656590,1656648-1656650,1656657,1657041,1657054,1657374,1657492,1657510,1657565,1657580,1657584,1657586,1657589,1657592,1657607,1657609,1657682,1657
 
907,1658207,1658734,1658781,1658790,1658799,1658802,1658804,1658833,1658840,1658966,1659043,1659053,1659059,1659188-1659189,1659216,1659263,1659293,1659304,1659306-1659307,1659382,1659384,1659428,1659471,1659486,1659505,1659516,1659521,1659524,1659559,1659562,1659803,1659806,1659814,1659833,1659862,1659905,1659919,1659948,1659967,1659983-1659984,1660060,1660074,1660077,1660133,1660168,1660331-1660332,1660353,1660358,1660924,1661386,1661867,1661972,1661990,1662200,1662308-1662309,1662548,1662614,1662736,1662985,1662988-1662989,1663264,1663277,1663298,1663534,1663562,1663676,1663715,1663754,1663768,1663772,1663781,1663893,1663995,1664143,1664163,1664174,1664301,1664317,1664347,1664657,1664659,1664710,1664863-1664864,1664866,1665085,1665292,1665559,1665653,1665661,1665672,1665694,1665697,1665736,1665779,1665976-1665977,1665980-1665981,1665985-1665986,1665989,1665998,1666004,1666008,1666013,1666017,1666024,1666116,1666386-1666387,1666494,1666496,1666552,1666569,1666579,137,149,1
 

svn commit: r1688901 - /tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

2015-07-02 Thread markt
Author: markt
Date: Thu Jul  2 20:29:35 2015
New Revision: 1688901

URL: http://svn.apache.org/r1688901
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=57943
Prevent the same socket being added to the cache twice.
Patch based on analysis by Ian Luo / Sun Qi

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1688901r1=1688900r2=1688901view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Thu Jul  2 
20:29:35 2015
@@ -1521,36 +1521,12 @@ public class NioEndpoint extends Abstrac
 state = handler.process(ka, status);
 }
 if (state == SocketState.CLOSED) {
-// Close socket and pool
-try {
-if (socket.getPoller().cancelledKey(key) != 
null) {
-// SocketWrapper (attachment) was removed 
from the
-// key - recycle the key. This can only 
happen once
-// per attempted closure so it is used to 
determine
-// whether or not to return the key to the 
cache.
-// We do NOT want to do this more than 
once - see BZ
-// 57340.
-if (running  !paused) {
-if (!nioChannels.push(socket)) {
-socket.free();
-}
-}
-socket = null;
-}
-ka = null;
-} catch (Exception x) {
-log.error(,x);
-}
+close(socket, key);
+socket = null;
+ka = null;
 }
 } else if (handshake == -1 ) {
-if (key != null) {
-socket.getPoller().cancelledKey(key);
-}
-if (running  !paused) {
-if (!nioChannels.push(socket)) {
-socket.free();
-}
-}
+close(socket, key);
 socket = null;
 ka = null;
 } else {
@@ -1577,6 +1553,26 @@ public class NioEndpoint extends Abstrac
 }
 }
 }
+
+private void close(NioChannel socket, SelectionKey key) {
+try {
+if (socket.getPoller().cancelledKey(key) != null) {
+// SocketWrapper (attachment) was removed from the
+// key - recycle the key. This can only happen once
+// per attempted closure so it is used to determine
+// whether or not to return the key to the cache.
+// We do NOT want to do this more than once - see BZ
+// 57340 / 57943.
+if (running  !paused) {
+if (!nioChannels.push(socket)) {
+socket.free();
+}
+}
+}
+} catch (Exception x) {
+log.error(,x);
+}
+}
 }
 
 // --- SendfileData Inner Class



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



svn commit: r1688909 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/util/net/NioEndpoint.java webapps/docs/changelog.xml

2015-07-02 Thread markt
Author: markt
Date: Thu Jul  2 21:05:46 2015
New Revision: 1688909

URL: http://svn.apache.org/r1688909
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=57943
Prevent the same socket being added to the cache twice.
Patch based on analysis by Ian Luo / Sun Qi

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

Propchange: tomcat/tc7.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jul  2 21:05:46 2015
@@ -1,2 +1,2 @@
-/tomcat/tc8.0.x/trunk:1636525,1637336,1637685,1637709,1638726,1640089,1640276,1640349,1640363,1640366,1640642,1640672,1640674,1640689,1640884,1641001,1641065,1641067,1641375,1641638,1641723,1641726,1641729-1641730,1641736,1641988,1642669-1642670,1642698,1642701,1643205,1643215,1643217,1643230,1643232,1643273,1643285,1643329-1643330,1643511,1643513,1643521,1643539,1643571,1643581-1643582,1643635,1643655,1643738,1643964,1644018,1644333,1644954,1644992,1645014,1645360,1645456,1645627,1645642,1645686,1645903-1645904,1645908-1645909,1645913,1645920,1646458,1646460-1646462,1646735,1646738-1646741,1646744,1646746,1646748-1646755,1646757,1646759-1646760,1647043,1648816,1651420-1651422,1651844,1652926,1652939-1652940,1652973,1653798,1653817,1653841,1654042,1654161,1654736,1654767,1654787,1656592,1662986,1663265,1663278,1663325,1663535,1663567,1663679,1663997,1664175,1664321,1664872,1665061,1665086,1666027,1666395,1666503,1666506,1666560,1666570,1666581,1666759,1666967,1666988,1667553-1667555
 
,1667558,1667617,1667633,1667637,1667747,1667767,1667873,1668028,1668137,1668634,1669432,1669801,1669840,1669895-1669896,1670398,1670435,1670592,1670605-1670607,1670609,1670632,1670720,1670725,1670727,1670731,1671114,1672273,1672285,1673759,1674220,1674295,1675469,1675488,1675595,1675831,1676232,1676367-1676369,1676382,1676394,1676483,1676556,1676635,1678178,1679536,1679988,1680256,1681124,1681182,1681730,1681840,1681864,1681869,1682010,1682034,1682047,1682052-1682053,1682062,1682064,1682070,1682312,1682325,1682331,1682386,1684367,1684385,1685759,1685774,1685827,1685892,1687341
-/tomcat/trunk:1156115-1157160,1157162-1157859,1157862-1157942,1157945-1160347,1160349-1163716,1163718-1166689,1166691-1174340,1174342-1175596,1175598-1175611,1175613-1175932,1175934-1177783,1177785-1177980,1178006-1180720,1180722-1183094,1183096-1187753,1187755,1187775,1187801,1187806,1187809,1187826-1188312,1188314-1188401,1188646-1188840,1188842-1190176,1190178-1195223,1195225-1195953,1195955,1195957-1201238,1201240-1203345,1203347-1206623,1206625-1208046,1208073,1208096,1208114,1208145,1208772,1209194-1212125,1212127-1220291,1220293,1220295-1221321,1221323-1222329,1222332-1222401,1222405-1222795,1222850-1222950,1222969-1225326,1225328-1225463,1225465,1225627,1225629-1226534,1226536-1228908,1228911-1228923,1228927-1229532,1229534-1230766,1230768-1231625,1231627-1233414,1233419-1235207,1235209-1237425,1237427,1237429-1237977,1237981,1237985,1237995,1238070,1238073,1239024-1239048,1239050-1239062,1239135,1239256,1239258-1239485,1239785-1240046,1240101,1240106,1240109,1240112,1240114
 
,1240116,1240118,1240121,1240329,1240474-1240850,1240857,1241087,1241160,1241408-1241822,1241908-1241909,1241912-1242110,1242371-1292130,1292134-1292458,1292464-1292670,1292672-1292776,1292780-1293392,1293397-1297017,1297019-1297963,1297965-1299820,1300108,1300111-1300460,1300520-1300948,1300997,1301006,1301280,1302332,1302348,1302608-1302610,1302649,1302837,1303138,1303163,1303338,1303521,1303587,1303698,1303803,1303852,1304011,1304035,1304037,1304135,1304249,1304253,1304260,1304271,1304275,1304468,1304895,1304930-1304932,1305194,1305943,1305965,1306556,1306579-1306580,1307084,1307310,1307511-1307512,1307579,1307591,1307597,1310636,1310639-1310640,1310642,1310701,1311212,1311995,1327617,1327670,1331766,1333161,1333173,1333827,1334787,1335026,1335257,1335547,1335692,1335711,1335731,1336515,1336813,1336864,1336868,1336884,1337419,1337426,1337546,1337572,1337591-1337595,1337643,1337707,1337719,1337734,1337741,1337745,1338151-1338154,1338178,1342027,1342029,1342315,1342320,1342476,1342
 

[Bug 57943] NioEndpoint, one poller thread died

2015-07-02 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=57943

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

   What|Removed |Added

Product|Tomcat 7|Tomcat 6
  Component|Connectors  |Connectors
Version|7.0.54  |6.0.44
   Target Milestone|--- |default

--- Comment #6 from Mark Thomas ma...@apache.org ---
Many thanks for the details analysis.

I have applied a patch that should fix this to trunk (9.0.x) and back-ported it
to 8.0.x (for 8.0.25 onwards) and 7.0.x (7.0.64 onwards). I have also proposed
is 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



svn commit: r1688911 - /tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

2015-07-02 Thread markt
Author: markt
Date: Thu Jul  2 21:07:18 2015
New Revision: 1688911

URL: http://svn.apache.org/r1688911
Log: (empty)

Modified:
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1688911r1=1688910r2=1688911view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Thu 
Jul  2 21:07:18 2015
@@ -1756,20 +1756,17 @@ public class NioEndpoint extends Abstrac
 // Close socket and pool
 try {
 close(ka, socket, key, SocketStatus.ERROR);
-socket = null;
-ka = null;
 } catch ( Exception x ) {
 log.error(,x);
 }
 }
 } else if (handshake == -1 ) {
 close(ka, socket, key, SocketStatus.DISCONNECT);
-ka = null;
 } else {
 ka.getPoller().add(socket, handshake);
 }
-}catch(CancelledKeyException cx) {
-socket.getPoller().cancelledKey(key,null,false);
+} catch (CancelledKeyException cx) {
+socket.getPoller().cancelledKey(key, null, false);
 } catch (OutOfMemoryError oom) {
 try {
 oomParachuteData = null;
@@ -1809,7 +1806,7 @@ public class NioEndpoint extends Abstrac
 if (ka != null) {
 ka.setComet(false);
 }
-if (socket.getPoller().cancelledKey(key, SocketStatus.ERROR, 
false) != null) {
+if (socket.getPoller().cancelledKey(key, socketStatus, false) 
!= null) {
 // SocketWrapper (attachment) was removed from the
 // key - recycle both. This can only happen once
 // per attempted closure so it is used to determine



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



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

2015-07-02 Thread markt
Author: markt
Date: Thu Jul  2 21:12:54 2015
New Revision: 1688914

URL: http://svn.apache.org/r1688914
Log: (empty)

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=1688914r1=1688913r2=1688914view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Thu Jul  2 21:12:54 2015
@@ -80,6 +80,14 @@ PATCHES PROPOSED TO BACKPORT:
   +1: rjung, markt, remm
   -1: 
 
+* Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=57943
+  Prevent the same socket being added to the cache twice. Patch based on
+  analysis by Ian Luo / Sun Qi.
+  http://svn.apache.org/r1688909
+  http://svn.apache.org/r1688911
+  +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



Re: [VOTE] Release Apache Tomcat 7.0.63

2015-07-02 Thread Ognjen Blagojevic

Violeta,

On 30.6.2015 11:01, Violeta Georgieva wrote:

The proposed 7.0.63 release is:
[ ] Broken - do not release
[x] Stable - go ahead and release as 7.0.63 Stable


Tested .zip distribution on Windows 7 64-bit, Oracle JDK 1.7.0_79 and 
APR/native 1.1.33:


- Tested TLS connectivity for BIO, NIO, and APR connectors.

- Crawled all links (except /manager, /host-manager and 
/examples/async*). No broken links found, except links to JavaDocs.


- Smoke tests of BIO, NIO and APR, with and without TLS, all passed.

- Tested with several webapps that are in active development.

-Ognjen


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



[Bug 58095] Empty script tag results in generated jsp having a self-closing script tag, which is invalid and results in rendering issues

2015-07-02 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58095

--- Comment #1 from Christopher Schultz ch...@christopherschultz.net ---
Do you have a test case? Is this .jspx or .jsp?

What does generated jsp mean?

Recommendation for suppressing the coalescing of the tags:

script type=text/javascript src=/somepath/myfile.js!-- comment
--/script

-- 
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: [VOTE] Release Apache Tomcat 8.0.24

2015-07-02 Thread Christopher Schultz
Mark,

On 7/1/15 4:56 PM, Mark Thomas wrote:
 The proposed Apache Tomcat 8.0.24 release is now available for voting.
 
 The main changes since 8.0.23 are:
 - Provide path parameters to POJO via per session
   javax.websocket.server.ServerEndpointConfig as they vary
   between different requests.
 
 - Various fixes to the SlowQueryReport in jdbc-pool
 
 - Various improvements to how Tomcat implements the requirements
   of SRV.10.7.2 (not loading Java SE and implemented
   specification classes from web applications
 
 There is a small collection of bug fixes, new features and
 performance improvements. For full details, see the changelog:
 http://svn.us.apache.org/repos/asf/tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml
 
 It can be obtained from:
 https://dist.apache.org/repos/dist/dev/tomcat/tomcat-8/v8.0.24/
 The Maven staging repo is:
 https://repository.apache.org/content/repositories/orgapachetomcat-1047/
 The svn tag is:
 http://svn.apache.org/repos/asf/tomcat/tc8.0.x/tags/TOMCAT_8_0_24/
 
 The proposed 8.0.24 release is:
 [ ] Broken - do not release
 [X] Stable - go ahead and release as 8.0.24

Tested in dev environment with a standard web application with no fancy
toys like WebSocket, etc.

Details:
* Environment
*  Java (build): java version 1.8.0_45 Java(TM) SE Runtime
Environment (build 1.8.0_45-b14) Java HotSpot(TM) 64-Bit Server VM
(build 25.45-b02, mixed mode)
*  Java (test): java version 1.8.0_45 Java(TM) SE Runtime
Environment (build 1.8.0_45-b14) Java HotSpot(TM) 64-Bit Server VM
(build 25.45-b02, mixed mode)
*  OS:   Linux 2.6.32-312-ec2 x86_64
*  cc:   cc (Debian 4.7.2-5) 4.7.2
*  make: GNU Make 3.81
*  OpenSSL:  OpenSSL 1.0.1e 11 Feb 2013
*  APR:  1.4.6
*
* Valid MD5 signature for apache-tomcat-8.0.24.zip
* Valid GPG signature for apache-tomcat-8.0.24.zip
* Valid MD5 signature for apache-tomcat-8.0.24.tar.gz
* Valid GPG signature for apache-tomcat-8.0.24.tar.gz
* Valid MD5 signature for apache-tomcat-8.0.24.exe
* Valid GPG signature for apache-tomcat-8.0.24.exe
* Valid MD5 signature for apache-tomcat-8.0.24-src.zip
* Valid GPG signature for apache-tomcat-8.0.24-src.zip
* Valid MD5 signature for apache-tomcat-8.0.24-src.tar.gz
* Valid GPG signature for apache-tomcat-8.0.24-src.tar.gz
*
* Binary Zip and tarball: Same
* Source Zip and tarball: Same
*
* Building dependencies returned: 0
* tcnative builds cleanly
* Tomcat builds cleanly
* Junit Tests: FAILED
*
* Tests that failed:

(These tests are known to fail in my environment due to lack of
multicast support.)

TEST-org.apache.catalina.session.TestStandardSession.APR.txt
TEST-org.apache.catalina.session.TestStandardSession.BIO.txt
TEST-org.apache.catalina.session.TestStandardSession.NIO.txt
TEST-org.apache.catalina.session.TestStandardSession.NIO2.txt
TEST-org.apache.catalina.tribes.group.TestGroupChannelMemberArrival.APR.txt
TEST-org.apache.catalina.tribes.group.TestGroupChannelMemberArrival.BIO.txt
TEST-org.apache.catalina.tribes.group.TestGroupChannelMemberArrival.NIO.txt
TEST-org.apache.catalina.tribes.group.TestGroupChannelMemberArrival.NIO2.txt
TEST-org.apache.catalina.tribes.group.TestGroupChannelSenderConnections.APR.txt
TEST-org.apache.catalina.tribes.group.TestGroupChannelSenderConnections.BIO.txt
TEST-org.apache.catalina.tribes.group.TestGroupChannelSenderConnections.NIO.txt
TEST-org.apache.catalina.tribes.group.TestGroupChannelSenderConnections.NIO2.txt
TEST-org.apache.catalina.tribes.group.TestGroupChannelStartStop.APR.txt
TEST-org.apache.catalina.tribes.group.TestGroupChannelStartStop.BIO.txt
TEST-org.apache.catalina.tribes.group.TestGroupChannelStartStop.NIO.txt
TEST-org.apache.catalina.tribes.group.TestGroupChannelStartStop.NIO2.txt
TEST-org.apache.catalina.tribes.group.interceptors.TestNonBlockingCoordinator.APR.txt
TEST-org.apache.catalina.tribes.group.interceptors.TestNonBlockingCoordinator.BIO.txt
TEST-org.apache.catalina.tribes.group.interceptors.TestNonBlockingCoordinator.NIO.txt
TEST-org.apache.catalina.tribes.group.interceptors.TestNonBlockingCoordinator.NIO2.txt
TEST-org.apache.catalina.tribes.group.interceptors.TestOrderInterceptor.APR.txt
TEST-org.apache.catalina.tribes.group.interceptors.TestOrderInterceptor.BIO.txt
TEST-org.apache.catalina.tribes.group.interceptors.TestOrderInterceptor.NIO.txt
TEST-org.apache.catalina.tribes.group.interceptors.TestOrderInterceptor.NIO2.txt
TEST-org.apache.catalina.tribes.group.interceptors.TestTcpFailureDetector.APR.txt
TEST-org.apache.catalina.tribes.group.interceptors.TestTcpFailureDetector.BIO.txt
TEST-org.apache.catalina.tribes.group.interceptors.TestTcpFailureDetector.NIO.txt
TEST-org.apache.catalina.tribes.group.interceptors.TestTcpFailureDetector.NIO2.txt



signature.asc
Description: OpenPGP digital signature


[Bug 58096] New: Incorrect CodeSource location from ProtectionDomain for classes in WEB-INF/classes

2015-07-02 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58096

Bug ID: 58096
   Summary: Incorrect CodeSource location from ProtectionDomain
for classes in WEB-INF/classes
   Product: Tomcat 8
   Version: trunk
  Hardware: PC
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: super...@gmail.com

I tried a very simple webapp, with a test.jsp and
WEB-INF/classes/test/pkg/Test.class on both Tomcat 7 and Tomcat 8 latest
version (with Java 7 and Java 8 respectively)

 test.jsp 
Test: %=
test.pkg.Test.class.getProtectionDomain().getCodeSource().getLocation() %
==

and Tomcat 8 shows

Test:
file:/C:/Install/apache-tomcat-8.0.23/webapps/test/WEB-INF/classe/test/pkg/Test.class


Tomcat 7 shows the similar result.

In a standalone Java program, the similar code shows the top-level classpath
entry like xxx/classes where test/pkg/Test.class is saved.

I also tried Jetty, it shows it correctly like:

Test:
file:/C:/Install/jetty-distribution-9.3.0.v20150612/test-base/webapps/test/WEB-INF/classes/


So what I expect is WEB-INF/classes, is there any reason why Tomcat returns the
full path of the class file instead of WEB-INF/classes ?

I have a quick fix to get what I want, but not sure whether there are other
impacts, at least all unit tests are passed except two
TEST-org.apache.catalina.filters.TestRemoteIpFilter.*.

The fix is here:

https://github.com/SuperMMX/tomcat/commit/a96b4a80144f78140690fd35e47d0fdd1a64d0ae

-- 
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 58096] Incorrect CodeSource location from ProtectionDomain for classes in WEB-INF/classes

2015-07-02 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58096

Xuan MA super...@gmail.com changed:

   What|Removed |Added

 OS||All

--- Comment #1 from Xuan MA super...@gmail.com ---
Comment from Mark Thomas:

I've taken a quick look and the issue looks valid. I'm not sure about
the proposed fix though. It is almost certainly better to correct the
value returned by getCodeBase() (fix the root cause, not one of the
symptoms).

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