[GitHub] [tomcat-maven-plugin] tamar-sy commented on a change in pull request #30: Tc9.x Initial suport for Tomact9
tamar-sy commented on a change in pull request #30: URL: https://github.com/apache/tomcat-maven-plugin/pull/30#discussion_r757865385 ## File path: tomcat9-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat9/run/RunMojo.java ## @@ -479,18 +480,23 @@ private WebResource urlToWebResource( URL url, String path ) jarFile = new JarFile( filePath ); JarEntry jarEntry = jarFile.getJarEntry( StringUtils.removeStart( path, "/" ) ); - +/* return new JarResource( this, // getPath(), // filePath, // url.getPath().substring( 0, idx ), // jarEntry, // "", // null ); +*/ + +JarResourceSet jr = new JarResourceSet(context.getResources(), getPath(), filePath, getPath()); Review comment: I'm going to upgrade from tomact7 to tomcat9. now I'm using tomcat7 mvn plugin for run & debug in local machine. I want to use your tomcat9 mvn plugin in order to run & debug. How can I use it? Thanks a lot -- 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. To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org 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 65708] New: uncaptured exception make SocketProcessor container has a httpconnection leak
https://bz.apache.org/bugzilla/show_bug.cgi?id=65708 Bug ID: 65708 Summary: uncaptured exception make SocketProcessor container has a httpconnection leak Product: Tomcat 8 Version: 8.5.23 Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: newch...@sina.com Target Milestone: Created attachment 38104 --> https://bz.apache.org/bugzilla/attachment.cgi?id=38104&action=edit the line 1476 encounter a exception tomcat-embed-core-8.5.23.jar if org.apache.tomcat.util.net.NioEndpoint.SocketProcessor#doRun encounter exception before connection closed and it is not CancelledKeyException class,it will trigger throw exception to the third catch code block. if org.apache.tomcat.util.net.NioEndpoint.SocketProcessor#doRun (line 1453 -- line 1485) if (handshake == 0) { SocketState state = SocketState.OPEN; // Process the request from this socket if (event == null) { state = getHandler().process(socketWrapper, SocketEvent.OPEN_READ); } else { state = getHandler().process(socketWrapper, event); } if (state == SocketState.CLOSED) { close(socket, key); } } else if (handshake == -1 ) { close(socket, key); } else if (handshake == SelectionKey.OP_READ){ socketWrapper.registerReadInterest(); } else if (handshake == SelectionKey.OP_WRITE){ socketWrapper.registerWriteInterest(); } } catch (CancelledKeyException cx) { socket.getPoller().cancelledKey(key); } catch (VirtualMachineError vme) { ExceptionUtils.handleThrowable(vme); } catch (Throwable t) { log.error("", t); socket.getPoller().cancelledKey(key); } finally { socketWrapper = null; event = null; //return to cache if (running && !paused) { processorCache.push(this); } } and in the catch block if the first line code(line 1476) encounter exception, the second line code(line 1477) will be skip. and the socket will be not closed, ,and make a socket connection leak. -- 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: Revert incorrect change in 4896083
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 417e339 Revert incorrect change in 4896083 417e339 is described below commit 417e3396a44efd71c16b2494c4840f8b347ecf7b Author: Mark Thomas AuthorDate: Sun Nov 28 13:42:24 2021 + Revert incorrect change in 4896083 --- .../org/apache/catalina/storeconfig/StoreConfigLifecycleListener.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/org/apache/catalina/storeconfig/StoreConfigLifecycleListener.java b/java/org/apache/catalina/storeconfig/StoreConfigLifecycleListener.java index e34c91f..bddec0c 100644 --- a/java/org/apache/catalina/storeconfig/StoreConfigLifecycleListener.java +++ b/java/org/apache/catalina/storeconfig/StoreConfigLifecycleListener.java @@ -65,8 +65,8 @@ public class StoreConfigLifecycleListener implements LifecycleListener { if (event.getSource() instanceof Server) { createMBean((Server) event.getSource()); } else { -log.warn("This listener must only be nested within Server elements, but is in [" + -event.getLifecycle().getClass().getSimpleName() + "]."); +log.warn(sm.getString("storeConfigListener.notServer", +event.getLifecycle().getClass().getSimpleName())); } } else if (Lifecycle.AFTER_STOP_EVENT.equals(event.getType())) { if (oname != null) { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [tomcat] branch 8.5.x updated: Revert incorrect change in 4896083
Am 2021-11-28 um 14:42 schrieb ma...@apache.org: 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 417e339 Revert incorrect change in 4896083 417e339 is described below commit 417e3396a44efd71c16b2494c4840f8b347ecf7b Author: Mark Thomas AuthorDate: Sun Nov 28 13:42:24 2021 + Revert incorrect change in 4896083 --- .../org/apache/catalina/storeconfig/StoreConfigLifecycleListener.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/org/apache/catalina/storeconfig/StoreConfigLifecycleListener.java b/java/org/apache/catalina/storeconfig/StoreConfigLifecycleListener.java index e34c91f..bddec0c 100644 --- a/java/org/apache/catalina/storeconfig/StoreConfigLifecycleListener.java +++ b/java/org/apache/catalina/storeconfig/StoreConfigLifecycleListener.java @@ -65,8 +65,8 @@ public class StoreConfigLifecycleListener implements LifecycleListener { if (event.getSource() instanceof Server) { createMBean((Server) event.getSource()); } else { -log.warn("This listener must only be nested within Server elements, but is in [" + -event.getLifecycle().getClass().getSimpleName() + "]."); +log.warn(sm.getString("storeConfigListener.notServer", +event.getLifecycle().getClass().getSimpleName())); This is now incorrect as well. Look at https://github.com/apache/tomcat/blob/48960832ca7e5c6da77d2fb83548e4f92fb37040/java/org/apache/catalina/storeconfig/LocalStrings.properties#L22. There is no placeholder. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [tomcat] branch main updated: Switch from Cobertura to JaCoCo for code coverage
Mark, On 11/27/21 06:31, Mark Thomas wrote: On 27/11/2021 04:17, Christopher Schultz wrote: Mark, On 11/8/21 08:55, Mark Thomas wrote: On 08/11/2021 12:42, ma...@apache.org wrote: This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/main by this push: new b15b713 Switch from Cobertura to JaCoCo for code coverage b15b713 is described below commit b15b7130ced07cfe36961531dad4642a422e9500 Author: Mark Thomas AuthorDate: Mon Nov 8 12:41:36 2021 + Switch from Cobertura to JaCoCo for code coverage Thoughts on back-porting this? We don't need to back-port it. The primary benefit I see is consistency. I only just read this; sorry for not seeing it earlier in the month. I don't mind the back-port; I was just curious why you decided to switch code-coverage tools. I don't recall seeing a discussion on the list. I'm not demanding such a discussion, it's just that you are usually very good about asking for feedback before making a tooling change like that. I think I mentioned the reasoning somewhere but I can't find it now so I am happy to provide an explanation here. The short version is that Cobertura doesn't work with Java 11 and there was no indication that Java 11 support was going to be available soon. This has been a problem for a while but I only noticed it when I was trying to get the builds working on the upgraded BuildBot CI infrastructure. I did a little research and saw JaCoCo which was a name a recognised from other ASF projects using it - primarily Commons. In addition to Java 11 support, a big advantage of JaCoCo is that it can handle tests running in parallel. That reduces the overnight CI runs that generate the coverage reports from ~4 hours to ~1 hour. I've no objection to considering alternatives if folks want to propose one as I didn't do an exhaustive search. Equally, I'm happy sticking with JaCoCo. Thanks for the details. -chris - 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: Back-port updated i18n string
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 99a87d9 Back-port updated i18n string 99a87d9 is described below commit 99a87d9ca8ddacc2a48d3890fb7181a7aac2da2a Author: Mark Thomas AuthorDate: Sun Nov 28 18:23:19 2021 + Back-port updated i18n string --- java/org/apache/catalina/storeconfig/LocalStrings.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/org/apache/catalina/storeconfig/LocalStrings.properties b/java/org/apache/catalina/storeconfig/LocalStrings.properties index a6bdd6d..f4c3ee1 100644 --- a/java/org/apache/catalina/storeconfig/LocalStrings.properties +++ b/java/org/apache/catalina/storeconfig/LocalStrings.properties @@ -19,7 +19,7 @@ config.storeServerError=Error storing server factory.storeNoDescriptor=Descriptor for element class [{0}] not configured! factory.storeTag=store tag [{0}] ( Object: [{1}] ) -storeConfigListener.notServer=The listener was added to component other than the Server and will therefore be ignored +storeConfigListener.notServer=This listener must only be nested within Server elements, but is in [{0}], ignoring it. storeFileMover.directoryCreationError=Cannot create directory [{0}] storeFileMover.renameError=Cannot rename [{0}] to [{1}] - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org