[Bug 64068] Tomcat failes to start when JVM start option specified for new line by "\" on linux.

2020-01-16 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64068

--- Comment #4 from Rintaro ISONO  ---
I tryed with 8.5.50 (Comment 2), then it didn't work like the previous my
report.

Comment 1 is also effective in 8.5.50 and 8.5.50 started normally with JVM
start options.

Results of discussions within our company, we skip the update to 8.5.50 and
wait the fix.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



buildbot success in on tomcat-85-trunk

2020-01-16 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-85-trunk while 
building tomcat. Full details are available at:
https://ci.apache.org/builders/tomcat-85-trunk/builds/2132

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

Buildslave for this Build: asf946_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-85-commit' 
triggered this build
Build Source Stamp: [branch 8.5.x] cee47895a383505bb616ac14ca8176ec049e137f
Blamelist: Mark Thomas 

Build succeeded!

Sincerely,
 -The Buildbot




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



buildbot success in on tomcat-9-trunk

2020-01-16 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-9-trunk while 
building tomcat. Full details are available at:
https://ci.apache.org/builders/tomcat-9-trunk/builds/13

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

Buildslave for this Build: asf946_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-9-commit' 
triggered this build
Build Source Stamp: [branch 9.0.x] 3dc9c293c049e69235e72d8ae24f37d3190207f4
Blamelist: Mark Thomas 

Build succeeded!

Sincerely,
 -The Buildbot




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



buildbot success in on tomcat-trunk

2020-01-16 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-trunk while 
building tomcat. Full details are available at:
https://ci.apache.org/builders/tomcat-trunk/builds/4891

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

Buildslave for this Build: asf946_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' 
triggered this build
Build Source Stamp: [branch master] 912abf63d51997be156ae52aac55bacb9ce27a87
Blamelist: Mark Thomas 

Build succeeded!

Sincerely,
 -The Buildbot




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



[tomcat] branch 8.5.x updated: Update test for WebappServiceLoader changes

2020-01-16 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new cee4789  Update test for WebappServiceLoader changes
cee4789 is described below

commit cee47895a383505bb616ac14ca8176ec049e137f
Author: Mark Thomas 
AuthorDate: Thu Jan 16 20:55:36 2020 +

Update test for WebappServiceLoader changes
---
 .../catalina/startup/TestWebappServiceLoader.java  | 18 ++
 1 file changed, 18 insertions(+)

diff --git a/test/org/apache/catalina/startup/TestWebappServiceLoader.java 
b/test/org/apache/catalina/startup/TestWebappServiceLoader.java
index 5e083f6..6a0f18d 100644
--- a/test/org/apache/catalina/startup/TestWebappServiceLoader.java
+++ b/test/org/apache/catalina/startup/TestWebappServiceLoader.java
@@ -32,6 +32,9 @@ import org.junit.Before;
 import org.junit.Test;
 
 import org.apache.catalina.Context;
+import org.apache.catalina.LifecycleException;
+import org.apache.catalina.WebResourceRoot;
+import org.apache.catalina.webresources.StandardRoot;
 import org.apache.tomcat.unittest.TesterContext;
 import org.easymock.EasyMock;
 import org.easymock.IMocksControl;
@@ -101,6 +104,8 @@ public class TestWebappServiceLoader {
 List jars = Arrays.asList("jar1.jar", "dir/");
 
EasyMock.expect(servletContext.getAttribute(ServletContext.ORDERED_LIBS))
 .andReturn(jars);
+EasyMock.expect(servletContext.getResource("/WEB-INF/classes/" + 
CONFIG_FILE))
+.andReturn(null);
 EasyMock.expect(servletContext.getResource("/WEB-INF/lib/jar1.jar"))
 .andReturn(url1);
 loader.parseConfigFile(EasyMock.isA(LinkedHashSet.class), 
EasyMock.eq(sci1));
@@ -181,10 +186,19 @@ public class TestWebappServiceLoader {
 private static class ExtendedTesterContext extends TesterContext {
 private final ServletContext servletContext;
 private final ClassLoader parent;
+private final WebResourceRoot resources;
 
 public ExtendedTesterContext(ServletContext servletContext, 
ClassLoader parent) {
 this.servletContext = servletContext;
 this.parent = parent;
+// Empty resources - any non-null returns will be mocked on the
+// ServletContext
+this.resources = new StandardRoot(this);
+try {
+this.resources.start();
+} catch (LifecycleException e) {
+throw new IllegalStateException(e);
+}
 }
 
 @Override
@@ -202,5 +216,9 @@ public class TestWebappServiceLoader {
 return parent;
 }
 
+@Override
+public WebResourceRoot getResources() {
+return resources;
+}
 }
 }


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



[tomcat] branch 9.0.x updated: Update test for WebappServiceLoader changes

2020-01-16 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 3dc9c29  Update test for WebappServiceLoader changes
3dc9c29 is described below

commit 3dc9c293c049e69235e72d8ae24f37d3190207f4
Author: Mark Thomas 
AuthorDate: Thu Jan 16 20:55:36 2020 +

Update test for WebappServiceLoader changes
---
 .../catalina/startup/TestWebappServiceLoader.java  | 18 ++
 1 file changed, 18 insertions(+)

diff --git a/test/org/apache/catalina/startup/TestWebappServiceLoader.java 
b/test/org/apache/catalina/startup/TestWebappServiceLoader.java
index 5e083f6..6a0f18d 100644
--- a/test/org/apache/catalina/startup/TestWebappServiceLoader.java
+++ b/test/org/apache/catalina/startup/TestWebappServiceLoader.java
@@ -32,6 +32,9 @@ import org.junit.Before;
 import org.junit.Test;
 
 import org.apache.catalina.Context;
+import org.apache.catalina.LifecycleException;
+import org.apache.catalina.WebResourceRoot;
+import org.apache.catalina.webresources.StandardRoot;
 import org.apache.tomcat.unittest.TesterContext;
 import org.easymock.EasyMock;
 import org.easymock.IMocksControl;
@@ -101,6 +104,8 @@ public class TestWebappServiceLoader {
 List jars = Arrays.asList("jar1.jar", "dir/");
 
EasyMock.expect(servletContext.getAttribute(ServletContext.ORDERED_LIBS))
 .andReturn(jars);
+EasyMock.expect(servletContext.getResource("/WEB-INF/classes/" + 
CONFIG_FILE))
+.andReturn(null);
 EasyMock.expect(servletContext.getResource("/WEB-INF/lib/jar1.jar"))
 .andReturn(url1);
 loader.parseConfigFile(EasyMock.isA(LinkedHashSet.class), 
EasyMock.eq(sci1));
@@ -181,10 +186,19 @@ public class TestWebappServiceLoader {
 private static class ExtendedTesterContext extends TesterContext {
 private final ServletContext servletContext;
 private final ClassLoader parent;
+private final WebResourceRoot resources;
 
 public ExtendedTesterContext(ServletContext servletContext, 
ClassLoader parent) {
 this.servletContext = servletContext;
 this.parent = parent;
+// Empty resources - any non-null returns will be mocked on the
+// ServletContext
+this.resources = new StandardRoot(this);
+try {
+this.resources.start();
+} catch (LifecycleException e) {
+throw new IllegalStateException(e);
+}
 }
 
 @Override
@@ -202,5 +216,9 @@ public class TestWebappServiceLoader {
 return parent;
 }
 
+@Override
+public WebResourceRoot getResources() {
+return resources;
+}
 }
 }


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



[tomcat] 01/02: Update test for WebappServiceLoader changes

2020-01-16 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit ddbfaa752c40065324ba5d71e9ec2bc9065131da
Author: Mark Thomas 
AuthorDate: Thu Jan 16 20:55:36 2020 +

Update test for WebappServiceLoader changes
---
 .../catalina/startup/TestWebappServiceLoader.java  | 18 ++
 1 file changed, 18 insertions(+)

diff --git a/test/org/apache/catalina/startup/TestWebappServiceLoader.java 
b/test/org/apache/catalina/startup/TestWebappServiceLoader.java
index 8260bd0..e3f3dda 100644
--- a/test/org/apache/catalina/startup/TestWebappServiceLoader.java
+++ b/test/org/apache/catalina/startup/TestWebappServiceLoader.java
@@ -32,6 +32,9 @@ import org.junit.Before;
 import org.junit.Test;
 
 import org.apache.catalina.Context;
+import org.apache.catalina.LifecycleException;
+import org.apache.catalina.WebResourceRoot;
+import org.apache.catalina.webresources.StandardRoot;
 import org.apache.tomcat.unittest.TesterContext;
 import org.easymock.EasyMock;
 import org.easymock.IMocksControl;
@@ -101,6 +104,8 @@ public class TestWebappServiceLoader {
 List jars = Arrays.asList("jar1.jar", "dir/");
 
EasyMock.expect(servletContext.getAttribute(ServletContext.ORDERED_LIBS))
 .andReturn(jars);
+EasyMock.expect(servletContext.getResource("/WEB-INF/classes/" + 
CONFIG_FILE))
+.andReturn(null);
 EasyMock.expect(servletContext.getResource("/WEB-INF/lib/jar1.jar"))
 .andReturn(url1);
 loader.parseConfigFile(EasyMock.isA(LinkedHashSet.class), 
EasyMock.eq(sci1));
@@ -181,10 +186,19 @@ public class TestWebappServiceLoader {
 private static class ExtendedTesterContext extends TesterContext {
 private final ServletContext servletContext;
 private final ClassLoader parent;
+private final WebResourceRoot resources;
 
 public ExtendedTesterContext(ServletContext servletContext, 
ClassLoader parent) {
 this.servletContext = servletContext;
 this.parent = parent;
+// Empty resources - any non-null returns will be mocked on the
+// ServletContext
+this.resources = new StandardRoot(this);
+try {
+this.resources.start();
+} catch (LifecycleException e) {
+throw new IllegalStateException(e);
+}
 }
 
 @Override
@@ -202,5 +216,9 @@ public class TestWebappServiceLoader {
 return parent;
 }
 
+@Override
+public WebResourceRoot getResources() {
+return resources;
+}
 }
 }


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



[tomcat] branch master updated (f4a23e1 -> 912abf6)

2020-01-16 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


from f4a23e1  Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=53620 log 
files
 new ddbfaa7  Update test for WebappServiceLoader changes
 new 912abf6  Update tests after BZ 56320 changes (only open when data to 
log)

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../catalina/startup/TestWebappServiceLoader.java  | 18 ++
 test/org/apache/juli/TestFileHandler.java  |  6 ++
 test/org/apache/juli/TestFileHandlerNonRotatable.java  |  3 +++
 3 files changed, 27 insertions(+)


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



[tomcat] 02/02: Update tests after BZ 56320 changes (only open when data to log)

2020-01-16 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 912abf63d51997be156ae52aac55bacb9ce27a87
Author: Mark Thomas 
AuthorDate: Thu Jan 16 20:56:51 2020 +

Update tests after BZ 56320 changes (only open when data to log)
---
 test/org/apache/juli/TestFileHandler.java | 6 ++
 test/org/apache/juli/TestFileHandlerNonRotatable.java | 3 +++
 2 files changed, 9 insertions(+)

diff --git a/test/org/apache/juli/TestFileHandler.java 
b/test/org/apache/juli/TestFileHandler.java
index 1ca4675..d8840f9 100644
--- a/test/org/apache/juli/TestFileHandler.java
+++ b/test/org/apache/juli/TestFileHandler.java
@@ -78,6 +78,7 @@ public class TestFileHandler {
 generateLogFiles(logsDir, PREFIX_1, SUFIX_1, 3);
 
 FileHandler fh1 = new FileHandler(logsDir.getAbsolutePath(), PREFIX_1, 
SUFIX_1, Integer.valueOf(2));
+fh1.open();
 
 Thread.sleep(1000);
 
@@ -94,6 +95,10 @@ public class TestFileHandler {
 FileHandler fh2 = new FileHandler(logsDir.getAbsolutePath(), PREFIX_1, 
SUFIX_2, Integer.valueOf(2));
 FileHandler fh3 = new FileHandler(logsDir.getAbsolutePath(), PREFIX_2, 
SUFIX_1, Integer.valueOf(2));
 FileHandler fh4 = new FileHandler(logsDir.getAbsolutePath(), PREFIX_3, 
SUFIX_1, Integer.valueOf(2));
+fh1.open();
+fh2.open();
+fh3.open();
+fh4.open();
 
 Thread.sleep(1000);
 
@@ -110,6 +115,7 @@ public class TestFileHandler {
 generateLogFiles(logsDir, PREFIX_1, SUFIX_1, 3);
 
 FileHandler fh1 = new FileHandler(logsDir.getAbsolutePath(), PREFIX_1, 
SUFIX_1, null);
+fh1.open();
 
 Thread.sleep(1000);
 
diff --git a/test/org/apache/juli/TestFileHandlerNonRotatable.java 
b/test/org/apache/juli/TestFileHandlerNonRotatable.java
index 5b91245..a5affe8 100644
--- a/test/org/apache/juli/TestFileHandlerNonRotatable.java
+++ b/test/org/apache/juli/TestFileHandlerNonRotatable.java
@@ -55,6 +55,7 @@ public class TestFileHandlerNonRotatable extends 
LoggingBaseTest {
 public void testBug61232() throws Exception {
 testHandler = new FileHandler(this.getTemporaryDirectory().toString(),
 "juli.", ".log");
+testHandler.open();
 
 File logFile = new File(this.getTemporaryDirectory(), "juli.log");
 Assert.assertTrue(logFile.exists());
@@ -64,6 +65,7 @@ public class TestFileHandlerNonRotatable extends 
LoggingBaseTest {
 public void testCustomSuffixWithoutSeparator() throws Exception {
 testHandler = new FileHandler(this.getTemporaryDirectory().toString(),
 "juli.", "log");
+testHandler.open();
 
 File logFile = new File(this.getTemporaryDirectory(), "juli.log");
 Assert.assertTrue(logFile.exists());
@@ -73,6 +75,7 @@ public class TestFileHandlerNonRotatable extends 
LoggingBaseTest {
 public void testCustomPrefixWithoutSeparator() throws Exception {
 testHandler = new FileHandler(this.getTemporaryDirectory().toString(),
 "juli", ".log");
+testHandler.open();
 
 File logFile = new File(this.getTemporaryDirectory(), "juli.log");
 Assert.assertTrue(logFile.exists());


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



[Bug 55252] Separate Ant and command-line wrappers for JspC

2020-01-16 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=55252

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |LATER

--- Comment #1 from Mark Thomas  ---
I've no objection to this proposal but neither do I particularly see the need.

No-one has stepped up to provide a patch in some time so resolving this as
LATER. If this is an itch someone wants to scratch they are free to re-open
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



[Bug 55104] Allow passing arguments with spaces to Commons Daemon

2020-01-16 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=55104

Mark Thomas  changed:

   What|Removed |Added

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

--- Comment #3 from Mark Thomas  ---
This appears to have been addressed  - probably by the changes to BZ 63815.

-- 
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 53620] [juli] delay opening a file until something gets logged

2020-01-16 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=53620

Mark Thomas  changed:

   What|Removed |Added

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

--- Comment #3 from Mark Thomas  ---
It took a little longer but Tomcat 10 is now under development so I have
applied these changes.

Fixed in:
- master for 10.0.0.0-M1 onwards

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch master updated (24713fa -> f4a23e1)

2020-01-16 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


from 24713fa  Fix NPE reported by CI system
 add f4a23e1  Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=53620 log 
files

No new revisions were added by this update.

Summary of changes:
 java/org/apache/juli/AsyncFileHandler.java |  3 +--
 java/org/apache/juli/FileHandler.java  | 29 +++--
 webapps/docs/changelog.xml |  8 
 3 files changed, 24 insertions(+), 16 deletions(-)


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



[tomcat] branch 7.0.x updated: Align more closely with 8.5.x

2020-01-16 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/7.0.x by this push:
 new 00aef66  Align more closely with 8.5.x
00aef66 is described below

commit 00aef66ae661d5650e7f09e632aadbcd60784282
Author: Mark Thomas 
AuthorDate: Thu Jan 16 19:35:31 2020 +

Align more closely with 8.5.x
---
 java/org/apache/juli/AsyncFileHandler.java | 36 +-
 java/org/apache/juli/ClassLoaderLogManager.java| 15 +
 java/org/apache/juli/DateFormatCache.java  |  7 ++---
 java/org/apache/juli/FileHandler.java  | 24 +--
 java/org/apache/juli/JdkLoggerFormatter.java   |  4 ---
 java/org/apache/juli/logging/DirectJDKLog.java | 30 ++
 .../juli/logging/LogConfigurationException.java| 26 ++--
 java/org/apache/juli/logging/package.html  |  2 +-
 8 files changed, 59 insertions(+), 85 deletions(-)

diff --git a/java/org/apache/juli/AsyncFileHandler.java 
b/java/org/apache/juli/AsyncFileHandler.java
index 44aa826..8429d2f 100644
--- a/java/org/apache/juli/AsyncFileHandler.java
+++ b/java/org/apache/juli/AsyncFileHandler.java
@@ -43,16 +43,27 @@ import java.util.logging.LogRecord;
  */
 public class AsyncFileHandler extends FileHandler {
 
-public static final int OVERFLOW_DROP_LAST = 1;
-public static final int OVERFLOW_DROP_FIRST = 2;
-public static final int OVERFLOW_DROP_FLUSH = 3;
+public static final int OVERFLOW_DROP_LAST= 1;
+public static final int OVERFLOW_DROP_FIRST   = 2;
+public static final int OVERFLOW_DROP_FLUSH   = 3;
 public static final int OVERFLOW_DROP_CURRENT = 4;
 
-public static final int OVERFLOW_DROP_TYPE = 
Integer.parseInt(System.getProperty("org.apache.juli.AsyncOverflowDropType", 
"1"));
-public static final int DEFAULT_MAX_RECORDS = 
Integer.parseInt(System.getProperty("org.apache.juli.AsyncMaxRecordCount", 
"1"));
-public static final int LOGGER_SLEEP_TIME = 
Integer.parseInt(System.getProperty("org.apache.juli.AsyncLoggerPollInterval", 
"1000"));
+public static final int DEFAULT_OVERFLOW_DROP_TYPE = 1;
+public static final int DEFAULT_MAX_RECORDS= 1;
+public static final int DEFAULT_LOGGER_SLEEP_TIME  = 1000;
 
-protected static LinkedBlockingDeque queue = new 
LinkedBlockingDeque(DEFAULT_MAX_RECORDS);
+public static final int OVERFLOW_DROP_TYPE = Integer.parseInt(
+System.getProperty("org.apache.juli.AsyncOverflowDropType",
+   Integer.toString(DEFAULT_OVERFLOW_DROP_TYPE)));
+public static final int MAX_RECORDS = Integer.parseInt(
+System.getProperty("org.apache.juli.AsyncMaxRecordCount",
+   Integer.toString(DEFAULT_MAX_RECORDS)));
+public static final int LOGGER_SLEEP_TIME = Integer.parseInt(
+System.getProperty("org.apache.juli.AsyncLoggerPollInterval",
+   Integer.toString(DEFAULT_LOGGER_SLEEP_TIME)));
+
+protected static LinkedBlockingDeque queue =
+new LinkedBlockingDeque(DEFAULT_MAX_RECORDS);
 
 protected static LoggerThread logger = new LoggerThread();
 
@@ -137,7 +148,6 @@ public class AsyncFileHandler extends FileHandler {
 }
 
 protected static class LoggerThread extends Thread {
-protected boolean run = true;
 public LoggerThread() {
 this.setDaemon(true);
 this.setName("AsyncFileHandlerWriter-" + 
System.identityHashCode(this));
@@ -145,7 +155,7 @@ public class AsyncFileHandler extends FileHandler {
 
 @Override
 public void run() {
-while (run) {
+while (true) {
 try {
 LogEntry entry = queue.poll(LOGGER_SLEEP_TIME, 
TimeUnit.MILLISECONDS);
 if (entry != null) {
@@ -156,13 +166,13 @@ public class AsyncFileHandler extends FileHandler {
 } catch (Exception x) {
 x.printStackTrace();
 }
-}//while
+}
 }
 }
 
 protected static class LogEntry {
-private LogRecord record;
-private AsyncFileHandler handler;
+private final LogRecord record;
+private final AsyncFileHandler handler;
 public LogEntry(LogRecord record, AsyncFileHandler handler) {
 super();
 this.record = record;
@@ -177,7 +187,5 @@ public class AsyncFileHandler extends FileHandler {
 return true;
 }
 }
-
 }
-
 }
diff --git a/java/org/apache/juli/ClassLoaderLogManager.java 
b/java/org/apache/juli/ClassLoaderLogManager.java
index 8cb7d07..e4c6886 100644
--- a/java/org/apache/juli/ClassLoaderLogManager.java
+++ b/java/org/apache/juli/ClassLoaderLogManager.java
@@ -14,7 +14,6 @@
  * See the 

[Bug 64081] Fix for 49464 looks to introduced a regression on jstl's import tag support under certain condition

2020-01-16 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64081

fuminz...@crd.com changed:

   What|Removed |Added

 OS||All

--- Comment #1 from fuminz...@crd.com ---
A description of the issue:
Fix to bug 49464 looks to introduced a new bug/regression for jstl import tag
under certain conditions:
1. When jstl's fmt:setLocale is also used.
2. javax.servlet.jsp.jstl-1.2.3.jar is used. (later test indicates the issue
happens with javax.servlet.jsp.jstl-1.2.5.jar as well).

The issue behavior:
For the import tag such as

the expectation is var1 would be populated with the contents of sample.txt -
and the page itself not getting the file contents.

However, with tomcat 9.0.26 (with the bug 49464 fix), it is observed that the
var1 is left empty, while the containing jsp's generated result html would
contain the contents of the sample.txt.

Investigation:
under the above mentioned conditions, 
1. Tomcat's org.apache.catalina.servlets.DefaultServlet at about line 1025
(9.0.26), 
"outputEncoding != org.apache.coyote.Constants.DEFAULT_BODY_CHARSET.name()"
would yield a true even when the contents of both left and right sides are the
same.
2. The boolean outputEncodingSpecified being true would further branch the code
flow in about line 1108-1112 to pw.flush.
3. these looks to flush the contents into the response, and voided the internal
buffer which is used to populate the variable.
And the result is the result html contents get the import contents, while the
variable does not.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 8.5.x updated: Align with master/9.0.x

2020-01-16 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new dcc2773  Align with master/9.0.x
dcc2773 is described below

commit dcc2773b8ab86d6d74eed17b58c018cabded21c6
Author: Mark Thomas 
AuthorDate: Thu Jan 16 18:21:13 2020 +

Align with master/9.0.x

Clean-up
Remove references to org.apache.juli.JdkLoggerConfig (Tomcat Lite era)
---
 java/org/apache/juli/AsyncFileHandler.java |  6 +-
 java/org/apache/juli/FileHandler.java  |  9 +
 java/org/apache/juli/logging/DirectJDKLog.java | 17 +
 3 files changed, 11 insertions(+), 21 deletions(-)

diff --git a/java/org/apache/juli/AsyncFileHandler.java 
b/java/org/apache/juli/AsyncFileHandler.java
index cfd685d..20a9e16 100644
--- a/java/org/apache/juli/AsyncFileHandler.java
+++ b/java/org/apache/juli/AsyncFileHandler.java
@@ -147,7 +147,6 @@ public class AsyncFileHandler extends FileHandler {
 }
 
 protected static class LoggerThread extends Thread {
-protected final boolean run = true;
 public LoggerThread() {
 this.setDaemon(true);
 this.setName("AsyncFileHandlerWriter-" + 
System.identityHashCode(this));
@@ -155,7 +154,7 @@ public class AsyncFileHandler extends FileHandler {
 
 @Override
 public void run() {
-while (run) {
+while (true) {
 try {
 LogEntry entry = queue.poll(LOGGER_SLEEP_TIME, 
TimeUnit.MILLISECONDS);
 if (entry != null) {
@@ -187,8 +186,5 @@ public class AsyncFileHandler extends FileHandler {
 return true;
 }
 }
-
 }
-
-
 }
diff --git a/java/org/apache/juli/FileHandler.java 
b/java/org/apache/juli/FileHandler.java
index 0d62c92..a437f6a 100644
--- a/java/org/apache/juli/FileHandler.java
+++ b/java/org/apache/juli/FileHandler.java
@@ -95,14 +95,15 @@ import java.util.regex.Pattern;
  * 
  */
 public class FileHandler extends Handler {
+
 public static final int DEFAULT_MAX_DAYS = -1;
 
 private static final ExecutorService DELETE_FILES_SERVICE =
 Executors.newSingleThreadExecutor(new ThreadFactory() {
+private static final String NAME_PREFIX = 
"FileHandlerLogFilesCleaner-";
 private final boolean isSecurityEnabled;
 private final ThreadGroup group;
 private final AtomicInteger threadNumber = new 
AtomicInteger(1);
-private final String namePrefix = 
"FileHandlerLogFilesCleaner-";
 
 {
 SecurityManager s = System.getSecurityManager();
@@ -135,7 +136,7 @@ public class FileHandler extends Handler {
 
.setContextClassLoader(getClass().getClassLoader());
 }
 Thread t = new Thread(group, r,
-namePrefix + threadNumber.getAndIncrement());
+NAME_PREFIX + threadNumber.getAndIncrement());
 t.setDaemon(true);
 return t;
 } finally {
@@ -370,8 +371,7 @@ public class FileHandler extends Handler {
 private void configure() {
 
 Timestamp ts = new Timestamp(System.currentTimeMillis());
-String tsString = ts.toString().substring(0, 19);
-date = tsString.substring(0, 10);
+date = ts.toString().substring(0, 10);
 
 String className = this.getClass().getName(); //allow classes to 
override
 
@@ -415,6 +415,7 @@ public class FileHandler extends Handler {
 } catch (NumberFormatException ignore) {
 //no op
 }
+
 // Get encoding for the logging file
 String encoding = getProperty(className + ".encoding", null);
 if (encoding != null && encoding.length() > 0) {
diff --git a/java/org/apache/juli/logging/DirectJDKLog.java 
b/java/org/apache/juli/logging/DirectJDKLog.java
index 2e38563..adf9177 100644
--- a/java/org/apache/juli/logging/DirectJDKLog.java
+++ b/java/org/apache/juli/logging/DirectJDKLog.java
@@ -14,7 +14,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.juli.logging;
 
 import java.util.logging.ConsoleHandler;
@@ -24,28 +23,22 @@ import java.util.logging.Level;
 import java.util.logging.Logger;
 
 /**
- * Hardcoded java.util.logging commons-logging implementation.
+ * Hard-coded java.util.logging commons-logging implementation.
  */
 class DirectJDKLog implements Log {
 // no reason to hide this - but good reasons to not hide
 public final Logger logger;
 
-/** Alternate config reader and console format
- */
+// Alternate config reader and console format
 private static final String 

[Bug 62971] Revert the fix for 49464 in tomcat 9

2020-01-16 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=62971

fuminz...@crd.com changed:

   What|Removed |Added

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

--- Comment #10 from fuminz...@crd.com ---
Thanks for the recommendation. New Bug 64081 reported. Closing this one.

-- 
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 64081] New: Fix for 49464 looks to introduced a regression on jstl's import tag support under certain condition

2020-01-16 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64081

Bug ID: 64081
   Summary: Fix for 49464 looks to introduced a regression on
jstl's import tag support under certain condition
   Product: Tomcat 9
   Version: 9.0.26
  Hardware: PC
Status: NEW
  Severity: regression
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: fuminz...@crd.com
  Target Milestone: -

Created attachment 36968
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=36968=edit
A demonstration webapp zip of the issue behavior.

A simple jsp below could demonstrate the issue behavior - when it is used with
javax.servlet.jsp.jstl-1.2.3.jar and javax.servlet.jsp.jstl-api-1.2.1.jar
instead of taglibs-standard-impl-1.2.5.jar and taglibs-standard-spec-1.2.5.jar.
 I have also created a simple webapp with such. Some environment factors might
play - Windows 10 pro with en-US/Eastern Time zone was used when the issue was
encountered. java version is 11.0.5 was used but looks not relavent.


[Bug 64080] Graceful shutdown does not occur for connected clients that have not yet submitted their request payload

2020-01-16 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64080

Mark Thomas  changed:

   What|Removed |Added

   Severity|normal  |enhancement
 OS||All

--- Comment #1 from Mark Thomas  ---
I'll note that:
- there is a similar situation with requests in the keep-alive state;
- the issue was introduced largely as a result of the switch from blocking IO
to non-blocking IO.

Are you expecting Tomcat to process these requests normally (within some
configured timeout or set of timeouts for each stage) or is cleanly returning a
503 an acceptable response?

Looking at the existing code, processing the requests normally is a much more
invasive change that returning a 503.

A likely issue with a 503 is that clients won't read it until they have sent
the entire request so the Connector's maxSwallowSize configuration becomes a
factor as well.

It looks like changes would be required;
- in the Processor.service() implementations to always process the request on
the first iteration around the processing loop
- in Endpoint.stopInternal() to add a delay / wait between pause() (which stops
the Acceptor) and stopping the Poller (NIO/APR) / closing the active
connections (NIO2)

I'm moving this to an enhancement

-- 
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: Tomcat 7.0.x end of life

2020-01-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Mark,

On 1/14/20 3:56 PM, Mark Thomas wrote:
> Hi all,
> 
> This has been mentioned several times as we have figured out our 
> approach to Jakarta EE 9 and Tomcat 10. I'd like to formally
> propose that we announce end of life for Tomcat 7.0.x as 31 March
> 2021.
> 
> Thoughts?

FTR: +1

- -chris
-BEGIN PGP SIGNATURE-
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl4gmR4ACgkQHPApP6U8
pFh/7BAAgyJYPkDZh27l+CRXzR2h2+MfYArCXvqHdJCqOH1eOTtAyvGT2FMhZS+V
taPllefA5OzT6fdCKsKzcrn0+TUyRS2bJdU7N/76iOnR0zT975G5F9jPPdJV1m8f
cI4HsG22pioEN28o03gyFfbc2WSWfthGztjLbeAZpUb4a/pj5o0a3ay2v4vUeMT5
6tqwxTW8eXfV/YY8746Sp+P0lGkDhVV6ou/UT4GmTzIhNJJ+RO+bTUl/wYopErSg
9FxXUFs3m6K5m0ZJrVYhOLmAIoqlO/d6bIJRZ1RES+8+cPxvYklPuhZtcW0uqqcZ
xy/QLrmiGdO0t/4vrEMhLsVS9149XHZQsuBiJJPP8+hnBHZ0HbqxSKzJJ3bmGt15
sbuWf8kbVmO9/Ihp7POuXZmj4b358Z/Jvh0KlAg13QAvA7K77h7f72F+hqsagQgN
1k/CFB5eIUcjENrDPtRARXh0C7K/tpCx3cB6i6iNB9Vn7hVKTi6PAfz+A6+fX4qg
yOeDuKIOEB+Rl8BaLnw3BYBp9ceAEvfWz1Px9zYhB6xxWv91gtHd7pLPHWY0kGLe
H86PEABsg37Fcw8yUQfUIbXXup4XxpLhAa03/EplVr6EZsPyChBEH6kynV7Shey6
QjhY9riwvQQ/O2bofEkwpHso1qAeHr/ChxsD5cy5vFhwpcdOJS0=
=AfK0
-END PGP SIGNATURE-

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



Re: Tomcat 7.0.x end of life

2020-01-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Mark,

On 1/14/20 3:56 PM, Mark Thomas wrote:
> This has been mentioned several times as we have figured out our 
> approach to Jakarta EE 9 and Tomcat 10. I'd like to formally
> propose that we announce end of life for Tomcat 7.0.x as 31 March
> 2021.
> 
> Thoughts?

If we are willing to give slightly less than 12 full months notice, we
could sunset it on January 14th, 2021, which would be exactly 10 years
after the initial stable release. :)

- -chris
-BEGIN PGP SIGNATURE-
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl4gmQcACgkQHPApP6U8
pFjt4BAAp+IE+owaNfrYZ/tBv/X9enr+oZ/8zZoFF9HnYjKd/wkJlbVcYOZ0MNkB
C26/BbKAzKXZaNdU/O+UKo8gBc0vmThn3BHlR9cLzn+uxvJnIA622sOi3q7yXB+q
oiDGmu87pynuy+cN4z1p3/qDyHOJFkRJb5wm0muODH5Q1MiwQQW4cEFMg/l/2Y4H
fjzLWg8W2gfNtaHhGv3NFEbWWqeAYI2NcZTQu0aX0x3J/YTC+pzBBEec/7yAHFus
EYXYZP4NS2oGfkdXpuSfpex3p+NarahQUDMw0CsmdMVS/1lBvrW1YaiakR9k+u9m
t1B+kwnHBJ2qvxqEr1FQCdxft5L5jFv0cMnGPln3X1FD4+lYeqSAZ6DUWZI6DTl7
9AiwEkfJDP8UdKlkZvAv4lYVcwN+Cg63hJNPmoOSRDSQO7l2VneFucHZ7P2DzKCZ
DFKkrxxmzkviJb2fztvqs72uKpV9qaJlD8aRM7zB9N514Nr9AEsBEkjyu4rLk7Bv
+M+GQzxCNer37nJ7D09y2XQh2vOHqKJJPZ5e0MtX1mXKLCttAizia1YFcKmNh/b0
NfdFVeVsS4TTV9312mTg3+AWShxv2O/2sC+nuQBiGThYDYEsDVUKQNyRmntHy9wr
8b5MOlk67cERia7OG1gNXqOAsZcX0FncTSm2Y5OEHREfotRwU00=
=Wk/r
-END PGP SIGNATURE-

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



[Bug 62971] Revert the fix for 49464 in tomcat 9

2020-01-16 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=62971

--- Comment #9 from Mark Thomas  ---
This situation you describe seems to be wholly unrelated to this bug.

I recommend opening a new bug.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat-jakartaee-migration] branch master updated: Improve logs

2020-01-16 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git


The following commit(s) were added to refs/heads/master by this push:
 new 1f37102  Improve logs
1f37102 is described below

commit 1f371029964a0545bc0bca83faa87674cc87a377
Author: remm 
AuthorDate: Thu Jan 16 17:18:26 2020 +0100

Improve logs

Add the total time taken [the examples need 0.4s for me on my hardware,
so if it's automagic on deployment it will quickly add up]. Add a log
INFO when processing an archive, since it might take a while as well.
---
 src/main/java/org/apache/tomcat/jakartaee/Migration.java  | 8 ++--
 .../resources/org/apache/tomcat/jakartaee/LocalStrings.properties | 3 ++-
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/apache/tomcat/jakartaee/Migration.java 
b/src/main/java/org/apache/tomcat/jakartaee/Migration.java
index bc7744b..044e0a1 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/Migration.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/Migration.java
@@ -24,6 +24,7 @@ import java.io.InputStream;
 import java.io.OutputStream;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.concurrent.TimeUnit;
 import java.util.jar.Attributes;
 import java.util.jar.JarEntry;
 import java.util.jar.JarFile;
@@ -71,6 +72,7 @@ public class Migration {
 public boolean execute() throws IOException {
 logger.log(Level.INFO, sm.getString("migration.execute", 
source.getAbsolutePath(),
 destination.getAbsolutePath()));
+long t1 = System.nanoTime();
 if (source.isDirectory()) {
 if (destination.mkdirs()) {
 migrateDirectory(source, destination);
@@ -86,7 +88,8 @@ public class Migration {
 logger.log(Level.SEVERE, sm.getString("migration.mkdirError", 
parentDestination.getAbsolutePath()));
 }
 }
-logger.log(Level.INFO, sm.getString("migration.done"));
+logger.log(Level.INFO, sm.getString("migration.done"),
+Long.valueOf(TimeUnit.MILLISECONDS.convert(System.nanoTime() - 
t1, TimeUnit.NANOSECONDS)));
 return true;
 }
 
@@ -141,10 +144,11 @@ public class Migration {
 
 
 private void migrateStream(String name, InputStream src, OutputStream 
dest) throws IOException {
-logger.log(Level.FINE, sm.getString("migration.stream", name));
 if (isArchive(name)) {
+logger.log(Level.INFO, sm.getString("migration.archive", name));
 migrateArchive(src, dest);
 } else {
+logger.log(Level.FINE, sm.getString("migration.stream", name));
 for (Converter converter : converters) {
 if (converter.accpets(name)) {
 converter.convert(src, dest);
diff --git 
a/src/main/resources/org/apache/tomcat/jakartaee/LocalStrings.properties 
b/src/main/resources/org/apache/tomcat/jakartaee/LocalStrings.properties
index b41be87..9310641 100644
--- a/src/main/resources/org/apache/tomcat/jakartaee/LocalStrings.properties
+++ b/src/main/resources/org/apache/tomcat/jakartaee/LocalStrings.properties
@@ -13,8 +13,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+migration.archive=Migrating archive [{0}]
 migration.cannotReadSource=Cannot read source location [{0}]
-migration.done=Migration done
+migration.done=Migration completed in [{0}] milliseconds
 migration.entry=Migrating Jar entry [{0}]
 migration.error=Error performing migration
 migration.execute=Performing migration from source [{0}] to destination [{1}]


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



[Bug 64021] SCI ordering prevents a web application SCI from using a service bootstrapped by a container-provided SCI

2020-01-16 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64021

--- Comment #2 from Andy Wilkinson  ---
Thanks very much, Mark.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat-jakartaee-migration] branch master updated: Add back shade plugin

2020-01-16 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git


The following commit(s) were added to refs/heads/master by this push:
 new 8b17c00  Add back shade plugin
8b17c00 is described below

commit 8b17c008b8f16d8438dc222f9e62f1f6d2b57472
Author: remm 
AuthorDate: Thu Jan 16 15:34:12 2020 +0100

Add back shade plugin

Generate "fat" JAR separate from the main JAR, which can then be used by
the assembly plugin. Simplify pom a bit.
---
 pom.xml | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index 4e3679a..cf7f18b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -82,7 +82,6 @@

 
   
-org.apache.maven.plugins
 maven-jar-plugin
 
   
@@ -105,9 +104,7 @@
   
 
   
-  
 
   
 


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



[Bug 63993] Fatal error EXCEPTION_ACCESS_VIOLATION are thrown while the load test scenario includes multiple concurrent connections

2020-01-16 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63993

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |NEEDINFO
 OS||All

--- Comment #1 from Mark Thomas  ---
Please re-test with the latest 7.0.x release (7.0.99 as I type this). The APR
poller has been significantly re-factored since 7.0.94.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 7.0.x updated: https://bz.apache.org/bugzilla/show_bug.cgi?id=64021 SCI ordering

2020-01-16 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/7.0.x by this push:
 new fe905a4  https://bz.apache.org/bugzilla/show_bug.cgi?id=64021 SCI 
ordering
fe905a4 is described below

commit fe905a43bf935cb293db462915a17ad87c303438
Author: Mark Thomas 
AuthorDate: Thu Jan 16 11:10:13 2020 +

https://bz.apache.org/bugzilla/show_bug.cgi?id=64021 SCI ordering

Ensure that container provided SCIs are always loaded before application
provided SCIs. Where both container and application provide the same
SCI, the application takes priority.
SCI definitions from JARS unpacked into WEB-INF/classes are now handled
consistently and will always be found irrespective of whether the web
application defines a JAR ordering or not.
---
 .../catalina/startup/WebappServiceLoader.java  | 32 +-
 webapps/docs/changelog.xml | 11 
 2 files changed, 36 insertions(+), 7 deletions(-)

diff --git a/java/org/apache/catalina/startup/WebappServiceLoader.java 
b/java/org/apache/catalina/startup/WebappServiceLoader.java
index 0133d8d..f22e7a8 100644
--- a/java/org/apache/catalina/startup/WebappServiceLoader.java
+++ b/java/org/apache/catalina/startup/WebappServiceLoader.java
@@ -22,6 +22,7 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.net.URL;
+import java.net.URLClassLoader;
 import java.nio.charset.Charset;
 import java.util.ArrayList;
 import java.util.Collections;
@@ -58,6 +59,7 @@ import org.apache.tomcat.util.buf.UriUtil;
  * @see java.util.ServiceLoader
  */
 public class WebappServiceLoader {
+private static final String CLASSES = "/WEB-INF/classes/";
 private static final String LIB = "/WEB-INF/lib/";
 private static final String SERVICES = "META-INF/services/";
 private static final Charset UTF8 = Charset.forName("UTF-8");
@@ -100,10 +102,26 @@ public class WebappServiceLoader {
 // if the ServletContext has ORDERED_LIBS, then use that to specify the
 // set of JARs from WEB-INF/lib that should be used for loading 
services
 @SuppressWarnings("unchecked")
-List orderedLibs =
-(List) 
servletContext.getAttribute(ServletContext.ORDERED_LIBS);
-if (orderedLibs != null) {
-// handle ordered libs directly, ...
+List orderedLibs = (List) 
servletContext.getAttribute(ServletContext.ORDERED_LIBS);
+
+// Handle application SCIs directly...
+if (orderedLibs == null) {
+// No ordered libs, so use every service definition we can find
+if (loader instanceof URLClassLoader) {
+Enumeration resources = ((URLClassLoader) 
loader).findResources("/" + configFile);
+while (resources.hasMoreElements()) {
+URL resource = resources.nextElement();
+parseConfigFile(applicationServicesFound, resource);
+}
+}
+} else {
+// Ordered libs so only use services defined in those libs and any
+// in WEB-INF/classes
+URL unpacked = servletContext.getResource(CLASSES + configFile);
+if (unpacked != null) {
+parseConfigFile(applicationServicesFound, unpacked);
+}
+
 for (String lib : orderedLibs) {
 URL jarUrl = servletContext.getResource(LIB + lib);
 if (jarUrl == null) {
@@ -124,11 +142,11 @@ public class WebappServiceLoader {
 // no provider file found, this is OK
 }
 }
-
-// and the parent ClassLoader for all others
-loader = context.getParentClassLoader();
 }
 
+// and use the parent ClassLoader for all other SCIs
+loader = context.getParentClassLoader();
+
 Enumeration resources;
 if (loader == null) {
 resources = ClassLoader.getSystemResources(configFile);
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index a2e88f1..74c7bf5 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -88,6 +88,17 @@
 (michaelo)
   
   
+64021: Ensure that container provided SCIs are always loaded
+before application provided SCIs. Note that where both the container 
and
+the application provide the same SCI, it is the application provided 
SCI
+that will be used. (markt)
+  
+  
+SCI definitions from JARs unpacked into WEB-INF/classes 
are
+now handled consistently and will always be found irrespective of
+whether the web application defines a JAR ordering or not. (markt)
+  
+  
 64023: Skip null-valued session attributes when 
deserializing
 

[Bug 64021] SCI ordering prevents a web application SCI from using a service bootstrapped by a container-provided SCI

2020-01-16 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64021

Mark Thomas  changed:

   What|Removed |Added

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

--- Comment #1 from Mark Thomas  ---
Fixed in:
- master for 10.0.0.0-M1 onwards
- 9.0.x for 9.0.31 onwards
- 8.5.x for 8.5.51 onwards
- 7.0.x for 7.0.100 onwards

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 8.5.x updated: Fix NPE reported by CI system

2020-01-16 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new 7bd3b3d  Fix NPE reported by CI system
7bd3b3d is described below

commit 7bd3b3d8dd2e9522199e6d0db7d717862a8b2a36
Author: Mark Thomas 
AuthorDate: Thu Jan 16 14:16:44 2020 +

Fix NPE reported by CI system
---
 java/org/apache/catalina/startup/WebappServiceLoader.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/startup/WebappServiceLoader.java 
b/java/org/apache/catalina/startup/WebappServiceLoader.java
index dc580d5..0d0bc7a 100644
--- a/java/org/apache/catalina/startup/WebappServiceLoader.java
+++ b/java/org/apache/catalina/startup/WebappServiceLoader.java
@@ -114,7 +114,9 @@ public class WebappServiceLoader {
 // Ordered libs so only use services defined in those libs and any
 // in WEB-INF/classes
 URL unpacked = servletContext.getResource(CLASSES + configFile);
-parseConfigFile(applicationServicesFound, unpacked);
+if (unpacked != null) {
+parseConfigFile(applicationServicesFound, unpacked);
+}
 
 for (String lib : orderedLibs) {
 URL jarUrl = servletContext.getResource(LIB + lib);


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



[tomcat] branch master updated: Fix NPE reported by CI system

2020-01-16 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/master by this push:
 new 24713fa  Fix NPE reported by CI system
24713fa is described below

commit 24713fab3d5f35d86f709f40c29a65d528edab4c
Author: Mark Thomas 
AuthorDate: Thu Jan 16 14:16:44 2020 +

Fix NPE reported by CI system
---
 java/org/apache/catalina/startup/WebappServiceLoader.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/startup/WebappServiceLoader.java 
b/java/org/apache/catalina/startup/WebappServiceLoader.java
index 0b8eab8..bd3bfe5 100644
--- a/java/org/apache/catalina/startup/WebappServiceLoader.java
+++ b/java/org/apache/catalina/startup/WebappServiceLoader.java
@@ -114,7 +114,9 @@ public class WebappServiceLoader {
 // Ordered libs so only use services defined in those libs and any
 // in WEB-INF/classes
 URL unpacked = servletContext.getResource(CLASSES + configFile);
-parseConfigFile(applicationServicesFound, unpacked);
+if (unpacked != null) {
+parseConfigFile(applicationServicesFound, unpacked);
+}
 
 for (String lib : orderedLibs) {
 URL jarUrl = servletContext.getResource(LIB + lib);


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



[tomcat] branch 9.0.x updated: Fix NPE reported by CI system

2020-01-16 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new d3a32d9  Fix NPE reported by CI system
d3a32d9 is described below

commit d3a32d9e6b7018d5a35d7f670a8691b4f9db1799
Author: Mark Thomas 
AuthorDate: Thu Jan 16 14:16:44 2020 +

Fix NPE reported by CI system
---
 java/org/apache/catalina/startup/WebappServiceLoader.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/startup/WebappServiceLoader.java 
b/java/org/apache/catalina/startup/WebappServiceLoader.java
index dc580d5..0d0bc7a 100644
--- a/java/org/apache/catalina/startup/WebappServiceLoader.java
+++ b/java/org/apache/catalina/startup/WebappServiceLoader.java
@@ -114,7 +114,9 @@ public class WebappServiceLoader {
 // Ordered libs so only use services defined in those libs and any
 // in WEB-INF/classes
 URL unpacked = servletContext.getResource(CLASSES + configFile);
-parseConfigFile(applicationServicesFound, unpacked);
+if (unpacked != null) {
+parseConfigFile(applicationServicesFound, unpacked);
+}
 
 for (String lib : orderedLibs) {
 URL jarUrl = servletContext.getResource(LIB + lib);


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



Re: [tomcat-jakartaee-migration] branch master updated: Shade and add a main class

2020-01-16 Thread Mark Thomas
On 16/01/2020 11:53, Rémy Maucherat wrote:
> On Thu, Jan 16, 2020 at 11:58 AM Mark Thomas  > wrote:
> 
> On 16/01/2020 10:27, Rémy Maucherat wrote:
> > On Thu, Jan 16, 2020 at 11:06 AM  
> > >> wrote:
> >
> >     This is an automated email from the ASF dual-hosted git
> repository.
> >
> >     remm pushed a commit to branch master
> >     in repository
> >     https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git
> >
> >
> >     The following commit(s) were added to refs/heads/master by
> this push:
> >          new 86bc4ee  Shade and add a main class
> >     86bc4ee is described below
> >
> >     commit 86bc4eea2804fa5df6a5089dd4a232847b709c91
> >     Author: remm mailto:r...@apache.org>
> >>
> >     AuthorDate: Thu Jan 16 11:06:25 2020 +0100
> >
> >         Shade and add a main class
> >
> >         It seems easier to use to me: "java -jar
> overlylongjarname.jar src
> >         dest". The overlylongjarname could be trimmed down a bit.
> >
> >
> > So there's an option between this way and the assembly that was added
> > (which I'm not sure how to use).
> 
> If I understand your changes correctly, they create a single "fat" jar.
> Is that right?
> 
> 
> Yes, so it includes BCEL.
>  
> 
> 
> My thinking with the assembly approach (and I don't think the two
> approaches are mutually exclusive) was:
> 
> - looking towards a formal ASF release where we would want bin and
>   source releases
> 
> - to make it easier to "plug-in" additional convertors for specific file
>   types.
> 
> I'm just guessing at requirements at this point. Given where things are
> right now, I think a single JAR makes most sense. It is much easier to
> work with during development: (build, use) rather than (build,
> unpack, use)
> 
> At the moment the script just sets up the class path. I have no
> objection to removing the assembly plumbing for now. We can always add
> it back if we need it.
> 
> Well, that's not a bad idea since that's how the releases are done and I
> didn't think about the plugin idea, I get it better now.
> I guess I can keep my hack pom :)

Sorry, I should have been clearer. I'm in favour of keeping the single
JAR via the shade plug-in- it makes it easier to work with during
development / testing.

We can still use the assembly to produce a final release (if we get to
the point of formally releasing this).

Mark

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



Re: [Bug 61542] Apache Tomcat Remote Code Execution via JSP Upload bypass

2020-01-16 Thread Mark Thomas
On 16/01/2020 12:00, bugzi...@apache.org wrote:
> https://bz.apache.org/bugzilla/show_bug.cgi?id=61542
> 
> --- Comment #13 from Sam  ---

This idiot has been blocked from BZ for spam and the spam comment deleted.

Mark

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



[Bug 62971] Revert the fix for 49464 in tomcat 9

2020-01-16 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=62971

fuminz...@crd.com changed:

   What|Removed |Added

 Status|NEEDINFO|NEW

--- Comment #8 from fuminz...@crd.com ---
A simple jsp below could demonstrate the issue behavior - when it is used with
javax.servlet.jsp.jstl-1.2.3.jar (and javax.servlet.jsp.jstl-api-1.2.1.jar)
instead of taglibs-standard-impl-1.2.5.jar and taglibs-standard-spec-1.2.5.jar.
 I have also created a simple webapp with such. - Some environment factors
might play - I am using a Windows 10 pro, with en-US/Eastern Time zone, which
might cause the non-constant CharacterEncoding to be set on the Response.

But now I am wondering maybe I should create a separate bug instead of reopen
this one - so that we could move forward instead of considering rolling it back
- what do you think?


buildbot failure in on tomcat-85-trunk

2020-01-16 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-85-trunk while 
building tomcat. Full details are available at:
https://ci.apache.org/builders/tomcat-85-trunk/builds/2129

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

Buildslave for this Build: asf946_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-85-commit' 
triggered this build
Build Source Stamp: [branch 8.5.x] 983d5ccd2692b29d8f587f8819137bcfebb7e404
Blamelist: Mark Thomas 

BUILD FAILED: failed compile_1

Sincerely,
 -The Buildbot




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



[Bug 64063] The libtcnative library should be installed in $CATALINA_HOME/bin

2020-01-16 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64063

mgrigorov  changed:

   What|Removed |Added

 Status|RESOLVED|CLOSED
 Resolution|WONTFIX |INVALID

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



buildbot failure in on tomcat-9-trunk

2020-01-16 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-9-trunk while 
building tomcat. Full details are available at:
https://ci.apache.org/builders/tomcat-9-trunk/builds/11

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

Buildslave for this Build: asf946_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-9-commit' 
triggered this build
Build Source Stamp: [branch 9.0.x] 0585e5a9bdffd703c23c590a91f7737a567268da
Blamelist: Mark Thomas 

BUILD FAILED: failed compile_1

Sincerely,
 -The Buildbot




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



[Bug 61542] Apache Tomcat Remote Code Execution via JSP Upload bypass

2020-01-16 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=61542

--- Comment #13 from Sam  ---
Hello Mark, is this issue fixed? 
Best regards,
Sam.
https://getpeople.io

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat-jakartaee-migration] branch master updated: Drop shade plugin

2020-01-16 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git


The following commit(s) were added to refs/heads/master by this push:
 new 0278c8f  Drop shade plugin
0278c8f is described below

commit 0278c8fe110a6753184fb4307ed1f225518cfaab
Author: remm 
AuthorDate: Thu Jan 16 12:56:34 2020 +0100

Drop shade plugin
---
 pom.xml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/pom.xml b/pom.xml
index 2abda49..4e3679a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -105,6 +105,7 @@
   
 
   
+  
 
   
 


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



[tomcat-jakartaee-migration] branch master updated: Add i18n and some validation

2020-01-16 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git


The following commit(s) were added to refs/heads/master by this push:
 new 873d7af  Add i18n and some validation
873d7af is described below

commit 873d7afeba2ce603db0a98d6f6b3a3ce52ace265
Author: remm 
AuthorDate: Thu Jan 16 12:53:36 2020 +0100

Add i18n and some validation
---
 .../org/apache/tomcat/jakartaee/Migration.java |  46 ++--
 .../org/apache/tomcat/jakartaee/StringManager.java | 292 +
 .../tomcat/jakartaee/LocalStrings.properties   |  23 ++
 3 files changed, 346 insertions(+), 15 deletions(-)

diff --git a/src/main/java/org/apache/tomcat/jakartaee/Migration.java 
b/src/main/java/org/apache/tomcat/jakartaee/Migration.java
index c81dfd7..bc7744b 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/Migration.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/Migration.java
@@ -30,9 +30,14 @@ import java.util.jar.JarFile;
 import java.util.jar.JarInputStream;
 import java.util.jar.JarOutputStream;
 import java.util.jar.Manifest;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 public class Migration {
 
+private static final Logger logger = 
Logger.getLogger(Migration.class.getCanonicalName());
+private static final StringManager sm = 
StringManager.getManager(Migration.class);
+
 private File source;
 private File destination;
 private final List converters;
@@ -51,29 +56,38 @@ public class Migration {
 
 public void setSource(File source) {
 if (!source.canRead()) {
-// TODO i18n
-throw new IllegalArgumentException();
+throw new 
IllegalArgumentException(sm.getString("migration.cannotReadSource",
+source.getAbsolutePath()));
 }
 this.source = source;
 }
 
 
 public void setDestination(File destination) {
-// TODO validate
 this.destination = destination;
 }
 
 
 public boolean execute() throws IOException {
-// TODO validate arguments
-
+logger.log(Level.INFO, sm.getString("migration.execute", 
source.getAbsolutePath(),
+destination.getAbsolutePath()));
 if (source.isDirectory()) {
-migrateDirectory(source, destination);
+if (destination.mkdirs()) {
+migrateDirectory(source, destination);
+} else {
+logger.log(Level.SEVERE, sm.getString("migration.mkdirError", 
destination.getAbsolutePath()));
+}
 } else {
 // Single file
-migrateFile(source, destination);
+File parentDestination = destination.getParentFile();
+if (parentDestination.exists() || parentDestination.mkdirs()) {
+migrateFile(source, destination);
+} else {
+logger.log(Level.SEVERE, sm.getString("migration.mkdirError", 
parentDestination.getAbsolutePath()));
+}
 }
-return false;
+logger.log(Level.INFO, sm.getString("migration.done"));
+return true;
 }
 
 
@@ -83,8 +97,11 @@ public class Migration {
 File srcFile = new File(src, file);
 File destFile = new File(dest, file);
 if (srcFile.isDirectory()) {
-destFile.mkdirs();
-migrateDirectory(srcFile, destFile);
+if (destFile.mkdir()) {
+migrateDirectory(srcFile, destFile);
+} else {
+logger.log(Level.SEVERE, 
sm.getString("migration.mkdirError", destFile.getAbsolutePath()));
+}
 } else {
 migrateFile(srcFile, destFile);
 }
@@ -113,7 +130,7 @@ public class Migration {
 JarEntry jarEntry;
 while ((jarEntry = jarIs.getNextJarEntry()) != null) {
 String sourceName = jarEntry.getName();
-System.out.println("Migrating JarEntry [" + sourceName + "]");
+logger.log(Level.FINE, sm.getString("migration.entry", 
sourceName));
 String destName = Util.convert(sourceName);
 JarEntry destEntry = new JarEntry(destName);
 jarOs.putNextEntry(destEntry);
@@ -124,7 +141,7 @@ public class Migration {
 
 
 private void migrateStream(String name, InputStream src, OutputStream 
dest) throws IOException {
-System.out.println("Migrating stream [" + name + "]");
+logger.log(Level.FINE, sm.getString("migration.stream", name));
 if (isArchive(name)) {
 migrateArchive(src, dest);
 } else {
@@ -166,8 +183,7 @@ public class Migration {
 try {
 result = migration.execute();
 } catch (IOException e) {
-// TODO Auto-generated catch block
-e.printStackTrace();
+

Re: [tomcat-jakartaee-migration] branch master updated: Shade and add a main class

2020-01-16 Thread Rémy Maucherat
On Thu, Jan 16, 2020 at 11:58 AM Mark Thomas  wrote:

> On 16/01/2020 10:27, Rémy Maucherat wrote:
> > On Thu, Jan 16, 2020 at 11:06 AM  > > wrote:
> >
> > This is an automated email from the ASF dual-hosted git repository.
> >
> > remm pushed a commit to branch master
> > in repository
> > https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git
> >
> >
> > The following commit(s) were added to refs/heads/master by this push:
> >  new 86bc4ee  Shade and add a main class
> > 86bc4ee is described below
> >
> > commit 86bc4eea2804fa5df6a5089dd4a232847b709c91
> > Author: remm mailto:r...@apache.org>>
> > AuthorDate: Thu Jan 16 11:06:25 2020 +0100
> >
> > Shade and add a main class
> >
> > It seems easier to use to me: "java -jar overlylongjarname.jar
> src
> > dest". The overlylongjarname could be trimmed down a bit.
> >
> >
> > So there's an option between this way and the assembly that was added
> > (which I'm not sure how to use).
>
> If I understand your changes correctly, they create a single "fat" jar.
> Is that right?
>

Yes, so it includes BCEL.


>
> My thinking with the assembly approach (and I don't think the two
> approaches are mutually exclusive) was:
>
> - looking towards a formal ASF release where we would want bin and
>   source releases
>
> - to make it easier to "plug-in" additional convertors for specific file
>   types.
>
> I'm just guessing at requirements at this point. Given where things are
> right now, I think a single JAR makes most sense. It is much easier to
> work with during development: (build, use) rather than (build, unpack, use)
>
> At the moment the script just sets up the class path. I have no
> objection to removing the assembly plumbing for now. We can always add
> it back if we need it.
>
> Well, that's not a bad idea since that's how the releases are done and I
didn't think about the plugin idea, I get it better now.
I guess I can keep my hack pom :)

Rémy


[tomcat] branch 9.0.x updated: Simplify

2020-01-16 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 518c954  Simplify
518c954 is described below

commit 518c954f056fd48e70093e46cb594cf7ffcaf2a5
Author: Mark Thomas 
AuthorDate: Thu Jan 16 11:47:11 2020 +

Simplify
---
 java/org/apache/catalina/startup/WebappServiceLoader.java | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/java/org/apache/catalina/startup/WebappServiceLoader.java 
b/java/org/apache/catalina/startup/WebappServiceLoader.java
index d6b7623..dc580d5 100644
--- a/java/org/apache/catalina/startup/WebappServiceLoader.java
+++ b/java/org/apache/catalina/startup/WebappServiceLoader.java
@@ -96,8 +96,6 @@ public class WebappServiceLoader {
 LinkedHashSet applicationServicesFound = new LinkedHashSet<>();
 LinkedHashSet containerServicesFound = new LinkedHashSet<>();
 
-ClassLoader loader = servletContext.getClassLoader();
-
 // if the ServletContext has ORDERED_LIBS, then use that to specify the
 // set of JARs from WEB-INF/lib that should be used for loading 
services
 @SuppressWarnings("unchecked")
@@ -141,7 +139,7 @@ public class WebappServiceLoader {
 }
 
 // and use the parent ClassLoader for all other SCIs
-loader = context.getParentClassLoader();
+ClassLoader loader = context.getParentClassLoader();
 
 Enumeration resources;
 if (loader == null) {


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



[tomcat] branch 8.5.x updated: Simplify

2020-01-16 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new 983d5cc  Simplify
983d5cc is described below

commit 983d5ccd2692b29d8f587f8819137bcfebb7e404
Author: Mark Thomas 
AuthorDate: Thu Jan 16 11:47:11 2020 +

Simplify
---
 java/org/apache/catalina/startup/WebappServiceLoader.java | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/java/org/apache/catalina/startup/WebappServiceLoader.java 
b/java/org/apache/catalina/startup/WebappServiceLoader.java
index d6b7623..dc580d5 100644
--- a/java/org/apache/catalina/startup/WebappServiceLoader.java
+++ b/java/org/apache/catalina/startup/WebappServiceLoader.java
@@ -96,8 +96,6 @@ public class WebappServiceLoader {
 LinkedHashSet applicationServicesFound = new LinkedHashSet<>();
 LinkedHashSet containerServicesFound = new LinkedHashSet<>();
 
-ClassLoader loader = servletContext.getClassLoader();
-
 // if the ServletContext has ORDERED_LIBS, then use that to specify the
 // set of JARs from WEB-INF/lib that should be used for loading 
services
 @SuppressWarnings("unchecked")
@@ -141,7 +139,7 @@ public class WebappServiceLoader {
 }
 
 // and use the parent ClassLoader for all other SCIs
-loader = context.getParentClassLoader();
+ClassLoader loader = context.getParentClassLoader();
 
 Enumeration resources;
 if (loader == null) {


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



[tomcat-jakartaee-migration] branch master updated: Add .java to the list

2020-01-16 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git


The following commit(s) were added to refs/heads/master by this push:
 new f676558  Add .java to the list
f676558 is described below

commit f676558ab37a4dd297b84e1a10b049e305633ef7
Author: remm 
AuthorDate: Thu Jan 16 12:47:09 2020 +0100

Add .java to the list

The example webapp has sources. So why not ...
---
 src/main/java/org/apache/tomcat/jakartaee/TextConverter.java | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/main/java/org/apache/tomcat/jakartaee/TextConverter.java 
b/src/main/java/org/apache/tomcat/jakartaee/TextConverter.java
index 9775964..bec3e7e 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/TextConverter.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/TextConverter.java
@@ -31,6 +31,7 @@ public class TextConverter implements Converter {
 
 static {
 supportedExtensions = new ArrayList<>();
+supportedExtensions.add("java");
 supportedExtensions.add("jsp");
 supportedExtensions.add("jspx");
 supportedExtensions.add("tag");


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



[tomcat] branch master updated: Simplify

2020-01-16 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/master by this push:
 new 9e50f37  Simplify
9e50f37 is described below

commit 9e50f37d6aa0c6726a82eca70bd559753d72794f
Author: Mark Thomas 
AuthorDate: Thu Jan 16 11:47:11 2020 +

Simplify
---
 java/org/apache/catalina/startup/WebappServiceLoader.java | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/java/org/apache/catalina/startup/WebappServiceLoader.java 
b/java/org/apache/catalina/startup/WebappServiceLoader.java
index 11c4b43..0b8eab8 100644
--- a/java/org/apache/catalina/startup/WebappServiceLoader.java
+++ b/java/org/apache/catalina/startup/WebappServiceLoader.java
@@ -96,8 +96,6 @@ public class WebappServiceLoader {
 LinkedHashSet applicationServicesFound = new LinkedHashSet<>();
 LinkedHashSet containerServicesFound = new LinkedHashSet<>();
 
-ClassLoader loader = servletContext.getClassLoader();
-
 // if the ServletContext has ORDERED_LIBS, then use that to specify the
 // set of JARs from WEB-INF/lib that should be used for loading 
services
 @SuppressWarnings("unchecked")
@@ -141,7 +139,7 @@ public class WebappServiceLoader {
 }
 
 // and use the parent ClassLoader for all other SCIs
-loader = context.getParentClassLoader();
+ClassLoader loader = context.getParentClassLoader();
 
 Enumeration resources;
 if (loader == null) {


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



[Bug 64063] The libtcnative library should be installed in $CATALINA_HOME/bin

2020-01-16 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64063

Michael Osipov  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #9 from Michael Osipov  ---
(In reply to mgrigorov from comment #8)
> After re-reading https://tomcat.apache.org/native-doc/ I think the
> documentation is good enough. It explains that $CATALINA_HOME/lib should be
> added to LD_LIBRARY_PATH. Somehow I've missed this the previous time.
> 
> I'm fine to close this ticket as "Not a problem".
> 
> @Michael Osipov: Do you want to keep it open and make some improvements ?

Improvement should happen in a new ticket.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] 02/02: Correct ordering

2020-01-16 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 4544de01b8e07324f1e983b4c5379d5a63d82b6c
Author: Mark Thomas 
AuthorDate: Thu Jan 16 11:11:59 2020 +

Correct ordering
---
 webapps/docs/changelog.xml | 22 +-
 1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index f8e24c7..08b0425 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -61,6 +61,10 @@
 Avoid useless environment restore when not using GSSCredential
 in JNDIRealm. (remm)
   
+  
+58577: Respect the argument-count when searching for MBean
+operations to invoke via the JMXProxyServlet. (schultz)
+  
   
 62755: Add ability to opt out of adding the default web.xml
 config when embedding Tomcat and adding a context via
@@ -68,6 +72,11 @@
 setAddDefaultWebXmlToWebapp(false) to prevent the 
automatic
 config. (isapir/markt)
   
+  
+63691: Skip all jar and directory scanning when the wildcard
+pattern * or *.jar is set or added to
+tomcat.util.scan.StandardJarScanFilter.jarsToSkip. 
(isapir)
+  
   
 64005: Correct a regression in the static resource caching
 changes introduced in 8.5.28. Avoid a NullPointerException
@@ -102,19 +111,14 @@
 64023: Skip null-valued session attributes when 
deserializing
 sessions. (schultz)
   
-  
-63691: Skip all jar and directory scanning when the wildcard
-pattern * or *.jar is set or added to
-tomcat.util.scan.StandardJarScanFilter.jarsToSkip. 
(isapir)
-  
   
 Do not throw a NullPointerException when an MBean or operation cannot
 be found by the JMXProxyServlet. (schultz)
   
-  
-58577: Respect the argument-count when searching for MBean
-operations to invoke via the JMXProxyServlet. (schultz)
-  
+  
+64067: Allow more than one parameter when defining 
RewriteMaps.
+(fschumacher)
+  
   
 64074: InputStreams for directories obtained
 from resource URLs now return a directory listing consistent with the


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



buildbot failure in on tomcat-trunk

2020-01-16 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-trunk while building 
tomcat. Full details are available at:
https://ci.apache.org/builders/tomcat-trunk/builds/4887

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

Buildslave for this Build: asf946_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' 
triggered this build
Build Source Stamp: [branch master] 82af31d38d8f84eebe3284fcbf2bde33745cdf4e
Blamelist: Mark Thomas 

BUILD FAILED: failed compile_1

Sincerely,
 -The Buildbot




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



[tomcat] 01/02: https://bz.apache.org/bugzilla/show_bug.cgi?id=64021 SCI ordering

2020-01-16 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 8a7384de384345b2372a73b677e35bb0f817920b
Author: Mark Thomas 
AuthorDate: Thu Jan 16 11:10:13 2020 +

https://bz.apache.org/bugzilla/show_bug.cgi?id=64021 SCI ordering

Ensure that container provided SCIs are always loaded before application
provided SCIs. Where both container and application provide the same
SCI, the application takes priority.
SCI definitions from JARS unpacked into WEB-INF/classes are now handled
consistently and will always be found irrespective of whether the web
application defines a JAR ordering or not.
---
 .../catalina/startup/WebappServiceLoader.java  | 29 --
 webapps/docs/changelog.xml | 11 
 2 files changed, 33 insertions(+), 7 deletions(-)

diff --git a/java/org/apache/catalina/startup/WebappServiceLoader.java 
b/java/org/apache/catalina/startup/WebappServiceLoader.java
index a47a8f9..d6b7623 100644
--- a/java/org/apache/catalina/startup/WebappServiceLoader.java
+++ b/java/org/apache/catalina/startup/WebappServiceLoader.java
@@ -34,6 +34,7 @@ import java.util.regex.Pattern;
 import javax.servlet.ServletContext;
 
 import org.apache.catalina.Context;
+import org.apache.catalina.WebResource;
 import org.apache.tomcat.util.scan.JarFactory;
 
 /**
@@ -58,6 +59,7 @@ import org.apache.tomcat.util.scan.JarFactory;
  * @see java.util.ServiceLoader
  */
 public class WebappServiceLoader {
+private static final String CLASSES = "/WEB-INF/classes/";
 private static final String LIB = "/WEB-INF/lib/";
 private static final String SERVICES = "META-INF/services/";
 
@@ -99,10 +101,23 @@ public class WebappServiceLoader {
 // if the ServletContext has ORDERED_LIBS, then use that to specify the
 // set of JARs from WEB-INF/lib that should be used for loading 
services
 @SuppressWarnings("unchecked")
-List orderedLibs =
-(List) 
servletContext.getAttribute(ServletContext.ORDERED_LIBS);
-if (orderedLibs != null) {
-// handle ordered libs directly, ...
+List orderedLibs = (List) 
servletContext.getAttribute(ServletContext.ORDERED_LIBS);
+
+// Handle application SCIs directly...
+if (orderedLibs == null) {
+// No ordered libs, so use every service definition we can find
+WebResource[] resources = 
context.getResources().getClassLoaderResources("/" + configFile);
+for (WebResource resource : resources) {
+if (resource.isFile()) {
+parseConfigFile(applicationServicesFound, 
resource.getURL());
+}
+}
+} else {
+// Ordered libs so only use services defined in those libs and any
+// in WEB-INF/classes
+URL unpacked = servletContext.getResource(CLASSES + configFile);
+parseConfigFile(applicationServicesFound, unpacked);
+
 for (String lib : orderedLibs) {
 URL jarUrl = servletContext.getResource(LIB + lib);
 if (jarUrl == null) {
@@ -123,11 +138,11 @@ public class WebappServiceLoader {
 // no provider file found, this is OK
 }
 }
-
-// and the parent ClassLoader for all others
-loader = context.getParentClassLoader();
 }
 
+// and use the parent ClassLoader for all other SCIs
+loader = context.getParentClassLoader();
+
 Enumeration resources;
 if (loader == null) {
 resources = ClassLoader.getSystemResources(configFile);
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 641bdfd..f8e24c7 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -88,6 +88,17 @@
 (michaelo)
   
   
+64021: Ensure that container provided SCIs are always loaded
+before application provided SCIs. Note that where both the container 
and
+the application provide the same SCI, it is the application provided 
SCI
+that will be used. (markt)
+  
+  
+SCI definitions from JARs unpacked into WEB-INF/classes 
are
+now handled consistently and will always be found irrespective of
+whether the web application defines a JAR ordering or not. (markt)
+  
+  
 64023: Skip null-valued session attributes when 
deserializing
 sessions. (schultz)
   


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



[tomcat] branch 8.5.x updated (c2efdb6 -> 4544de0)

2020-01-16 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a change to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


from c2efdb6  Align with 9.0.x and master
 new 8a7384d  https://bz.apache.org/bugzilla/show_bug.cgi?id=64021 SCI 
ordering
 new 4544de0  Correct ordering

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../catalina/startup/WebappServiceLoader.java  | 29 ++-
 webapps/docs/changelog.xml | 33 --
 2 files changed, 46 insertions(+), 16 deletions(-)


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



[tomcat] 01/02: https://bz.apache.org/bugzilla/show_bug.cgi?id=64021 SCI ordering

2020-01-16 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 6cea73b33d9c17293fb5266ef3ffa56581d04e6c
Author: Mark Thomas 
AuthorDate: Thu Jan 16 11:10:13 2020 +

https://bz.apache.org/bugzilla/show_bug.cgi?id=64021 SCI ordering

Ensure that container provided SCIs are always loaded before application
provided SCIs. Where both container and application provide the same
SCI, the application takes priority.
SCI definitions from JARS unpacked into WEB-INF/classes are now handled
consistently and will always be found irrespective of whether the web
application defines a JAR ordering or not.
---
 .../catalina/startup/WebappServiceLoader.java  | 29 --
 webapps/docs/changelog.xml | 11 
 2 files changed, 33 insertions(+), 7 deletions(-)

diff --git a/java/org/apache/catalina/startup/WebappServiceLoader.java 
b/java/org/apache/catalina/startup/WebappServiceLoader.java
index a47a8f9..d6b7623 100644
--- a/java/org/apache/catalina/startup/WebappServiceLoader.java
+++ b/java/org/apache/catalina/startup/WebappServiceLoader.java
@@ -34,6 +34,7 @@ import java.util.regex.Pattern;
 import javax.servlet.ServletContext;
 
 import org.apache.catalina.Context;
+import org.apache.catalina.WebResource;
 import org.apache.tomcat.util.scan.JarFactory;
 
 /**
@@ -58,6 +59,7 @@ import org.apache.tomcat.util.scan.JarFactory;
  * @see java.util.ServiceLoader
  */
 public class WebappServiceLoader {
+private static final String CLASSES = "/WEB-INF/classes/";
 private static final String LIB = "/WEB-INF/lib/";
 private static final String SERVICES = "META-INF/services/";
 
@@ -99,10 +101,23 @@ public class WebappServiceLoader {
 // if the ServletContext has ORDERED_LIBS, then use that to specify the
 // set of JARs from WEB-INF/lib that should be used for loading 
services
 @SuppressWarnings("unchecked")
-List orderedLibs =
-(List) 
servletContext.getAttribute(ServletContext.ORDERED_LIBS);
-if (orderedLibs != null) {
-// handle ordered libs directly, ...
+List orderedLibs = (List) 
servletContext.getAttribute(ServletContext.ORDERED_LIBS);
+
+// Handle application SCIs directly...
+if (orderedLibs == null) {
+// No ordered libs, so use every service definition we can find
+WebResource[] resources = 
context.getResources().getClassLoaderResources("/" + configFile);
+for (WebResource resource : resources) {
+if (resource.isFile()) {
+parseConfigFile(applicationServicesFound, 
resource.getURL());
+}
+}
+} else {
+// Ordered libs so only use services defined in those libs and any
+// in WEB-INF/classes
+URL unpacked = servletContext.getResource(CLASSES + configFile);
+parseConfigFile(applicationServicesFound, unpacked);
+
 for (String lib : orderedLibs) {
 URL jarUrl = servletContext.getResource(LIB + lib);
 if (jarUrl == null) {
@@ -123,11 +138,11 @@ public class WebappServiceLoader {
 // no provider file found, this is OK
 }
 }
-
-// and the parent ClassLoader for all others
-loader = context.getParentClassLoader();
 }
 
+// and use the parent ClassLoader for all other SCIs
+loader = context.getParentClassLoader();
+
 Enumeration resources;
 if (loader == null) {
 resources = ClassLoader.getSystemResources(configFile);
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 7006a2f..abf3bd2 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -80,6 +80,17 @@
 (michaelo)
   
   
+64021: Ensure that container provided SCIs are always loaded
+before application provided SCIs. Note that where both the container 
and
+the application provide the same SCI, it is the application provided 
SCI
+that will be used. (markt)
+  
+  
+SCI definitions from JARs unpacked into WEB-INF/classes 
are
+now handled consistently and will always be found irrespective of
+whether the web application defines a JAR ordering or not. (markt)
+  
+  
 64023: Skip null-valued session attributes when 
deserializing
 sessions. (schultz)
   


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



[tomcat] branch 9.0.x updated (956be6c -> 0585e5a)

2020-01-16 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a change to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


from 956be6c  Clarify expected return value
 new 6cea73b  https://bz.apache.org/bugzilla/show_bug.cgi?id=64021 SCI 
ordering
 new 0585e5a  Correct ordering

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../catalina/startup/WebappServiceLoader.java  | 29 --
 webapps/docs/changelog.xml | 29 +++---
 2 files changed, 42 insertions(+), 16 deletions(-)


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



[tomcat] 02/02: Correct ordering

2020-01-16 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 0585e5a9bdffd703c23c590a91f7737a567268da
Author: Mark Thomas 
AuthorDate: Thu Jan 16 11:11:59 2020 +

Correct ordering
---
 webapps/docs/changelog.xml | 18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index abf3bd2..1bc44c3 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -56,6 +56,15 @@
 in JNDIRealm. (remm)
   
   
+58577: Respect the argument-count when searching for MBean
+operations to invoke via the JMXProxyServlet. (schultz)
+  
+  
+63691: Skip all jar and directory scanning when the wildcard
+pattern * or *.jar is set or added to
+tomcat.util.scan.StandardJarScanFilter.jarsToSkip. 
(isapir)
+  
+  
 64005: Correct a regression in the static resource caching
 changes introduced in 9.0.28. Avoid a NullPointerException
 when working with the URL provided for the root of a packed WAR. 
(markt)
@@ -94,19 +103,10 @@
 64023: Skip null-valued session attributes when 
deserializing
 sessions. (schultz)
   
-  
-63691: Skip all jar and directory scanning when the wildcard
-pattern * or *.jar is set or added to
-tomcat.util.scan.StandardJarScanFilter.jarsToSkip. 
(isapir)
-  
   
 Do not throw a NullPointerException when an MBean or operation cannot
 be found by the JMXProxyServlet. (schultz)
   
-  
-58577: Respect the argument-count when searching for MBean
-operations to invoke via the JMXProxyServlet. (schultz)
-  
   
 64067: Allow more than one parameter when defining 
RewriteMaps.
 (fschumacher)


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



[Bug 64080] New: Graceful shutdown does not occur for connected clients that have not yet submitted their request payload

2020-01-16 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64080

Bug ID: 64080
   Summary: Graceful shutdown does not occur for connected clients
that have not yet submitted their request payload
   Product: Tomcat 9
   Version: 9.0.27
  Hardware: PC
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: carbatt...@hotmail.com
  Target Milestone: -

Continuing from bug 62515, testing shows that graceful shutdown will occur if:
- the request has reached the servlet
- bindOnInit is set to false on Connector in server.xml
- unloadDelay is set to sufficient high value on Context in context.xml

The key point here is "the request has reached the servlet".

The server will accept a connect SYN/ACK and still terminate the connection,
resulting in error upstream.

Expected behavior for Tomcat here would be to:
1. Either not accept the connect (as it is shutting down)
Or
2. If accepted, wait unloadDelay/some_other_property period of time to receive
the request and respond to it.

To reproduce the error:

SERVER
- servlet with sleep of 30s
- unloadDelay set to 60s
- bindOnInit set to false

Testcase:
1. Use HTTPUrlConnection
urlConn.setDoInput (true);
urlConn.setDoOutput (true);
urlConn.setUseCaches (false);
urlConn.setConnectTimeout(1000); //1 second
urlConn.setReadTimeout(1); // 10 seconds
urlConn.connect();

At this point a succesful connection to Tomcat server has been established by
the Java Client

2. Shutdown Tomcat server
Tomcat will abort this connection

3. Submit request: 
OutputStreamWriter printout = new OutputStreamWriter(urlConn.getOutputStream
(), charset);

This will throw a IOException (SocketTimeOutException)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch master updated: https://bz.apache.org/bugzilla/show_bug.cgi?id=64021 SCI ordering

2020-01-16 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/master by this push:
 new 82af31d  https://bz.apache.org/bugzilla/show_bug.cgi?id=64021 SCI 
ordering
82af31d is described below

commit 82af31d38d8f84eebe3284fcbf2bde33745cdf4e
Author: Mark Thomas 
AuthorDate: Thu Jan 16 11:10:13 2020 +

https://bz.apache.org/bugzilla/show_bug.cgi?id=64021 SCI ordering

Ensure that container provided SCIs are always loaded before application
provided SCIs. Where both container and application provide the same
SCI, the application takes priority.
SCI definitions from JARS unpacked into WEB-INF/classes are now handled
consistently and will always be found irrespective of whether the web
application defines a JAR ordering or not.
---
 .../catalina/startup/WebappServiceLoader.java  | 29 --
 1 file changed, 22 insertions(+), 7 deletions(-)

diff --git a/java/org/apache/catalina/startup/WebappServiceLoader.java 
b/java/org/apache/catalina/startup/WebappServiceLoader.java
index f0d2465..11c4b43 100644
--- a/java/org/apache/catalina/startup/WebappServiceLoader.java
+++ b/java/org/apache/catalina/startup/WebappServiceLoader.java
@@ -34,6 +34,7 @@ import java.util.regex.Pattern;
 import jakarta.servlet.ServletContext;
 
 import org.apache.catalina.Context;
+import org.apache.catalina.WebResource;
 import org.apache.tomcat.util.scan.JarFactory;
 
 /**
@@ -58,6 +59,7 @@ import org.apache.tomcat.util.scan.JarFactory;
  * @see java.util.ServiceLoader
  */
 public class WebappServiceLoader {
+private static final String CLASSES = "/WEB-INF/classes/";
 private static final String LIB = "/WEB-INF/lib/";
 private static final String SERVICES = "META-INF/services/";
 
@@ -99,10 +101,23 @@ public class WebappServiceLoader {
 // if the ServletContext has ORDERED_LIBS, then use that to specify the
 // set of JARs from WEB-INF/lib that should be used for loading 
services
 @SuppressWarnings("unchecked")
-List orderedLibs =
-(List) 
servletContext.getAttribute(ServletContext.ORDERED_LIBS);
-if (orderedLibs != null) {
-// handle ordered libs directly, ...
+List orderedLibs = (List) 
servletContext.getAttribute(ServletContext.ORDERED_LIBS);
+
+// Handle application SCIs directly...
+if (orderedLibs == null) {
+// No ordered libs, so use every service definition we can find
+WebResource[] resources = 
context.getResources().getClassLoaderResources("/" + configFile);
+for (WebResource resource : resources) {
+if (resource.isFile()) {
+parseConfigFile(applicationServicesFound, 
resource.getURL());
+}
+}
+} else {
+// Ordered libs so only use services defined in those libs and any
+// in WEB-INF/classes
+URL unpacked = servletContext.getResource(CLASSES + configFile);
+parseConfigFile(applicationServicesFound, unpacked);
+
 for (String lib : orderedLibs) {
 URL jarUrl = servletContext.getResource(LIB + lib);
 if (jarUrl == null) {
@@ -123,11 +138,11 @@ public class WebappServiceLoader {
 // no provider file found, this is OK
 }
 }
-
-// and the parent ClassLoader for all others
-loader = context.getParentClassLoader();
 }
 
+// and use the parent ClassLoader for all other SCIs
+loader = context.getParentClassLoader();
+
 Enumeration resources;
 if (loader == null) {
 resources = ClassLoader.getSystemResources(configFile);


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



Re: [tomcat-jakartaee-migration] branch master updated: Shade and add a main class

2020-01-16 Thread Mark Thomas
On 16/01/2020 10:27, Rémy Maucherat wrote:
> On Thu, Jan 16, 2020 at 11:06 AM  > wrote:
> 
> This is an automated email from the ASF dual-hosted git repository.
> 
> remm pushed a commit to branch master
> in repository
> https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git
> 
> 
> The following commit(s) were added to refs/heads/master by this push:
>      new 86bc4ee  Shade and add a main class
> 86bc4ee is described below
> 
> commit 86bc4eea2804fa5df6a5089dd4a232847b709c91
> Author: remm mailto:r...@apache.org>>
> AuthorDate: Thu Jan 16 11:06:25 2020 +0100
> 
>     Shade and add a main class
> 
>     It seems easier to use to me: "java -jar overlylongjarname.jar src
>     dest". The overlylongjarname could be trimmed down a bit.
> 
> 
> So there's an option between this way and the assembly that was added
> (which I'm not sure how to use).

If I understand your changes correctly, they create a single "fat" jar.
Is that right?

My thinking with the assembly approach (and I don't think the two
approaches are mutually exclusive) was:

- looking towards a formal ASF release where we would want bin and
  source releases

- to make it easier to "plug-in" additional convertors for specific file
  types.

I'm just guessing at requirements at this point. Given where things are
right now, I think a single JAR makes most sense. It is much easier to
work with during development: (build, use) rather than (build, unpack, use)

At the moment the script just sets up the class path. I have no
objection to removing the assembly plumbing for now. We can always add
it back if we need it.

Mark

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



Re: [tomcat-jakartaee-migration] branch master updated: Shade and add a main class

2020-01-16 Thread Rémy Maucherat
On Thu, Jan 16, 2020 at 11:06 AM  wrote:

> This is an automated email from the ASF dual-hosted git repository.
>
> remm pushed a commit to branch master
> in repository
> https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git
>
>
> The following commit(s) were added to refs/heads/master by this push:
>  new 86bc4ee  Shade and add a main class
> 86bc4ee is described below
>
> commit 86bc4eea2804fa5df6a5089dd4a232847b709c91
> Author: remm 
> AuthorDate: Thu Jan 16 11:06:25 2020 +0100
>
> Shade and add a main class
>
> It seems easier to use to me: "java -jar overlylongjarname.jar src
> dest". The overlylongjarname could be trimmed down a bit.
>

So there's an option between this way and the assembly that was added
(which I'm not sure how to use).

Rémy


> ---
>  pom.xml | 24 
>  1 file changed, 24 insertions(+)
>
> diff --git a/pom.xml b/pom.xml
> index 1370d14..ceeb2cf 100644
> --- a/pom.xml
> +++ b/pom.xml
> @@ -82,6 +82,18 @@
>  
>  
>
> +org.apache.maven.plugins
> +maven-jar-plugin
> +
> +  
> +
> +  true
> +  org.apache.tomcat.jakartaee.Migration
> +
> +  
> +
> +  
> +  
>  
> @@ -93,6 +105,18 @@
>
>  
>
> +  
> +org.apache.maven.plugins
> +maven-shade-plugin
> +
> +  
> +package
> +
> +  shade
> +
> +  
> +
> +  
>  
>
>
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
>


[tomcat-jakartaee-migration] branch master updated: Cleanup

2020-01-16 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git


The following commit(s) were added to refs/heads/master by this push:
 new 573e65c  Cleanup
573e65c is described below

commit 573e65c12dec2f79d6b4409aeba400479f00aa61
Author: remm 
AuthorDate: Thu Jan 16 11:11:18 2020 +0100

Cleanup
---
 pom.xml | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/pom.xml b/pom.xml
index ceeb2cf..2abda49 100644
--- a/pom.xml
+++ b/pom.xml
@@ -64,7 +64,7 @@
 8
 8
   
- 
+
   
 
   org.apache.bcel
@@ -114,10 +114,13 @@
 
   shade
 
+
+  false
+
   
 
   
 
   
-
+
 
\ No newline at end of file


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



[tomcat-jakartaee-migration] branch master updated: Shade and add a main class

2020-01-16 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git


The following commit(s) were added to refs/heads/master by this push:
 new 86bc4ee  Shade and add a main class
86bc4ee is described below

commit 86bc4eea2804fa5df6a5089dd4a232847b709c91
Author: remm 
AuthorDate: Thu Jan 16 11:06:25 2020 +0100

Shade and add a main class

It seems easier to use to me: "java -jar overlylongjarname.jar src
dest". The overlylongjarname could be trimmed down a bit.
---
 pom.xml | 24 
 1 file changed, 24 insertions(+)

diff --git a/pom.xml b/pom.xml
index 1370d14..ceeb2cf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -82,6 +82,18 @@

 
   
+org.apache.maven.plugins
+maven-jar-plugin
+
+  
+
+  true
+  org.apache.tomcat.jakartaee.Migration
+
+  
+
+  
+  
 
@@ -93,6 +105,18 @@
   
 
   
+  
+org.apache.maven.plugins
+maven-shade-plugin
+
+  
+package
+
+  shade
+
+  
+
+  
 
   
 


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



[tomcat] branch 8.5.x updated: Align with 9.0.x and master

2020-01-16 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new c2efdb6  Align with 9.0.x and master
c2efdb6 is described below

commit c2efdb65049d9694018b4202076b3930cc44da29
Author: Mark Thomas 
AuthorDate: Thu Jan 16 10:04:46 2020 +

Align with 9.0.x and master
---
 java/org/apache/catalina/startup/WebappServiceLoader.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/startup/WebappServiceLoader.java 
b/java/org/apache/catalina/startup/WebappServiceLoader.java
index 5e2badf..a47a8f9 100644
--- a/java/org/apache/catalina/startup/WebappServiceLoader.java
+++ b/java/org/apache/catalina/startup/WebappServiceLoader.java
@@ -163,7 +163,7 @@ public class WebappServiceLoader {
 throws IOException {
 try (InputStream is = url.openStream();
 InputStreamReader in = new InputStreamReader(is, 
StandardCharsets.UTF_8);
-BufferedReader reader = new BufferedReader(in);) {
+BufferedReader reader = new BufferedReader(in)) {
 String line;
 while ((line = reader.readLine()) != null) {
 int i = line.indexOf('#');


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



[tomcat] branch 8.5.x updated: Clarify expected return value

2020-01-16 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new 2e98027  Clarify expected return value
2e98027 is described below

commit 2e9802724287d8856f2d3fc626308f50bf127175
Author: Mark Thomas 
AuthorDate: Thu Jan 16 10:04:12 2020 +

Clarify expected return value
---
 java/org/apache/catalina/WebResourceRoot.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/WebResourceRoot.java 
b/java/org/apache/catalina/WebResourceRoot.java
index 5acf0d1..e5ba087 100644
--- a/java/org/apache/catalina/WebResourceRoot.java
+++ b/java/org/apache/catalina/WebResourceRoot.java
@@ -140,7 +140,8 @@ public interface WebResourceRoot extends Lifecycle {
  *  application. It must start with '/'.
  *
  * @return  The objects that represents the class loader resources at the
- *  given path
+ *  given path. There will always be at least one element although
+ *  that element may represent a resource that is not present.
  */
 WebResource[] getClassLoaderResources(String path);
 


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



[tomcat-jakartaee-migration] branch master updated: Fix processing of directories

2020-01-16 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git


The following commit(s) were added to refs/heads/master by this push:
 new 60546ef  Fix processing of directories
60546ef is described below

commit 60546ef5fcc7f2b13680032dbc43eaf461397158
Author: remm 
AuthorDate: Thu Jan 16 11:03:10 2020 +0100

Fix processing of directories

Tested using the examples webapp from Tomcat 9 (exploded as with regular
Tomcat), which runs.
---
 src/main/java/org/apache/tomcat/jakartaee/Migration.java | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/tomcat/jakartaee/Migration.java 
b/src/main/java/org/apache/tomcat/jakartaee/Migration.java
index 80fb2b1..c81dfd7 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/Migration.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/Migration.java
@@ -80,7 +80,14 @@ public class Migration {
 private void migrateDirectory(File src, File dest) throws IOException {
 String[] files = src.list();
 for (String file : files) {
-migrateFile(new File(src, file), new File(dest, file));
+File srcFile = new File(src, file);
+File destFile = new File(dest, file);
+if (srcFile.isDirectory()) {
+destFile.mkdirs();
+migrateDirectory(srcFile, destFile);
+} else {
+migrateFile(srcFile, destFile);
+}
 }
 }
 


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



[tomcat] branch 9.0.x updated: Clarify expected return value

2020-01-16 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 956be6c  Clarify expected return value
956be6c is described below

commit 956be6cf245c3dbc77818465b4e8186d41d61edf
Author: Mark Thomas 
AuthorDate: Thu Jan 16 10:03:25 2020 +

Clarify expected return value
---
 java/org/apache/catalina/WebResourceRoot.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/WebResourceRoot.java 
b/java/org/apache/catalina/WebResourceRoot.java
index 5acf0d1..e5ba087 100644
--- a/java/org/apache/catalina/WebResourceRoot.java
+++ b/java/org/apache/catalina/WebResourceRoot.java
@@ -140,7 +140,8 @@ public interface WebResourceRoot extends Lifecycle {
  *  application. It must start with '/'.
  *
  * @return  The objects that represents the class loader resources at the
- *  given path
+ *  given path. There will always be at least one element although
+ *  that element may represent a resource that is not present.
  */
 WebResource[] getClassLoaderResources(String path);
 


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



[tomcat] branch master updated: Clarify expected return value

2020-01-16 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/master by this push:
 new 1ab52cd  Clarify expected return value
1ab52cd is described below

commit 1ab52cdcc3223059b04c2bc80a2e0f5904cadfbc
Author: Mark Thomas 
AuthorDate: Thu Jan 16 10:02:49 2020 +

Clarify expected return value
---
 java/org/apache/catalina/WebResourceRoot.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/WebResourceRoot.java 
b/java/org/apache/catalina/WebResourceRoot.java
index 5acf0d1..e5ba087 100644
--- a/java/org/apache/catalina/WebResourceRoot.java
+++ b/java/org/apache/catalina/WebResourceRoot.java
@@ -140,7 +140,8 @@ public interface WebResourceRoot extends Lifecycle {
  *  application. It must start with '/'.
  *
  * @return  The objects that represents the class loader resources at the
- *  given path
+ *  given path. There will always be at least one element although
+ *  that element may represent a resource that is not present.
  */
 WebResource[] getClassLoaderResources(String path);
 


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



[Bug 64063] The libtcnative library should be installed in $CATALINA_HOME/bin

2020-01-16 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64063

--- Comment #8 from mgrigorov  ---
After re-reading https://tomcat.apache.org/native-doc/ I think the
documentation is good enough. It explains that $CATALINA_HOME/lib should be
added to LD_LIBRARY_PATH. Somehow I've missed this the previous time.

I'm fine to close this ticket as "Not a problem".

@Michael Osipov: Do you want to keep it open and make some improvements ?

-- 
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: r1872869 - /tomcat/site/trunk/docs/native-doc/index.html

2020-01-16 Thread mgrigorov
Author: mgrigorov
Date: Thu Jan 16 09:13:39 2020
New Revision: 1872869

URL: http://svn.apache.org/viewvc?rev=1872869=rev
Log:

Fix the name of the Debian/Ubuntu package for libapr1-dev

Modified:
tomcat/site/trunk/docs/native-doc/index.html

Modified: tomcat/site/trunk/docs/native-doc/index.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/native-doc/index.html?rev=1872869=1872868=1872869=diff
==
--- tomcat/site/trunk/docs/native-doc/index.html (original)
+++ tomcat/site/trunk/docs/native-doc/index.html Thu Jan 16 09:13:39 2020
@@ -53,9 +53,9 @@ list of changes.
   
 
 
-  In debian based Linux those dependencies could be installed by something 
like:
+  In Debian based Linux those dependencies could be installed by something 
like:
 
-apt-get install libapr1.0-dev 
libssl-dev
+apt-get install libapr1-dev 
libssl-dev
 
   In rpm based Linux those dependencies could be installed by something 
like:
 



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



[GitHub] [tomcat] panchenko opened a new pull request #235: tomcat-jdbc check if returned connection is closed

2020-01-16 Thread GitBox
panchenko opened a new pull request #235: tomcat-jdbc check if returned 
connection is closed
URL: https://github.com/apache/tomcat/pull/235
 
 
   I had a situation when driver closed connection because of I/O error, bur 
connection has been added to the avaialble ones and then returned to another 
caller.
   The `testOn*` properties were not enabled in that case.
   
   It looks like the pool can easily check if connection has been closed and 
don't accept it back.
   WDYT?


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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