Bug in vminfo command of Manager app

2021-03-25 Thread Jared Crapo
I believe I have discovered a bug in the vminfo command of the Manager 
application. I searched the archives of this list, and both open and closed 
bugs in Bugzilla, and didn’t find anything similar, so I thought I’d reach out 
here before filing a new bug report.

Environment:

- Ubuntu 20.04.02 LTS
- Openjdk-11
- Tomcat 10.0.4 downloaded directly from 
https://tomcat.apache.org/download-10.cgi (i.e. not installed from via the 
operating system package manager)

Steps to reproduce:

- Load http://localhost:8080/manager/text/vminfo in your browser

Expected result: big page of info about the jvm.

Actual result: HTTP Status code 500, with one line of text “OK - VM info”.

Log output:

25-Mar-2021 14:49:41.042 SEVERE [http-nio-8080-exec-4] 
org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for 
servlet [Manager] in context with path [/manager] threw exception
java.lang.UnsupportedOperationException: Boot class path mechanism is 
not supported
 at 
java.management/sun.management.RuntimeImpl.getBootClassPath(RuntimeImpl.java:99)
 at org.apache.tomcat.util.Diagnostics.getVMInfo(Diagnostics.java:562)
 at org.apache.tomcat.util.Diagnostics.getVMInfo(Diagnostics.java:480)
 at org.apache.catalina.manager.ManagerServlet.vmInfo(ManagerServlet.java:616)
 at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:387)
 at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:663)
 at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:770)
 at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:223)
 at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:158)
 at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
 at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:185)
 at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:158)
 at 
org.apache.catalina.filters.HttpHeaderSecurityFilter.doFilter(HttpHeaderSecurityFilter.java:126)
 at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:185)
 at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:158)
 at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
 at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
 at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:668)
 at 
org.apache.catalina.valves.RequestFilterValve.process(RequestFilterValve.java:378)
 at org.apache.catalina.valves.RemoteAddrValve.invoke(RemoteAddrValve.java:56)
 at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
 at 
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:690)
 at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:353)
 at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:374)
 at 
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
 at 
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:870)
 at 
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1696)
 at 
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
 at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
 at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
 at 
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
 at java.base/java.lang.Thread.run(Thread.java:832)


After some research, I believe I understand the root cause of this problem. 
Many jdk > 8 do not implement getBootClassPath(). If I follow the same steps to 
reproduce but use openjdk 8, the vminfo command works as expected.

As the log indicates, the exception is raised by the getVMInfo() method in 
Diagnostics.java 
(https://github.com/apache/tomcat/blob/master/java/org/apache/tomcat/util/Diagnostics.java).
 I think the solution is to guard the runtimeMXBean.getBootClassPath() method 
call with a check that runtimeMXBean.isBootClassPathSupported() is true.

Can anyone else reproduce this? If so, I’m happy to add a bug report in 
bugzilla.

Cheers,

Jared





buildbot failure in on tomcat-9-trunk

2021-03-25 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/707

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] a4fdf9341380db613c8f55632493599651241135
Blamelist: Mark Thomas 

BUILD FAILED: failed shell_8

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: Non-functional change. Aligning 10.0.x/9.0.x/8.5.x

2021-03-25 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 0b47fef  Non-functional change. Aligning 10.0.x/9.0.x/8.5.x
0b47fef is described below

commit 0b47fefff20e0c3bea4194df5356684f5c031e44
Author: Mark Thomas 
AuthorDate: Thu Mar 25 20:56:22 2021 +

Non-functional change. Aligning 10.0.x/9.0.x/8.5.x
---
 java/org/apache/catalina/connector/Connector.java  |  1 -
 java/org/apache/catalina/connector/InputBuffer.java|  1 -
 java/org/apache/catalina/connector/Request.java|  4 ++--
 java/org/apache/catalina/connector/RequestFacade.java  | 16 ++--
 java/org/apache/catalina/connector/ResponseFacade.java | 15 +++
 5 files changed, 11 insertions(+), 26 deletions(-)

diff --git a/java/org/apache/catalina/connector/Connector.java 
b/java/org/apache/catalina/connector/Connector.java
index cc42d27..320e1c4 100644
--- a/java/org/apache/catalina/connector/Connector.java
+++ b/java/org/apache/catalina/connector/Connector.java
@@ -106,7 +106,6 @@ public class Connector extends LifecycleMBeanBase  {
 
 // - Instance Variables
 
-
 /**
  * The Service we are associated with (if any).
  */
diff --git a/java/org/apache/catalina/connector/InputBuffer.java 
b/java/org/apache/catalina/connector/InputBuffer.java
index f2dba3d..1fbc3a9 100644
--- a/java/org/apache/catalina/connector/InputBuffer.java
+++ b/java/org/apache/catalina/connector/InputBuffer.java
@@ -556,7 +556,6 @@ public class InputBuffer extends Reader
 }
 
 Charset charset = null;
-
 if (coyoteRequest != null) {
 charset = coyoteRequest.getCharset();
 }
diff --git a/java/org/apache/catalina/connector/Request.java 
b/java/org/apache/catalina/connector/Request.java
index 3ffaabf..aa237b7 100644
--- a/java/org/apache/catalina/connector/Request.java
+++ b/java/org/apache/catalina/connector/Request.java
@@ -1855,8 +1855,8 @@ public class Request implements HttpServletRequest {
 }
 
 Cookie[] newCookies = new Cookie[size + 1];
-for (int i = 0; i < size; i++) {
-newCookies[i] = cookies[i];
+if (cookies != null) {
+System.arraycopy(cookies, 0, newCookies, 0, size);
 }
 newCookies[size] = cookie;
 
diff --git a/java/org/apache/catalina/connector/RequestFacade.java 
b/java/org/apache/catalina/connector/RequestFacade.java
index e80147c..e524173 100644
--- a/java/org/apache/catalina/connector/RequestFacade.java
+++ b/java/org/apache/catalina/connector/RequestFacade.java
@@ -1056,11 +1056,13 @@ public class RequestFacade implements 
HttpServletRequest {
 return request.getAsyncContext();
 }
 
+
 @Override
 public DispatcherType getDispatcherType() {
 return request.getDispatcherType();
 }
 
+
 @Override
 public boolean authenticate(HttpServletResponse response)
 throws IOException, ServletException {
@@ -1084,31 +1086,25 @@ public class RequestFacade implements 
HttpServletRequest {
 return request.getParts();
 }
 
+
 @Override
 public Part getPart(String name) throws IllegalStateException, IOException,
 ServletException {
 return request.getPart(name);
 }
 
+
 public boolean getAllowTrace() {
 return request.getConnector().getAllowTrace();
 }
 
-/**
- * {@inheritDoc}
- *
- * @since Servlet 3.1
- */
+
 @Override
 public long getContentLengthLong() {
 return request.getContentLengthLong();
 }
 
-/**
- * {@inheritDoc}
- *
- * @since Servlet 3.1
- */
+
 @Override
 public  T upgrade(
 Class httpUpgradeHandlerClass) throws java.io.IOException, 
ServletException {
diff --git a/java/org/apache/catalina/connector/ResponseFacade.java 
b/java/org/apache/catalina/connector/ResponseFacade.java
index 460c74f..252b990 100644
--- a/java/org/apache/catalina/connector/ResponseFacade.java
+++ b/java/org/apache/catalina/connector/ResponseFacade.java
@@ -40,9 +40,7 @@ import org.apache.tomcat.util.res.StringManager;
  * @author Remy Maucherat
  */
 @SuppressWarnings("deprecation")
-public class ResponseFacade
-implements HttpServletResponse {
-
+public class ResponseFacade implements HttpServletResponse {
 
 // --- DoPrivileged
 
@@ -86,8 +84,8 @@ public class ResponseFacade
 }
 }
 
-// --- Constructors
 
+// --- Constructors
 
 /**
  * Construct a wrapper for the specified response.
@@ -219,11 +217,9 @@ public class ResponseFacade
 
 @Override
 public void setContentLength(int len) {
-
   

[tomcat] branch 9.0.x updated: No functional change. Aligning 10.0.x/9.0.x/8.5.x

2021-03-25 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 a4fdf93  No functional change. Aligning 10.0.x/9.0.x/8.5.x
a4fdf93 is described below

commit a4fdf9341380db613c8f55632493599651241135
Author: Mark Thomas 
AuthorDate: Thu Mar 25 20:55:31 2021 +

No functional change. Aligning 10.0.x/9.0.x/8.5.x
---
 java/org/apache/catalina/connector/Connector.java | 1 -
 1 file changed, 1 deletion(-)

diff --git a/java/org/apache/catalina/connector/Connector.java 
b/java/org/apache/catalina/connector/Connector.java
index 9af0457..43655d3 100644
--- a/java/org/apache/catalina/connector/Connector.java
+++ b/java/org/apache/catalina/connector/Connector.java
@@ -111,7 +111,6 @@ public class Connector extends LifecycleMBeanBase  {
 
 // - Instance Variables
 
-
 /**
  * The Service we are associated with (if any).
  */

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



[tomcat] branch master updated: No functional change. Aligning 10.0.x/9.0.x/8.5.x

2021-03-25 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 45514a3  No functional change. Aligning 10.0.x/9.0.x/8.5.x
45514a3 is described below

commit 45514a31b96c242e772f768cba1574152741ffc6
Author: Mark Thomas 
AuthorDate: Thu Mar 25 20:54:57 2021 +

No functional change. Aligning 10.0.x/9.0.x/8.5.x
---
 java/org/apache/catalina/authenticator/Constants.java | 1 -
 java/org/apache/catalina/connector/Connector.java | 3 +--
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/java/org/apache/catalina/authenticator/Constants.java 
b/java/org/apache/catalina/authenticator/Constants.java
index 1bf3689..1bb5809 100644
--- a/java/org/apache/catalina/authenticator/Constants.java
+++ b/java/org/apache/catalina/authenticator/Constants.java
@@ -17,7 +17,6 @@
 package org.apache.catalina.authenticator;
 
 public class Constants {
-
 // Authentication methods for login configuration
 // Servlet spec schemes are defined in HttpServletRequest
 // Vendor specific schemes
diff --git a/java/org/apache/catalina/connector/Connector.java 
b/java/org/apache/catalina/connector/Connector.java
index c0305a9..485a26a 100644
--- a/java/org/apache/catalina/connector/Connector.java
+++ b/java/org/apache/catalina/connector/Connector.java
@@ -63,7 +63,6 @@ public class Connector extends LifecycleMBeanBase  {
 
 //  Constructor
 
-
 /**
  * Defaults to using HTTP/1.1 NIO implementation.
  */
@@ -101,8 +100,8 @@ public class Connector extends LifecycleMBeanBase  {
 
setThrowOnFailure(Boolean.getBoolean("org.apache.catalina.startup.EXIT_ON_INIT_FAILURE"));
 }
 
-// - Instance Variables
 
+// - Instance Variables
 
 /**
  * The Service we are associated with (if any).

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



[Bug 65181] Tomcat Native library with OpenSSL Engine private key loading

2021-03-25 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=65181

Mark Thomas  changed:

   What|Removed |Added

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

--- Comment #6 from Mark Thomas  ---
Thanks for the patch. The fix will be in 1.2.27.

The Tomcat 10.0.x unit tests passed for the APR/Native connector with this
patch applied.

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



[tomcat-native] branch master updated: Fix BZ 65181 Improve support for using OpenSSL Engines

2021-03-25 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-native.git


The following commit(s) were added to refs/heads/master by this push:
 new 69e884a  Fix BZ 65181 Improve support for using OpenSSL Engines
69e884a is described below

commit 69e884a96a308a2bfdd91c7de3a9b301838031c8
Author: Mark Thomas 
AuthorDate: Thu Mar 25 20:31:51 2021 +

Fix BZ 65181 Improve support for using OpenSSL Engines

Improve support for using OpenSSL Engines that use proprietary key
formats. Patch provided by Edin Hodizc.

https://bz.apache.org/bugzilla/show_bug.cgi?id=65181
---
 native/include/ssl_private.h  | 1 +
 native/src/sslcontext.c   | 8 +++-
 xdocs/miscellaneous/changelog.xml | 6 ++
 3 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/native/include/ssl_private.h b/native/include/ssl_private.h
index b50bf24..f6b2840 100644
--- a/native/include/ssl_private.h
+++ b/native/include/ssl_private.h
@@ -51,6 +51,7 @@
  */
 #ifndef OPENSSL_NO_ENGINE
 #include 
+extern ENGINE *tcn_ssl_engine;
 #endif
 
 #ifndef RAND_MAX
diff --git a/native/src/sslcontext.c b/native/src/sslcontext.c
index f10b55e..5d08a78 100644
--- a/native/src/sslcontext.c
+++ b/native/src/sslcontext.c
@@ -1034,7 +1034,13 @@ TCN_IMPLEMENT_CALL(jboolean, SSLContext, 
setCertificate)(TCN_STDARGS, jlong ctx,
 }
 }
 else {
-if ((c->keys[idx] = load_pem_key(c, key_file)) == NULL) {
+if ((c->keys[idx] = load_pem_key(c, key_file)) == NULL
+#ifndef OPENSSL_NO_ENGINE
+&& tcn_ssl_engine != NULL &&
+(c->keys[idx] = ENGINE_load_private_key(tcn_ssl_engine, 
key_file,
+NULL, NULL)) == NULL
+#endif
+) {
 ERR_error_string(SSL_ERR_get(), err);
 tcn_Throw(e, "Unable to load certificate key %s (%s)",
   key_file, err);
diff --git a/xdocs/miscellaneous/changelog.xml 
b/xdocs/miscellaneous/changelog.xml
index 5a4379f..f9874cc 100644
--- a/xdocs/miscellaneous/changelog.xml
+++ b/xdocs/miscellaneous/changelog.xml
@@ -35,6 +35,12 @@
   
 
 
+  
+
+  65181: Improve support for using OpenSSL Engines that use
+  proprietary key formats. Patch provided by Edin Hodizc. (markt)
+
+  
 
 
   

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



Re: Need a Tomcat Native release

2021-03-25 Thread Violeta Georgieva
На чт, 25.03.2021 г. в 21:42 ч. Mark Thomas  написа:
>
> Hi all,
>
> Given the recent OpenSSL security announcement [1], I think we'll need a
> Tomcat Native release to provide Windows binaries based on OpenSSL 1.1.1k
>
> We can then use the updated Tomcat Native for the next set of releases,
> including what is likely to be the final 7.0.x release.

+1

>
> I'll start work now on a Tomcat Native release.

Thanks,
Violeta

>
> Mark
>
> [1] https://www.openssl.org/news/secadv/20210325.txt
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org


Need a Tomcat Native release

2021-03-25 Thread Mark Thomas

Hi all,

Given the recent OpenSSL security announcement [1], I think we'll need a 
Tomcat Native release to provide Windows binaries based on OpenSSL 1.1.1k


We can then use the updated Tomcat Native for the next set of releases, 
including what is likely to be the final 7.0.x release.


I'll start work now on a Tomcat Native release.

Mark

[1] https://www.openssl.org/news/secadv/20210325.txt

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



[Bug 65204] LinkageError AuthConfigFactoryImpl

2021-03-25 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=65204

--- Comment #7 from Lukas Vasek  ---
that's really hard because it's huge proprietary project and I don't know what
exactly I should export out of the project to prepare some test case. but give
me some time I'll try to do my best

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

2021-03-25 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/2668

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



[Bug 65204] LinkageError AuthConfigFactoryImpl

2021-03-25 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=65204

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |NEEDINFO

--- Comment #6 from Mark Thomas  ---
I can't recreate this with a simple test.

Errors like this are typically triggered when multiple instances of the same
class are present. You may want to check for this.

We are going to need the simplest possible test case that reproduces this.

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



buildbot success in on tomcat-9-trunk

2021-03-25 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/706

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] 341018fe7bced0829654857a62767e0f5c58de59
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



[Bug 65204] LinkageError AuthConfigFactoryImpl

2021-03-25 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=65204

--- Comment #5 from Lukas Vasek  ---
Well if you can prepare some release/branch which I can test with, just let me
know and I will test that.

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

2021-03-25 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/5759

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



[Bug 65204] LinkageError AuthConfigFactoryImpl

2021-03-25 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=65204

--- Comment #4 from Mark Thomas  ---
I'm wondering if this commit might be the trigger for this:
https://github.com/apache/tomcat/commit/caba05c

Investigating...

-- 
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: Re-work fix for complete()/dispatch() when in READ_WRITE state

2021-03-25 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 7e0947e  Re-work fix for complete()/dispatch() when in READ_WRITE state
7e0947e is described below

commit 7e0947ede53c5593156f03dd90d7ac9e560de56e
Author: Mark Thomas 
AuthorDate: Thu Mar 25 17:52:24 2021 +

Re-work fix for complete()/dispatch() when in READ_WRITE state

Previous fix only addressed dispatch. Mirror changes to complete().
The *_PENDING states are only required if the complete()/dispatch() is
performed on a non-container thread. If on a container thread the race
condition cannot occur.
---
 java/org/apache/coyote/AsyncStateMachine.java | 38 +++
 1 file changed, 21 insertions(+), 17 deletions(-)

diff --git a/java/org/apache/coyote/AsyncStateMachine.java 
b/java/org/apache/coyote/AsyncStateMachine.java
index 0826a2c..c45c6b2 100644
--- a/java/org/apache/coyote/AsyncStateMachine.java
+++ b/java/org/apache/coyote/AsyncStateMachine.java
@@ -91,19 +91,23 @@ import org.apache.tomcat.util.security.PrivilegedSetTccl;
  *|   /  |  \  
   |
  *|OT-complete() /   |   \OT-dispatch()
   |
  *|   COMPLETE_PENDING«--«--/|
\---»-»DISPATCH_PENDING |
- *|  |/|\|   /|\ | 
   |
- *|  | | ||  
|post()  |
- *|  | |complete()   |  dispatch()|  | 
   |
- *|  | | ||  | 
   |
- *|  | |-«---«-- | --«---READ_WRITE--»|  | 
   |
- *|  |   |/  /|\ | 
   |
- *|  |   | post()/   /   | 
   |
- *|  |   |  /   /| 
   |
- *|  |   | /   / | 
   |
- *|  |   |/   /  | 
   |
- *|post()|   timeout() post()|   /   /asyncOperation()   |  
timeout() |
- *|  |   |--||   |  /|
|--||
- *| \|/ \|/ |   complete()  \|/ \|//   dispatch()   \|/  
\|/ ||
+ *||  /|\|   /|\ | 
   |
+ *||   | ||  
|post()  |
+ *||   |OT-complete()|   OT-dispatch()|  | 
   |
+ *||   |-«---«---|---«--\ |  | 
   |
+ *|| |   \|  | 
   |
+ *|| /---«---«-- | --«---READ_WRITE--»|  | 
   |
+ *||/ ST-complete()  |/  /|\  \  | 
   |
+ *||   / | post()/   / \ | 
   |
+ *||  /  |  /   /   \| 
   |
+ *|| /   | /   / \   | 
   |
+ *||/|/   /   \  | 
   |
+ *||   / |   |   / \ | 
   |
+ *||  /  |   |  /  ST-dispatch()\| 
   |
+ *||  |  |   | | \   | 
   |
+ *|  post()|  |  timeout() post()|   | |asyncOperation()  \  |  
timeout() |
+ *||  |  |--||   | |  |  |
|--||
+ *|   \|/\|/\|/ | complete()\|/ \|/|   dispatch()\|/\|/  
\|/ ||
  *
|--«-COMPLETING««--STARTED»-»DISPATCHING|
  */|\  /|\   | /|\ |   /|\ 
/|\
  * |||  |--||  
 |
@@ -301,7 +305,8 @@ public class AsyncStateMachine {
 
 
 public synchronized boolean asyncComplete() {
-if (!ContainerThreadMarker.isContainerThread() && state == 
AsyncState.STARTING) {
+if (!ContainerThreadMarker.isContainerThread() &&
+(state == AsyncState.STARTING || state == 
AsyncState.READ_WRITE_OP)) {
 updateState(AsyncState.COMPLETE_PENDING);
 return false;
 }
@@ -361,10 +366,9 @@ public class AsyncStateMachine {
 }
 
 
-
 public 

[tomcat] branch 9.0.x updated: Re-work fix for complete()/dispatch() when in READ_WRITE state

2021-03-25 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 341018f  Re-work fix for complete()/dispatch() when in READ_WRITE state
341018f is described below

commit 341018fe7bced0829654857a62767e0f5c58de59
Author: Mark Thomas 
AuthorDate: Thu Mar 25 17:52:24 2021 +

Re-work fix for complete()/dispatch() when in READ_WRITE state

Previous fix only addressed dispatch. Mirror changes to complete().
The *_PENDING states are only required if the complete()/dispatch() is
performed on a non-container thread. If on a container thread the race
condition cannot occur.
---
 java/org/apache/coyote/AsyncStateMachine.java | 37 +++
 1 file changed, 21 insertions(+), 16 deletions(-)

diff --git a/java/org/apache/coyote/AsyncStateMachine.java 
b/java/org/apache/coyote/AsyncStateMachine.java
index 4cc194e..3176246 100644
--- a/java/org/apache/coyote/AsyncStateMachine.java
+++ b/java/org/apache/coyote/AsyncStateMachine.java
@@ -91,19 +91,23 @@ import org.apache.tomcat.util.security.PrivilegedSetTccl;
  *|   /  |  \  
   |
  *|OT-complete() /   |   \OT-dispatch()
   |
  *|   COMPLETE_PENDING«--«--/|
\---»-»DISPATCH_PENDING |
- *|  |/|\|   /|\ | 
   |
- *|  | | ||  
|post()  |
- *|  | |complete()   |  dispatch()|  | 
   |
- *|  | | ||  | 
   |
- *|  | |-«---«-- | --«---READ_WRITE--»|  | 
   |
- *|  |   |/  /|\ | 
   |
- *|  |   | post()/   /   | 
   |
- *|  |   |  /   /| 
   |
- *|  |   | /   / | 
   |
- *|  |   |/   /  | 
   |
- *|post()|   timeout() post()|   /   /asyncOperation()   |  
timeout() |
- *|  |   |--||   |  /|
|--||
- *| \|/ \|/ |   complete()  \|/ \|//   dispatch()   \|/  
\|/ ||
+ *||  /|\|   /|\ | 
   |
+ *||   | ||  
|post()  |
+ *||   |OT-complete()|   OT-dispatch()|  | 
   |
+ *||   |-«---«---|---«--\ |  | 
   |
+ *|| |   \|  | 
   |
+ *|| /---«---«-- | --«---READ_WRITE--»|  | 
   |
+ *||/ ST-complete()  |/  /|\  \  | 
   |
+ *||   / | post()/   / \ | 
   |
+ *||  /  |  /   /   \| 
   |
+ *|| /   | /   / \   | 
   |
+ *||/|/   /   \  | 
   |
+ *||   / |   |   / \ | 
   |
+ *||  /  |   |  /  ST-dispatch()\| 
   |
+ *||  |  |   | | \   | 
   |
+ *|  post()|  |  timeout() post()|   | |asyncOperation()  \  |  
timeout() |
+ *||  |  |--||   | |  |  |
|--||
+ *|   \|/\|/\|/ | complete()\|/ \|/|   dispatch()\|/\|/  
\|/ ||
  *
|--«-COMPLETING««--STARTED»-»DISPATCHING|
  */|\  /|\   | /|\ |   /|\ 
/|\
  * |||  |--||  
 |
@@ -301,7 +305,8 @@ class AsyncStateMachine {
 
 
 synchronized boolean asyncComplete() {
-if (!ContainerThreadMarker.isContainerThread() && state == 
AsyncState.STARTING) {
+if (!ContainerThreadMarker.isContainerThread() &&
+(state == AsyncState.STARTING || state == 
AsyncState.READ_WRITE_OP)) {
 updateState(AsyncState.COMPLETE_PENDING);
 return false;
 }
@@ -362,8 +367,8 @@ class AsyncStateMachine {
 
 
 synchronized boolean asyncDispatch() {
-

[tomcat] branch master updated: Re-work fix for complete()/dispatch() when in READ_WRITE state

2021-03-25 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 a417690  Re-work fix for complete()/dispatch() when in READ_WRITE state
a417690 is described below

commit a417690be308ca145a8b5b61f0260a4f713ea331
Author: Mark Thomas 
AuthorDate: Thu Mar 25 17:52:24 2021 +

Re-work fix for complete()/dispatch() when in READ_WRITE state

Previous fix only addressed dispatch. Mirror changes to complete().
The *_PENDING states are only required if the complete()/dispatch() is
performed on a non-container thread. If on a container thread the race
condition cannot occur.
---
 java/org/apache/coyote/AsyncStateMachine.java | 37 +++
 1 file changed, 21 insertions(+), 16 deletions(-)

diff --git a/java/org/apache/coyote/AsyncStateMachine.java 
b/java/org/apache/coyote/AsyncStateMachine.java
index 4cc194e..3176246 100644
--- a/java/org/apache/coyote/AsyncStateMachine.java
+++ b/java/org/apache/coyote/AsyncStateMachine.java
@@ -91,19 +91,23 @@ import org.apache.tomcat.util.security.PrivilegedSetTccl;
  *|   /  |  \  
   |
  *|OT-complete() /   |   \OT-dispatch()
   |
  *|   COMPLETE_PENDING«--«--/|
\---»-»DISPATCH_PENDING |
- *|  |/|\|   /|\ | 
   |
- *|  | | ||  
|post()  |
- *|  | |complete()   |  dispatch()|  | 
   |
- *|  | | ||  | 
   |
- *|  | |-«---«-- | --«---READ_WRITE--»|  | 
   |
- *|  |   |/  /|\ | 
   |
- *|  |   | post()/   /   | 
   |
- *|  |   |  /   /| 
   |
- *|  |   | /   / | 
   |
- *|  |   |/   /  | 
   |
- *|post()|   timeout() post()|   /   /asyncOperation()   |  
timeout() |
- *|  |   |--||   |  /|
|--||
- *| \|/ \|/ |   complete()  \|/ \|//   dispatch()   \|/  
\|/ ||
+ *||  /|\|   /|\ | 
   |
+ *||   | ||  
|post()  |
+ *||   |OT-complete()|   OT-dispatch()|  | 
   |
+ *||   |-«---«---|---«--\ |  | 
   |
+ *|| |   \|  | 
   |
+ *|| /---«---«-- | --«---READ_WRITE--»|  | 
   |
+ *||/ ST-complete()  |/  /|\  \  | 
   |
+ *||   / | post()/   / \ | 
   |
+ *||  /  |  /   /   \| 
   |
+ *|| /   | /   / \   | 
   |
+ *||/|/   /   \  | 
   |
+ *||   / |   |   / \ | 
   |
+ *||  /  |   |  /  ST-dispatch()\| 
   |
+ *||  |  |   | | \   | 
   |
+ *|  post()|  |  timeout() post()|   | |asyncOperation()  \  |  
timeout() |
+ *||  |  |--||   | |  |  |
|--||
+ *|   \|/\|/\|/ | complete()\|/ \|/|   dispatch()\|/\|/  
\|/ ||
  *
|--«-COMPLETING««--STARTED»-»DISPATCHING|
  */|\  /|\   | /|\ |   /|\ 
/|\
  * |||  |--||  
 |
@@ -301,7 +305,8 @@ class AsyncStateMachine {
 
 
 synchronized boolean asyncComplete() {
-if (!ContainerThreadMarker.isContainerThread() && state == 
AsyncState.STARTING) {
+if (!ContainerThreadMarker.isContainerThread() &&
+(state == AsyncState.STARTING || state == 
AsyncState.READ_WRITE_OP)) {
 updateState(AsyncState.COMPLETE_PENDING);
 return false;
 }
@@ -362,8 +367,8 @@ class AsyncStateMachine {
 
 
 synchronized boolean asyncDispatch() {
-   

[GitHub] [tomcat-jakartaee-migration] ppkarwasz commented on pull request #16: Modifies TOMCAT profile

2021-03-25 Thread GitBox


ppkarwasz commented on pull request #16:
URL: 
https://github.com/apache/tomcat-jakartaee-migration/pull/16#issuecomment-807166268


   @martin-g: I am not running the migration tool and deploying the 
**jakartified** version. The migration tool works just fine in relocating the 
class files from `javax/*` to `jakarta/*` directory.
   
   I am using a feature introduce by Rémy in [this 
commit](https://github.com/apache/tomcat/commit/abd1dead7804e99e3215e8e01a6cf7448a6b9f36)
 to deploy the **original** WAR file by simply setting the context to:
   
   ```lang-xml
   
   
   
   ```
   
   In this usage scenario the fact that the `TOMCAT` profile _jakartifies_ APIs 
that are not provided by Tomcat is a problem (beside the fact that the 
migration tool's `--help` states `TOMCAT (default) to convert Java EE APIs 
**provided** by Tomcat`). On the other hand the migration tool works fine even 
if I convert the same applications using the `EE`


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



[Bug 65204] LinkageError AuthConfigFactoryImpl

2021-03-25 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=65204

Phillip Webb  changed:

   What|Removed |Added

 CC||pw...@pivotal.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



buildbot failure in on tomcat-9-trunk

2021-03-25 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/705

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] 63a33e599e34ef0d22097f829b5d5b1dff441c03
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



buildbot failure in on tomcat-trunk

2021-03-25 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/5758

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] 70c7d663df87d35800eea571c2a1cecd4d5b4f91
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



[GitHub] [tomcat-jakartaee-migration] rmaucher commented on pull request #16: Modifies TOMCAT profile

2021-03-25 Thread GitBox


rmaucher commented on pull request #16:
URL: 
https://github.com/apache/tomcat-jakartaee-migration/pull/16#issuecomment-807107234


   Since this is going nowhere, I'm trying something else to see if it could be 
a better solution to that problem when using the class transformer.
   
https://github.com/apache/tomcat-jakartaee-migration/commit/b89a835d5bca7e67e4ba0decf7e4e712c3b6aef5


-- 
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-jakartaee-migration] branch master updated: Validate changes by the class transformer

2021-03-25 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 b89a835  Validate changes by the class transformer
b89a835 is described below

commit b89a835d5bca7e67e4ba0decf7e4e712c3b6aef5
Author: remm 
AuthorDate: Thu Mar 25 18:01:07 2021 +0100

Validate changes by the class transformer

When converting in the class transformer, the opportunity exists to try
to load the classes to verify that the rewrite makes more sense than the
original.
Inspired by the problem posed by JSTL in the Tomcat examples webapp [or
any other webapp that would include EE specification classes that happen
to match the profile used].
---
 CHANGES.md |  1 +
 .../apache/tomcat/jakartaee/ClassConverter.java| 52 +-
 2 files changed, 52 insertions(+), 1 deletion(-)

diff --git a/CHANGES.md b/CHANGES.md
index 1e2c314..669b1b2 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -3,6 +3,7 @@
 ## 0.3.0 (in progress)
 
 - Fix [#14](https://github.com/apache/tomcat-jakartaee-migration/issues/14). 
Do not migrate `javax.xml.(registry|rpc)` namespaces. (mgrigorov)
+- The class transformer will now validate that its rewrite exists in the 
runtime environment (remm)
 
 ## 0.2.0
 
diff --git a/src/main/java/org/apache/tomcat/jakartaee/ClassConverter.java 
b/src/main/java/org/apache/tomcat/jakartaee/ClassConverter.java
index d3fbaae..1ef8993 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/ClassConverter.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/ClassConverter.java
@@ -101,7 +101,57 @@ public class ClassConverter implements Converter, 
ClassFileTransformer {
 ByteArrayInputStream inputStream = new 
ByteArrayInputStream(classfileBuffer);
 ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
 try {
-convert(className, inputStream, outputStream, profile);
+ClassParser parser = new ClassParser(inputStream, "unknown");
+JavaClass javaClass = parser.parse();
+
+boolean converted = false;
+
+// Loop through constant pool
+Constant[] constantPool = 
javaClass.getConstantPool().getConstantPool();
+// Need an int as the maximum pool size is 2^16
+for (int i = 0; i < constantPool.length; i++) {
+if (constantPool[i] instanceof ConstantUtf8) {
+ConstantUtf8 c = (ConstantUtf8) constantPool[i];
+String str = c.getBytes();
+String newString = profile.convert(str);
+// Object comparison is deliberate
+if (newString != str) {
+// Since this is runtime conversion, the idea is to 
only convert to
+// Jakarta EE specification classes that exist in the 
container 
+String[] split = newString.split(";");
+for (String current : split) {
+int pos = current.indexOf("jakarta/");
+if (pos >= 0) {
+boolean found = false;
+try {
+
loader.loadClass(current.substring(pos).replace('/', '.'));
+found = true;
+} catch (Exception e) {}
+if (!found) {
+// Cancel the replacement as the 
replacement does not exist
+String originalFragment = 
current.replace("jakarta/", "javax/");
+newString = newString.replace(current, 
originalFragment);
+}
+}
+}
+if (newString != str) {
+c = new ConstantUtf8(newString);
+constantPool[i] = c;
+converted = true;
+}
+}
+}
+}
+
+if (logger.isLoggable(Level.FINE)) {
+if (converted) {
+logger.log(Level.FINE, 
sm.getString("classConverter.converted", className));
+} else if (logger.isLoggable(Level.FINEST)) {
+logger.log(Level.FINEST, 
sm.getString("classConverter.noConversion", className));
+}
+}
+
+javaClass.dump(outputStream);
 } catch (IOException e) {
 throw new IllegalClassFormatException(e.getLocalizedMessage());
 }

-
To unsubscribe, e-mail: 

[tomcat] 01/02: When using a thread may still be in async mode here

2021-03-25 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 90cd91c3d96ba107ade6b90332174313109c83c5
Author: Mark Thomas 
AuthorDate: Thu Mar 25 16:18:18 2021 +

When using a thread may still be in async mode here
---
 test/org/apache/catalina/core/TestAsyncContextImpl.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/org/apache/catalina/core/TestAsyncContextImpl.java 
b/test/org/apache/catalina/core/TestAsyncContextImpl.java
index 2995fe0..bba6408 100644
--- a/test/org/apache/catalina/core/TestAsyncContextImpl.java
+++ b/test/org/apache/catalina/core/TestAsyncContextImpl.java
@@ -2848,7 +2848,7 @@ public class TestAsyncContextImpl extends TomcatBaseTest {
 } else {
 ac.dispatch("/simpleServlet");
 }
-if (req.isAsyncStarted()) {
+if (!useThread && req.isAsyncStarted()) {
 invalidStateDetected = true;
 }
 }

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



[tomcat] 02/02: Fix intermittent CI failure

2021-03-25 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 c3e3deaccca128a6c57ec801128f65be8e291dc4
Author: Mark Thomas 
AuthorDate: Thu Mar 25 16:19:49 2021 +

Fix intermittent CI failure

If the complete/dispatch is on a new thread there is a race condition
between the new thread and the container thread. The COMPLETE_PENDIND
and DISPATCH_PENDING states were created to handle this scenario so use
them.
---
 java/org/apache/coyote/AsyncStateMachine.java | 34 +++
 1 file changed, 19 insertions(+), 15 deletions(-)

diff --git a/java/org/apache/coyote/AsyncStateMachine.java 
b/java/org/apache/coyote/AsyncStateMachine.java
index 2f9a28d..0826a2c 100644
--- a/java/org/apache/coyote/AsyncStateMachine.java
+++ b/java/org/apache/coyote/AsyncStateMachine.java
@@ -91,21 +91,23 @@ import org.apache.tomcat.util.security.PrivilegedSetTccl;
  *|   /  |  \  
   |
  *|OT-complete() /   |   \OT-dispatch()
   |
  *|   COMPLETE_PENDING«--«--/|
\---»-»DISPATCH_PENDING |
- *|  |   |   | 
   |
- *|post()|   timeout() post()|   post()post()|  
timeout() |
- *|  |   |--||  |--| |
|--||
- *| \|/ \|/ |   complete()  \|/\|/ |   dispatch()   \|/  
\|/ ||
+ *|  |/|\|   /|\ | 
   |
+ *|  | | ||  
|post()  |
+ *|  | |complete()   |  dispatch()|  | 
   |
+ *|  | | ||  | 
   |
+ *|  | |-«---«-- | --«---READ_WRITE--»|  | 
   |
+ *|  |   |/  /|\ | 
   |
+ *|  |   | post()/   /   | 
   |
+ *|  |   |  /   /| 
   |
+ *|  |   | /   / | 
   |
+ *|  |   |/   /  | 
   |
+ *|post()|   timeout() post()|   /   /asyncOperation()   |  
timeout() |
+ *|  |   |--||   |  /|
|--||
+ *| \|/ \|/ |   complete()  \|/ \|//   dispatch()   \|/  
\|/ ||
  *
|--«-COMPLETING««--STARTED»-»DISPATCHING|
- */|\  /|\ /|\   | /|\ \   /|\ /|\ 
/|\
- * ||   ||  \   \asyncOperation()   |   |  
 |
- * ||   |   timeout()|   \   \  |   |  
 |
- * ||   ||\   \ |   |  
 |
- * ||   || \   \|   |  
 |
- * ||   ||  \   \   |   |  
 |
- * ||   ||   \   \  |   |  
 |
- * ||   ||  post()\   \   dispatch()|   |  
 |
- * ||   |   complete()   | \ \|/|   |  
 |
- * ||   |---««-- | --«---READ_WRITE»|   |  
 |
+ */|\  /|\   | /|\ |   /|\ 
/|\
+ * |||  |--||  
 |
+ * ||   timeout()|  post()  |  
 |
  * |||  |  
 |
  * ||   complete()  \|/ dispatch()  |  
 |
  * ||«---TIMING_OUT»|  
 |
@@ -359,8 +361,10 @@ public class AsyncStateMachine {
 }
 
 
+
 public synchronized boolean asyncDispatch() {
-if (!ContainerThreadMarker.isContainerThread() && state == 
AsyncState.STARTING) {
+if (!ContainerThreadMarker.isContainerThread() && state == 
AsyncState.STARTING ||
+state == AsyncState.READ_WRITE_OP) {
 updateState(AsyncState.DISPATCH_PENDING);
 return false;
 }

-
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 (f2ddf1e -> c3e3dea)

2021-03-25 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 f2ddf1e  Enable debug logging for a test that is failing 
intermittently in CI
 new 90cd91c  When using a thread may still be in async mode here
 new c3e3dea  Fix intermittent CI failure

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:
 java/org/apache/coyote/AsyncStateMachine.java  | 34 --
 .../apache/catalina/core/TestAsyncContextImpl.java |  2 +-
 2 files changed, 20 insertions(+), 16 deletions(-)

-
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 (5d46443 -> 63a33e5)

2021-03-25 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 5d46443  Enable debug logging for a test that is failing 
intermittently in CI
 add 0b8d6bf  When using a thread may still be in async mode here
 add 63a33e5  Fix intermittent CI failure

No new revisions were added by this update.

Summary of changes:
 java/org/apache/coyote/AsyncStateMachine.java  | 33 --
 .../apache/catalina/core/TestAsyncContextImpl.java |  2 +-
 2 files changed, 19 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: Fix intermittent CI failure

2021-03-25 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 70c7d663df87d35800eea571c2a1cecd4d5b4f91
Author: Mark Thomas 
AuthorDate: Thu Mar 25 16:19:49 2021 +

Fix intermittent CI failure

If the complete/dispatch is on a new thread there is a race condition
between the new thread and the container thread. The COMPLETE_PENDIND
and DISPATCH_PENDING states were created to handle this scenario so use
them.
---
 java/org/apache/coyote/AsyncStateMachine.java | 33 +++
 1 file changed, 18 insertions(+), 15 deletions(-)

diff --git a/java/org/apache/coyote/AsyncStateMachine.java 
b/java/org/apache/coyote/AsyncStateMachine.java
index 4ad5a0d..4cc194e 100644
--- a/java/org/apache/coyote/AsyncStateMachine.java
+++ b/java/org/apache/coyote/AsyncStateMachine.java
@@ -91,21 +91,23 @@ import org.apache.tomcat.util.security.PrivilegedSetTccl;
  *|   /  |  \  
   |
  *|OT-complete() /   |   \OT-dispatch()
   |
  *|   COMPLETE_PENDING«--«--/|
\---»-»DISPATCH_PENDING |
- *|  |   |   | 
   |
- *|post()|   timeout() post()|   post()post()|  
timeout() |
- *|  |   |--||  |--| |
|--||
- *| \|/ \|/ |   complete()  \|/\|/ |   dispatch()   \|/  
\|/ ||
+ *|  |/|\|   /|\ | 
   |
+ *|  | | ||  
|post()  |
+ *|  | |complete()   |  dispatch()|  | 
   |
+ *|  | | ||  | 
   |
+ *|  | |-«---«-- | --«---READ_WRITE--»|  | 
   |
+ *|  |   |/  /|\ | 
   |
+ *|  |   | post()/   /   | 
   |
+ *|  |   |  /   /| 
   |
+ *|  |   | /   / | 
   |
+ *|  |   |/   /  | 
   |
+ *|post()|   timeout() post()|   /   /asyncOperation()   |  
timeout() |
+ *|  |   |--||   |  /|
|--||
+ *| \|/ \|/ |   complete()  \|/ \|//   dispatch()   \|/  
\|/ ||
  *
|--«-COMPLETING««--STARTED»-»DISPATCHING|
- */|\  /|\ /|\   | /|\ \   /|\ /|\ 
/|\
- * ||   ||  \   \asyncOperation()   |   |  
 |
- * ||   |   timeout()|   \   \  |   |  
 |
- * ||   ||\   \ |   |  
 |
- * ||   || \   \|   |  
 |
- * ||   ||  \   \   |   |  
 |
- * ||   ||   \   \  |   |  
 |
- * ||   ||  post()\   \   dispatch()|   |  
 |
- * ||   |   complete()   | \ \|/|   |  
 |
- * ||   |---««-- | --«---READ_WRITE»|   |  
 |
+ */|\  /|\   | /|\ |   /|\ 
/|\
+ * |||  |--||  
 |
+ * ||   timeout()|  post()  |  
 |
  * |||  |  
 |
  * ||   complete()  \|/ dispatch()  |  
 |
  * ||«---TIMING_OUT»|  
 |
@@ -360,7 +362,8 @@ class AsyncStateMachine {
 
 
 synchronized boolean asyncDispatch() {
-if (!ContainerThreadMarker.isContainerThread() && state == 
AsyncState.STARTING) {
+if (!ContainerThreadMarker.isContainerThread() && state == 
AsyncState.STARTING ||
+state == AsyncState.READ_WRITE_OP) {
 updateState(AsyncState.DISPATCH_PENDING);
 return false;
 }

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



[tomcat] 01/02: When using a thread may still be in async mode here

2021-03-25 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 6036c21bcdf247ec823b624149260d5b43853ea3
Author: Mark Thomas 
AuthorDate: Thu Mar 25 16:18:18 2021 +

When using a thread may still be in async mode here
---
 test/org/apache/catalina/core/TestAsyncContextImpl.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/org/apache/catalina/core/TestAsyncContextImpl.java 
b/test/org/apache/catalina/core/TestAsyncContextImpl.java
index 421b3b4..23668f5 100644
--- a/test/org/apache/catalina/core/TestAsyncContextImpl.java
+++ b/test/org/apache/catalina/core/TestAsyncContextImpl.java
@@ -2848,7 +2848,7 @@ public class TestAsyncContextImpl extends TomcatBaseTest {
 } else {
 ac.dispatch("/simpleServlet");
 }
-if (req.isAsyncStarted()) {
+if (!useThread && req.isAsyncStarted()) {
 invalidStateDetected = true;
 }
 }

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



[tomcat] branch master updated (2fa851b -> 70c7d66)

2021-03-25 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 2fa851b  Enable debug logging for a test that is failing 
intermittently in CI
 new 6036c21  When using a thread may still be in async mode here
 new 70c7d66  Fix intermittent CI failure

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:
 java/org/apache/coyote/AsyncStateMachine.java  | 33 --
 .../apache/catalina/core/TestAsyncContextImpl.java |  2 +-
 2 files changed, 19 insertions(+), 16 deletions(-)

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



[Bug 65204] LinkageError AuthConfigFactoryImpl

2021-03-25 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=65204

--- Comment #3 from Lukas Vasek  ---
Hello,
I've added logs from statup of both v41 and v43 tomcats if that helps anyhow

-- 
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 65204] LinkageError AuthConfigFactoryImpl

2021-03-25 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=65204

--- Comment #2 from Lukas Vasek  ---
Created attachment 37787
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37787=edit
unsuccessfull tomcat startup

-- 
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 65204] LinkageError AuthConfigFactoryImpl

2021-03-25 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=65204

--- Comment #1 from Lukas Vasek  ---
Created attachment 37786
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37786=edit
successfull tomcat startup

-- 
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 65204] LinkageError AuthConfigFactoryImpl

2021-03-25 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=65204

Andy Wilkinson  changed:

   What|Removed |Added

 CC||awilkin...@pivotal.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



[Bug 65204] New: LinkageError AuthConfigFactoryImpl

2021-03-25 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=65204

Bug ID: 65204
   Summary: LinkageError AuthConfigFactoryImpl
   Product: Tomcat 9
   Version: 9.0.43
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: bil...@gmail.com
  Target Milestone: -

Hello,
this is tuff issue because I'm getting it inside spring-boot tests and don't
know how to show you some sample application where you can reproduce it. 
But after upgrade to tomcat 9.0.43 (also 9.0.44) I'm getting exception shown
bellow when I'm trying to start the integration tests. In tomcat 9.0.41
everything works properly.

here is link to original issue
https://github.com/spring-projects/spring-boot/issues/25795
If there is anything with what I can help let me know please.


java.lang.LinkageError: loader 'app' attempted duplicate class definition for
org.apache.catalina.authenticator.jaspic.AuthConfigFactoryImpl.
(org.apache.catalina.authenticator.jaspic.AuthConfigFactoryImpl is in unnamed
module of loader 'app')
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
at
java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
at
java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:800)
at
java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:698)
at
java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:621)
at
java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:579)
at
java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
at
org.apache.catalina.authenticator.AuthenticatorBase.findJaspicProvider(AuthenticatorBase.java:1416)
at
org.apache.catalina.authenticator.AuthenticatorBase.getJaspicProvider(AuthenticatorBase.java:1409)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:533)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357)
at
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:374)
at
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1707)
at
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:834)

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



[GitHub] [tomcat-jakartaee-migration] martin-g commented on pull request #16: Modifies TOMCAT profile

2021-03-25 Thread GitBox


martin-g commented on pull request #16:
URL: 
https://github.com/apache/tomcat-jakartaee-migration/pull/16#issuecomment-806727589


   How do you deploy the app ?
   Do you put yourApp.war in `webapps-javaee/` folder ?


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



[GitHub] [tomcat-jakartaee-migration] martin-g commented on pull request #16: Modifies TOMCAT profile

2021-03-25 Thread GitBox


martin-g commented on pull request #16:
URL: 
https://github.com/apache/tomcat-jakartaee-migration/pull/16#issuecomment-806722812


   >  is still located in the `persistence-api.jar` as 
`javax/persistence/*.class`.
   
   This shouldn't be the case. The migrator should have updated it to 
jakarta/persistence/*.class.
   
   Please provide a small application that demonstrates the problem.


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



[GitHub] [tomcat-jakartaee-migration] ppkarwasz commented on pull request #16: Modifies TOMCAT profile

2021-03-25 Thread GitBox


ppkarwasz commented on pull request #16:
URL: 
https://github.com/apache/tomcat-jakartaee-migration/pull/16#issuecomment-806715595


   > > ```
   > > 3\. The classloader fails to load the `jakarta.persistence.*` classes.
   > > ```
   > 
   > Fails how ? What is the exception ?
   
   One of the standard `ClassNotFoundException` and `NoClassDefFoundError`. The 
reason is simple: the class that would be transformed into 
`jakarta.persistence.*` is still located in the `persistence-api.jar` as 
`javax/persistence/*.class`.
   
   This of course doesn't happen for the 5 spec jars distributed with Tomcat: 
when the classloader loads a servlet that implements `javax.servlet.Servlet`, 
the transformer changes is to `jakarta.servlet.Servlet` and the interface is 
loaded correctly from `CATALINA_HOME/lib/servlet-api.jar` (unless of course 
somebody bundled a second version with the application, but this is his 
problem).
   
   That's why I advocate to remove all APIs not bundled with Tomcat from the 
`TOMCAT` profile.


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



[GitHub] [tomcat-jakartaee-migration] martin-g commented on pull request #16: Modifies TOMCAT profile

2021-03-25 Thread GitBox


martin-g commented on pull request #16:
URL: 
https://github.com/apache/tomcat-jakartaee-migration/pull/16#issuecomment-806695753


   > 3\. The classloader fails to load the `jakarta.persistence.*` classes.
   
   Fails how ? What is the exception ?
   


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



[Bug 57129] Regression. Load WEB-INF/lib jarfiles in alphabetical order

2021-03-25 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=57129

davide.vec...@enghouse.com changed:

   What|Removed |Added

 CC||davide.vec...@enghouse.com

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



[GitHub] [tomcat-jakartaee-migration] ppkarwasz commented on pull request #16: Modifies TOMCAT profile

2021-03-25 Thread GitBox


ppkarwasz commented on pull request #16:
URL: 
https://github.com/apache/tomcat-jakartaee-migration/pull/16#issuecomment-806658340


   > I still don't understand the setup.
   > Since both Tomcat and the app do not provide the extra API jars how this 
application works/worked on Tomcat 9.x ?
   
   The app **provides** JPA 2.x API jars, but when I configure the 
application's classloader to transform using `jakartaConverter="TOMCAT"` the 
following happens:
   
   1. The application loads a JPA entity class,
   2. The `ClassFileTransformer` changes all `javax.persistence.*` annotations 
into `jakarta.persistence.*` annotations,
   3. The classloader fails to load the `jakarta.persistence.*` classes.
   
   I argue that `javax.persistence.*` and others (EJB, JAX-WS) should be 
removed from the `TOMCAT` profile. The only part of Tomcat's code, where there 
is a reference to JPA is the `InstanceManager`: whenever Tomcat instantiates a 
servlet class, it autowires the fields annotated with `@PersistenceContext`, 
etc. However this only works if there is a JPA implementation in Tomcat's 
_server_ classloader, i.e. we are deploying on TomEE  (`EE` profile) or unusual 
Tomcat + JPA installation.
   
   The remaining two APIs I removed from the `TOMCAT` profile (Java Mail and 
JTA) are, as far as I can see, only referenced in JNDI, so that applications 
can configure a mail `Session` or `UserTransaction` in their application 
context (if they ship with an implementation). For these applications I believe 
the `EE` profile is more appropriate.


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



[GitHub] [tomcat-jakartaee-migration] ppkarwasz edited a comment on pull request #16: Modifies TOMCAT profile

2021-03-25 Thread GitBox


ppkarwasz edited a comment on pull request #16:
URL: 
https://github.com/apache/tomcat-jakartaee-migration/pull/16#issuecomment-806549378


   @rmaucher: I fail to understand how changing the `TOMCAT` profile will cause 
problems for others, because I don't understand the purpose of this profile. 
When one would want to use the `TOMCAT` profile instead of the `EE` profile?
   
   The way I imagine it should work is:
   
   1. You want to migrate your application to Jakarta EE 9, use the `EE` 
profile and **replace** all spec jars shipped with the application,
   2. If you don't use any Java EE technology, besides those implemented by 
Tomcat, but you are using annotations: transform the application **before** 
deployment (IIRC the annotation scanner does not interact with the class 
loader) with the `TOMCAT` profile,
   3. If you are not using annotations nor `ServletContainerInitializer`s (the 
latter limitation can be relaxed), just configure the application context with 
`jakartaConverter="TOMCAT"` and deploy the application **as is**.
   
   Of course I would settle for an alternative profile, which works for case 3. 
I am bad with names, so a proposition is welcome.
   
   Packaging both versions of the spec jars is also a solution, but our clients 
tend to upgrade our applications very rarely: some applications run a couple of 
years before they upgrade. We even found recently several Tomcat 8.0.5 and 
9.0.0-M10 installations (probably they fought `M` stands for _max_). Therefore 
we are looking for a solution that requires the minimal amount of configuration 
to accommodate clients which run Tomcat 7.0 and Tomcat 10.0, possibly without 
modifying `CATALINA_HOME` (due to the widespread practice of _"upgrading"_ 
Tomcat by installing a new version and moving the `webapps` folder, all 
upgrades would require our intervention).


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



[GitHub] [tomcat-jakartaee-migration] ppkarwasz commented on pull request #16: Modifies TOMCAT profile

2021-03-25 Thread GitBox


ppkarwasz commented on pull request #16:
URL: 
https://github.com/apache/tomcat-jakartaee-migration/pull/16#issuecomment-806549378


   @rmaucher: I fail to understand how changing the `TOMCAT` profile will cause 
problems for others, because I don't understand the purpose of this profile. 
When one would want to use the `TOMCAT` profile instead of the `EE` profile?
   
   The way I imagine it should work is:
   
   1. You want to migrate your application to Jakarta EE 9, use the `EE` 
profile and **replace** all spec jars shipped with the application,
   2. If you don't use any Java EE technology, besides those implemented by 
Tomcat, but you are using annotations: transform the application **before** 
deployment (IIRC the annotation scanner does not interact with the class 
loader),
   3. If you are not using annotations nor `ServletContainerInitializer`s (the 
latter limitation can be relaxed), just configure the application context with 
`jakartaConverter="TOMCAT"` and deploy the application **as is**.
   
   Of course I would settle for an alternative profile, which works for case 3.
   
   Packaging both versions of the spec jars is also a solution, but our clients 
tend to upgrade our applications very rarely: some applications run a couple of 
years before they upgrade. We even found recently several Tomcat 8.0.5 and 
9.0.0-M10 installations (probably they fought `M` stands for _max_). Therefore 
we are looking for a solution that requires the minimal amount of configuration 
to accommodate clients which run Tomcat 7.0 and Tomcat 10.0, possibly without 
modifying `CATALINA_HOME` (due to the widespread practice of _"upgrading"_ 
Tomcat by installing a new version and moving the `webapps` folder, all 
upgrades would require our intervention).


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



[GitHub] [tomcat-jakartaee-migration] rmaucher commented on pull request #16: Modifies TOMCAT profile

2021-03-25 Thread GitBox


rmaucher commented on pull request #16:
URL: 
https://github.com/apache/tomcat-jakartaee-migration/pull/16#issuecomment-806478334


   > I still don't understand the setup.
   > Since both Tomcat and the app do not provide the extra API jars how this 
application works/worked on Tomcat 9.x ?
   
   Going back to the JSTL spec and implementation in the examples webapp. The 
implementation classes get redirected to jakarta.servlet.jsp.jstl, however the 
classes are still looked up from the javax.servlet.jsp.jstl package. The spec 
classes from javax.* are not relocated to jakarta.*.
   
   > Could we create another profile to address this?
   
   Tomcat uses some classes that overlap the packages, so meh. JSTL is the best 
example, but there's also all the annotations.


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



[GitHub] [tomcat-jakartaee-migration] martin-g commented on pull request #16: Modifies TOMCAT profile

2021-03-25 Thread GitBox


martin-g commented on pull request #16:
URL: 
https://github.com/apache/tomcat-jakartaee-migration/pull/16#issuecomment-806465322


   I still don't understand the setup.
   Since both Tomcat and the app do not provide the extra API jars how this 
application works/worked on Tomcat 9.x ? 
   


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



[GitHub] [tomcat-jakartaee-migration] markt-asf commented on pull request #16: Modifies TOMCAT profile

2021-03-25 Thread GitBox


markt-asf commented on pull request #16:
URL: 
https://github.com/apache/tomcat-jakartaee-migration/pull/16#issuecomment-806456674


   Could we create another profile to address this?


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



[GitHub] [tomcat-jakartaee-migration] rmaucher commented on pull request #16: Modifies TOMCAT profile

2021-03-25 Thread GitBox


rmaucher commented on pull request #16:
URL: 
https://github.com/apache/tomcat-jakartaee-migration/pull/16#issuecomment-806448089


   I perfectly understand [the problem is relocation of spec classes in the 
webapps], but there's no solution for you at the moment and I don't think this 
will be implemented. Did you actually try adding Jakarta API JARs to your 
webapp ? I don't see anything preventing you from doing this. Or you can put 
the API JARs in the Tomcat classloader too.
   
   Your change in this PR will only suit your particular needs but will cause 
problems for others, so it cannot go in.


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