Re: JDK 16 is in Rampdown Phase One

2020-12-14 Thread Martin Grigorov
On Mon, Dec 14, 2020 at 10:08 AM Rémy Maucherat  wrote:

> On Mon, Dec 14, 2020 at 8:53 AM Martin Grigorov 
> wrote:
>
> > Hi Tomcat team,
> >
> > The following tests fail on JDK 16 b28:
> >
> > [concat] Testsuites with failed tests:
> >[concat]
> >
> >
> TEST-org.apache.catalina.loader.TestWebappClassLoaderExecutorMemoryLeak.APR.txt
> >[concat]
> >
> >
> TEST-org.apache.catalina.loader.TestWebappClassLoaderExecutorMemoryLeak.NIO.txt
> >[concat]
> >
> >
> TEST-org.apache.catalina.loader.TestWebappClassLoaderExecutorMemoryLeak.NIO2.txt
> >[concat]
> > TEST-org.apache.catalina.loader.TestWebappClassLoaderMemoryLeak.APR.txt
> >[concat]
> > TEST-org.apache.catalina.loader.TestWebappClassLoaderMemoryLeak.NIO.txt
> >[concat]
> > TEST-org.apache.catalina.loader.TestWebappClassLoaderMemoryLeak.NIO2.txt
> >
> >
> > with this reason:
> >
> > Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make
> > field final java.util.concurrent.ThreadPoolExecutor
> > java.util.concurrent.ThreadPoolExecutor$Worker.this$0 accessible: module
> > java.base does not "opens java.util.concurrent" to unnamed module @80503
> > at
> >
> >
> java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357)
> > at
> >
> >
> java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
> > at
> > java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:177)
> > at
> java.base/java.lang.reflect.Field.setAccessible(Field.java:171)
> > at
> >
> >
> org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads(WebappClassLoaderBase.java:1798)
> > at
> >
> >
> org.apache.catalina.loader.WebappClassLoaderBase.clearReferences(WebappClassLoaderBase.java:1622)
> > at
> >
> >
> org.apache.catalina.loader.WebappClassLoaderBase.stop(WebappClassLoaderBase.java:1554)
> > at
> >
> org.apache.catalina.loader.WebappLoader.stopInternal(WebappLoader.java:461)
> > at
> > org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
> >
>
> The changelog does say it's tightening up this sort of stuff, so I guess
> it's working just fine ! For now, I'll add the exception to the list of
> caught exceptions.
>

This fixed the old failure. Now it prints a WARNING with the same message
as before.

But the next problem is:

14-Dec-2020 08:41:48.999 INFO [main]
org.apache.catalina.core.StandardService.stopInternal Stopping service
[Tomcat]
Exception in thread "pool-1-thread-2" java.lang.IllegalMonitorStateException
at
java.base/java.util.concurrent.locks.ReentrantLock$Sync.tryRelease(ReentrantLock.java:175)
at
java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1006)
at
java.base/java.util.concurrent.locks.ReentrantLock.unlock(ReentrantLock.java:494)
at
java.base/java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
at
java.base/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1056)
at
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1116)
at
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
at java.base/java.lang.Thread.run(Thread.java:831)
14-Dec-2020 08:41:49.000 INFO [main]
org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler
["http-nio-127.0.0.1-auto-1-37203"]
Exception in thread "pool-1-thread-4" java.lang.IllegalMonitorStateException
at
java.base/java.util.concurrent.locks.ReentrantLock$Sync.tryRelease(ReentrantLock.java:175)
at
java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1006)
at
java.base/java.util.concurrent.locks.ReentrantLock.unlock(ReentrantLock.java:494)
at
java.base/java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
at
java.base/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1056)
at
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1116)
at
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
at java.base/java.lang.Thread.run(Thread.java:831)
Exception in thread "pool-1-thread-5" java.lang.IllegalMonitorStateException
at
java.base/java.util.concurrent.locks.ReentrantLock$Sync.tryRelease(ReentrantLock.java:175)
at
java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1006)
at
java.base/java.util.concurrent.locks.ReentrantLock.unlock(ReentrantLock.java:494)
at
java.base/java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
at
java.base/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1056)
at

Re: JDK 16 is in Rampdown Phase One

2020-12-14 Thread Rémy Maucherat
On Mon, Dec 14, 2020 at 8:53 AM Martin Grigorov 
wrote:

> Hi Tomcat team,
>
> The following tests fail on JDK 16 b28:
>

Ok, so I installed JDK 16 and tested. No issues overall, nice !

About this particular one however, the proper exceptions are now caught and
everything (so it's "ok") but it's not possible to make the functionality
work anymore by default. So the executor and its threads are still hanging,
causing the assertions to fail [as well as the traces when stopping the
blocked threads]. Should we relax module security somehow to allow the
fields setAccessible(true) to work again ? [that doesn't sound like a great
plan to me ...]

Rémy


>
> [concat] Testsuites with failed tests:
>[concat]
>
> TEST-org.apache.catalina.loader.TestWebappClassLoaderExecutorMemoryLeak.APR.txt
>[concat]
>
> TEST-org.apache.catalina.loader.TestWebappClassLoaderExecutorMemoryLeak.NIO.txt
>[concat]
>
> TEST-org.apache.catalina.loader.TestWebappClassLoaderExecutorMemoryLeak.NIO2.txt
>[concat]
> TEST-org.apache.catalina.loader.TestWebappClassLoaderMemoryLeak.APR.txt
>[concat]
> TEST-org.apache.catalina.loader.TestWebappClassLoaderMemoryLeak.NIO.txt
>[concat]
> TEST-org.apache.catalina.loader.TestWebappClassLoaderMemoryLeak.NIO2.txt
>
>
> with this reason:
>
> Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make
> field final java.util.concurrent.ThreadPoolExecutor
> java.util.concurrent.ThreadPoolExecutor$Worker.this$0 accessible: module
> java.base does not "opens java.util.concurrent" to unnamed module @80503
> at
>
> java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357)
> at
>
> java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
> at
> java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:177)
> at java.base/java.lang.reflect.Field.setAccessible(Field.java:171)
> at
>
> org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads(WebappClassLoaderBase.java:1798)
> at
>
> org.apache.catalina.loader.WebappClassLoaderBase.clearReferences(WebappClassLoaderBase.java:1622)
> at
>
> org.apache.catalina.loader.WebappClassLoaderBase.stop(WebappClassLoaderBase.java:1554)
> at
> org.apache.catalina.loader.WebappLoader.stopInternal(WebappLoader.java:461)
> at
> org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
>
> Regards,
> Martin
>
> On Sun, Dec 13, 2020 at 7:08 PM Rory O'Donnell 
> wrote:
>
> > Hi Mark,
> >
> > *Per the JDK 16 schedule , we are in Rampdown Phase One* *[1] .
> > *
> >
> > *Please advise if you find any issues while testing the latest Early
> > Access builds.*
> >
> >   * Schedule for JDK 16
> >   o *2020/12/10 Rampdown Phase One*
> >   o 2021/01/14  Rampdown Phase Two
> >   o 2021/02/04  Initial Release Candidate
> >   o 2021/02/18  Final Release Candidate
> >   o 2021/03/16  General Availability
> >   * Release Notes [2]
> >
> > OpenJDK 16 Early Access build 28**is now available at
> > http://jdk.java.net/16
> >
> >   * Features - the overall feature set is frozen. No further JEPs will
> > be targeted to this release.
> >   * Significant Integrations in b28:
> >   o *Integrated JEP 396: **Strongly Encapsulate JDK Internals by
> > Default **
> > *
> >   + Strongly encapsulate all internal elements of the JDK by
> > default, except for critical internal APIs
> >  such as
> > |sun.misc.Unsafe|.
> >   + Allow end users to choose the relaxed strong encapsulation
> > that has been the default since JDK 9.
> >   o Integrated JEP 397: Sealed Classes (Second Preview)
> >  with this release.
> >   + Enhance the Java programming language with sealed classes
> > and interfaces
> > .
> >   + Refines JEP 360  which
> > was delivered in JDK 15 as a preview feature.
> >
> >   * These early-access , open-source builds are provided under the GNU
> > General Public License, version 2, with the Classpath Exception
> > .
> >   * Changes in recent builds that maybe of interest:
> >   o Build 28
> >   + JDK-8256299: JEP 396: Strongly Encapsulate JDK Internals by
> > Default
> >   + JDK-8166596: TLS support for the EdDSA signature algorithm
> >   + JDK-8256718: Old tracing flags are now obsolete and must be
> > replaced with unified logging
> >   o Build 27
> >   + JDK-8159746: (proxy) Support for default methods
> >   + JDK-8254631: Better support ALPN byte wire values in SunJSSE
> >
> > Project Loom 

[tomcat-jakartaee-migration] branch master updated: Simplify migrate.sh

2020-12-14 Thread mgrigorov
This is an automated email from the ASF dual-hosted git repository.

mgrigorov 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 fed139d  Simplify migrate.sh
fed139d is described below

commit fed139dd3f7351b50a7196107cbdb48585232747
Author: Martin Tzvetanov Grigorov 
AuthorDate: Mon Dec 14 15:17:35 2020 +0200

Simplify migrate.sh

Suggested-by: Christopher Schultz
---
 src/main/scripts/migrate.sh | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/main/scripts/migrate.sh b/src/main/scripts/migrate.sh
index cf43ced..31deef9 100755
--- a/src/main/scripts/migrate.sh
+++ b/src/main/scripts/migrate.sh
@@ -1,9 +1,6 @@
 #!/bin/sh
 
-mydir="$PWD"
-cd `dirname "$0"`
-BIN_FOLDER="$PWD"
-cd "$mydir"
+BIN_FOLDER=`dirname "$0"`
 
 # Assumes java is on the path
 java -cp "$BIN_FOLDER/../lib/*" org.apache.tomcat.jakartaee.MigrationCLI "$@"


-
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: Avoid InaccessibleObjectException on Java 16

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

remm 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 e2aa9ec  Avoid InaccessibleObjectException on Java 16
e2aa9ec is described below

commit e2aa9ec094e6fa20ef37ea772065c3face8be0dd
Author: remm 
AuthorDate: Mon Dec 14 09:33:10 2020 +0100

Avoid InaccessibleObjectException on Java 16
---
 java/org/apache/catalina/loader/WebappClassLoaderBase.java | 6 ++
 webapps/docs/changelog.xml | 4 
 2 files changed, 10 insertions(+)

diff --git a/java/org/apache/catalina/loader/WebappClassLoaderBase.java 
b/java/org/apache/catalina/loader/WebappClassLoaderBase.java
index a9bfdce..0854d9f 100644
--- a/java/org/apache/catalina/loader/WebappClassLoaderBase.java
+++ b/java/org/apache/catalina/loader/WebappClassLoaderBase.java
@@ -2623,6 +2623,12 @@ public abstract class WebappClassLoaderBase extends 
URLClassLoader
 log.warn(sm.getString(
 "webappClassLoader.stopThreadFail",
 thread.getName(), contextName), e);
+} catch (RuntimeException e) {
+// InaccessibleObjectException is only available in 
Java 9+,
+// swapped for RuntimeException
+log.warn(sm.getString(
+"webappClassLoader.stopThreadFail",
+thread.getName(), contextName), e);
 }
 
 // Stopping an executor automatically interrupts the
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index dd24280..8c15c5e 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -131,6 +131,10 @@
 Ensure that values are not duplicated when manipulating the vary 
header.
 Based on a pull request by Fredrik Fall. (markt)
   
+  
+Avoid uncaught InaccessibleObjectException on Java 16 trying to clear
+references threads. (remm)
+  
 
   
   


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



[tomcat] branch master updated: Add a line about POEditor and a link to the WIKI page

2020-12-14 Thread mgrigorov
This is an automated email from the ASF dual-hosted git repository.

mgrigorov 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 ec7147c  Add a line about POEditor and a link to the WIKI page
ec7147c is described below

commit ec7147cf9c8ff240e27fec9943a681e6cc849286
Author: Martin Grigorov 
AuthorDate: Mon Dec 14 15:03:59 2020 +0200

Add a line about POEditor and a link to the WIKI page
---
 CONTRIBUTING.md | 5 +
 1 file changed, 5 insertions(+)

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 3484864..bf9f6a0 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -29,6 +29,11 @@ Please review our 
[guide](https://tomcat.apache.org/bugreport.html) on how to
 submit a bug report. This page also has links to other resources to assist
 you.
 
+### Reporting Translation improvements
+
+Apache Tomcat project uses POEditor for managing the localization files. 
+Please see more at https://cwiki.apache.org/confluence/x/vIPzBQ
+
 ### Your First Code Contribution
 
 ### Trouble Deciding How to Contribute?


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



Re: JDK 16 is in Rampdown Phase One

2020-12-14 Thread Martin Grigorov
On Mon, Dec 14, 2020 at 12:30 PM Rémy Maucherat  wrote:

> On Mon, Dec 14, 2020 at 8:53 AM Martin Grigorov 
> wrote:
>
> > Hi Tomcat team,
> >
> > The following tests fail on JDK 16 b28:
> >
>
> Ok, so I installed JDK 16 and tested. No issues overall, nice !
>
> About this particular one however, the proper exceptions are now caught and
> everything (so it's "ok") but it's not possible to make the functionality
> work anymore by default. So the executor and its threads are still hanging,
> causing the assertions to fail [as well as the traces when stopping the
> blocked threads]. Should we relax module security somehow to allow the
> fields setAccessible(true) to work again ? [that doesn't sound like a great
> plan to me ...]
>

One can work it around by adding --add-opens=java.base/java.
util.concurrent=ALL-UNNAMED to the JVM arguments
I am not sure whether some module-info.java hackery can make it better.



>
> Rémy
>
>
> >
> > [concat] Testsuites with failed tests:
> >[concat]
> >
> >
> TEST-org.apache.catalina.loader.TestWebappClassLoaderExecutorMemoryLeak.APR.txt
> >[concat]
> >
> >
> TEST-org.apache.catalina.loader.TestWebappClassLoaderExecutorMemoryLeak.NIO.txt
> >[concat]
> >
> >
> TEST-org.apache.catalina.loader.TestWebappClassLoaderExecutorMemoryLeak.NIO2.txt
> >[concat]
> > TEST-org.apache.catalina.loader.TestWebappClassLoaderMemoryLeak.APR.txt
> >[concat]
> > TEST-org.apache.catalina.loader.TestWebappClassLoaderMemoryLeak.NIO.txt
> >[concat]
> > TEST-org.apache.catalina.loader.TestWebappClassLoaderMemoryLeak.NIO2.txt
> >
> >
> > with this reason:
> >
> > Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make
> > field final java.util.concurrent.ThreadPoolExecutor
> > java.util.concurrent.ThreadPoolExecutor$Worker.this$0 accessible: module
> > java.base does not "opens java.util.concurrent" to unnamed module @80503
> > at
> >
> >
> java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357)
> > at
> >
> >
> java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
> > at
> > java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:177)
> > at
> java.base/java.lang.reflect.Field.setAccessible(Field.java:171)
> > at
> >
> >
> org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads(WebappClassLoaderBase.java:1798)
> > at
> >
> >
> org.apache.catalina.loader.WebappClassLoaderBase.clearReferences(WebappClassLoaderBase.java:1622)
> > at
> >
> >
> org.apache.catalina.loader.WebappClassLoaderBase.stop(WebappClassLoaderBase.java:1554)
> > at
> >
> org.apache.catalina.loader.WebappLoader.stopInternal(WebappLoader.java:461)
> > at
> > org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
> >
> > Regards,
> > Martin
> >
> > On Sun, Dec 13, 2020 at 7:08 PM Rory O'Donnell  >
> > wrote:
> >
> > > Hi Mark,
> > >
> > > *Per the JDK 16 schedule , we are in Rampdown Phase One* *[1] .
> > > *
> > >
> > > *Please advise if you find any issues while testing the latest Early
> > > Access builds.*
> > >
> > >   * Schedule for JDK 16
> > >   o *2020/12/10 Rampdown Phase One*
> > >   o 2021/01/14  Rampdown Phase Two
> > >   o 2021/02/04  Initial Release Candidate
> > >   o 2021/02/18  Final Release Candidate
> > >   o 2021/03/16  General Availability
> > >   * Release Notes [2]
> > >
> > > OpenJDK 16 Early Access build 28**is now available at
> > > http://jdk.java.net/16
> > >
> > >   * Features - the overall feature set is frozen. No further JEPs will
> > > be targeted to this release.
> > >   * Significant Integrations in b28:
> > >   o *Integrated JEP 396: **Strongly Encapsulate JDK Internals by
> > > Default **
> > > *
> > >   + Strongly encapsulate all internal elements of the JDK by
> > > default, except for critical internal APIs
> > >  such as
> > > |sun.misc.Unsafe|.
> > >   + Allow end users to choose the relaxed strong encapsulation
> > > that has been the default since JDK 9.
> > >   o Integrated JEP 397: Sealed Classes (Second Preview)
> > >  with this release.
> > >   + Enhance the Java programming language with sealed classes
> > > and interfaces
> > >  >.
> > >   + Refines JEP 360  which
> > > was delivered in JDK 15 as a preview feature.
> > >
> > >   * These early-access , open-source builds are provided under the GNU
> > > General Public License, version 2, with the Classpath Exception
> > > .
> > >   * Changes in recent builds that 

[tomcat] branch 7.0.x updated: Add a line about POEditor and a link to the WIKI page

2020-12-14 Thread mgrigorov
This is an automated email from the ASF dual-hosted git repository.

mgrigorov 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 0a73005  Add a line about POEditor and a link to the WIKI page
0a73005 is described below

commit 0a730056add58c75f31da836a88207cfb3449efd
Author: Martin Grigorov 
AuthorDate: Mon Dec 14 15:03:59 2020 +0200

Add a line about POEditor and a link to the WIKI page

(cherry picked from commit ec7147cf9c8ff240e27fec9943a681e6cc849286)
---
 CONTRIBUTING.md | 5 +
 1 file changed, 5 insertions(+)

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index ed533d1..fdb648b 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -29,6 +29,11 @@ Please review our 
[guide](https://tomcat.apache.org/bugreport.html) on how to
 submit a bug report. This page also has links to other resources to assist
 you.
 
+### Reporting Translation improvements
+
+Apache Tomcat project uses POEditor for managing the localization files. 
+Please see more at https://cwiki.apache.org/confluence/x/vIPzBQ
+
 ### Your First Code Contribution
 
 ### Trouble Deciding How to Contribute?


-
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: Add a line about POEditor and a link to the WIKI page

2020-12-14 Thread mgrigorov
This is an automated email from the ASF dual-hosted git repository.

mgrigorov 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 1f22ac9  Add a line about POEditor and a link to the WIKI page
1f22ac9 is described below

commit 1f22ac9031da45b40d805075ce9620da7b90dc5c
Author: Martin Grigorov 
AuthorDate: Mon Dec 14 15:03:59 2020 +0200

Add a line about POEditor and a link to the WIKI page

(cherry picked from commit ec7147cf9c8ff240e27fec9943a681e6cc849286)
---
 CONTRIBUTING.md | 5 +
 1 file changed, 5 insertions(+)

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index f0157a0..73cf0e1 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -29,6 +29,11 @@ Please review our 
[guide](https://tomcat.apache.org/bugreport.html) on how to
 submit a bug report. This page also has links to other resources to assist
 you.
 
+### Reporting Translation improvements
+
+Apache Tomcat project uses POEditor for managing the localization files. 
+Please see more at https://cwiki.apache.org/confluence/x/vIPzBQ
+
 ### Your First Code Contribution
 
 ### Trouble Deciding How to Contribute?


-
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: Add a line about POEditor and a link to the WIKI page

2020-12-14 Thread mgrigorov
This is an automated email from the ASF dual-hosted git repository.

mgrigorov 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 db9fae0  Add a line about POEditor and a link to the WIKI page
db9fae0 is described below

commit db9fae0db35dc9ceb864bffea06f92789ca8a679
Author: Martin Grigorov 
AuthorDate: Mon Dec 14 15:03:59 2020 +0200

Add a line about POEditor and a link to the WIKI page

(cherry picked from commit ec7147cf9c8ff240e27fec9943a681e6cc849286)
---
 CONTRIBUTING.md | 5 +
 1 file changed, 5 insertions(+)

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index ed533d1..fdb648b 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -29,6 +29,11 @@ Please review our 
[guide](https://tomcat.apache.org/bugreport.html) on how to
 submit a bug report. This page also has links to other resources to assist
 you.
 
+### Reporting Translation improvements
+
+Apache Tomcat project uses POEditor for managing the localization files. 
+Please see more at https://cwiki.apache.org/confluence/x/vIPzBQ
+
 ### Your First Code Contribution
 
 ### Trouble Deciding How to Contribute?


-
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: Avoid InaccessibleObjectException on Java 16

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

remm 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 9968b16  Avoid InaccessibleObjectException on Java 16
9968b16 is described below

commit 9968b1655e50ba82a73597427bcbc40a5c56b48d
Author: remm 
AuthorDate: Mon Dec 14 09:33:10 2020 +0100

Avoid InaccessibleObjectException on Java 16
---
 java/org/apache/catalina/loader/WebappClassLoaderBase.java | 5 +++--
 webapps/docs/changelog.xml | 4 
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/loader/WebappClassLoaderBase.java 
b/java/org/apache/catalina/loader/WebappClassLoaderBase.java
index 75629d9..714e316 100644
--- a/java/org/apache/catalina/loader/WebappClassLoaderBase.java
+++ b/java/org/apache/catalina/loader/WebappClassLoaderBase.java
@@ -1808,8 +1808,9 @@ public abstract class WebappClassLoaderBase extends 
URLClassLoader
 usingExecutor = true;
 }
 }
-} catch (SecurityException | NoSuchFieldException | 
IllegalArgumentException |
-IllegalAccessException e) {
+} catch (NoSuchFieldException | IllegalAccessException | 
RuntimeException e) {
+// InaccessibleObjectException is only available in 
Java 9+,
+// swapped for RuntimeException
 
log.warn(sm.getString("webappClassLoader.stopThreadFail",
 thread.getName(), getContextName()), e);
 }
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 6b1a6c6..6755a79 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -145,6 +145,10 @@
 be logged in the access log using the new %{peer}a
 syntax. (rjung)
   
+  
+Avoid uncaught InaccessibleObjectException on Java 16 trying to clear
+references threads. (remm)
+  
 
   
   


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



[Bug 64977] 日志中读取资源文件中文乱码

2020-12-14 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64977

Mark Thomas  changed:

   What|Removed |Added

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

--- Comment #1 from Mark Thomas  ---
This is expected when running in an IDE. The build script handles the
conversion for the release.

This was a deliberate decision to manage the properties files as UTF-8 and
convert during build. The benefits (easy to maintain) outweigh the disadvantage
(strings broken when running in a IDE).

-- 
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: JDK 16 is in Rampdown Phase One

2020-12-14 Thread Mark Thomas
On 14/12/2020 11:06, Martin Grigorov wrote:
> On Mon, Dec 14, 2020 at 12:30 PM Rémy Maucherat  wrote:
> 
>> On Mon, Dec 14, 2020 at 8:53 AM Martin Grigorov 
>> wrote:
>>
>>> Hi Tomcat team,
>>>
>>> The following tests fail on JDK 16 b28:
>>>
>>
>> Ok, so I installed JDK 16 and tested. No issues overall, nice !
>>
>> About this particular one however, the proper exceptions are now caught and
>> everything (so it's "ok") but it's not possible to make the functionality
>> work anymore by default. So the executor and its threads are still hanging,
>> causing the assertions to fail [as well as the traces when stopping the
>> blocked threads]. Should we relax module security somehow to allow the
>> fields setAccessible(true) to work again ? [that doesn't sound like a great
>> plan to me ...]
>>
> 
> One can work it around by adding --add-opens=java.base/java.
> util.concurrent=ALL-UNNAMED to the JVM arguments
> I am not sure whether some module-info.java hackery can make it better.

This is what we currently do:

https://github.com/apache/tomcat/blob/master/bin/catalina.sh#L313

(and the same for .bat). Looks like we need to add another entry there.

Mark

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



Re: JDK 16 is in Rampdown Phase One

2020-12-14 Thread Rémy Maucherat
On Mon, Dec 14, 2020 at 8:53 AM Martin Grigorov 
wrote:

> Hi Tomcat team,
>
> The following tests fail on JDK 16 b28:
>
> [concat] Testsuites with failed tests:
>[concat]
>
> TEST-org.apache.catalina.loader.TestWebappClassLoaderExecutorMemoryLeak.APR.txt
>[concat]
>
> TEST-org.apache.catalina.loader.TestWebappClassLoaderExecutorMemoryLeak.NIO.txt
>[concat]
>
> TEST-org.apache.catalina.loader.TestWebappClassLoaderExecutorMemoryLeak.NIO2.txt
>[concat]
> TEST-org.apache.catalina.loader.TestWebappClassLoaderMemoryLeak.APR.txt
>[concat]
> TEST-org.apache.catalina.loader.TestWebappClassLoaderMemoryLeak.NIO.txt
>[concat]
> TEST-org.apache.catalina.loader.TestWebappClassLoaderMemoryLeak.NIO2.txt
>
>
> with this reason:
>
> Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make
> field final java.util.concurrent.ThreadPoolExecutor
> java.util.concurrent.ThreadPoolExecutor$Worker.this$0 accessible: module
> java.base does not "opens java.util.concurrent" to unnamed module @80503
> at
>
> java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357)
> at
>
> java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
> at
> java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:177)
> at java.base/java.lang.reflect.Field.setAccessible(Field.java:171)
> at
>
> org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads(WebappClassLoaderBase.java:1798)
> at
>
> org.apache.catalina.loader.WebappClassLoaderBase.clearReferences(WebappClassLoaderBase.java:1622)
> at
>
> org.apache.catalina.loader.WebappClassLoaderBase.stop(WebappClassLoaderBase.java:1554)
> at
> org.apache.catalina.loader.WebappLoader.stopInternal(WebappLoader.java:461)
> at
> org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
>

The changelog does say it's tightening up this sort of stuff, so I guess
it's working just fine ! For now, I'll add the exception to the list of
caught exceptions.

Rémy


>
> Regards,
> Martin
>
> On Sun, Dec 13, 2020 at 7:08 PM Rory O'Donnell 
> wrote:
>
> > Hi Mark,
> >
> > *Per the JDK 16 schedule , we are in Rampdown Phase One* *[1] .
> > *
> >
> > *Please advise if you find any issues while testing the latest Early
> > Access builds.*
> >
> >   * Schedule for JDK 16
> >   o *2020/12/10 Rampdown Phase One*
> >   o 2021/01/14  Rampdown Phase Two
> >   o 2021/02/04  Initial Release Candidate
> >   o 2021/02/18  Final Release Candidate
> >   o 2021/03/16  General Availability
> >   * Release Notes [2]
> >
> > OpenJDK 16 Early Access build 28**is now available at
> > http://jdk.java.net/16
> >
> >   * Features - the overall feature set is frozen. No further JEPs will
> > be targeted to this release.
> >   * Significant Integrations in b28:
> >   o *Integrated JEP 396: **Strongly Encapsulate JDK Internals by
> > Default **
> > *
> >   + Strongly encapsulate all internal elements of the JDK by
> > default, except for critical internal APIs
> >  such as
> > |sun.misc.Unsafe|.
> >   + Allow end users to choose the relaxed strong encapsulation
> > that has been the default since JDK 9.
> >   o Integrated JEP 397: Sealed Classes (Second Preview)
> >  with this release.
> >   + Enhance the Java programming language with sealed classes
> > and interfaces
> > .
> >   + Refines JEP 360  which
> > was delivered in JDK 15 as a preview feature.
> >
> >   * These early-access , open-source builds are provided under the GNU
> > General Public License, version 2, with the Classpath Exception
> > .
> >   * Changes in recent builds that maybe of interest:
> >   o Build 28
> >   + JDK-8256299: JEP 396: Strongly Encapsulate JDK Internals by
> > Default
> >   + JDK-8166596: TLS support for the EdDSA signature algorithm
> >   + JDK-8256718: Old tracing flags are now obsolete and must be
> > replaced with unified logging
> >   o Build 27
> >   + JDK-8159746: (proxy) Support for default methods
> >   + JDK-8254631: Better support ALPN byte wire values in SunJSSE
> >
> > Project Loom Early-Access: *Build 16-loom+9-316
> > * (2020/11/30) - based on JDK-16+25
> > 
> >
> >   * These early-access builds are provided under the GNU General Public
> > License, version 2, with the Classpath Exception
> > 
> >   

[tomcat] branch master updated: Avoid InaccessibleObjectException on Java 16

2020-12-14 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.git


The following commit(s) were added to refs/heads/master by this push:
 new efc6af6  Avoid InaccessibleObjectException on Java 16
efc6af6 is described below

commit efc6af6778ff3c1605d8b053f6fd2a4d9fd8e0d3
Author: remm 
AuthorDate: Mon Dec 14 09:16:46 2020 +0100

Avoid InaccessibleObjectException on Java 16
---
 java/org/apache/catalina/loader/WebappClassLoaderBase.java | 6 --
 webapps/docs/changelog.xml | 4 
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/loader/WebappClassLoaderBase.java 
b/java/org/apache/catalina/loader/WebappClassLoaderBase.java
index e105452..2bc07a1 100644
--- a/java/org/apache/catalina/loader/WebappClassLoaderBase.java
+++ b/java/org/apache/catalina/loader/WebappClassLoaderBase.java
@@ -1802,8 +1802,10 @@ public abstract class WebappClassLoaderBase extends 
URLClassLoader
 usingExecutor = true;
 }
 }
-} catch (SecurityException | NoSuchFieldException | 
IllegalArgumentException |
-IllegalAccessException e) {
+} catch (/*SecurityException |*/ NoSuchFieldException | 
/*IllegalArgumentException |*/
+IllegalAccessException | RuntimeException e) {
+// FIXME: InaccessibleObjectException is only 
available in Java 9+,
+// swapped for RuntimeException for now
 
log.warn(sm.getString("webappClassLoader.stopThreadFail",
 thread.getName(), getContextName()), e);
 }
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index caff865..89c8d18 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -138,6 +138,10 @@
 be logged in the access log using the new %{peer}a
 syntax. (rjung)
   
+  
+Avoid uncaught InaccessibleObjectException on Java 16 trying to clear
+references threads. (remm)
+  
 
   
   


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



[GitHub] [tomcat] martin-g merged pull request #388: Update ide-support package version

2020-12-14 Thread GitBox


martin-g merged pull request #388:
URL: https://github.com/apache/tomcat/pull/388


   



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



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



[tomcat] branch master updated: Update ide-support package version

2020-12-14 Thread mgrigorov
This is an automated email from the ASF dual-hosted git repository.

mgrigorov 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 98ef763  Update ide-support package version
 new 8e84084  Merge pull request #388 from zzk0/master
98ef763 is described below

commit 98ef76388974ce7e17bcfb9d0602a915e3c206f9
Author: zhouzekai 
AuthorDate: Sat Dec 12 16:10:21 2020 +0800

Update ide-support package version
---
 res/ide-support/eclipse/eclipse.classpath | 2 +-
 res/ide-support/idea/tomcat.iml   | 2 +-
 res/ide-support/netbeans/project.xml  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/res/ide-support/eclipse/eclipse.classpath 
b/res/ide-support/eclipse/eclipse.classpath
index 5b34ea5..d298189 100644
--- a/res/ide-support/eclipse/eclipse.classpath
+++ b/res/ide-support/eclipse/eclipse.classpath
@@ -29,6 +29,6 @@
 
 
 
-
+
 
 
diff --git a/res/ide-support/idea/tomcat.iml b/res/ide-support/idea/tomcat.iml
index 268961a..e749442 100644
--- a/res/ide-support/idea/tomcat.iml
+++ b/res/ide-support/idea/tomcat.iml
@@ -113,7 +113,7 @@
 
   
 
-  
+  
 
 
 
diff --git a/res/ide-support/netbeans/project.xml 
b/res/ide-support/netbeans/project.xml
index 0dd6468..498fd3a 100644
--- a/res/ide-support/netbeans/project.xml
+++ b/res/ide-support/netbeans/project.xml
@@ -178,7 +178,7 @@
 -->
 
 java
-${base.path}/jaxrpc-1.1-rc4/geronimo-spec-jaxrpc-1.1-rc4.jar:${base.path}/wsdl4j-1.6.3/wsdl4j-1.6.3.jar:${base.path}/ecj-4.17/ecj-4.17.jar:${base.path}/bnd-5.1.1/biz.aQute.bnd-5.1.1.jar:${ant.includes}/
+${base.path}/jaxrpc-1.1-rc4/geronimo-spec-jaxrpc-1.1-rc4.jar:${base.path}/wsdl4j-1.6.3/wsdl4j-1.6.3.jar:${base.path}/ecj-4.17/ecj-4.17.jar:${base.path}/bnd-5.3.0-SNAPSHOT/biz.aQute.bnd-5.3.0-SNAPSHOT.jar:${ant.includes}/
 1.7
 
 


-
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 ide-support package version

2020-12-14 Thread mgrigorov
This is an automated email from the ASF dual-hosted git repository.

mgrigorov 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 1865e48  Update ide-support package version
1865e48 is described below

commit 1865e4828d2dcb58ffa233171767f97198eca04e
Author: zhouzekai 
AuthorDate: Sat Dec 12 16:10:21 2020 +0800

Update ide-support package version

(cherry picked from commit 98ef76388974ce7e17bcfb9d0602a915e3c206f9)
---
 res/ide-support/eclipse/eclipse.classpath | 2 +-
 res/ide-support/idea/tomcat.iml   | 2 +-
 res/ide-support/netbeans/project.xml  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/res/ide-support/eclipse/eclipse.classpath 
b/res/ide-support/eclipse/eclipse.classpath
index 5b34ea5..d298189 100644
--- a/res/ide-support/eclipse/eclipse.classpath
+++ b/res/ide-support/eclipse/eclipse.classpath
@@ -29,6 +29,6 @@
 
 
 
-
+
 
 
diff --git a/res/ide-support/idea/tomcat.iml b/res/ide-support/idea/tomcat.iml
index 268961a..e749442 100644
--- a/res/ide-support/idea/tomcat.iml
+++ b/res/ide-support/idea/tomcat.iml
@@ -113,7 +113,7 @@
 
   
 
-  
+  
 
 
 
diff --git a/res/ide-support/netbeans/project.xml 
b/res/ide-support/netbeans/project.xml
index 0dd6468..498fd3a 100644
--- a/res/ide-support/netbeans/project.xml
+++ b/res/ide-support/netbeans/project.xml
@@ -178,7 +178,7 @@
 -->
 
 java
-${base.path}/jaxrpc-1.1-rc4/geronimo-spec-jaxrpc-1.1-rc4.jar:${base.path}/wsdl4j-1.6.3/wsdl4j-1.6.3.jar:${base.path}/ecj-4.17/ecj-4.17.jar:${base.path}/bnd-5.1.1/biz.aQute.bnd-5.1.1.jar:${ant.includes}/
+${base.path}/jaxrpc-1.1-rc4/geronimo-spec-jaxrpc-1.1-rc4.jar:${base.path}/wsdl4j-1.6.3/wsdl4j-1.6.3.jar:${base.path}/ecj-4.17/ecj-4.17.jar:${base.path}/bnd-5.3.0-SNAPSHOT/biz.aQute.bnd-5.3.0-SNAPSHOT.jar:${ant.includes}/
 1.7
 
 


-
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: Avoid InaccessibleObjectException on Java 16

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

remm 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 d391a95  Avoid InaccessibleObjectException on Java 16
d391a95 is described below

commit d391a95b1d97f1fceaf07a728035e4f0e44aa9d2
Author: remm 
AuthorDate: Mon Dec 14 09:33:10 2020 +0100

Avoid InaccessibleObjectException on Java 16
---
 java/org/apache/catalina/loader/WebappClassLoaderBase.java | 5 +++--
 webapps/docs/changelog.xml | 4 
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/loader/WebappClassLoaderBase.java 
b/java/org/apache/catalina/loader/WebappClassLoaderBase.java
index 3987d89..e64a278 100644
--- a/java/org/apache/catalina/loader/WebappClassLoaderBase.java
+++ b/java/org/apache/catalina/loader/WebappClassLoaderBase.java
@@ -1802,8 +1802,9 @@ public abstract class WebappClassLoaderBase extends 
URLClassLoader
 usingExecutor = true;
 }
 }
-} catch (SecurityException | NoSuchFieldException | 
IllegalArgumentException |
-IllegalAccessException e) {
+} catch (NoSuchFieldException | IllegalAccessException | 
RuntimeException e) {
+// InaccessibleObjectException is only available in 
Java 9+,
+// swapped for RuntimeException
 
log.warn(sm.getString("webappClassLoader.stopThreadFail",
 thread.getName(), getContextName()), e);
 }
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index c470346..7e2c761 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -138,6 +138,10 @@
 be logged in the access log using the new %{peer}a
 syntax. (rjung)
   
+  
+Avoid uncaught InaccessibleObjectException on Java 16 trying to clear
+references threads. (remm)
+  
 
   
   


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