is this bug in tomcat 7 ?
hello all, mbean-descripator.xml in org.apache.catalina.tribes package is the same as mbean-descripator.xml in org.apache.catalina.ha package Anas _ More than messages–check out the rest of the Windows Live™. http://www.microsoft.com/windows/windowslive/
DO NOT REPLY [Bug 47024] New: org.apache.catalina.core.ContainerBase is not thread-safe
https://issues.apache.org/bugzilla/show_bug.cgi?id=47024 Summary: org.apache.catalina.core.ContainerBase is not thread-safe Product: Tomcat 6 Version: unspecified Platform: PC OS/Version: Windows XP Status: NEW Severity: normal Priority: P2 Component: Catalina AssignedTo: dev@tomcat.apache.org ReportedBy: s...@apache.org The variable threadDone is accessed from at least two threads, but is not volatile and access is not synchronised. There is no guarantee that the ContainerBackgroundProcessor thread will ever see threadDone == true. Making the variable volatile would fix this. At least two other variables are also accessed from the main and background threads and need protecting: - started - startChildren == org.apache.catalina.core.ContainerBase.fireContainerEvent accesses listeners.size() outside the synchronized (listeners) section. This is a bit dubious. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- 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: svn commit: r763298 - in /tomcat/trunk/java/org/apache/catalina: core/StandardContext.java core/StandardHost.java tribes/membership/Membership.java util/InstanceSupport.java util/LifecycleSuppor
On 12/04/2009, Filip Hanik - Dev Lists wrote: > sebb wrote: > > > On 10/04/2009, Mark Thomas wrote: > > > > > > > Filip Hanik - Dev Lists wrote: > > > > > > > > > > > > > I'm generally against this find bugs 'may be bugs' issues. > > > > > > > > > > > > is there an actual bug here? > > > > > > > > > Reported bug, no. Bugs uses could hit, yes. Hence why this is in trunk > > > and not being proposed for backport. > > > > > > Are all the syncs necessary? I haven't looked in detail but I suspect > > > that right now, that most of them are not. As we increase JMX > > > functionality and have more dynamic configuration then we'll almost > > > certainly need them so I don't see the harm in getting this right now. > > > > > > > > > > I've no idea why this is related to JMX. > > > > Synchronization is not only about preventing lost updates, it is also > > about ensuring proper publication. > > > > If thread A writes to a non-volatile variable, thread B is only > > guaranteed to see the latest copy of the variable if both thread A and > > thread B use synchronization on the *same* variable. > > > > Without synch., thread B may never see the updated variable. Indeed it > > may see an updated reference but an incomplete object. > > > > Most of the time, a synchronized setter/unsynchronized getter will > > work just fine. > > However, this does not mean that it will always work. > > > > > We *all* understand what the tool is reporting. However, the tool is not > looking at the entire picture, hence thinking the tool is right on > everything, is simple meaningless. Of course the tool can generate false positives. However, it does find a lot of bugs, so each report is worth investigating. So let's look at the case of StandardContext. If the class instances are never shared between threads, then the existing synch. is not needed and should be removed. If the class instances are shared between threads, then the class needs to be thread-safe, and any existing synch. needs to be effective. This was not the case with the methods that changed lock objects. Even after fixing the lock object problems, the class on its own is not thread-safe, however there is no Javadoc to document what locks callers need to obtain to ensure thread-safety. Some of the getXXX methods in the existing class used synch. and some did not. Assuming that the class needs to be thread-safe, then at some point synch. will need to be done to ensure proper publication. The existing synch. regime is at best fragile, and any external requirements should at least be documented. > Filip > > > > > > > > > > Mark > > > > > > > > > > > > > > Filip > > > > > > > > ma...@apache.org wrote: > > > >> Author: markt > > > >> Date: Wed Apr 8 16:08:42 2009 > > > >> New Revision: 763298 > > > >> > > > >> URL: > http://svn.apache.org/viewvc?rev=763298&view=rev > > > >> Log: > > > >> Fix > https://issues.apache.org/bugzilla/show_bug.cgi?id=46990 > > > >> Various sync issues. > > > >> > > > >> Modified: > > > >> > tomcat/trunk/java/org/apache/catalina/core/StandardContext.java > > > >> > tomcat/trunk/java/org/apache/catalina/core/StandardHost.java > > > >> > > > >> > tomcat/trunk/java/org/apache/catalina/tribes/membership/Membership.java > > > >> > tomcat/trunk/java/org/apache/catalina/util/InstanceSupport.java > > > >> > tomcat/trunk/java/org/apache/catalina/util/LifecycleSupport.java > > > >> > > > >> Modified: > tomcat/trunk/java/org/apache/catalina/core/StandardContext.java > > > >> URL: > > > >> > http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardContext.java?rev=763298&r1=763297&r2=763298&view=diff > > > >> > > > >> > == > > > >> > > > >> --- > tomcat/trunk/java/org/apache/catalina/core/StandardContext.java > > > >> (original) > > > >> +++ > tomcat/trunk/java/org/apache/catalina/core/StandardContext.java > > > >> Wed Apr 8 16:08:42 2009 > > > >> @@ -201,6 +201,8 @@ > > > >> * application, in the order they were encountered in the > web.xml > > > >> file. > > > >> */ > > > >> private String applicationListeners[] = new String[0]; > > > >> ++private final Object applicationListenersLock = new > Object(); > > > >> > > > >> > > > >> /** > > > >> @@ -223,6 +225,8 @@ > > > >> private ApplicationParameter applicationParameters[] = > > > >> new ApplicationParameter[0]; > > > >> > > > >> +private final Object applicationParametersLock = new Object(); > > > >> + > > > >> /** > > > >> * The application available flag for this Context. > > > >> @@ -263,6 +267,8 @@ > > > >> * The security constraints for this web application. > > > >> */ > > > >> private SecurityConstraint constraints[] = new > > > >> SecurityConstraint[0]; > > > >> ++private final Object constraintsLock = new Object(); > > > >> > > > >> > > > >> /*
svn commit: r764741 - /tomcat/trunk/java/org/apache/catalina/ha/backend/TcpSender.java
Author: jfclere Date: Tue Apr 14 11:18:54 2009 New Revision: 764741 URL: http://svn.apache.org/viewvc?rev=764741&view=rev Log: Oops it will loop without that... Modified: tomcat/trunk/java/org/apache/catalina/ha/backend/TcpSender.java Modified: tomcat/trunk/java/org/apache/catalina/ha/backend/TcpSender.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/backend/TcpSender.java?rev=764741&r1=764740&r2=764741&view=diff == --- tomcat/trunk/java/org/apache/catalina/ha/backend/TcpSender.java (original) +++ tomcat/trunk/java/org/apache/catalina/ha/backend/TcpSender.java Tue Apr 14 11:18:54 2009 @@ -145,6 +145,7 @@ if ("content-length".equalsIgnoreCase(headerName)) { contentLength = Integer.parseInt(headerValue); } +header = connectionReaders[i].readLine(); } if (contentLength > 0) { char[] buf = new char[512]; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: is this bug in tomcat 7 ?
it's work to be done :) Anas Ahmed wrote: hello all, mbean-descripator.xml in org.apache.catalina.tribes package is the same as mbean-descripator.xml in org.apache.catalina.ha package Anas _ More than messages–check out the rest of the Windows Live™. http://www.microsoft.com/windows/windowslive/ - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r763298 - in /tomcat/trunk/java/org/apache/catalina: core/StandardContext.java core/StandardHost.java tribes/membership/Membership.java util/InstanceSupport.java util/LifecycleSuppor
sebb wrote: On 12/04/2009, Filip Hanik - Dev Lists wrote: sebb wrote: On 10/04/2009, Mark Thomas wrote: Filip Hanik - Dev Lists wrote: I'm generally against this find bugs 'may be bugs' issues. > is there an actual bug here? Reported bug, no. Bugs uses could hit, yes. Hence why this is in trunk and not being proposed for backport. Are all the syncs necessary? I haven't looked in detail but I suspect that right now, that most of them are not. As we increase JMX functionality and have more dynamic configuration then we'll almost certainly need them so I don't see the harm in getting this right now. I've no idea why this is related to JMX. Synchronization is not only about preventing lost updates, it is also about ensuring proper publication. If thread A writes to a non-volatile variable, thread B is only guaranteed to see the latest copy of the variable if both thread A and thread B use synchronization on the *same* variable. Without synch., thread B may never see the updated variable. Indeed it may see an updated reference but an incomplete object. Most of the time, a synchronized setter/unsynchronized getter will work just fine. However, this does not mean that it will always work. We *all* understand what the tool is reporting. However, the tool is not looking at the entire picture, hence thinking the tool is right on everything, is simple meaningless. Of course the tool can generate false positives. However, it does find a lot of bugs, so each report is worth investigating. So let's look at the case of StandardContext. If the class instances are never shared between threads, then the existing synch. is not needed and should be removed. If the class instances are shared between threads, then the class needs to be thread-safe, and any existing synch. needs to be effective. This was not the case with the methods that changed lock objects. this is just theorizing. Taken straight out of a book. If you were programming based on that, then every single object would be synchronized. However, understanding what the code actually does, and then realizing that some stuff even though it looks non thread safe, will never be an issue. That is Tomcat for you. It's not pretty, but it works. And we wont be making it pretty for vanity sake. Even after fixing the lock object problems, the class on its own is not thread-safe, however there is no Javadoc to document what locks callers need to obtain to ensure thread-safety. Some of the getXXX methods in the existing class used synch. and some did not. Assuming that the class needs to be thread-safe, then at some point synch. will need to be done to ensure proper publication. The existing synch. regime is at best fragile, and any external requirements should at least be documented. To us, the code is the documentation. Filip Mark > > Filip > > ma...@apache.org wrote: >> Author: markt >> Date: Wed Apr 8 16:08:42 2009 >> New Revision: 763298 >> >> URL: http://svn.apache.org/viewvc?rev=763298&view=rev >> Log: >> Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=46990 >> Various sync issues. >> >> Modified: >> tomcat/trunk/java/org/apache/catalina/core/StandardContext.java >> tomcat/trunk/java/org/apache/catalina/core/StandardHost.java >> >> tomcat/trunk/java/org/apache/catalina/tribes/membership/Membership.java >> tomcat/trunk/java/org/apache/catalina/util/InstanceSupport.java >> tomcat/trunk/java/org/apache/catalina/util/LifecycleSupport.java >> >> Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContext.java >> URL: >> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardContext.java?rev=763298&r1=763297&r2=763298&view=diff >> >> == >> >> --- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java >> (original) >> +++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java >> Wed Apr 8 16:08:42 2009 >> @@ -201,6 +201,8 @@ >> * application, in the order they were encountered in the web.xml >> file. >> */ >> private String applicationListeners[] = new String[0]; >> ++private final Object applicationListenersLock = new Object(); >> >> >> /** >> @@ -223,6 +225,8 @@ >> private ApplicationParameter applicationParameters[] = >> new ApplicationParameter[0]; >> >> +private final Object applicationParametersLock = new Object(); >> + >> /** >> * The application available flag for this Context. >> @@ -263,6 +267,8 @@ >> * The security constraints for this web application. >> */
svn commit: r764884 - /tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java
Author: markt Date: Tue Apr 14 17:13:16 2009 New Revision: 764884 URL: http://svn.apache.org/viewvc?rev=764884&view=rev Log: Add a TODO to review the synchronisation around background processing Modified: tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java Modified: tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java?rev=764884&r1=764883&r2=764884&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java Tue Apr 14 17:13:16 2009 @@ -115,7 +115,9 @@ * * Subclasses that fire additional events should document them in the * class comments of the implementation class. - * + * + * TODO: Review synchronisation around background processing. See bug 47024. + * * @author Craig R. McClanahan */ - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 47024] org.apache.catalina.core.ContainerBase is not thread-safe
https://issues.apache.org/bugzilla/show_bug.cgi?id=47024 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution||WONTFIX --- Comment #1 from Mark Thomas 2009-04-14 10:15:02 PST --- This isn't causing any real world bugs and due to the nature of the background thread any issue is unlikely. That said, it wouldn't hurt to spend a little time looking at this. I have therefore added to TODO to trunk. Given there is no immediate need for code changes in TC6, I am marking this as WONTFIX. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r764898 - in /tomcat/trunk/java/org/apache/catalina/core: ApplicationDispatcher.java ApplicationHttpRequest.java DummyRequest.java DummyResponse.java NamingContextListener.java StandardWra
Author: markt Date: Tue Apr 14 17:46:23 2009 New Revision: 764898 URL: http://svn.apache.org/viewvc?rev=764898&view=rev Log: Code clean up prompted by Eclipse: - mark unused parameters as unused - remove code that doesn't do anything Modified: tomcat/trunk/java/org/apache/catalina/core/ApplicationDispatcher.java tomcat/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java tomcat/trunk/java/org/apache/catalina/core/DummyRequest.java tomcat/trunk/java/org/apache/catalina/core/DummyResponse.java tomcat/trunk/java/org/apache/catalina/core/NamingContextListener.java tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java tomcat/trunk/java/org/apache/catalina/core/StandardWrapperValve.java Modified: tomcat/trunk/java/org/apache/catalina/core/ApplicationDispatcher.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ApplicationDispatcher.java?rev=764898&r1=764897&r2=764898&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/ApplicationDispatcher.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/ApplicationDispatcher.java Tue Apr 14 17:46:23 2009 @@ -620,7 +620,6 @@ wrapper.getLogger().error(sm.getString("applicationDispatcher.allocateException", wrapper.getName()), StandardWrapper.getRootCause(e)); servletException = e; -servlet = null; } catch (Throwable e) { wrapper.getLogger().error(sm.getString("applicationDispatcher.allocateException", wrapper.getName()), e); Modified: tomcat/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java?rev=764898&r1=764897&r2=764898&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java Tue Apr 14 17:46:23 2009 @@ -570,7 +570,7 @@ try { session = manager.findSession(requestedSessionId); } catch (IOException e) { -session = null; +// Ignore } if ((session != null) && session.isValid()) { return (true); @@ -819,9 +819,9 @@ ArrayList results = new ArrayList(); -if (values1 == null) -; -else if (values1 instanceof String) +if (values1 == null) { +// Skip - nothing to merge +} else if (values1 instanceof String) results.add(values1); else if (values1 instanceof String[]) { String values[] = (String[]) values1; @@ -830,9 +830,9 @@ } else results.add(values1.toString()); -if (values2 == null) -; -else if (values2 instanceof String) +if (values2 == null) { +// Skip - nothing to merge +} else if (values2 instanceof String) results.add(values2); else if (values2 instanceof String[]) { String values[] = (String[]) values2; Modified: tomcat/trunk/java/org/apache/catalina/core/DummyRequest.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/DummyRequest.java?rev=764898&r1=764897&r2=764898&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/DummyRequest.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/DummyRequest.java Tue Apr 14 17:46:23 2009 @@ -163,41 +163,45 @@ } public String getAuthorization() { return null; } -public void setAuthorization(String authorization) {} +public void setAuthorization( +@SuppressWarnings("unused") String authorization) {} public Connector getConnector() { return null; } -public void setConnector(Connector connector) {} +public void setConnector(@SuppressWarnings("unused") Connector connector) {} public Context getContext() { return null; } -public void setContext(Context context) {} +public void setContext(@SuppressWarnings("unused") Context context) {} public Host getHost() { return null; } -public void setHost(Host host) {} +public void setHost(@SuppressWarnings("unused") Host host) {} public String getInfo() { return null; } public Response getResponse() { return null; } -public void setResponse(Response response) {} +public void setResponse(@SuppressWarnings("unused") Response response) {} public Socket getSocket() { return null; } -public void setSocket(Socket socket) {} +public void setSocket(@SuppressWarnings("unused") Socket socket) {} public InputStream getStream() { return null; } -
DO NOT REPLY [Bug 47032] New: /status/all fails if using PersistentManager
https://issues.apache.org/bugzilla/show_bug.cgi?id=47032 Summary: /status/all fails if using PersistentManager Product: Tomcat 5 Version: 5.5.23 Platform: PC OS/Version: Windows XP Status: NEW Severity: normal Priority: P2 Component: Webapps:Manager AssignedTo: dev@tomcat.apache.org ReportedBy: olivier.du...@pwgsc.gc.ca Hello, This bug is in Tomcat 5.5.23. We got it once we modified a context.xml of our application to disable session persistence. In META-INF/context.xml for our application we have added and tested as OK But as a consequence, in the application manager, when I click on the "complete server status" link I get the error below. I have been unable to test the problem with the latest 5.5 release. This bug seems related 46816 raised and fixed for Tomcat 6. https://issues.apache.org/bugzilla/show_bug.cgi?id=46816 I want to have access to the full status to get some details about the created sessions and the usage of my application. Thanks Olivier HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Cannot find attribute sessionMaxAliveTime org.apache.catalina.manager.StatusManagerServlet.doGet(StatusManagerServlet.java:306) javax.servlet.http.HttpServlet.service(HttpServlet.java:690) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) root cause javax.management.AttributeNotFoundException: Cannot find attribute sessionMaxAliveTime org.apache.commons.modeler.BaseModelMBean.getAttribute(BaseModelMBean.java:259) com.sun.jmx.mbeanserver.DynamicMetaDataImpl.getAttribute(Unknown Source) com.sun.jmx.mbeanserver.MetaDataImpl.getAttribute(Unknown Source) com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(Unknown Source) com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(Unknown Source) org.apache.catalina.manager.StatusTransformer.writeManager(StatusTransformer.java:723) org.apache.catalina.manager.StatusTransformer.writeContext(StatusTransformer.java:675) org.apache.catalina.manager.StatusTransformer.writeDetailedState(StatusTransformer.java:600) org.apache.catalina.manager.StatusManagerServlet.doGet(StatusManagerServlet.java:301) javax.servlet.http.HttpServlet.service(HttpServlet.java:690) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) note The full stack trace of the root cause is available in the Apache Tomcat/5.5.23 logs. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- 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
DO NOT REPLY [Bug 46816] /status/all fails if using PersistentManager
https://issues.apache.org/bugzilla/show_bug.cgi?id=46816 --- Comment #3 from olivier dupuy 2009-04-14 12:14:41 PST --- See the apparently related bug 47032 on Tomcat 5.5.23 https://issues.apache.org/bugzilla/show_bug.cgi?id=47032 -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- 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
DO NOT REPLY [Bug 47017] org.apache.catalina.core.ApplicationHttpRequest causes StackOverflowError
https://issues.apache.org/bugzilla/show_bug.cgi?id=47017 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution||INVALID --- Comment #2 from Mark Thomas 2009-04-14 12:17:00 PST --- Both issues above have the same root cause. Something somewhere called setRequest() on the wrapped request and passed in the same wrapped request setting up the infinite loop. I've double checked the Tomcat code and it doesn't do this so it looks like either an application issue or a framework issue. I'd like to throw an IAE if an app does this but unfortunately, the spec doesn't allow it. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- 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
DO NOT REPLY [Bug 37929] invalidated session causes pageContext methods to fail
https://issues.apache.org/bugzilla/show_bug.cgi?id=37929 Pavel Sher changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED | --- Comment #6 from Pavel Sher 2009-04-14 13:44:15 PST --- It seems the problem still exists in the Tomcat 6.0.18. Moreover, I took a look at the PageContextImpl.java class and I do not see there any fixes related to this bug. I browsed svn repository and it looks like this commit has reverted the fix: http://svn.apache.org/viewvc/tomcat/jasper/tc6.0.x/src/share/org/apache/jasper/runtime/PageContextImpl.java?view=log Is it supposed to be so? Or fix was reverted by mistake? -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- 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: svn commit: r764884 - /tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java
On Tue, 2009-04-14 at 17:13 +, ma...@apache.org wrote: > Author: markt > Date: Tue Apr 14 17:13:16 2009 > New Revision: 764884 > > URL: http://svn.apache.org/viewvc?rev=764884&view=rev > Log: > Add a TODO to review the synchronisation around background processing Ok, so I get two more email messages about this "issue". Please don't use Tomcat's source as a notebook for nonsense, thanks, it is already in BZ. Rémy - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 47013] JSP not compiled at startup when used as a servlet
https://issues.apache.org/bugzilla/show_bug.cgi?id=47013 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution||DUPLICATE --- Comment #1 from Mark Thomas 2009-04-14 14:58:08 PST --- I don;t see this with trunk. Looks to be a duplicate of bug 41606 that was fixed recently. *** This bug has been marked as a duplicate of bug 41606 *** -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- 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
DO NOT REPLY [Bug 41606] The jspInit method is called twice.
https://issues.apache.org/bugzilla/show_bug.cgi?id=41606 Mark Thomas changed: What|Removed |Added CC||robert.flahe...@oracle.com --- Comment #4 from Mark Thomas 2009-04-14 14:58:08 PST --- *** Bug 47013 has been marked as a duplicate of this bug. *** -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- 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
DO NOT REPLY [Bug 47013] JSP not compiled at startup when used as a servlet
https://issues.apache.org/bugzilla/show_bug.cgi?id=47013 --- Comment #2 from Robert Flaherty 2009-04-14 15:07:53 PST --- Shouldn't that precompile flag be changed though (bottom of the note). -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r764985 - in /tomcat/trunk/java/org/apache/catalina/core: Constants.java StandardWrapper.java
Author: markt Date: Tue Apr 14 22:16:53 2009 New Revision: 764985 URL: http://svn.apache.org/viewvc?rev=764985&view=rev Log: Fix secondary issue reported as part of bug47013 Modified: tomcat/trunk/java/org/apache/catalina/core/Constants.java tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java Modified: tomcat/trunk/java/org/apache/catalina/core/Constants.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/Constants.java?rev=764985&r1=764984&r2=764985&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/Constants.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/Constants.java Tue Apr 14 22:16:53 2009 @@ -28,5 +28,8 @@ public static final String JSP_SERVLET_CLASS = "org.apache.jasper.servlet.JspServlet"; public static final String JSP_SERVLET_NAME = "jsp"; +public static final String PRECOMPILE = +System.getProperty("org.apache.jasper.Constants.PRECOMPILE", +"jsp_precompile"); } Modified: tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java?rev=764985&r1=764984&r2=764985&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java Tue Apr 14 22:16:53 2009 @@ -1070,7 +1070,8 @@ // Invoking jspInit DummyRequest req = new DummyRequest(); req.setServletPath(jspFile); -req.setQueryString("jsp_precompile=true"); +req.setQueryString(Constants.PRECOMPILE + +"jsp_precompile=true"); DummyResponse res = new DummyResponse(); if( Globals.IS_SECURITY_ENABLED) { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r764987 - /tomcat/tc6.0.x/trunk/STATUS.txt
Author: markt Date: Tue Apr 14 22:18:42 2009 New Revision: 764987 URL: http://svn.apache.org/viewvc?rev=764987&view=rev Log: Propose fix for 47013 Modified: tomcat/tc6.0.x/trunk/STATUS.txt Modified: tomcat/tc6.0.x/trunk/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=764987&r1=764986&r2=764987&view=diff == --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Apr 14 22:18:42 2009 @@ -252,3 +252,9 @@ http://svn.apache.org/viewvc?rev=763717&view=rev +1: markt -1: + +* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=47013 + Use system property rather than hard code default + http://svn.apache.org/viewvc?rev=764985&view=rev + +1: markt + -1: - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 47013] JSP not compiled at startup when used as a servlet
https://issues.apache.org/bugzilla/show_bug.cgi?id=47013 Mark Thomas changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|DUPLICATE | --- Comment #3 from Mark Thomas 2009-04-14 15:19:01 PST --- Re-opening to track the secondary issue. It has been fixed in trunk and proposed for 6.0.x. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- 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
DO NOT REPLY [Bug 46950] SSL renegotiation does not occur when resource with CLIENT-CERT auth is requested
https://issues.apache.org/bugzilla/show_bug.cgi?id=46950 Mark Thomas changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution||WORKSFORME --- Comment #3 from Mark Thomas 2009-04-14 16:15:31 PST --- The following configuration works for me. At a guess, you haven't configured Tomcat to trust the issuer of your client certificate. The browser only prompts you to select a cert if it has one that the server will trust. Please use the users list if you need further help configuring your SSL certs. Bug46950 /bug46381.jsp manager Everything /* CONFIDENTIAL CLIENT-CERT -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- 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: svn commit: r764985 - in /tomcat/trunk/java/org/apache/catalina/core: Constants.java StandardWrapper.java
On 14/04/2009, ma...@apache.org wrote: > Author: markt > Date: Tue Apr 14 22:16:53 2009 > New Revision: 764985 > > URL: http://svn.apache.org/viewvc?rev=764985&view=rev > Log: > Fix secondary issue reported as part of bug47013 Which says: req.setQueryString(Constants.PRECOMPILE + "=true"); > Modified: > tomcat/trunk/java/org/apache/catalina/core/Constants.java > tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java > > Modified: tomcat/trunk/java/org/apache/catalina/core/Constants.java > URL: > http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/Constants.java?rev=764985&r1=764984&r2=764985&view=diff > > == > --- tomcat/trunk/java/org/apache/catalina/core/Constants.java (original) > +++ tomcat/trunk/java/org/apache/catalina/core/Constants.java Tue Apr 14 > 22:16:53 2009 > @@ -28,5 +28,8 @@ > public static final String JSP_SERVLET_CLASS = > "org.apache.jasper.servlet.JspServlet"; > public static final String JSP_SERVLET_NAME = "jsp"; > +public static final String PRECOMPILE = > +System.getProperty("org.apache.jasper.Constants.PRECOMPILE", > +"jsp_precompile"); > > } > > Modified: tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java > URL: > http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java?rev=764985&r1=764984&r2=764985&view=diff > > == > --- tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java > (original) > +++ tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java Tue Apr > 14 22:16:53 2009 > @@ -1070,7 +1070,8 @@ > // Invoking jspInit > DummyRequest req = new DummyRequest(); > req.setServletPath(jspFile); > -req.setQueryString("jsp_precompile=true"); > +req.setQueryString(Constants.PRECOMPILE + > +"jsp_precompile=true"); Looks like that last line should be: "=true"); since Constants.PRECOMPILE="jsp_precompile" (as a default) But I could be wrong ... > DummyResponse res = new DummyResponse(); > > if( Globals.IS_SECURITY_ENABLED) { > > > > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > > - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r764985 - in /tomcat/trunk/java/org/apache/catalina/core: Constants.java StandardWrapper.java
sebb wrote: > On 14/04/2009, ma...@apache.org wrote: >> Author: markt >> Date: Tue Apr 14 22:16:53 2009 >> New Revision: 764985 >> >> URL: http://svn.apache.org/viewvc?rev=764985&view=rev >> Log: >> Fix secondary issue reported as part of bug47013 > > Which says: > > req.setQueryString(Constants.PRECOMPILE + "=true"); Cheers - bad copy and paste. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r764997 - /tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java
Author: markt Date: Tue Apr 14 23:19:06 2009 New Revision: 764997 URL: http://svn.apache.org/viewvc?rev=764997&view=rev Log: Fix stupid error Modified: tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java Modified: tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java?rev=764997&r1=764996&r2=764997&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java Tue Apr 14 23:19:06 2009 @@ -1070,8 +1070,7 @@ // Invoking jspInit DummyRequest req = new DummyRequest(); req.setServletPath(jspFile); -req.setQueryString(Constants.PRECOMPILE + -"jsp_precompile=true"); +req.setQueryString(Constants.PRECOMPILE + "=true"); DummyResponse res = new DummyResponse(); if( Globals.IS_SECURITY_ENABLED) { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r764998 - /tomcat/tc6.0.x/trunk/STATUS.txt
Author: markt Date: Tue Apr 14 23:20:15 2009 New Revision: 764998 URL: http://svn.apache.org/viewvc?rev=764998&view=rev Log: Add correction Modified: tomcat/tc6.0.x/trunk/STATUS.txt Modified: tomcat/tc6.0.x/trunk/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=764998&r1=764997&r2=764998&view=diff == --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Apr 14 23:20:15 2009 @@ -256,5 +256,6 @@ * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=47013 Use system property rather than hard code default http://svn.apache.org/viewvc?rev=764985&view=rev + http://svn.apache.org/viewvc?rev=764997&view=rev +1: markt -1: - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 37929] invalidated session causes pageContext methods to fail
https://issues.apache.org/bugzilla/show_bug.cgi?id=37929 Mark Thomas changed: What|Removed |Added Component|Jasper |Jasper Version|5.0.25 |6.0.18 Product|Tomcat 5|Tomcat 6 Target Milestone|--- |default --- Comment #7 from Mark Thomas 2009-04-14 16:24:42 PST --- Moving to Tomcat 6 -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r765051 - in /tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool: ./ interceptor/ jmx/
Author: fhanik Date: Wed Apr 15 04:58:06 2009 New Revision: 765051 URL: http://svn.apache.org/viewvc?rev=765051&view=rev Log: JMX needs to be handled a bit differently. Random object names are not all that great. In this way, one can control the JMX registration completely from the outside. Modified: tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSource.java tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReportJmx.java tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPool.java tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPoolMBean.java tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/mbeans-descriptors.xml Modified: tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java?rev=765051&r1=765050&r2=765051&view=diff == --- tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java (original) +++ tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java Wed Apr 15 04:58:06 2009 @@ -779,17 +779,18 @@ protected void finalize(PooledConnection con) { } + +public org.apache.tomcat.jdbc.pool.jmx.ConnectionPool getJmxPool() { +return jmxPool; +} protected void startJmx() { try { -MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); -ObjectName name = new ObjectName(POOL_JMX_TYPE_PREFIX+"ConnectionPool,name="+getName()); if ("1.5".equals(System.getProperty("java.specification.version"))) { jmxPool = new org.apache.tomcat.jdbc.pool.jmx.ConnectionPool(this); } else { jmxPool = new org.apache.tomcat.jdbc.pool.jmx.ConnectionPool(this,true); } -mbs.registerMBean(jmxPool, name); } catch (Exception x) { log.warn("Unable to start JMX integration for connection pool. Instance["+getName()+"] can't be monitored.",x); } @@ -797,10 +798,6 @@ protected void stopJmx() { try { -MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); -ObjectName name = new ObjectName(POOL_JMX_TYPE_PREFIX+"ConnectionPool,name="+getName()); -if (mbs.isRegistered(name)) -mbs.unregisterMBean(name); jmxPool = null; }catch (Exception x) { log.warn("Unable to stop JMX integration for connection pool. Instance["+getName()+"].",x); Modified: tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSource.java URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSource.java?rev=765051&r1=765050&r2=765051&view=diff == --- tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSource.java (original) +++ tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSource.java Wed Apr 15 04:58:06 2009 @@ -16,9 +16,19 @@ */ package org.apache.tomcat.jdbc.pool; +import java.lang.management.ManagementFactory; import java.sql.SQLException; +import java.util.Hashtable; import java.util.Properties; +import javax.management.InstanceNotFoundException; +import javax.management.MBeanRegistration; +import javax.management.MBeanServer; +import javax.management.MalformedObjectNameException; +import javax.management.ObjectName; + +import org.apache.tomcat.jdbc.pool.jmx.ConnectionPoolMBean; + /** * A DataSource that can be instantiated through IoC and implements the DataSource interface @@ -26,7 +36,7 @@ * @author Filip Hanik * @version 1.0 */ -public class DataSource extends DataSourceProxy implements javax.sql.DataSource, org.apache.tomcat.jdbc.pool.jmx.ConnectionPoolMBean { +public class DataSource extends DataSourceProxy implements MBeanRegistration,javax.sql.DataSource, org.apache.tomcat.jdbc.pool.jmx.ConnectionPoolMBean { public DataSource() { super(); @@ -37,6 +47,63 @@ } //=== +// Register the actual pool itself under the tomcat.jdbc domain +//=== +protected volatile ObjectName oname = null; +public void postDeregister() { +if (oname!=null) unregisterJmx(); +} + +public void postRegister(Boolean registrationDone) { +} + + +public void preDeregister() throws
svn commit: r765054 - in /tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool: ConnectionPool.java FairBlockingQueue.java PoolProperties.java jmx/ConnectionPool.java
Author: fhanik Date: Wed Apr 15 05:44:43 2009 New Revision: 765054 URL: http://svn.apache.org/viewvc?rev=765054&view=rev Log: When using the fair queue, use a much more efficient idle connection handling by using a FILO queue so that connections are reused properly Modified: tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/FairBlockingQueue.java tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PoolProperties.java tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPool.java Modified: tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java?rev=765054&r1=765053&r2=765054&view=diff == --- tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java (original) +++ tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java Wed Apr 15 05:44:43 2009 @@ -630,7 +630,7 @@ con.validate(PooledConnection.VALIDATE_RETURN)) { con.setStackTrace(null); con.setTimestamp(System.currentTimeMillis()); -if ((idle.size()>=poolProperties.getMaxIdle()) || (!idle.offer(con))) { +if (((idle.size()>=poolProperties.getMaxIdle()) && !poolProperties.isPoolSweeperEnabled()) || (!idle.offer(con))) { if (log.isDebugEnabled()) { log.debug("Connection ["+con+"] will be closed and not returned to the pool, idle["+idle.size()+"]>=maxIdle["+poolProperties.getMaxIdle()+"] idle.offer failed."); } @@ -920,7 +920,7 @@ try { if (pool.getPoolProperties().isRemoveAbandoned()) pool.checkAbandoned(); -if (pool.getPoolProperties().getMaxIdle()http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/FairBlockingQueue.java?rev=765054&r1=765053&r2=765054&view=diff == --- tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/FairBlockingQueue.java (original) +++ tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/FairBlockingQueue.java Wed Apr 15 05:44:43 2009 @@ -63,7 +63,7 @@ c = waiters.poll(); c.setItem(e); } else { -items.add(e); +items.addFirst(e); } } finally { lock.unlock(); Modified: tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PoolProperties.java URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PoolProperties.java?rev=765054&r1=765053&r2=765054&view=diff == --- tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PoolProperties.java (original) +++ tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PoolProperties.java Wed Apr 15 05:44:43 2009 @@ -45,7 +45,7 @@ protected String connectionProperties; protected int initialSize = 10; protected int maxActive = 100; -protected int maxIdle = maxActive; +protected int maxIdle = Integer.MAX_VALUE; protected int minIdle = initialSize; protected int maxWait = 3; protected String validationQuery; Modified: tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPool.java URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPool.java?rev=765054&r1=765053&r2=765054&view=diff == --- tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPool.java (original) +++ tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPool.java Wed Apr 15 05:44:43 2009 @@ -154,7 +154,7 @@ } public int getNumActive() { -return getNumActive(); +return getActive(); } //= - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org