[Bug 64063] The libtcnative library should be installed in $CATALINA_HOME/bin
https://bz.apache.org/bugzilla/show_bug.cgi?id=64063 --- Comment #2 from mgrigorov --- If the change is not correct then the documentation needs to be improved to explain that the libs should be either copied to $CATALINA_HOME/bin manually or put into a folder that in on the library path. Other opinions ? -- 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-native] martin-g commented on issue #6: Install libtcnative** files in $prefix/bin folder
martin-g commented on issue #6: Install libtcnative** files in $prefix/bin folder URL: https://github.com/apache/tomcat-native/pull/6#issuecomment-572436295 I see now your comment in Bugzilla This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GitHub] [tomcat-native] martin-g commented on issue #6: Install libtcnative** files in $prefix/bin folder
martin-g commented on issue #6: Install libtcnative** files in $prefix/bin folder URL: https://github.com/apache/tomcat-native/pull/6#issuecomment-572435443 @michael-o Care to explain why ? Do you have a better solution ? I didn't pushed directly the change but created PR because I am also not sure whether this is the right solution. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GitHub] [tomcat-native] michael-o commented on issue #6: Install libtcnative** files in $prefix/bin folder
michael-o commented on issue #6: Install libtcnative** files in $prefix/bin folder URL: https://github.com/apache/tomcat-native/pull/6#issuecomment-572428506 Absolutely not fond of that. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 64063] The libtcnative library should be installed in $CATALINA_HOME/bin
https://bz.apache.org/bugzilla/show_bug.cgi?id=64063 --- Comment #1 from Michael Osipov --- (In reply to mgrigorov from comment #0) > As explained by Remy Maucherat at > http://markmail.org/message/3fb7o7xljawktilr the native libraries should be > installed at $CATALINA_HOME/bin instead of $CATALINA_HOME/lib folder. > > A Pull Request with the change: > https://github.com/apache/tomcat-native/pull/6 I have complied so much native software myself in the last 5 years on a lot Unix-like OSes that that there are several reasons why this is wrong: * GNU autoconf has well established conventions for libs going to libdir. Don't break the convention. * This is a native library and native libs on Un*x go to libdir * You might want to share the lib with several Tomcat installations, e.g., from /usr/local/lib or /opt/lib. An option I see is to provide multiple layouts like libapr does. Rule of thumb, don't break wellknown conventions just because this is a JNI wrapper. -- 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 64063] New: The libtcnative library should be installed in $CATALINA_HOME/bin
https://bz.apache.org/bugzilla/show_bug.cgi?id=64063 Bug ID: 64063 Summary: The libtcnative library should be installed in $CATALINA_HOME/bin Product: Tomcat Native Version: 1.2.23 Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P2 Component: Library Assignee: dev@tomcat.apache.org Reporter: mgrigo...@apache.org Target Milestone: --- As explained by Remy Maucherat at http://markmail.org/message/3fb7o7xljawktilr the native libraries should be installed at $CATALINA_HOME/bin instead of $CATALINA_HOME/lib folder. A Pull Request with the change: https://github.com/apache/tomcat-native/pull/6 -- 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: Running APR tests
Hi, On Wed, Jan 8, 2020 at 5:03 PM Martin Grigorov wrote: > Remy, > > On Wed, Jan 8, 2020 at 3:09 PM Rémy Maucherat wrote: > >> On Wed, Jan 8, 2020 at 12:59 PM Martin Grigorov >> wrote: >> >>> >>> >>> On Tue, Jan 7, 2020 at 7:04 PM Martin Grigorov >>> wrote: >>> On Tue, Jan 7, 2020, 17:59 Rémy Maucherat wrote: > On Tue, Jan 7, 2020 at 4:35 PM Martin Grigorov > wrote: > >> Hi Rémy, >> >> Thank you for helping me! >> >> On Tue, Jan 7, 2020 at 5:22 PM Rémy Maucherat >> wrote: >> >>> On Tue, Jan 7, 2020 at 4:11 PM Martin Grigorov >>> wrote: >>> Hello, I have hard time making the APR related tests to pass here. BuildBot config uses: command=['bash' , '-c' , 'echo test.apr.loc=/home/buildslave/slave/tomcat-trunk/basepath/tomcat-native-1.2.23-bin/lib >> build.properties'], What exactly is expected to find in this lib folder ? I've build tomcat-native locally and installed it at output/build/lib/, i.e. there are several libtcnative-1*** files in it ./configure --with-apr=(which apr-1-config) --with-ssl=yes --with-java-home=$JAVA_8_HOME --prefix=/home/martin/git/apache/tomcat/output/build Tomcat's build.xml has which resolves to output/build/bin and there is nothing native there No matter what I try it still fails with: org.apache.catalina.LifecycleException: The configured protocol [org.apache.coyote.http11.Http11AprProtocol] requires the APR/native library which is not available It fails the same way even with test.apr.loc=/home/martin/git/apache/tomcat/output/build/lib in my build.properties tomcat-native-1.2.23-*bin*/lib suggests that it contains binaries but I am unable to find where to download this bundle from. https://tomcat.apache.org/download-native.cgi has links to the sources. There is a text "You can find binaries release too. You may download them from HERE" but it points to http://mirrors.netix.net/apache/tomcat/tomcat-connectors/native/1.2.23/binaries/ where I see only Windows binaries Any pointers ? >>> >>> Well, you can put native in your OS library path. Failing this, this >>> has been harmonized in Tomcat 9 to also load it from the "bin" folder in >>> all cases (embedded like the testuite, standalone). >>> >> >> (I use fish shell) >> >> $ set -x LD_LIBRARY_PATH >> /home/martin/git/apache/tomcat/output/build/lib >> $ echo $LD_LIBRARY_PATH >> /home/martin/git/apache/tomcat/output/build/lib >> $ ant test-only-apr >> >> still fails with the same error >> >> This is with master branch, i.e. Tomcat 9.x. >> I copied all binaries to ./bin folder too >> cp output/build/lib/libtcnative-1.* output/build/bin/ >> but still the tests fail :-/ >> >> Do you also have all the dependencies available, like APR and OpenSSL > ? I see some confusion about APR above. > I've installed libapr1-dev and ssllib-dev (or something similar, I'm out now) as explained in the docu. apr-1-config comes with libapr1-dev >>> >>> Starting Tomcat itself loads the APR libraries fine if libtcnative-1* >>> files are either in $CATALINA_HOME/bin or if they are in LD_LIBRARY_PATH. >>> But if they are in $CATALINA_HOME/lib they are not found! >>> >> >> Well, that lib folder was never used for that, use bin instead. >> >> >>> Is there a need for a change in tomcat-native/native ? >>> Because >>>./configure --with-apr=/usr/bin/apr-1-config \ >>> --with-java-home=/home/jfclere/JAVA/jdk1.7.0_80/ \ >>> --with-ssl=yes \ >>> --prefix=$CATALINA_HOME >>> (from https://tomcat.apache.org/native-doc/) puts them >>> in $CATALINA_HOME/lib >>> >> >> Right so unless you do something about it later, this is not a libpath >> location. You should look at the BUILDING and it's less ambiguous. >> > > I am not sure whether you understood me. > By issuing ./configure --prefix=$CATALINA_HOME it will prepare a > configuration that `make install` will put the native libraries into > $CATALINA_HOME/*lib* > It's been a long time since I've touched Makefiles but I think the problem > is at > https://github.com/apache/tomcat-native/blob/66c8296137a80b35e24bda542bb2abb8d8dbae39/native/Makefile.in#L87 > I think it should use $(DESTDIR)$(bindir) instead as a target. This way > there won't be a need of manual fixes after `make install`. > Bugzilla ticket: https://bz.apache.org/bugzilla/show_bug.cgi?id=64063 Pull Request: https://github.com/apache/tomcat-native/pull/6 > > >> >> Rémy >> >> >>> >>> > Rémy > >
[tomcat-native] branch feature/install-libtcnative-in-catalina-bin-folder created (now 0fc2e32)
This is an automated email from the ASF dual-hosted git repository. mgrigorov pushed a change to branch feature/install-libtcnative-in-catalina-bin-folder in repository https://gitbox.apache.org/repos/asf/tomcat-native.git. at 0fc2e32 Install libtcnative** files in $prefix/bin folder This branch includes the following new commits: new 0fc2e32 Install libtcnative** files in $prefix/bin folder The 1 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. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GitHub] [tomcat-native] martin-g opened a new pull request #6: Install libtcnative** files in $prefix/bin folder
martin-g opened a new pull request #6: Install libtcnative** files in $prefix/bin folder URL: https://github.com/apache/tomcat-native/pull/6 $prefix == $CATALINA_HOME As explained by Remy Maucherat at https://markmail.org/message/3fb7o7xljawktilr the native libraries should be installed at $CATALINA_HOME/bin instead of $CATALINA_HOME/lib 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 With regards, Apache Git Services - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat-native] 01/01: Install libtcnative** files in $prefix/bin folder
This is an automated email from the ASF dual-hosted git repository. mgrigorov pushed a commit to branch feature/install-libtcnative-in-catalina-bin-folder in repository https://gitbox.apache.org/repos/asf/tomcat-native.git commit 0fc2e32a645abbf97a8f93c8e5cce8561842fbe3 Author: Martin Tzvetanov Grigorov AuthorDate: Thu Jan 9 08:52:41 2020 +0200 Install libtcnative** files in $prefix/bin folder $prefix == $CATALINA_HOME As explained by Remy Maucherat at https://markmail.org/message/3fb7o7xljawktilr the native libraries should be installed at $CATALINA_HOME/bin instead of $CATALINA_HOME/lib folder. --- native/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/native/Makefile.in b/native/Makefile.in index 6e6c68a..1780faa 100644 --- a/native/Makefile.in +++ b/native/Makefile.in @@ -84,7 +84,7 @@ install: $(TARGET_LIB) list='$(INSTALL_SUBDIRS)'; for i in $$list; do \ ( cd $$i ; $(MAKE) DESTDIR=$(DESTDIR) install ); \ done - $(LIBTOOL) --mode=install $(INSTALL) -m 755 $(TARGET_LIB) $(DESTDIR)$(libdir) + $(LIBTOOL) --mode=install $(INSTALL) -m 755 $(TARGET_LIB) $(DESTDIR)$(bindir) $(TARGET_LIB): $(OBJECTS) $(LINK) @lib_target@ $(TCNATIVE_LDFLAGS) $(TCNATIVE_LIBS) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GitHub] [tomcat] senthalan commented on issue #162: Add support for same-site cookie attribute
senthalan commented on issue #162: Add support for same-site cookie attribute URL: https://github.com/apache/tomcat/pull/162#issuecomment-572392633 @markt-asf Is this ported to 7.0.x as well? This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
buildbot success in on tomcat-trunk
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/4854 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] 8c50fc3e71b9b4b3807e57d6566a3cdbb94748db Blamelist: remm Build succeeded! Sincerely, -The Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch master updated: Fix "javadoc"
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 8c50fc3 Fix "javadoc" 8c50fc3 is described below commit 8c50fc3e71b9b4b3807e57d6566a3cdbb94748db Author: remm AuthorDate: Wed Jan 8 17:45:09 2020 +0100 Fix "javadoc" --- java/org/apache/tomcat/util/net/SocketProperties.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/org/apache/tomcat/util/net/SocketProperties.java b/java/org/apache/tomcat/util/net/SocketProperties.java index 488f6f7..bfed3ac 100644 --- a/java/org/apache/tomcat/util/net/SocketProperties.java +++ b/java/org/apache/tomcat/util/net/SocketProperties.java @@ -112,8 +112,8 @@ public class SocketProperties { * environments. Big servers also need to use a much higher default, * while small cloud based ones should use 0 instead. * Possible default value strategy: - * heap < 1GB: 0 - * heap >= 1GB: heap / 16 + * heap inf 1GB: 0 + * heap sup 1GB: heap / 32 */ protected int bufferPoolSize = 1024*1024*100; - 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
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/4853 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] 80a9422e9721cb772acf17aefe294692018af1e4 Blamelist: remm BUILD FAILED: failed compile Sincerely, -The Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch master updated: Plan larger update than anticipated to default cache sizes
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 80a9422 Plan larger update than anticipated to default cache sizes 80a9422 is described below commit 80a9422e9721cb772acf17aefe294692018af1e4 Author: remm AuthorDate: Wed Jan 8 17:23:22 2020 +0100 Plan larger update than anticipated to default cache sizes bufferPoolSize is configurable but not used at all at the moment, but should probably have more significance. --- TOMCAT-NEXT.txt | 2 +- java/org/apache/tomcat/util/net/SocketProperties.java | 14 ++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/TOMCAT-NEXT.txt b/TOMCAT-NEXT.txt index 07aa147..87eadaa 100644 --- a/TOMCAT-NEXT.txt +++ b/TOMCAT-NEXT.txt @@ -67,6 +67,6 @@ New items for 10.0.x onwards: 14. Remove unused NIO blocking code. -15. Remove caches in Endpoint for trivial object (SocketProcessorBase, PollerEvent). +15. Change SocketProperties cache sizes default values. 16. Share configuration between HTTP/1.1 and nested HTTP/2 rather than duplicating. diff --git a/java/org/apache/tomcat/util/net/SocketProperties.java b/java/org/apache/tomcat/util/net/SocketProperties.java index 706cc5e..488f6f7 100644 --- a/java/org/apache/tomcat/util/net/SocketProperties.java +++ b/java/org/apache/tomcat/util/net/SocketProperties.java @@ -39,6 +39,7 @@ public class SocketProperties { * Default is 500 * -1 is unlimited * 0 is disabled + * TODO: The default will be changed to 0 in Tomcat 10 */ protected int processorCache = 500; @@ -49,6 +50,7 @@ public class SocketProperties { * -1 is unlimited * 0 is disabled * 0 the max number of objects to keep in cache. + * TODO: The default will be changed to 0 in Tomcat 10 */ protected int eventCache = 500; @@ -93,6 +95,11 @@ public class SocketProperties { * this value is how many channels * -1 means unlimited cached, 0 means no cache * Default value is 500 + * TODO: The default should be changed in Tomcat 10, actually it should be + * bufferPoolSize / (appReadBufSize + appWriteBufSize), assuming the SSL + * buffers are ignored (that would be logical), and the value would be 6400. + * So the default value will be changed to a new default value like -2 to + * set a dynamic value based on bufferPoolSize in that case. */ protected int bufferPool = 500; @@ -100,6 +107,13 @@ public class SocketProperties { * Buffer pool size in bytes to be cached * -1 means unlimited, 0 means no cache * Default value is 100MB (1024*1024*100 bytes) + * TODO: The default value to be used could rather be based on the + * JVM max heap, otherwise it could be a problem in some + * environments. Big servers also need to use a much higher default, + * while small cloud based ones should use 0 instead. + * Possible default value strategy: + * heap < 1GB: 0 + * heap >= 1GB: heap / 16 */ protected int bufferPoolSize = 1024*1024*100; - 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
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/2116 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] 0e607291d002ce1556fe35a2ca098c58d45e778f Blamelist: Christopher Schultz Build succeeded! Sincerely, -The Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
buildbot success in on tomcat-7-trunk
The Buildbot has detected a restored build on builder tomcat-7-trunk while building tomcat. Full details are available at: https://ci.apache.org/builders/tomcat-7-trunk/builds/1567 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: asf946_ubuntu Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-7-commit' triggered this build Build Source Stamp: [branch 7.0.x] ec80e077cd0dc3300a1a576f7333ce7890188c7b Blamelist: Christopher Schultz Build succeeded! Sincerely, -The Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 7.0.x updated: Fix botched back-port.
This is an automated email from the ASF dual-hosted git repository. schultz 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 ec80e07 Fix botched back-port. ec80e07 is described below commit ec80e077cd0dc3300a1a576f7333ce7890188c7b Author: Christopher Schultz AuthorDate: Wed Jan 8 10:49:00 2020 -0500 Fix botched back-port. --- java/org/apache/tomcat/util/modeler/Registry.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/java/org/apache/tomcat/util/modeler/Registry.java b/java/org/apache/tomcat/util/modeler/Registry.java index 2037684..c15b1fe 100644 --- a/java/org/apache/tomcat/util/modeler/Registry.java +++ b/java/org/apache/tomcat/util/modeler/Registry.java @@ -41,6 +41,7 @@ import javax.management.ObjectName; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; import org.apache.tomcat.util.modeler.modules.ModelerSource; +import org.apache.tomcat.util.res.StringManager; /* Issues: @@ -72,6 +73,7 @@ public class Registry implements RegistryMBean, MBeanRegistration { * The Log instance to which we will write our log messages. */ private static final Log log = LogFactory.getLog(Registry.class); +private static final StringManager sm = StringManager.getManager(Registry.class); // Support for the factory methods - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 8.5.x updated: Fix botched back-port.
This is an automated email from the ASF dual-hosted git repository. schultz 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 0e60729 Fix botched back-port. 0e60729 is described below commit 0e607291d002ce1556fe35a2ca098c58d45e778f Author: Christopher Schultz AuthorDate: Wed Jan 8 10:49:00 2020 -0500 Fix botched back-port. --- java/org/apache/tomcat/util/modeler/Registry.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/java/org/apache/tomcat/util/modeler/Registry.java b/java/org/apache/tomcat/util/modeler/Registry.java index 1c35373..e4ab5db 100644 --- a/java/org/apache/tomcat/util/modeler/Registry.java +++ b/java/org/apache/tomcat/util/modeler/Registry.java @@ -39,6 +39,7 @@ import javax.management.ObjectName; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; import org.apache.tomcat.util.modeler.modules.ModelerSource; +import org.apache.tomcat.util.res.StringManager; /* Issues: @@ -70,6 +71,7 @@ public class Registry implements RegistryMBean, MBeanRegistration { * The Log instance to which we will write our log messages. */ private static final Log log = LogFactory.getLog(Registry.class); +private static final StringManager sm = StringManager.getManager(Registry.class); // Support for the factory methods - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
buildbot failure in on tomcat-85-trunk
The Buildbot has detected a new failure on builder tomcat-85-trunk while building tomcat. Full details are available at: https://ci.apache.org/builders/tomcat-85-trunk/builds/2115 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] 61717584d3cc35b5100d43e746b368fba6b823f7 Blamelist: Christopher Schultz BUILD FAILED: failed compile 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-7-trunk
The Buildbot has detected a new failure on builder tomcat-7-trunk while building tomcat. Full details are available at: https://ci.apache.org/builders/tomcat-7-trunk/builds/1566 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: asf946_ubuntu Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-7-commit' triggered this build Build Source Stamp: [branch 7.0.x] ab53d32ea1f4f3cb19e7f74840160d5fb9412033 Blamelist: Christopher Schultz BUILD FAILED: failed compile Sincerely, -The Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Running APR tests
Remy, On Wed, Jan 8, 2020 at 3:09 PM Rémy Maucherat wrote: > On Wed, Jan 8, 2020 at 12:59 PM Martin Grigorov > wrote: > >> >> >> On Tue, Jan 7, 2020 at 7:04 PM Martin Grigorov >> wrote: >> >>> >>> >>> On Tue, Jan 7, 2020, 17:59 Rémy Maucherat wrote: >>> On Tue, Jan 7, 2020 at 4:35 PM Martin Grigorov wrote: > Hi Rémy, > > Thank you for helping me! > > On Tue, Jan 7, 2020 at 5:22 PM Rémy Maucherat wrote: > >> On Tue, Jan 7, 2020 at 4:11 PM Martin Grigorov >> wrote: >> >>> Hello, >>> >>> I have hard time making the APR related tests to pass here. >>> >>> BuildBot config uses: >>> >>> command=['bash' , '-c' , 'echo >>> test.apr.loc=/home/buildslave/slave/tomcat-trunk/basepath/tomcat-native-1.2.23-bin/lib >>> >> build.properties'], >>> >>> What exactly is expected to find in this lib folder ? >>> I've build tomcat-native locally and installed it at >>> output/build/lib/, i.e. there are several libtcnative-1*** files in it >>> >>>./configure --with-apr=(which apr-1-config) --with-ssl=yes >>> --with-java-home=$JAVA_8_HOME >>> --prefix=/home/martin/git/apache/tomcat/output/build >>> >>> Tomcat's build.xml has >>> >>> which resolves to output/build/bin and there is nothing native there >>> >>> No matter what I try it still fails with: >>> org.apache.catalina.LifecycleException: The configured protocol >>> [org.apache.coyote.http11.Http11AprProtocol] requires the APR/native >>> library which is not available >>> >>> It fails the same way even with >>> test.apr.loc=/home/martin/git/apache/tomcat/output/build/lib >>> in my build.properties >>> >>> tomcat-native-1.2.23-*bin*/lib suggests that it contains binaries >>> but I am unable to find where to download this bundle from. >>> https://tomcat.apache.org/download-native.cgi has links to the >>> sources. >>> There is a text "You can find binaries release too. You may download >>> them from HERE" but it points to >>> http://mirrors.netix.net/apache/tomcat/tomcat-connectors/native/1.2.23/binaries/ >>> where I see only Windows binaries >>> >>> Any pointers ? >>> >> >> Well, you can put native in your OS library path. Failing this, this >> has been harmonized in Tomcat 9 to also load it from the "bin" folder in >> all cases (embedded like the testuite, standalone). >> > > (I use fish shell) > > $ set -x LD_LIBRARY_PATH > /home/martin/git/apache/tomcat/output/build/lib > $ echo $LD_LIBRARY_PATH > /home/martin/git/apache/tomcat/output/build/lib > $ ant test-only-apr > > still fails with the same error > > This is with master branch, i.e. Tomcat 9.x. > I copied all binaries to ./bin folder too > cp output/build/lib/libtcnative-1.* output/build/bin/ > but still the tests fail :-/ > > Do you also have all the dependencies available, like APR and OpenSSL ? I see some confusion about APR above. >>> >>> I've installed libapr1-dev and ssllib-dev (or something similar, I'm out >>> now) as explained in the docu. >>> apr-1-config comes with libapr1-dev >>> >> >> Starting Tomcat itself loads the APR libraries fine if libtcnative-1* >> files are either in $CATALINA_HOME/bin or if they are in LD_LIBRARY_PATH. >> But if they are in $CATALINA_HOME/lib they are not found! >> > > Well, that lib folder was never used for that, use bin instead. > > >> Is there a need for a change in tomcat-native/native ? >> Because >>./configure --with-apr=/usr/bin/apr-1-config \ >> --with-java-home=/home/jfclere/JAVA/jdk1.7.0_80/ \ >> --with-ssl=yes \ >> --prefix=$CATALINA_HOME >> (from https://tomcat.apache.org/native-doc/) puts them >> in $CATALINA_HOME/lib >> > > Right so unless you do something about it later, this is not a libpath > location. You should look at the BUILDING and it's less ambiguous. > I am not sure whether you understood me. By issuing ./configure --prefix=$CATALINA_HOME it will prepare a configuration that `make install` will put the native libraries into $CATALINA_HOME/*lib* It's been a long time since I've touched Makefiles but I think the problem is at https://github.com/apache/tomcat-native/blob/66c8296137a80b35e24bda542bb2abb8d8dbae39/native/Makefile.in#L87 I think it should use $(DESTDIR)$(bindir) instead as a target. This way there won't be a need of manual fixes after `make install`. > > Rémy > > >> >> >>> Rémy
[Bug 58577] JMX Proxy Servlet can't handle overloaded methods
https://bz.apache.org/bugzilla/show_bug.cgi?id=58577 Christopher Schultz changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #1 from Christopher Schultz --- I chose to make the simplest possible change for now, which is to check the argument count. It's not entirely possible to look for the exact right types because the parameter values come from the request as String values. With enough code, it might be possible to find a list of candidate methods, then attempt to convert the parameter strings into the target types for each one, and see if any of them succeed (or skip the failures) and invoke that particular type of operation. On the other hand, MBean operations should probably be designed to avoid such conflicts. This is fixed in e16472f93659c053f4af20ec5bacc08c342a0b90 Will be in 9.0.31 Will be in 8.5.51 Will be in 7.0.100 -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 8.5.x updated: Fix changelog
This is an automated email from the ASF dual-hosted git repository. schultz 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 6171758 Fix changelog 6171758 is described below commit 61717584d3cc35b5100d43e746b368fba6b823f7 Author: Christopher Schultz AuthorDate: Wed Jan 8 09:57:53 2020 -0500 Fix changelog --- webapps/docs/changelog.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index b6fc3ad..e90a592 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -102,7 +102,7 @@ 58577: Respect the argument-count when searching for MBean -operations to invoke via the JMXProxyServlet. +operations to invoke via the JMXProxyServlet. (schultz) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch master updated: Fix changelog
This is an automated email from the ASF dual-hosted git repository. schultz 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 ef3c0d1 Fix changelog ef3c0d1 is described below commit ef3c0d149eb441b3f2d22d645c7d5f0a3b19fc36 Author: Christopher Schultz AuthorDate: Wed Jan 8 09:57:53 2020 -0500 Fix changelog --- webapps/docs/changelog.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 2e3a7cc..33d7e34 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -94,7 +94,7 @@ 58577: Respect the argument-count when searching for MBean -operations to invoke via the JMXProxyServlet. +operations to invoke via the JMXProxyServlet. (schultz) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] 01/02: Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58577
This is an automated email from the ASF dual-hosted git repository. schultz pushed a commit to branch 7.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git commit 5ebf4101808a5b3267846aaae8f851b11eee72a2 Author: Christopher Schultz AuthorDate: Wed Jan 8 09:53:52 2020 -0500 Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58577 Respect the number of arguments when searching for a method to invoke. --- .../apache/catalina/manager/JMXProxyServlet.java | 8 -- .../catalina/manager/LocalStrings.properties | 2 +- java/org/apache/tomcat/util/modeler/Registry.java | 32 +- webapps/docs/changelog.xml | 4 +++ 4 files changed, 41 insertions(+), 5 deletions(-) diff --git a/java/org/apache/catalina/manager/JMXProxyServlet.java b/java/org/apache/catalina/manager/JMXProxyServlet.java index 24cc809..a4ac8a8 100644 --- a/java/org/apache/catalina/manager/JMXProxyServlet.java +++ b/java/org/apache/catalina/manager/JMXProxyServlet.java @@ -21,6 +21,7 @@ import java.io.PrintWriter; import java.util.Set; import javax.management.Attribute; +import javax.management.InstanceNotFoundException; import javax.management.MBeanException; import javax.management.MBeanInfo; import javax.management.MBeanOperationInfo; @@ -270,11 +271,12 @@ public class JMXProxyServlet extends HttpServlet { MBeanInfo info = null; try { info = registry.getMBeanServer().getMBeanInfo(oname); - -throw new IllegalArgumentException(sm.getString("jmxProxyServlet.noOperationOnBean", operation, onameStr, info.getClassName())); +} catch (InstanceNotFoundException infe) { +throw infe; } catch (Exception e) { -throw new IllegalArgumentException(sm.getString("jmxProxyServlet.noBeanFound", onameStr)); +throw new IllegalArgumentException(sm.getString("jmxProxyServlet.noBeanFound", onameStr), e); } +throw new IllegalArgumentException(sm.getString("jmxProxyServlet.noOperationOnBean", operation, (null == parameters ? 0 : parameters.length), onameStr, info.getClassName())); } MBeanParameterInfo[] signature = methodInfo.getSignature(); diff --git a/java/org/apache/catalina/manager/LocalStrings.properties b/java/org/apache/catalina/manager/LocalStrings.properties index 76c7116..13b083b 100644 --- a/java/org/apache/catalina/manager/LocalStrings.properties +++ b/java/org/apache/catalina/manager/LocalStrings.properties @@ -168,5 +168,5 @@ managerServlet.vminfo=OK - VM info statusServlet.complete=Complete Server Status statusServlet.title=Server Status -jmxProxyServlet.noOperationOnBean=Cannot find operation [{0}] on object name [{1}], which is a [{2}] +jmxProxyServlet.noOperationOnBean=Cannot find operation [{0}] with [{1}] arguments on object name [{2}], which is a [{3}] jmxProxyServlet.noBeanFound=Cannot find MBean with object name [{0}] diff --git a/java/org/apache/tomcat/util/modeler/Registry.java b/java/org/apache/tomcat/util/modeler/Registry.java index 9b92a0c..2037684 100644 --- a/java/org/apache/tomcat/util/modeler/Registry.java +++ b/java/org/apache/tomcat/util/modeler/Registry.java @@ -28,6 +28,7 @@ import java.util.Iterator; import java.util.List; import javax.management.DynamicMBean; +import javax.management.InstanceNotFoundException; import javax.management.MBeanAttributeInfo; import javax.management.MBeanInfo; import javax.management.MBeanOperationInfo; @@ -328,7 +329,6 @@ public class Registry implements RegistryMBean, MBeanRegistration { } } - // ID registry /** Return an int ID for faster access. Will be used for notifications @@ -512,6 +512,36 @@ public class Registry implements RegistryMBean, MBeanRegistration { return null; } +/** + * Find the operation info for a method. + * + * @param oname The bean name + * @param opName The operation name + * @param argCount The number of arguments to the method + * @return the operation info for the specified operation + * @throws InstanceNotFoundException If the object name is not bound to an MBean + */ +public MBeanOperationInfo getMethodInfo(ObjectName oname, String opName, int argCount) +throws InstanceNotFoundException +{ +MBeanInfo info = null; +try { +info = getMBeanServer().getMBeanInfo(oname); +} catch (InstanceNotFoundException infe) { +throw infe; +} catch (Exception e) { +log.warn(sm.getString("registry.noMetadata", oname), e); +return null; +} +MBeanOperationInfo attInfo[] = info.getOperations(); +for (int i = 0; i < attInfo.length; i++) { +if (opName.equals(attInfo[i].getName()) +&& argCount == attInfo[i].getSignature().length) { +
[tomcat] branch 7.0.x updated (2d53f10 -> ab53d32)
This is an automated email from the ASF dual-hosted git repository. schultz pushed a change to branch 7.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git. from 2d53f10 Update Changelog new 5ebf410 Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58577 new ab53d32 Fix changelog 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: .../apache/catalina/manager/JMXProxyServlet.java | 8 -- .../catalina/manager/LocalStrings.properties | 2 +- java/org/apache/tomcat/util/modeler/Registry.java | 32 +- webapps/docs/changelog.xml | 4 +++ 4 files changed, 41 insertions(+), 5 deletions(-) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] 02/02: Fix changelog
This is an automated email from the ASF dual-hosted git repository. schultz pushed a commit to branch 7.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git commit ab53d32ea1f4f3cb19e7f74840160d5fb9412033 Author: Christopher Schultz AuthorDate: Wed Jan 8 09:57:24 2020 -0500 Fix changelog --- webapps/docs/changelog.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 008d307..95cb2f2 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -97,7 +97,7 @@ 58577: Respect the argument-count when searching for MBean -operations to invoke via the JMXProxyServlet. +operations to invoke via the JMXProxyServlet. (schultz) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 8.5.x updated: Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58577
This is an automated email from the ASF dual-hosted git repository. schultz 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 e16472f Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58577 e16472f is described below commit e16472f93659c053f4af20ec5bacc08c342a0b90 Author: Christopher Schultz AuthorDate: Wed Jan 8 09:53:52 2020 -0500 Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58577 Respect the number of arguments when searching for a method to invoke. --- .../apache/catalina/manager/JMXProxyServlet.java | 10 --- .../catalina/manager/LocalStrings.properties | 2 +- java/org/apache/tomcat/util/modeler/Registry.java | 32 +- webapps/docs/changelog.xml | 4 +++ 4 files changed, 42 insertions(+), 6 deletions(-) diff --git a/java/org/apache/catalina/manager/JMXProxyServlet.java b/java/org/apache/catalina/manager/JMXProxyServlet.java index 2e98e19..7333e26 100644 --- a/java/org/apache/catalina/manager/JMXProxyServlet.java +++ b/java/org/apache/catalina/manager/JMXProxyServlet.java @@ -21,6 +21,7 @@ import java.io.PrintWriter; import java.util.Set; import javax.management.Attribute; +import javax.management.InstanceNotFoundException; import javax.management.MBeanException; import javax.management.MBeanInfo; import javax.management.MBeanOperationInfo; @@ -264,17 +265,18 @@ public class JMXProxyServlet extends HttpServlet { private Object invokeOperationInternal(String onameStr, String operation, String[] parameters) throws OperationsException, MBeanException, ReflectionException { ObjectName oname = new ObjectName(onameStr); -MBeanOperationInfo methodInfo = registry.getMethodInfo(oname, operation); +MBeanOperationInfo methodInfo = registry.getMethodInfo(oname, operation, (null == parameters ? 0 : parameters.length)); if(null == methodInfo) { // getMethodInfo returns null for both "object not found" and "operation not found" MBeanInfo info = null; try { info = registry.getMBeanServer().getMBeanInfo(oname); - -throw new IllegalArgumentException(sm.getString("jmxProxyServlet.noOperationOnBean", operation, onameStr, info.getClassName())); +} catch (InstanceNotFoundException infe) { +throw infe; } catch (Exception e) { -throw new IllegalArgumentException(sm.getString("jmxProxyServlet.noBeanFound", onameStr)); +throw new IllegalArgumentException(sm.getString("jmxProxyServlet.noBeanFound", onameStr), e); } +throw new IllegalArgumentException(sm.getString("jmxProxyServlet.noOperationOnBean", operation, (null == parameters ? 0 : parameters.length), onameStr, info.getClassName())); } MBeanParameterInfo[] signature = methodInfo.getSignature(); diff --git a/java/org/apache/catalina/manager/LocalStrings.properties b/java/org/apache/catalina/manager/LocalStrings.properties index bde5084..eaa4d2b 100644 --- a/java/org/apache/catalina/manager/LocalStrings.properties +++ b/java/org/apache/catalina/manager/LocalStrings.properties @@ -178,5 +178,5 @@ managerServlet.vminfo=OK - VM info statusServlet.complete=Complete Server Status statusServlet.title=Server Status -jmxProxyServlet.noOperationOnBean=Cannot find operation [{0}] on object name [{1}], which is a [{2}] +jmxProxyServlet.noOperationOnBean=Cannot find operation [{0}] with [{1}] arguments on object name [{2}], which is a [{3}] jmxProxyServlet.noBeanFound=Cannot find MBean with object name [{0}] diff --git a/java/org/apache/tomcat/util/modeler/Registry.java b/java/org/apache/tomcat/util/modeler/Registry.java index f90d3ed..1c35373 100644 --- a/java/org/apache/tomcat/util/modeler/Registry.java +++ b/java/org/apache/tomcat/util/modeler/Registry.java @@ -26,6 +26,7 @@ import java.util.Hashtable; import java.util.List; import javax.management.DynamicMBean; +import javax.management.InstanceNotFoundException; import javax.management.MBeanAttributeInfo; import javax.management.MBeanInfo; import javax.management.MBeanOperationInfo; @@ -242,7 +243,6 @@ public class Registry implements RegistryMBean, MBeanRegistration { } } - // ID registry /** @@ -376,6 +376,36 @@ public class Registry implements RegistryMBean, MBeanRegistration { return null; } +/** + * Find the operation info for a method. + * + * @param oname The bean name + * @param opName The operation name + * @param argCount The number of arguments to the method + * @return the operation info for the specified operation + * @throws InstanceNotFoundException If the object name is not bound to an MBean + */ +public
[tomcat] branch master updated: Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58577
This is an automated email from the ASF dual-hosted git repository. schultz 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 7fc6d5a Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58577 7fc6d5a is described below commit 7fc6d5ae83f7063fb543a1900285094f998bcd87 Author: Christopher Schultz AuthorDate: Wed Jan 8 09:53:52 2020 -0500 Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58577 Respect the number of arguments when searching for a method to invoke. --- .../apache/catalina/manager/JMXProxyServlet.java | 10 --- .../catalina/manager/LocalStrings.properties | 2 +- java/org/apache/tomcat/util/modeler/Registry.java | 32 +- webapps/docs/changelog.xml | 4 +++ 4 files changed, 42 insertions(+), 6 deletions(-) diff --git a/java/org/apache/catalina/manager/JMXProxyServlet.java b/java/org/apache/catalina/manager/JMXProxyServlet.java index e4cdf8e..30b718e 100644 --- a/java/org/apache/catalina/manager/JMXProxyServlet.java +++ b/java/org/apache/catalina/manager/JMXProxyServlet.java @@ -21,6 +21,7 @@ import java.io.PrintWriter; import java.util.Set; import javax.management.Attribute; +import javax.management.InstanceNotFoundException; import javax.management.MBeanException; import javax.management.MBeanInfo; import javax.management.MBeanOperationInfo; @@ -264,17 +265,18 @@ public class JMXProxyServlet extends HttpServlet { private Object invokeOperationInternal(String onameStr, String operation, String[] parameters) throws OperationsException, MBeanException, ReflectionException { ObjectName oname = new ObjectName(onameStr); -MBeanOperationInfo methodInfo = registry.getMethodInfo(oname, operation); +MBeanOperationInfo methodInfo = registry.getMethodInfo(oname, operation, (null == parameters ? 0 : parameters.length)); if(null == methodInfo) { // getMethodInfo returns null for both "object not found" and "operation not found" MBeanInfo info = null; try { info = registry.getMBeanServer().getMBeanInfo(oname); - -throw new IllegalArgumentException(sm.getString("jmxProxyServlet.noOperationOnBean", operation, onameStr, info.getClassName())); +} catch (InstanceNotFoundException infe) { +throw infe; } catch (Exception e) { -throw new IllegalArgumentException(sm.getString("jmxProxyServlet.noBeanFound", onameStr)); +throw new IllegalArgumentException(sm.getString("jmxProxyServlet.noBeanFound", onameStr), e); } +throw new IllegalArgumentException(sm.getString("jmxProxyServlet.noOperationOnBean", operation, (null == parameters ? 0 : parameters.length), onameStr, info.getClassName())); } MBeanParameterInfo[] signature = methodInfo.getSignature(); diff --git a/java/org/apache/catalina/manager/LocalStrings.properties b/java/org/apache/catalina/manager/LocalStrings.properties index 51acc29..afc1fec 100644 --- a/java/org/apache/catalina/manager/LocalStrings.properties +++ b/java/org/apache/catalina/manager/LocalStrings.properties @@ -193,5 +193,5 @@ managerServlet.vminfo=OK - VM info statusServlet.complete=Complete Server Status statusServlet.title=Server Status -jmxProxyServlet.noOperationOnBean=Cannot find operation [{0}] on object name [{1}], which is a [{2}] +jmxProxyServlet.noOperationOnBean=Cannot find operation [{0}] with [{1}] arguments on object name [{2}], which is a [{3}] jmxProxyServlet.noBeanFound=Cannot find MBean with object name [{0}] diff --git a/java/org/apache/tomcat/util/modeler/Registry.java b/java/org/apache/tomcat/util/modeler/Registry.java index b38af7a..41d24b7 100644 --- a/java/org/apache/tomcat/util/modeler/Registry.java +++ b/java/org/apache/tomcat/util/modeler/Registry.java @@ -27,6 +27,7 @@ import java.util.List; import java.util.Map; import javax.management.DynamicMBean; +import javax.management.InstanceNotFoundException; import javax.management.MBeanAttributeInfo; import javax.management.MBeanInfo; import javax.management.MBeanOperationInfo; @@ -263,7 +264,6 @@ public class Registry implements RegistryMBean, MBeanRegistration { } } - // ID registry /** @@ -397,6 +397,36 @@ public class Registry implements RegistryMBean, MBeanRegistration { return null; } +/** + * Find the operation info for a method. + * + * @param oname The bean name + * @param opName The operation name + * @param argCount The number of arguments to the method + * @return the operation info for the specified operation + * @throws InstanceNotFoundException If the object name is not bound to an MBean + */ +public
[tomcat] branch 7.0.x updated: Update Changelog
This is an automated email from the ASF dual-hosted git repository. schultz 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 2d53f10 Update Changelog 2d53f10 is described below commit 2d53f104faac1b41b2abc00eb82c78c7fd25b167 Author: Christopher Schultz AuthorDate: Wed Jan 8 09:06:22 2020 -0500 Update Changelog --- webapps/docs/changelog.xml | 4 1 file changed, 4 insertions(+) diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 6c2e7b3..78baa1f 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -91,6 +91,10 @@ 64023: Skip null-valued session attributes when deserializing sessions. (schultz) + +Do not throw a NullPointerException when an MBean or operation cannot +be found by the JMXProxyServlet. (schultz) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 8.5.x updated: Update Changelog
This is an automated email from the ASF dual-hosted git repository. schultz 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 07714ec Update Changelog 07714ec is described below commit 07714ec2220e1433bba7d754ef1a87f534e7d2c1 Author: Christopher Schultz AuthorDate: Wed Jan 8 09:05:05 2020 -0500 Update Changelog --- webapps/docs/changelog.xml | 4 1 file changed, 4 insertions(+) diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 905b93f..726a9ff 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -96,6 +96,10 @@ pattern * or *.jar is set or added to tomcat.util.scan.StandardJarScanFilter.jarsToSkip. (isapir) + +Do not throw a NullPointerException when an MBean or operation cannot +be found by the JMXProxyServlet. (schultz) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch master updated: Update changelog
This is an automated email from the ASF dual-hosted git repository. schultz 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 fb5e34c Update changelog fb5e34c is described below commit fb5e34cea9647234aa96f81ef40d0904a2bbe1d5 Author: Christopher Schultz AuthorDate: Wed Jan 8 09:03:54 2020 -0500 Update changelog --- webapps/docs/changelog.xml | 4 1 file changed, 4 insertions(+) diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index c013b2f..bf6ce4a 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -88,6 +88,10 @@ pattern * or *.jar is set or added to tomcat.util.scan.StandardJarScanFilter.jarsToSkip. (isapir) + +Do not throw a NullPointerException when an MBean or operation cannot +be found by the JMXProxyServlet. (schultz) + - 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: Do not throw NPE when MBean operation cannot be found.
This is an automated email from the ASF dual-hosted git repository. schultz 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 76100f2 Do not throw NPE when MBean operation cannot be found. 76100f2 is described below commit 76100f2422ebb82a6d61030b4a538ea204de5021 Author: Christopher Schultz AuthorDate: Wed Jan 8 08:48:41 2020 -0500 Do not throw NPE when MBean operation cannot be found. --- java/org/apache/catalina/manager/JMXProxyServlet.java| 16 java/org/apache/catalina/manager/LocalStrings.properties | 3 +++ 2 files changed, 19 insertions(+) diff --git a/java/org/apache/catalina/manager/JMXProxyServlet.java b/java/org/apache/catalina/manager/JMXProxyServlet.java index 3aa778b..24cc809 100644 --- a/java/org/apache/catalina/manager/JMXProxyServlet.java +++ b/java/org/apache/catalina/manager/JMXProxyServlet.java @@ -22,6 +22,7 @@ import java.util.Set; import javax.management.Attribute; import javax.management.MBeanException; +import javax.management.MBeanInfo; import javax.management.MBeanOperationInfo; import javax.management.MBeanParameterInfo; import javax.management.MBeanServer; @@ -35,6 +36,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.catalina.mbeans.MBeanDumper; +import org.apache.catalina.tribes.util.StringManager; import org.apache.tomcat.util.modeler.Registry; /** @@ -51,6 +53,8 @@ public class JMXProxyServlet extends HttpServlet { // without any parameters. private static final String[] NO_PARAMETERS = new String[0]; +private static final StringManager sm = StringManager.getManager(JMXProxyServlet.class); + // - Instance Variables /** * MBean server. @@ -261,6 +265,18 @@ public class JMXProxyServlet extends HttpServlet { throws OperationsException, MBeanException, ReflectionException { ObjectName oname=new ObjectName( onameStr ); MBeanOperationInfo methodInfo = registry.getMethodInfo(oname,operation); +if(null == methodInfo) { +// getMethodInfo returns null for both "object not found" and "operation not found" +MBeanInfo info = null; +try { +info = registry.getMBeanServer().getMBeanInfo(oname); + +throw new IllegalArgumentException(sm.getString("jmxProxyServlet.noOperationOnBean", operation, onameStr, info.getClassName())); +} catch (Exception e) { +throw new IllegalArgumentException(sm.getString("jmxProxyServlet.noBeanFound", onameStr)); +} +} + MBeanParameterInfo[] signature = methodInfo.getSignature(); String[] signatureTypes = new String[signature.length]; Object[] values = new Object[signature.length]; diff --git a/java/org/apache/catalina/manager/LocalStrings.properties b/java/org/apache/catalina/manager/LocalStrings.properties index 08b485c..76c7116 100644 --- a/java/org/apache/catalina/manager/LocalStrings.properties +++ b/java/org/apache/catalina/manager/LocalStrings.properties @@ -167,3 +167,6 @@ managerServlet.vminfo=OK - VM info statusServlet.complete=Complete Server Status statusServlet.title=Server Status + +jmxProxyServlet.noOperationOnBean=Cannot find operation [{0}] on object name [{1}], which is a [{2}] +jmxProxyServlet.noBeanFound=Cannot find MBean with object name [{0}] - 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: Do not throw NPE when MBean operation cannot be found.
This is an automated email from the ASF dual-hosted git repository. schultz 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 30e532f Do not throw NPE when MBean operation cannot be found. 30e532f is described below commit 30e532f4f050c33ad892ff595e73efa55f0dacb7 Author: Christopher Schultz AuthorDate: Wed Jan 8 08:48:41 2020 -0500 Do not throw NPE when MBean operation cannot be found. --- java/org/apache/catalina/manager/JMXProxyServlet.java| 16 java/org/apache/catalina/manager/LocalStrings.properties | 3 +++ 2 files changed, 19 insertions(+) diff --git a/java/org/apache/catalina/manager/JMXProxyServlet.java b/java/org/apache/catalina/manager/JMXProxyServlet.java index 762e64a..2e98e19 100644 --- a/java/org/apache/catalina/manager/JMXProxyServlet.java +++ b/java/org/apache/catalina/manager/JMXProxyServlet.java @@ -22,6 +22,7 @@ import java.util.Set; import javax.management.Attribute; import javax.management.MBeanException; +import javax.management.MBeanInfo; import javax.management.MBeanOperationInfo; import javax.management.MBeanParameterInfo; import javax.management.MBeanServer; @@ -35,6 +36,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.catalina.mbeans.MBeanDumper; +import org.apache.catalina.tribes.util.StringManager; import org.apache.tomcat.util.modeler.Registry; /** @@ -51,6 +53,8 @@ public class JMXProxyServlet extends HttpServlet { // without any parameters. private static final String[] NO_PARAMETERS = new String[0]; +private static final StringManager sm = StringManager.getManager(JMXProxyServlet.class); + // - Instance Variables /** * MBean server. @@ -261,6 +265,18 @@ public class JMXProxyServlet extends HttpServlet { throws OperationsException, MBeanException, ReflectionException { ObjectName oname = new ObjectName(onameStr); MBeanOperationInfo methodInfo = registry.getMethodInfo(oname, operation); +if(null == methodInfo) { +// getMethodInfo returns null for both "object not found" and "operation not found" +MBeanInfo info = null; +try { +info = registry.getMBeanServer().getMBeanInfo(oname); + +throw new IllegalArgumentException(sm.getString("jmxProxyServlet.noOperationOnBean", operation, onameStr, info.getClassName())); +} catch (Exception e) { +throw new IllegalArgumentException(sm.getString("jmxProxyServlet.noBeanFound", onameStr)); +} +} + MBeanParameterInfo[] signature = methodInfo.getSignature(); String[] signatureTypes = new String[signature.length]; Object[] values = new Object[signature.length]; diff --git a/java/org/apache/catalina/manager/LocalStrings.properties b/java/org/apache/catalina/manager/LocalStrings.properties index 556e0c1..bde5084 100644 --- a/java/org/apache/catalina/manager/LocalStrings.properties +++ b/java/org/apache/catalina/manager/LocalStrings.properties @@ -177,3 +177,6 @@ managerServlet.vminfo=OK - VM info statusServlet.complete=Complete Server Status statusServlet.title=Server Status + +jmxProxyServlet.noOperationOnBean=Cannot find operation [{0}] on object name [{1}], which is a [{2}] +jmxProxyServlet.noBeanFound=Cannot find MBean with object name [{0}] - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch master updated: Do not throw NPE when MBean operation cannot be found.
This is an automated email from the ASF dual-hosted git repository. schultz 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 4db28a4 Do not throw NPE when MBean operation cannot be found. 4db28a4 is described below commit 4db28a41774f15e9e4a3e7f1a4ec94a38959e3e7 Author: Christopher Schultz AuthorDate: Wed Jan 8 08:48:41 2020 -0500 Do not throw NPE when MBean operation cannot be found. --- java/org/apache/catalina/manager/JMXProxyServlet.java| 16 java/org/apache/catalina/manager/LocalStrings.properties | 3 +++ 2 files changed, 19 insertions(+) diff --git a/java/org/apache/catalina/manager/JMXProxyServlet.java b/java/org/apache/catalina/manager/JMXProxyServlet.java index e9edcd8..e4cdf8e 100644 --- a/java/org/apache/catalina/manager/JMXProxyServlet.java +++ b/java/org/apache/catalina/manager/JMXProxyServlet.java @@ -22,6 +22,7 @@ import java.util.Set; import javax.management.Attribute; import javax.management.MBeanException; +import javax.management.MBeanInfo; import javax.management.MBeanOperationInfo; import javax.management.MBeanParameterInfo; import javax.management.MBeanServer; @@ -35,6 +36,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.catalina.mbeans.MBeanDumper; +import org.apache.catalina.tribes.util.StringManager; import org.apache.tomcat.util.modeler.Registry; /** @@ -51,6 +53,8 @@ public class JMXProxyServlet extends HttpServlet { // without any parameters. private static final String[] NO_PARAMETERS = new String[0]; +private static final StringManager sm = StringManager.getManager(JMXProxyServlet.class); + // - Instance Variables /** * MBean server. @@ -261,6 +265,18 @@ public class JMXProxyServlet extends HttpServlet { throws OperationsException, MBeanException, ReflectionException { ObjectName oname = new ObjectName(onameStr); MBeanOperationInfo methodInfo = registry.getMethodInfo(oname, operation); +if(null == methodInfo) { +// getMethodInfo returns null for both "object not found" and "operation not found" +MBeanInfo info = null; +try { +info = registry.getMBeanServer().getMBeanInfo(oname); + +throw new IllegalArgumentException(sm.getString("jmxProxyServlet.noOperationOnBean", operation, onameStr, info.getClassName())); +} catch (Exception e) { +throw new IllegalArgumentException(sm.getString("jmxProxyServlet.noBeanFound", onameStr)); +} +} + MBeanParameterInfo[] signature = methodInfo.getSignature(); String[] signatureTypes = new String[signature.length]; Object[] values = new Object[signature.length]; diff --git a/java/org/apache/catalina/manager/LocalStrings.properties b/java/org/apache/catalina/manager/LocalStrings.properties index ce1ed7e..51acc29 100644 --- a/java/org/apache/catalina/manager/LocalStrings.properties +++ b/java/org/apache/catalina/manager/LocalStrings.properties @@ -192,3 +192,6 @@ managerServlet.vminfo=OK - VM info statusServlet.complete=Complete Server Status statusServlet.title=Server Status + +jmxProxyServlet.noOperationOnBean=Cannot find operation [{0}] on object name [{1}], which is a [{2}] +jmxProxyServlet.noBeanFound=Cannot find MBean with object name [{0}] - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Running APR tests
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Martin, On 1/7/20 10:10 AM, Martin Grigorov wrote: > Hello, > > I have hard time making the APR related tests to pass here. > > BuildBot config uses: > > command=['bash' , '-c' , 'echo > test.apr.loc=/home/buildslave/slave/tomcat-trunk/basepath/tomcat-nativ e-1.2.23-bin/lib >>> > build.properties'], > > What exactly is expected to find in this lib folder ? I've build > tomcat-native locally and installed it at output/build/lib/, i.e. > there are several libtcnative-1*** files in it > > ./configure --with-apr=(which apr-1-config) --with-ssl=yes > --with-java-home=$JAVA_8_HOME > --prefix=/home/martin/git/apache/tomcat/output/build > > Tomcat's build.xml has value="${test.basedir}/bin"/> which resolves to output/build/bin > and there is nothing native there > > No matter what I try it still fails with: > org.apache.catalina.LifecycleException: The configured protocol > [org.apache.coyote.http11.Http11AprProtocol] requires the > APR/native library which is not available > > It fails the same way even with > test.apr.loc=/home/martin/git/apache/tomcat/output/build/lib in my > build.properties > > tomcat-native-1.2.23-*bin*/lib suggests that it contains binaries > but I am unable to find where to download this bundle from. > https://tomcat.apache.org/download-native.cgi has links to the > sources. There is a text "You can find binaries release too. You > may download them from HERE" but it points to > http://mirrors.netix.net/apache/tomcat/tomcat-connectors/native/1.2.23 /binaries/ > > where I see only Windows binaries I have a script which should build everything and perform all tests: https://github.com/ChristopherSchultz/apache-tomcat-stuff/tree/master/bi n Look at test-tomcat-release.sh I haven't run it in a while, and it's got no documentation, but it should be somewhat readable if you are familiar with bash. - -chris -BEGIN PGP SIGNATURE- Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl4V3pUACgkQHPApP6U8 pFgdYw/8D890VJ4Sddep/svu5iBfWJZpgv7MqR1COt0a+k0nGdSh6NUnmNw+HZKH a/ST31uPzFf9iMurgfZFAuIaLt9Cihgmeg5Dyt5fqVV0g+QFvCglaqbtqekyyxQj /G5G7wxQoR/l0/qH43exDZNAftdFtaXsBMUULvOHDn5eKm4I2MeQdBRsc/5i8y1U RDYLp/KtOSbQs27rbIvl+kxC09MLzwC56laCAGGljmhID0DtZv8X8jpVlWouUS+B Wu3uDKmHmhpEpoa9Dx2yVEZT3zZXcFGPvVqudf0s00gPXGHZVJZxt+34/5NYvw87 0XhKG5zwPk4n1zBvGL3vjz1kuL8AwvsJFFhYyQxXvWxpj/v6IKgpQfIa4hEZ0FvG yqZJeYeIinCCFuBGR7nYqUuaIEVAf3blfFjbXbMHycNAs5TWvgqGYdLzuEYzscq/ wt/+08DxfQ7bF+m8f5QgZaZCYdzlYxjvZZ0ce0kIsB9eUf6tuwN3e29EapcW6yJg QoA2k3WxFOQSSK88LqUDAQLPRr9phX+BNWSp8+orzMyrY5vTSge72NHC4QbgkZF6 UIAFyC0PmlJtp+0JQKuhrD9rRtPcyhKsyJ3N7nvNDKYX9fXjc6OccyfCO1tLtHK+ 7df1D220No4EQeif9HVT88R4rF8NM1gtFvBc63jPa5HqO6TwkuQ= =WsvS -END PGP SIGNATURE- - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Running APR tests
On Wed, Jan 8, 2020 at 12:59 PM Martin Grigorov wrote: > > > On Tue, Jan 7, 2020 at 7:04 PM Martin Grigorov > wrote: > >> >> >> On Tue, Jan 7, 2020, 17:59 Rémy Maucherat wrote: >> >>> On Tue, Jan 7, 2020 at 4:35 PM Martin Grigorov >>> wrote: >>> Hi Rémy, Thank you for helping me! On Tue, Jan 7, 2020 at 5:22 PM Rémy Maucherat wrote: > On Tue, Jan 7, 2020 at 4:11 PM Martin Grigorov > wrote: > >> Hello, >> >> I have hard time making the APR related tests to pass here. >> >> BuildBot config uses: >> >> command=['bash' , '-c' , 'echo >> test.apr.loc=/home/buildslave/slave/tomcat-trunk/basepath/tomcat-native-1.2.23-bin/lib >> >> build.properties'], >> >> What exactly is expected to find in this lib folder ? >> I've build tomcat-native locally and installed it at >> output/build/lib/, i.e. there are several libtcnative-1*** files in it >> >>./configure --with-apr=(which apr-1-config) --with-ssl=yes >> --with-java-home=$JAVA_8_HOME >> --prefix=/home/martin/git/apache/tomcat/output/build >> >> Tomcat's build.xml has >> >> which resolves to output/build/bin and there is nothing native there >> >> No matter what I try it still fails with: >> org.apache.catalina.LifecycleException: The configured protocol >> [org.apache.coyote.http11.Http11AprProtocol] requires the APR/native >> library which is not available >> >> It fails the same way even with >> test.apr.loc=/home/martin/git/apache/tomcat/output/build/lib >> in my build.properties >> >> tomcat-native-1.2.23-*bin*/lib suggests that it contains binaries >> but I am unable to find where to download this bundle from. >> https://tomcat.apache.org/download-native.cgi has links to the >> sources. >> There is a text "You can find binaries release too. You may download >> them from HERE" but it points to >> http://mirrors.netix.net/apache/tomcat/tomcat-connectors/native/1.2.23/binaries/ >> where I see only Windows binaries >> >> Any pointers ? >> > > Well, you can put native in your OS library path. Failing this, this > has been harmonized in Tomcat 9 to also load it from the "bin" folder in > all cases (embedded like the testuite, standalone). > (I use fish shell) $ set -x LD_LIBRARY_PATH /home/martin/git/apache/tomcat/output/build/lib $ echo $LD_LIBRARY_PATH /home/martin/git/apache/tomcat/output/build/lib $ ant test-only-apr still fails with the same error This is with master branch, i.e. Tomcat 9.x. I copied all binaries to ./bin folder too cp output/build/lib/libtcnative-1.* output/build/bin/ but still the tests fail :-/ Do you also have all the dependencies available, like APR and OpenSSL ? >>> I see some confusion about APR above. >>> >> >> I've installed libapr1-dev and ssllib-dev (or something similar, I'm out >> now) as explained in the docu. >> apr-1-config comes with libapr1-dev >> > > Starting Tomcat itself loads the APR libraries fine if libtcnative-1* > files are either in $CATALINA_HOME/bin or if they are in LD_LIBRARY_PATH. > But if they are in $CATALINA_HOME/lib they are not found! > Well, that lib folder was never used for that, use bin instead. > Is there a need for a change in tomcat-native/native ? > Because >./configure --with-apr=/usr/bin/apr-1-config \ > --with-java-home=/home/jfclere/JAVA/jdk1.7.0_80/ \ > --with-ssl=yes \ > --prefix=$CATALINA_HOME > (from https://tomcat.apache.org/native-doc/) puts them > in $CATALINA_HOME/lib > Right so unless you do something about it later, this is not a libpath location. You should look at the BUILDING and it's less ambiguous. Rémy > > >> >>> Rémy >>> >>>
[Bug 64061] sendMessageBlock throws NPE and it results in IllegalStateException of TEXT_PARTIAL_WRITING
https://bz.apache.org/bugzilla/show_bug.cgi?id=64061 --- Comment #4 from ende...@gmail.com --- Ok, after I update and test the latest version, I will write a comment again. Thanks. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Running APR tests
On Tue, Jan 7, 2020 at 7:04 PM Martin Grigorov wrote: > > > On Tue, Jan 7, 2020, 17:59 Rémy Maucherat wrote: > >> On Tue, Jan 7, 2020 at 4:35 PM Martin Grigorov >> wrote: >> >>> Hi Rémy, >>> >>> Thank you for helping me! >>> >>> On Tue, Jan 7, 2020 at 5:22 PM Rémy Maucherat wrote: >>> On Tue, Jan 7, 2020 at 4:11 PM Martin Grigorov wrote: > Hello, > > I have hard time making the APR related tests to pass here. > > BuildBot config uses: > > command=['bash' , '-c' , 'echo > test.apr.loc=/home/buildslave/slave/tomcat-trunk/basepath/tomcat-native-1.2.23-bin/lib > >> build.properties'], > > What exactly is expected to find in this lib folder ? > I've build tomcat-native locally and installed it at > output/build/lib/, i.e. there are several libtcnative-1*** files in it > >./configure --with-apr=(which apr-1-config) --with-ssl=yes > --with-java-home=$JAVA_8_HOME > --prefix=/home/martin/git/apache/tomcat/output/build > > Tomcat's build.xml has > > which resolves to output/build/bin and there is nothing native there > > No matter what I try it still fails with: > org.apache.catalina.LifecycleException: The configured protocol > [org.apache.coyote.http11.Http11AprProtocol] requires the APR/native > library which is not available > > It fails the same way even with > test.apr.loc=/home/martin/git/apache/tomcat/output/build/lib > in my build.properties > > tomcat-native-1.2.23-*bin*/lib suggests that it contains binaries but > I am unable to find where to download this bundle from. > https://tomcat.apache.org/download-native.cgi has links to the > sources. > There is a text "You can find binaries release too. You may download > them from HERE" but it points to > http://mirrors.netix.net/apache/tomcat/tomcat-connectors/native/1.2.23/binaries/ > where I see only Windows binaries > > Any pointers ? > Well, you can put native in your OS library path. Failing this, this has been harmonized in Tomcat 9 to also load it from the "bin" folder in all cases (embedded like the testuite, standalone). >>> >>> (I use fish shell) >>> >>> $ set -x LD_LIBRARY_PATH /home/martin/git/apache/tomcat/output/build/lib >>> $ echo $LD_LIBRARY_PATH >>> /home/martin/git/apache/tomcat/output/build/lib >>> $ ant test-only-apr >>> >>> still fails with the same error >>> >>> This is with master branch, i.e. Tomcat 9.x. >>> I copied all binaries to ./bin folder too >>> cp output/build/lib/libtcnative-1.* output/build/bin/ >>> but still the tests fail :-/ >>> >>> Do you also have all the dependencies available, like APR and OpenSSL ? >> I see some confusion about APR above. >> > > I've installed libapr1-dev and ssllib-dev (or something similar, I'm out > now) as explained in the docu. > apr-1-config comes with libapr1-dev > Starting Tomcat itself loads the APR libraries fine if libtcnative-1* files are either in $CATALINA_HOME/bin or if they are in LD_LIBRARY_PATH. But if they are in $CATALINA_HOME/lib they are not found! Is there a need for a change in tomcat-native/native ? Because ./configure --with-apr=/usr/bin/apr-1-config \ --with-java-home=/home/jfclere/JAVA/jdk1.7.0_80/ \ --with-ssl=yes \ --prefix=$CATALINA_HOME (from https://tomcat.apache.org/native-doc/) puts them in $CATALINA_HOME/lib > >> Rémy >> >>
[Bug 64061] sendMessageBlock throws NPE and it results in IllegalStateException of TEXT_PARTIAL_WRITING
https://bz.apache.org/bugzilla/show_bug.cgi?id=64061 Mark Thomas changed: What|Removed |Added Status|NEW |NEEDINFO --- Comment #3 from Mark Thomas --- Please update to 9.0.30 and retest. There have been some fixes in this area. -- 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 64061] sendMessageBlock throws NPE and it results in IllegalStateException of TEXT_PARTIAL_WRITING
https://bz.apache.org/bugzilla/show_bug.cgi?id=64061 --- Comment #1 from ende...@gmail.com --- [intContainer#0-0-C-1] AbstractKafkaConsumer | Unknown exception during use case execution, discarding message. java.lang.NullPointerException: null at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:310) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:250) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendPartialString(WsRemoteEndpointImplBase.java:223) at org.apache.tomcat.websocket.WsRemoteEndpointBasic.sendText(WsRemoteEndpointBasic.java:49) at org.springframework.web.socket.adapter.standard.StandardWebSocketSession.sendTextMessage(StandardWebSocketSession.java:213) at org.springframework.web.socket.adapter.AbstractWebSocketSession.sendMessage(AbstractWebSocketSession.java:106) at org.springframework.web.socket.handler.ConcurrentWebSocketSessionDecorator.tryFlushMessageBuffer(ConcurrentWebSocketSessionDecorator.java:171) at org.springframework.web.socket.handler.ConcurrentWebSocketSessionDecorator.sendMessage(ConcurrentWebSocketSessionDecorator.java:144) at com.endevcy.core.interfaces.user.websocket.AbstractWebsocketTopic.send(AbstractWebsocketTopic.java:123) at com.endevcy.core.interfaces.user.websocket.AbstractWebsocketTopic.publish(AbstractWebsocketTopic.java:108) at com.endevcy.core.interfaces.user.websocket.WebsocketEventKafkaConsumer.handleMessage(WebsocketEventKafkaConsumer.java:45) at sun.reflect.GeneratedMethodAccessor169.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:171) at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:120) at org.springframework.kafka.listener.adapter.HandlerAdapter.invoke(HandlerAdapter.java:48) at org.springframework.kafka.listener.adapter.MessagingMessageListenerAdapter.invokeHandler(MessagingMessageListenerAdapter.java:283) at org.springframework.kafka.listener.adapter.RecordMessagingMessageListenerAdapter.onMessage(RecordMessagingMessageListenerAdapter.java:79) at org.springframework.kafka.listener.adapter.RecordMessagingMessageListenerAdapter.onMessage(RecordMessagingMessageListenerAdapter.java:50) at org.springframework.kafka.listener.adapter.RetryingMessageListenerAdapter.lambda$onMessage$0(RetryingMessageListenerAdapter.java:120) at org.springframework.retry.support.RetryTemplate.doExecute(RetryTemplate.java:287) at org.springframework.retry.support.RetryTemplate.execute(RetryTemplate.java:211) at org.springframework.kafka.listener.adapter.RetryingMessageListenerAdapter.onMessage(RetryingMessageListenerAdapter.java:114) at org.springframework.kafka.listener.adapter.RetryingMessageListenerAdapter.onMessage(RetryingMessageListenerAdapter.java:40) at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.doInvokeOnMessage(KafkaMessageListenerContainer.java:1275) at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.invokeOnMessage(KafkaMessageListenerContainer.java:1258) at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.doInvokeRecordListener(KafkaMessageListenerContainer.java:1219) at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.doInvokeWithRecords(KafkaMessageListenerContainer.java:1200) at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.invokeRecordListener(KafkaMessageListenerContainer.java:1120) at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.invokeListener(KafkaMessageListenerContainer.java:935) at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.pollAndInvoke(KafkaMessageListenerContainer.java:751) at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.run(KafkaMessageListenerContainer.java:700) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.lang.Thread.run(Thread.java:748) -- 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 64061] sendMessageBlock throws NPE and it results in IllegalStateException of TEXT_PARTIAL_WRITING
https://bz.apache.org/bugzilla/show_bug.cgi?id=64061 --- Comment #2 from ende...@gmail.com --- [intContainer#0-0-C-1] AbstractWebsocketTopic | Error sending to session [6af12758-99e4-6b95-5128-76c265e65d0a], removing session due to invalid state. java.lang.IllegalStateException: The remote endpoint was in state [TEXT_PARTIAL_WRITING] which is an invalid state for called method at org.apache.tomcat.websocket.WsRemoteEndpointImplBase$StateMachine.checkState(WsRemoteEndpointImplBase.java:1229) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase$StateMachine.textPartialStart(WsRemoteEndpointImplBase.java:1186) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendPartialString(WsRemoteEndpointImplBase.java:222) at org.apache.tomcat.websocket.WsRemoteEndpointBasic.sendText(WsRemoteEndpointBasic.java:49) at org.springframework.web.socket.adapter.standard.StandardWebSocketSession.sendTextMessage(StandardWebSocketSession.java:213) at org.springframework.web.socket.adapter.AbstractWebSocketSession.sendMessage(AbstractWebSocketSession.java:106) at org.springframework.web.socket.handler.ConcurrentWebSocketSessionDecorator.tryFlushMessageBuffer(ConcurrentWebSocketSessionDecorator.java:171) at org.springframework.web.socket.handler.ConcurrentWebSocketSessionDecorator.sendMessage(ConcurrentWebSocketSessionDecorator.java:144) at com.endevcy.core.interfaces.user.websocket.AbstractWebsocketTopic.send(AbstractWebsocketTopic.java:123) at com.endevcy.core.interfaces.user.websocket.AbstractWebsocketTopic.publish(AbstractWebsocketTopic.java:108) at com.endevcy.core.interfaces.user.websocket.WebsocketEventKafkaConsumer.handleMessage(WebsocketEventKafkaConsumer.java:45) at sun.reflect.GeneratedMethodAccessor169.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:171) at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:120) at org.springframework.kafka.listener.adapter.HandlerAdapter.invoke(HandlerAdapter.java:48) at org.springframework.kafka.listener.adapter.MessagingMessageListenerAdapter.invokeHandler(MessagingMessageListenerAdapter.java:283) at org.springframework.kafka.listener.adapter.RecordMessagingMessageListenerAdapter.onMessage(RecordMessagingMessageListenerAdapter.java:79) at org.springframework.kafka.listener.adapter.RecordMessagingMessageListenerAdapter.onMessage(RecordMessagingMessageListenerAdapter.java:50) at org.springframework.kafka.listener.adapter.RetryingMessageListenerAdapter.lambda$onMessage$0(RetryingMessageListenerAdapter.java:120) at org.springframework.retry.support.RetryTemplate.doExecute(RetryTemplate.java:287) at org.springframework.retry.support.RetryTemplate.execute(RetryTemplate.java:211) at org.springframework.kafka.listener.adapter.RetryingMessageListenerAdapter.onMessage(RetryingMessageListenerAdapter.java:114) at org.springframework.kafka.listener.adapter.RetryingMessageListenerAdapter.onMessage(RetryingMessageListenerAdapter.java:40) at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.doInvokeOnMessage(KafkaMessageListenerContainer.java:1275) at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.invokeOnMessage(KafkaMessageListenerContainer.java:1258) at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.doInvokeRecordListener(KafkaMessageListenerContainer.java:1219) at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.doInvokeWithRecords(KafkaMessageListenerContainer.java:1200) at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.invokeRecordListener(KafkaMessageListenerContainer.java:1120) at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.invokeListener(KafkaMessageListenerContainer.java:935) at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.pollAndInvoke(KafkaMessageListenerContainer.java:751) at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.run(KafkaMessageListenerContainer.java:700) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.lang.Thread.run(Thread.java:748) -- 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 64061] New: sendMessageBlock throws NPE and it results in IllegalStateException of TEXT_PARTIAL_WRITING
https://bz.apache.org/bugzilla/show_bug.cgi?id=64061 Bug ID: 64061 Summary: sendMessageBlock throws NPE and it results in IllegalStateException of TEXT_PARTIAL_WRITING Product: Tomcat 9 Version: 9.0.21 Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P2 Component: WebSocket Assignee: dev@tomcat.apache.org Reporter: ende...@gmail.com Target Milestone: - I implemented a backend server using SpringBoot and Tomcat. On the server, I used Kafka as a backend message stream and when the backend gets a new message from Kafka, it sends a message to a browser through Websocket protocol. Sometimes, calling sendMessageBlock throws an NPE. And right after that, the server also throws another IllegalState. I think this is because NPE caused inconsistent state (TEXT_PARTIAL_WRITING). To manage sessions' subscriptions and publish, I'm using synchronized(obj) method. -- 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 64056] JSP compiler not rendering spaces
https://bz.apache.org/bugzilla/show_bug.cgi?id=64056 Edoardo changed: What|Removed |Added OS||All CC||velt...@gmail.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