svn commit: r1498338 - /tomcat/trunk/java/javax/el/BeanNameResolver.java
Author: markt Date: Mon Jul 1 09:37:13 2013 New Revision: 1498338 URL: http://svn.apache.org/r1498338 Log: EL 3.0 New abstract class Added: tomcat/trunk/java/javax/el/BeanNameResolver.java (with props) Added: tomcat/trunk/java/javax/el/BeanNameResolver.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/el/BeanNameResolver.java?rev=1498338&view=auto == --- tomcat/trunk/java/javax/el/BeanNameResolver.java (added) +++ tomcat/trunk/java/javax/el/BeanNameResolver.java Mon Jul 1 09:37:13 2013 @@ -0,0 +1,67 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package javax.el; + +/** + * Base implementation that provides a minimal default implementation that is + * intended to be extended by application developers. + */ +public abstract class BeanNameResolver { + +/** + * Can this resolver resolve the given bean name? + */ +public boolean isNameResolved(@SuppressWarnings("unused") String beanName) { +return false; +} + + +/** + * Returns the named bean. + */ +public Object getBean(@SuppressWarnings("unused") String beanName) { +return null; +} + + +/** + * Sets a value of a bean of the given name. If the named bean does not + * exist and {@link #canCreateBean} returns true then a bean + * is created with the given value. + */ +public void setBeanValue(@SuppressWarnings("unused") String beanName, +@SuppressWarnings("unused") Object value) +throws PropertyNotWritableException{ +throw new PropertyNotWritableException(); +} + + +/** + * Is the named bean read-only? + */ +public boolean isReadOnly(@SuppressWarnings("unused") String beanName) { +return true; +} + + +/** + * Is it permitted to create a bean of the given name? + */ +public boolean canCreateBean(@SuppressWarnings("unused") String beanName) { +return false; +} +} Propchange: tomcat/trunk/java/javax/el/BeanNameResolver.java -- svn:eol-style = native - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Tagging 7.0.42
It is the start of another month so I'll be tagging 7.0.42 soon. Before I do, I plan to: - resolve any open bugs against 7.0.x (unless they are NEEDINFO) - review the recent enhancement requests that have patches - run the unit tests - run the TCKs I imagine I'll be tagging sometime tomorrow assuming I don't stumble across any issues. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1498340 - in /tomcat/trunk: java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java java/org/apache/catalina/mbeans/LocalStrings.properties webapps/docs/config/listeners.xml
Author: markt Date: Mon Jul 1 09:50:38 2013 New Revision: 1498340 URL: http://svn.apache.org/r1498340 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55017 Add the ability to configure the RMO bind address when using the JXM remote listener. Patch provided by Alexey Noskov. Modified: tomcat/trunk/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java tomcat/trunk/java/org/apache/catalina/mbeans/LocalStrings.properties tomcat/trunk/webapps/docs/config/listeners.xml Modified: tomcat/trunk/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java?rev=1498340&r1=1498339&r2=1498340&view=diff == --- tomcat/trunk/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java (original) +++ tomcat/trunk/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java Mon Jul 1 09:50:38 2013 @@ -20,8 +20,11 @@ package org.apache.catalina.mbeans; import java.io.IOException; import java.io.Serializable; import java.lang.management.ManagementFactory; +import java.net.InetAddress; import java.net.MalformedURLException; +import java.net.ServerSocket; import java.net.Socket; +import java.net.UnknownHostException; import java.rmi.RemoteException; import java.rmi.registry.LocateRegistry; import java.rmi.server.RMIClientSocketFactory; @@ -61,6 +64,7 @@ public class JmxRemoteLifecycleListener protected static final StringManager sm = StringManager.getManager(Constants.Package); +protected String rmiBindAddress = null; protected int rmiRegistryPortPlatform = -1; protected int rmiServerPortPlatform = -1; protected boolean rmiSSL = true; @@ -76,6 +80,22 @@ public class JmxRemoteLifecycleListener protected JMXConnectorServer csPlatform = null; /** + * Get the inet address on which the Platform RMI server is exported. + * @return The textual representation of inet address + */ +public String getRmiBindAddress() { +return rmiBindAddress; +} + +/** + * Set the inet address on which the Platform RMI server is exported. + * @param theRmiBindAddress The textual representation of inet address + */ +public void setRmiBindAddress(String theRmiBindAddress) { +rmiBindAddress = theRmiBindAddress; +} + +/** * Get the port on which the Platform RMI server is exported. This is the * port that is normally chosen by the RMI stack. * @return The port number @@ -189,11 +209,28 @@ public class JmxRemoteLifecycleListener // Configure SSL for RMI connection if required if (rmiSSL) { +if (rmiBindAddress != null) { +throw new IllegalStateException(sm.getString( +"jmxRemoteLifecycleListener.sslRmiBindAddress")); +} + csf = new SslRMIClientSocketFactory(); ssf = new SslRMIServerSocketFactory(ciphers, protocols, clientAuth); } +// Force server bind address if required +if (rmiBindAddress != null) { +try { +ssf = new RmiServerBindSocketFactory( +InetAddress.getByName(rmiBindAddress)); +} catch (UnknownHostException e) { +log.error(sm.getString( +"jmxRemoteLifecycleListener.invalidRmiBindAddress", +rmiBindAddress), e); +} +} + // Force the use of local ports if required if (useLocalPorts) { csf = new RmiClientLocalhostSocketFactory(csf); @@ -219,7 +256,7 @@ public class JmxRemoteLifecycleListener // Create the Platform server csPlatform = createServer("Platform", rmiRegistryPortPlatform, -rmiServerPortPlatform, env, +rmiServerPortPlatform, env, csf, ssf, ManagementFactory.getPlatformMBeanServer()); } else if (Lifecycle.STOP_EVENT == event.getType()) { @@ -229,11 +266,12 @@ public class JmxRemoteLifecycleListener private JMXConnectorServer createServer(String serverName, int theRmiRegistryPort, int theRmiServerPort, -HashMap theEnv, MBeanServer theMBeanServer) { +HashMap theEnv, RMIClientSocketFactory csf, +RMIServerSocketFactory ssf, MBeanServer theMBeanServer) { // Create the RMI registry try { -LocateRegistry.createRegistry(theRmiRegistryPort); +LocateRegistry.createRegistry(theRmiRegistryPort, csf, ssf); } catch (RemoteException e) { log.error(sm.getString( "jmxRemoteLifecycleListener.createRegistryFailed", @@ -289
svn commit: r1498342 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java java/org/apache/catalina/mbeans/LocalStrings.properties webapps/docs/config/listener
Author: markt Date: Mon Jul 1 09:53:32 2013 New Revision: 1498342 URL: http://svn.apache.org/r1498342 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55017 Add the ability to configure the RMI bind address when using the JXM remote listener. Patch provided by Alexey Noskov. Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java tomcat/tc7.0.x/trunk/java/org/apache/catalina/mbeans/LocalStrings.properties tomcat/tc7.0.x/trunk/webapps/docs/config/listeners.xml Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1498340 Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java?rev=1498342&r1=1498341&r2=1498342&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java Mon Jul 1 09:53:32 2013 @@ -20,8 +20,11 @@ package org.apache.catalina.mbeans; import java.io.IOException; import java.io.Serializable; import java.lang.management.ManagementFactory; +import java.net.InetAddress; import java.net.MalformedURLException; +import java.net.ServerSocket; import java.net.Socket; +import java.net.UnknownHostException; import java.rmi.RemoteException; import java.rmi.registry.LocateRegistry; import java.rmi.server.RMIClientSocketFactory; @@ -61,6 +64,7 @@ public class JmxRemoteLifecycleListener protected static final StringManager sm = StringManager.getManager(Constants.Package); +protected String rmiBindAddress = null; protected int rmiRegistryPortPlatform = -1; protected int rmiServerPortPlatform = -1; protected boolean rmiSSL = true; @@ -76,6 +80,22 @@ public class JmxRemoteLifecycleListener protected JMXConnectorServer csPlatform = null; /** + * Get the inet address on which the Platform RMI server is exported. + * @return The textual representation of inet address + */ +public String getRmiBindAddress() { +return rmiBindAddress; +} + +/** + * Set the inet address on which the Platform RMI server is exported. + * @param theRmiBindAddress The textual representation of inet address + */ +public void setRmiBindAddress(String theRmiBindAddress) { +rmiBindAddress = theRmiBindAddress; +} + +/** * Get the port on which the Platform RMI server is exported. This is the * port that is normally chosen by the RMI stack. * @return The port number @@ -189,11 +209,28 @@ public class JmxRemoteLifecycleListener // Configure SSL for RMI connection if required if (rmiSSL) { +if (rmiBindAddress != null) { +throw new IllegalStateException(sm.getString( +"jmxRemoteLifecycleListener.sslRmiBindAddress")); +} + csf = new SslRMIClientSocketFactory(); ssf = new SslRMIServerSocketFactory(ciphers, protocols, clientAuth); } +// Force server bind address if required +if (rmiBindAddress != null) { +try { +ssf = new RmiServerBindSocketFactory( +InetAddress.getByName(rmiBindAddress)); +} catch (UnknownHostException e) { +log.error(sm.getString( +"jmxRemoteLifecycleListener.invalidRmiBindAddress", +rmiBindAddress), e); +} +} + // Force the use of local ports if required if (useLocalPorts) { csf = new RmiClientLocalhostSocketFactory(csf); @@ -219,7 +256,7 @@ public class JmxRemoteLifecycleListener // Create the Platform server csPlatform = createServer("Platform", rmiRegistryPortPlatform, -rmiServerPortPlatform, env, +rmiServerPortPlatform, env, csf, ssf, ManagementFactory.getPlatformMBeanServer()); } else if (Lifecycle.STOP_EVENT == event.getType()) { @@ -229,11 +266,12 @@ public class JmxRemoteLifecycleListener private JMXConnectorServer createServer(String serverName, int theRmiRegistryPort, int theRmiServerPort, -HashMap theEnv, MBeanServer theMBeanServer) { +HashMap theEnv, RMIClientSocketFactory csf, +RMIServerSocketFactory ssf, MBeanServer theMBeanServer) { // Create the RMI registry try { -
[Bug 55017] Ability to configure RMI bind address
https://issues.apache.org/bugzilla/show_bug.cgi?id=55017 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #15 from Mark Thomas --- Thanks for the patch. It has been applied to trunk and 7.0.x and will be included in 7.0.42 onwards. -- 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: [taglibs] Site plans
Apologize for delayed response. 2013/6/26 Jeremy Boynes : > On Jun 25, 2013, at 7:54 AM, Henri Yandell wrote: > >> Help much appreciated - but do we want all the content of all the modules >> to be there? >> >> It feels to me that the website does not map directly to the codebase. We >> want an overall site, and subsites for Standard and for RDC. We don't want >> to have the 14 pom.xmls become a site structure, or the 4 pom.xmls >> (tld-generator and extended). > > Three mini-sites sounds good: a top-level one holding things together and > then sub-sites for standard and RDC. Is there a way to associate the > top-level one with the parent POM and the others with the "root" poms in > standard and rdc? That would match with the things that are likely to be > released (being all "standard" packages together, or all "rdc" packages > together, but not both at the same time). Do we still need an aggregator pom > as well - how about setting up separate CI jobs for "standard" and "rdc"? > Coud be possible but do you want to deploy sites from tagged modules versions ? (I presume yes). In such case that will changed a bit as all modules will be in a different svn path. > From the "standard" side, how about killing the separate "doc" "examples" and > "standard-test" modules, rolling the documentation and examples into the site > and the test cases into unit or integration tests in the individual modules? > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > -- Olivier Lamy Ecetera: http://ecetera.com.au http://twitter.com/olamy | http://linkedin.com/in/olamy - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 54086] ConcurrentModificationException in NioReceiver on shutdown
https://issues.apache.org/bugzilla/show_bug.cgi?id=54086 --- Comment #5 from Mark Thomas --- (In reply to Casey Lucas from comment #2) > Problem: > During shutdown, NioReceiver.close() There is no such method. I'm going to assume you mean stop(). -- 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 55159] Wasted work in ErrorReportValve.getPartialServletStackTrace
https://issues.apache.org/bugzilla/show_bug.cgi?id=55159 --- Comment #2 from Violeta Georgieva --- (In reply to Adrian Nistor from comment #0) > The above fix (in patch.diff) is certainly correct (it's easy to see > through code inspection), but I think we can have an even shorter > patch (one line, in patchShort.diff): just break as soon as "pos" is > set, without reversion the loop order. patchShort.diff is correct > only if there can be only one "elements[i]" with class name > "org.apache.catalina.core.ApplicationFilterChain" and method name > "internalDoFilter" or if it doesn't matter which such "elements[i]" is > detected (the last, like in the original code, or the first, like in > patchShort.diff). We need the last element and not the first one. So the first patch is the proper one. Regards Violeta -- 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: r1498363 - in /tomcat/trunk/java/org/apache/catalina/tribes/transport: LocalStrings.properties nio/NioReceiver.java
Author: markt Date: Mon Jul 1 10:57:50 2013 New Revision: 1498363 URL: http://svn.apache.org/r1498363 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54086 If stopListening is called while the thread is processing selector events it is possible for two threads to try to use the keys collection at the same time. Prevent the ConcurrentModificationException that can occur. Modified: tomcat/trunk/java/org/apache/catalina/tribes/transport/LocalStrings.properties tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java Modified: tomcat/trunk/java/org/apache/catalina/tribes/transport/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/transport/LocalStrings.properties?rev=1498363&r1=1498362&r2=1498363&view=diff == --- tomcat/trunk/java/org/apache/catalina/tribes/transport/LocalStrings.properties (original) +++ tomcat/trunk/java/org/apache/catalina/tribes/transport/LocalStrings.properties Mon Jul 1 10:57:50 2013 @@ -29,6 +29,7 @@ NioReceiver.requestError=Unable to proce NioReceiver.run.fail=Unable to run replication listener NioReceiver.start.fail=Unable to start cluster receiver NioReceiver.stop.fail=Unable to close cluster receiver selector +NioReceiver.stop.threadRunning=The NioReceiver thread did not stop in a timely manner. Errors may be observed when the selector is closed. NioReceiver.threadpool.fail=ThreadPool cannot be initialized. Listener not started. NioReceiver.threadsExhausted=Channel key is registered, but has had no interest ops for the last [{0}] ms. (cancelled: [{1}]):[{2}] last access:[{3} Possible cause: all threads used, perform thread dump Modified: tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java?rev=1498363&r1=1498362&r2=1498363&view=diff == --- tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java (original) +++ tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java Mon Jul 1 10:57:50 2013 @@ -55,6 +55,8 @@ public class NioReceiver extends Receive protected static final StringManager sm = StringManager.getManager(Constants.Package); +private volatile boolean running = false; + private AtomicReference selector = new AtomicReference<>(); private ServerSocketChannel serverChannel = null; private DatagramChannel datagramChannel = null; @@ -351,7 +353,17 @@ public class NioReceiver extends Receive Selector selector = this.selector.get(); if (selector != null) { try { +// Unlock the thread if is is blocked waiting for input selector.wakeup(); +// Wait for the receiver thread to finish +int count = 0; +while (running && count < 50) { +Thread.sleep(100); +count ++; +} +if (running) { +log.warn(sm.getString("NioReceiver.stop.threadRunning")); +} closeSelector(); } catch (Exception x) { log.error(sm.getString("NioReceiver.stop.fail"), x); @@ -403,10 +415,13 @@ public class NioReceiver extends Receive */ @Override public void run() { +running = true; try { listen(); } catch (Exception x) { log.error(sm.getString("NioReceiver.run.fail"), x); +} finally { +running = false; } } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1498340 - in /tomcat/trunk: java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java java/org/apache/catalina/mbeans/LocalStrings.properties webapps/docs/config/listeners.xml
On 01.07.2013 11:50, ma...@apache.org wrote: > Add the ability to configure the RMO bind address when using the JXM remote > listener. Coffee to the rescue: RMO points to "Rocky Mountain oysters are bull calf testicles used for human consumption" and "JXM is a pure-java (SWING) GUI for controlling the XMPCR, which is a USB powered and controlled XM radio.". The later is probably a good extension for Tomcat. Have a nice day Rainer - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1498340 - in /tomcat/trunk: java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java java/org/apache/catalina/mbeans/LocalStrings.properties webapps/docs/config/listeners.xml
On 01/07/2013 11:59, Rainer Jung wrote: > On 01.07.2013 11:50, ma...@apache.org wrote: >> Add the ability to configure the RMO bind address when using the JXM remote >> listener. > > Coffee to the rescue: RMO points to "Rocky Mountain oysters are bull > calf testicles used for human consumption" and "JXM is a pure-java > (SWING) GUI for controlling the XMPCR, which is a USB powered and > controlled XM radio.". The later is probably a good extension for Tomcat. > > Have a nice day :) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1498368 - /tomcat/trunk/java/org/apache/catalina/valves/ErrorReportValve.java
Author: violetagg Date: Mon Jul 1 11:01:38 2013 New Revision: 1498368 URL: http://svn.apache.org/r1498368 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55159 Small performance improvement Patch provided by Adrian Nistor Modified: tomcat/trunk/java/org/apache/catalina/valves/ErrorReportValve.java Modified: tomcat/trunk/java/org/apache/catalina/valves/ErrorReportValve.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/ErrorReportValve.java?rev=1498368&r1=1498367&r2=1498368&view=diff == --- tomcat/trunk/java/org/apache/catalina/valves/ErrorReportValve.java (original) +++ tomcat/trunk/java/org/apache/catalina/valves/ErrorReportValve.java Mon Jul 1 11:01:38 2013 @@ -272,11 +272,12 @@ public class ErrorReportValve extends Va trace.append(t.toString()).append('\n'); StackTraceElement[] elements = t.getStackTrace(); int pos = elements.length; -for (int i = 0; i < elements.length; i++) { +for (int i = elements.length - 1; i >= 0; i--) { if ((elements[i].getClassName().startsWith ("org.apache.catalina.core.ApplicationFilterChain")) && (elements[i].getMethodName().equals("internalDoFilter"))) { pos = i; +break; } } for (int i = 0; i < pos; i++) { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1498370 - /tomcat/trunk/webapps/docs/changelog.xml
Author: markt Date: Mon Jul 1 11:01:46 2013 New Revision: 1498370 URL: http://svn.apache.org/r1498370 Log: Fix changelog Modified: tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1498370&r1=1498369&r2=1498370&view=diff == --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Mon Jul 1 11:01:46 2013 @@ -130,6 +130,11 @@ Change default configuration so that a change to the global web.xml file will trigger a reload of all web applications. (markt) + +55017: Add the ability to configure the RMI bind address when +using the JMX remote lifecycle listener. Patch provided by Alexey +Noskov. (markt) + 55101: Make BASIC authentication more tolerant of whitespace. Patch provided by Brian Burch. (markt) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn propchange: r1498342 - svn:log
Author: markt Revision: 1498342 Modified property: svn:log Modified: svn:log at Mon Jul 1 11:02:32 2013 -- --- svn:log (original) +++ svn:log Mon Jul 1 11:02:32 2013 @@ -1,3 +1,3 @@ Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55017 -Add the ability to configure the RMI bind address when using the JXM remote listener. +Add the ability to configure the RMI bind address when using the JMX remote listener. Patch provided by Alexey Noskov. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn propchange: r1498340 - svn:log
Author: markt Revision: 1498340 Modified property: svn:log Modified: svn:log at Mon Jul 1 11:02:54 2013 -- --- svn:log (original) +++ svn:log Mon Jul 1 11:02:54 2013 @@ -1,3 +1,3 @@ Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55017 -Add the ability to configure the RMO bind address when using the JXM remote listener. +Add the ability to configure the RMI bind address when using the JMX remote listener. Patch provided by Alexey Noskov. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1498375 - in /tomcat: tc7.0.x/trunk/webapps/docs/changelog.xml trunk/webapps/docs/changelog.xml
Author: markt Date: Mon Jul 1 11:05:02 2013 New Revision: 1498375 URL: http://svn.apache.org/r1498375 Log: Use the right changelog Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1498375&r1=1498374&r2=1498375&view=diff == --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Mon Jul 1 11:05:02 2013 @@ -73,6 +73,11 @@ 54745: Fix JAR file scanning when Tomcat is deployed via Java Web Start. Patch provided by Nick Williams. (markt) + +55017: Add the ability to configure the RMI bind address when +using the JMX remote lifecycle listener. Patch provided by Alexey +Noskov. (markt) + 55071: Ensure original exception is reported if JDBC Realm fails to read a user's credentials. (markt) Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1498375&r1=1498374&r2=1498375&view=diff == --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Mon Jul 1 11:05:02 2013 @@ -130,11 +130,6 @@ Change default configuration so that a change to the global web.xml file will trigger a reload of all web applications. (markt) - -55017: Add the ability to configure the RMI bind address when -using the JMX remote lifecycle listener. Patch provided by Alexey -Noskov. (markt) - 55101: Make BASIC authentication more tolerant of whitespace. Patch provided by Brian Burch. (markt) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1498377 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/tribes/transport/LocalStrings.properties java/org/apache/catalina/tribes/transport/nio/NioReceiver.java webapps/docs/change
Author: markt Date: Mon Jul 1 11:09:51 2013 New Revision: 1498377 URL: http://svn.apache.org/r1498377 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54086 If stopListening is called while the thread is processing selector events it is possible for two threads to try to use the keys collection at the same time. Prevent the ConcurrentModificationException that can occur. Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/transport/LocalStrings.properties tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1498363 Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/transport/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/transport/LocalStrings.properties?rev=1498377&r1=1498376&r2=1498377&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/transport/LocalStrings.properties (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/transport/LocalStrings.properties Mon Jul 1 11:09:51 2013 @@ -36,4 +36,7 @@ IDataSender.senderModes.Instantiate=Can' IDataSender.senderModes.Missing=Can't configure a data replication sender for mode {0} IDataSender.senderModes.Resources=Can't load data replication sender mapping list IDataSender.stats=Send stats from [{0}:{1,number,integer}], Nr of bytes sent={2,number,integer} over {3} = {4,number,integer} bytes/request, processing time {5,number,integer} msec, avg processing time {6,number,integer} msec + +NioReceiver.stop.threadRunning=The NioReceiver thread did not stop in a timely manner. Errors may be observed when the selector is closed. + PooledSender.senderDisconnectFail=Failed to disconnect sender Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java?rev=1498377&r1=1498376&r2=1498377&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java Mon Jul 1 11:09:51 2013 @@ -59,7 +59,10 @@ public class NioReceiver extends Receive */ private static final String info = "NioReceiver/1.0"; +private volatile boolean running = false; + private AtomicReference selector = new AtomicReference(); + private ServerSocketChannel serverChannel = null; private DatagramChannel datagramChannel = null; @@ -364,7 +367,17 @@ public class NioReceiver extends Receive Selector selector = this.selector.get(); if (selector != null) { try { +// Unlock the thread if is is blocked waiting for input selector.wakeup(); +// Wait for the receiver thread to finish +int count = 0; +while (running && count < 50) { +Thread.sleep(100); +count ++; +} +if (running) { +log.warn(sm.getString("NioReceiver.stop.threadRunning")); +} closeSelector(); } catch (Exception x) { log.error("Unable to close cluster receiver selector.", x); @@ -416,10 +429,13 @@ public class NioReceiver extends Receive */ @Override public void run() { +running = true; try { listen(); } catch (Exception x) { log.error("Unable to run replication listener.", x); +} finally { +running = false; } } Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1498377&r1=1498376&r2=1498377&view=diff == --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Mon Jul 1 11:09:51 2013 @@ -146,6 +146,10 @@ workQueue in order to ensure that executor's maxThread works correctly. (kfujino) + +54086: Fix an additional code path that could lead to +multiple threads attempting to modify the same selector key set. (markt) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 54086] ConcurrentModificationException in NioReceiver on shutdown
https://issues.apache.org/bugzilla/show_bug.cgi?id=54086 Mark Thomas changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution|--- |FIXED --- Comment #6 from Mark Thomas --- Thanks for the analysis and patch. I went with a different approach as I generally prefer to tackle the root cause rather than handle the symptoms of a problem. Providing that the receiver thread stops in a timely manner, the patch prevents multiple threads accessing the key set. -- 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 55170] New: [websocket][jsr 356]Thread falls in endless cycle when connection is reset
https://issues.apache.org/bugzilla/show_bug.cgi?id=55170 Bug ID: 55170 Summary: [websocket][jsr 356]Thread falls in endless cycle when connection is reset Product: Tomcat 8 Version: trunk Hardware: PC Status: NEW Severity: normal Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: s.bos...@gmail.com Created attachment 30511 --> https://issues.apache.org/bugzilla/attachment.cgi?id=30511&action=edit profiling result screenshot I have a client which opens websocket connection to the echo server example. My client sends unlimited number of binary messages. At some point, the connection is closed by a network component in the middle (load balancer). I can see exception thrown at the client side and the session is closed (see below ). So far this behaviour seems normal. However, after closing the session, I noticed there is something that uses CPU time, which after some profiling turned out to be a thread that executes CPU extensive code in an endless cycle (see below ) Here is the exception that is thrown when the connection falls apart: Exception is :java.io.IOException: java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: java.io.IOException: The specified network name is no longer available. at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.startMessageBlock(WsRemoteEndpointImplBase.java:203) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendBytes(WsRemoteEndpointImplBase.java:112) at org.apache.tomcat.websocket.WsRemoteEndpointBasic.sendBinary(WsRemoteEndpointBasic.java:43) at com.sap.cloud.sample.helloworld.WebsocketsTestManager$TestThread.run(WebsocketsTestManager.java:257) Caused by: java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: java.io.IOException: The specified network name is no longer available. at org.apache.tomcat.websocket.WsRemoteEndpointImplBase$FutureToSendHandler.get(WsRemoteEndpointImplBase.java:719) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.startMessageBlock(WsRemoteEndpointImplBase.java:201) ... 3 more Caused by: java.util.concurrent.ExecutionException: java.io.IOException: The specified network name is no longer available. at sun.nio.ch.PendingFuture.get(PendingFuture.java:185) at org.apache.tomcat.websocket.AsyncChannelWrapperSecure$WriteTask.run(AsyncChannelWrapperSecure.java:209) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:722) Caused by: java.io.IOException: The specified network name is no longer available. at sun.nio.ch.Iocp.translateErrorToIOException(Iocp.java:309) at sun.nio.ch.Iocp.access$700(Iocp.java:46) at sun.nio.ch.Iocp$EventHandlerTask.run(Iocp.java:399) ... 1 more Here is the stacktrace of the thread consuming 100% CPU in an endless cycle: sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:757) javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624) org.apache.tomcat.websocket.AsyncChannelWrapperSecure$ReadTask.run(AsyncChannelWrapperSecure.java:264) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) java.lang.Thread.run(Thread.java:722) -- 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: r1498384 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/valves/ErrorReportValve.java webapps/docs/changelog.xml
Author: violetagg Date: Mon Jul 1 11:18:54 2013 New Revision: 1498384 URL: http://svn.apache.org/r1498384 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55159 Merged revision 1498368 from tomcat/trunk: Small performance improvement Patch provided by Adrian Nistor Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/ErrorReportValve.java tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1498368 Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/ErrorReportValve.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/ErrorReportValve.java?rev=1498384&r1=1498383&r2=1498384&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/ErrorReportValve.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/ErrorReportValve.java Mon Jul 1 11:18:54 2013 @@ -296,11 +296,12 @@ public class ErrorReportValve extends Va trace.append(t.toString()).append('\n'); StackTraceElement[] elements = t.getStackTrace(); int pos = elements.length; -for (int i = 0; i < elements.length; i++) { +for (int i = elements.length - 1; i >= 0; i--) { if ((elements[i].getClassName().startsWith ("org.apache.catalina.core.ApplicationFilterChain")) && (elements[i].getMethodName().equals("internalDoFilter"))) { pos = i; +break; } } for (int i = 0; i < pos; i++) { Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1498384&r1=1498383&r2=1498384&view=diff == --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Mon Jul 1 11:18:54 2013 @@ -83,9 +83,9 @@ fails to read a user's credentials. (markt) -55073, 55108, 55109 & -55110: Small performance improvements. Patches provided by -Adrian Nistor. (markt) +55073, 55108, 55109, 55110 +& 55159: Small performance improvements. Patches +provided by Adrian Nistor. (markt/violetagg) 55102: Add support for time to first byte in the - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55159] Wasted work in ErrorReportValve.getPartialServletStackTrace
https://issues.apache.org/bugzilla/show_bug.cgi?id=55159 Violeta Georgieva changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #3 from Violeta Georgieva --- Thanks for the report. The first patch was applied in trunk and 7.0.x and will be included in 7.0.42 onwards. -- 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 55171] New: [jsr 356] All server threads become blocked after some websocket testing
https://issues.apache.org/bugzilla/show_bug.cgi?id=55171 Bug ID: 55171 Summary: [jsr 356] All server threads become blocked after some websocket testing Product: Tomcat 8 Version: trunk Hardware: PC Status: NEW Severity: critical Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: s.bos...@gmail.com Created attachment 30512 --> https://issues.apache.org/bugzilla/attachment.cgi?id=30512&action=edit full thread stack dump I have a websocket test which performs some stress testing over an echo example server running on Tomcat 8. My test is creating up to 200 websocket connections and perform some message sending/receiving. At some point of time after some test restarts, the server stops to respond. I have restarted the test with a simple single socket connection and the server was still not responding. I checked the threads stacks at the server side and it seems all of the Tomcat worker therads were blocked. Attaching the full stack trace of all threads. In the server's logs file I can see only several exceptions like this: Jul 01, 2013 11:34:52 AM org.apache.tomcat.websocket.server.WsHttpUpgradeHandler destroy SEVERE: Failed to close WebConnection while destroying the WebSocket HttpUpgradeHandler java.io.IOException: Broken pipe at sun.nio.ch.FileDispatcherImpl.write0(Native Method) at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:50) at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:94) at sun.nio.ch.IOUtil.write(IOUtil.java:51) at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:450) at org.apache.tomcat.util.net.SecureNioChannel.flush(SecureNioChannel.java:135) at org.apache.tomcat.util.net.SecureNioChannel.close(SecureNioChannel.java:385) at org.apache.coyote.http11.upgrade.NioServletInputStream.doClose(NioServletInputStream.java:107) at org.apache.coyote.http11.upgrade.AbstractServletInputStream.close(AbstractServletInputStream.java:128) at org.apache.coyote.http11.upgrade.AbstractProcessor.close(AbstractProcessor.java:59) at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.destroy(WsHttpUpgradeHandler.java:137) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684) at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:223) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1584) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1543) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:789) Note: My test setup includes proxy and loadbalancer in the middle. In some cases the loadbalancer closes websocket connections which is seen as connection reset by the server and the client. -- 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 55173] New: [jsr 356] Exception message typo error
https://issues.apache.org/bugzilla/show_bug.cgi?id=55173 Bug ID: 55173 Summary: [jsr 356] Exception message typo error Product: Tomcat 8 Version: trunk Hardware: PC Status: NEW Severity: trivial Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: s.bos...@gmail.com In the exception below, the exception message seems to have a small typo error. conenction -> connection javax.websocket.DeploymentException: The HTTP request to initiate the WebSocket conenction failed at org.apache.tomcat.websocket.WsWebSocketContainer.connectToServer(WsWebSocketContainer.java:383) at org.apache.tomcat.websocket.WsWebSocketContainer.connectToServer(WsWebSocketContainer.java:232) at org.apache.tomcat.websocket.WsWebSocketContainer.connectToServer(WsWebSocketContainer.java:199) at com.sap.cloud.sample.helloworld.WebsocketsTestManager$TestThread.run(WebsocketsTestManager.java:259) Caused by: java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: java.io.IOException: The specified network name is no longer available. at org.apache.tomcat.websocket.AsyncChannelWrapperSecure$WrapperFuture.get(AsyncChannelWrapperSecure.java:466) at org.apache.tomcat.websocket.WsWebSocketContainer.processResponse(WsWebSocketContainer.java:593) at org.apache.tomcat.websocket.WsWebSocketContainer.connectToServer(WsWebSocketContainer.java:366) ... 3 more Caused by: java.util.concurrent.ExecutionException: java.io.IOException: The specified network name is no longer available. at sun.nio.ch.PendingFuture.get(PendingFuture.java:185) at org.apache.tomcat.websocket.AsyncChannelWrapperSecure$ReadTask.run(AsyncChannelWrapperSecure.java:253) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:722) Caused by: java.io.IOException: The specified network name is no longer available. at sun.nio.ch.Iocp.translateErrorToIOException(Iocp.java:309) at sun.nio.ch.Iocp.access$700(Iocp.java:46) at sun.nio.ch.Iocp$EventHandlerTask.run(Iocp.java:399) ... 1 more -- 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: r1498399 - /tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties
Author: violetagg Date: Mon Jul 1 12:07:30 2013 New Revision: 1498399 URL: http://svn.apache.org/r1498399 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55173 Fix typo Modified: tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties Modified: tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties?rev=1498399&r1=1498398&r2=1498399&view=diff == --- tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties Mon Jul 1 12:07:30 2013 @@ -81,7 +81,7 @@ wsWebSocketContainer.asynchronousChannel wsWebSocketContainer.asynchronousSocketChannelFail=Unable to open a connection to the server wsWebSocketContainer.defaultConfiguratorFaill=Failed to create the default configurator wsWebSocketContainer.endpointCreateFail=Failed to create a local endpoint of type [{0}] -wsWebSocketContainer.httpRequestFailed=The HTTP request to initiate the WebSocket conenction failed +wsWebSocketContainer.httpRequestFailed=The HTTP request to initiate the WebSocket connection failed wsWebSocketContainer.invalidHeader=Unable to parse HTTP header as no colon is present to delimit header name and header value in [{0}]. The header has been skipped. wsWebSocketContainer.invalidScheme=The requested scheme, [{0}], is not supported. The supported schemes are ws and wss wsWebSocketContainer.invalidStatus=The HTTP response from the server [{0}] did not permit the HTTP upgrade to WebSocket - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55173] [jsr 356] Exception message typo error
https://issues.apache.org/bugzilla/show_bug.cgi?id=55173 Violeta Georgieva changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED OS||All --- Comment #1 from Violeta Georgieva --- Thanks for the report. Fix in trunk. -- 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 55174] New: [jsr 356][websocket] MessageHandler never gets notified again after it throws exception
https://issues.apache.org/bugzilla/show_bug.cgi?id=55174 Bug ID: 55174 Summary: [jsr 356][websocket] MessageHandler never gets notified again after it throws exception Product: Tomcat 8 Version: trunk Hardware: PC Status: NEW Severity: major Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: s.bos...@gmail.com I have a test which adds a MessageHandler which gets notified on text messages. If its implementation method onMessage(String text) throws some exception (e.g. runtime exception), this MessageHandler will never ever be notified again for any new text messages received by the session. I suppose this happens because the exception actually kills the underlying thread in which the notification has happened. I think the client side implementation shall be more robust and expect and be prepared for exceptions coming from calls to user code. -- 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: r1498409 - /tomcat/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java
Author: violetagg Date: Mon Jul 1 12:26:02 2013 New Revision: 1498409 URL: http://svn.apache.org/r1498409 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55158 Small performance improvement Patch provided by Adrian Nistor Modified: tomcat/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java 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=1498409&r1=1498408&r2=1498409&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java Mon Jul 1 12:26:02 2013 @@ -910,9 +910,10 @@ class ApplicationHttpRequest extends Htt public AttributeNamesEnumerator() { int last = -1; parentEnumeration = getRequest().getAttributeNames(); -for (int i = 0; i < specialAttributes.length; i++) { +for (int i = specialAttributes.length - 1; i >= 0; i--) { if (getAttribute(specials[i]) != null) { last = i; +break; } } this.last = last; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1498413 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/core/ApplicationHttpRequest.java webapps/docs/changelog.xml
Author: violetagg Date: Mon Jul 1 12:40:25 2013 New Revision: 1498413 URL: http://svn.apache.org/r1498413 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55158 Merged revision 1498409 from tomcat/trunk: Small performance improvement Patch provided by Adrian Nistor Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1498409 Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java?rev=1498413&r1=1498412&r2=1498413&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java Mon Jul 1 12:40:25 2013 @@ -925,9 +925,10 @@ class ApplicationHttpRequest extends Htt public AttributeNamesEnumerator() { parentEnumeration = getRequest().getAttributeNames(); -for (int i = 0; i < specialAttributes.length; i++) { +for (int i = specialAttributes.length - 1; i >= 0; i--) { if (getAttribute(specials[i]) != null) { last = i; +break; } } } Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1498413&r1=1498412&r2=1498413&view=diff == --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Mon Jul 1 12:40:25 2013 @@ -83,9 +83,9 @@ fails to read a user's credentials. (markt) -55073, 55108, 55109, 55110 -& 55159: Small performance improvements. Patches -provided by Adrian Nistor. (markt/violetagg) +55073, 55108, 55109, 55110, +55158 & 55159: Small performance improvements. +Patches provided by Adrian Nistor. (markt/violetagg) 55102: Add support for time to first byte in the - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55158] Wasted work in AttributeNamesEnumerator constructor
https://issues.apache.org/bugzilla/show_bug.cgi?id=55158 Violeta Georgieva changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #1 from Violeta Georgieva --- Thanks for the report. Fix is in trunk and 7.0.x and will be included in 7.0.42 onwards. -- 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 54086] ConcurrentModificationException in NioReceiver on shutdown
https://issues.apache.org/bugzilla/show_bug.cgi?id=54086 --- Comment #7 from Casey Lucas --- (In reply to Mark Thomas from comment #5) > (In reply to Casey Lucas from comment #2) > > Problem: > > During shutdown, NioReceiver.close() > > There is no such method. I'm going to assume you mean stop(). Yes, stop. Thanks for the fix. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
buildbot failure in ASF Buildbot on tomcat-7-trunk
The Buildbot has detected a new failure on builder tomcat-7-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/tomcat-7-trunk/builds/1270 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/tc7.0.x/trunk] 1498413 Blamelist: violetagg BUILD FAILED: failed compile_1 sincerely, -The Buildbot
svn commit: r1498461 - in /tomcat/tc7.0.x/trunk: build.xml webapps/docs/changelog.xml
Author: markt Date: Mon Jul 1 14:04:37 2013 New Revision: 1498461 URL: http://svn.apache.org/r1498461 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55155 Avoid constant focus grabbing when running the Tomcat unit tests under Java 6 on OSX. Patch provided by Casey Lucas. Modified: tomcat/tc7.0.x/trunk/build.xml tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Modified: tomcat/tc7.0.x/trunk/build.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/build.xml?rev=1498461&r1=1498460&r2=1498461&view=diff == --- tomcat/tc7.0.x/trunk/build.xml (original) +++ tomcat/tc7.0.x/trunk/build.xml Mon Jul 1 14:04:37 2013 @@ -1204,6 +1204,7 @@ + Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1498461&r1=1498460&r2=1498461&view=diff == --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Mon Jul 1 14:04:37 2013 @@ -125,6 +125,10 @@ Correct the mechanism for the path calculation in AsyncContext.dispatch(). (violetagg) + +55155: Avoid constant focus grabbing when running the Tomcat +unit tests under Java 6 on OSX. Patch provided by Casey Lucas. (markt) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55155] running tomcat tests cause terminal to repeatedly grab focus (on os x)
https://issues.apache.org/bugzilla/show_bug.cgi?id=55155 Mark Thomas changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution|--- |FIXED --- Comment #9 from Mark Thomas --- I haven't dug into this far enough to idenitfy the trigger for this but it looks like whatever change triggered the probem in Java 7 has been back-ported to Java 6 but the change that allowed us to change the default for appContextProtection hasn't been back-ported. I can't tell if this is an Apple specific issue or one that will affect anyone using the Oracle (commerical) supported Java 6 binaries. An additional factor to take into consideration is the general reluctance of the Tomcat dev community to add work-arounds for bugs in third-party products (yes the JreMemoryLeakPreventionListener is a pretty big exception to that rule). Given that OSX seems to be a fairly popular platform amongst Java developers then I think your second patch is the way to go for now. If this emerges as a wider Java 6 issue we can look at using java.awt.headless=true instead. The patch has been applied to 7.0.x and will be included in 7.0.42 onwards. -- 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: r1498475 - /tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java
Author: markt Date: Mon Jul 1 14:26:13 2013 New Revision: 1498475 URL: http://svn.apache.org/r1498475 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55160 Retrieve timeout the same way it is set so that connectionUploadTimeout is applied if configured. Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java?rev=1498475&r1=1498474&r2=1498475&view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java Mon Jul 1 14:26:13 2013 @@ -447,9 +447,14 @@ public class InternalNioInputBuffer exte // Ignore } try { -NioEndpoint.KeyAttachment att = (NioEndpoint.KeyAttachment)socket.getAttachment(false); -if ( att == null ) throw new IOException("Key must be cancelled."); -nRead = pool.read(socket.getBufHandler().getReadBuffer(),socket,selector,att.getTimeout()); +NioEndpoint.KeyAttachment att = +(NioEndpoint.KeyAttachment) socket.getAttachment(false); +if (att == null) { +throw new IOException("Key must be cancelled."); +} +nRead = pool.read(socket.getBufHandler().getReadBuffer(), +socket, selector, +socket.getIOChannel().socket().getSoTimeout()); } catch ( EOFException eof ) { nRead = -1; } finally { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1498479 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/coyote/http11/InternalNioInputBuffer.java webapps/docs/changelog.xml
Author: markt Date: Mon Jul 1 14:28:40 2013 New Revision: 1498479 URL: http://svn.apache.org/r1498479 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55160 Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1498475 Modified: tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java?rev=1498479&r1=1498478&r2=1498479&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java Mon Jul 1 14:28:40 2013 @@ -414,9 +414,14 @@ public class InternalNioInputBuffer exte // Ignore } try { -NioEndpoint.KeyAttachment att = (NioEndpoint.KeyAttachment)socket.getAttachment(false); -if ( att == null ) throw new IOException("Key must be cancelled."); -nRead = pool.read(socket.getBufHandler().getReadBuffer(),socket,selector,att.getTimeout()); +NioEndpoint.KeyAttachment att = +(NioEndpoint.KeyAttachment) socket.getAttachment(false); +if (att == null) { +throw new IOException("Key must be cancelled."); +} +nRead = pool.read(socket.getBufHandler().getReadBuffer(), +socket, selector, +socket.getIOChannel().socket().getSoTimeout()); } catch ( EOFException eof ) { nRead = -1; } finally { Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1498479&r1=1498478&r2=1498479&view=diff == --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Mon Jul 1 14:28:40 2013 @@ -129,6 +129,10 @@ 55155: Avoid constant focus grabbing when running the Tomcat unit tests under Java 6 on OSX. Patch provided by Casey Lucas. (markt) + +55160: Don't ignore connectionUploadTimeout setting when +using HTTP NIO connector. (markt) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55160] NIO connectionUploadTimeout can't work
https://issues.apache.org/bugzilla/show_bug.cgi?id=55160 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED OS||All --- Comment #1 from Mark Thomas --- Thanks for the report. This has been fixed in trunk and 7.0.x and will be included in 7.0.42 onwards. -- 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: r1498482 - /tomcat/trunk/bin/catalina.sh
Author: markt Date: Mon Jul 1 14:34:27 2013 New Revision: 1498482 URL: http://svn.apache.org/r1498482 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54013 Give forced stop a short period (5s) to complete before returning. Modified: tomcat/trunk/bin/catalina.sh Modified: tomcat/trunk/bin/catalina.sh URL: http://svn.apache.org/viewvc/tomcat/trunk/bin/catalina.sh?rev=1498482&r1=1498481&r2=1498482&view=diff == --- tomcat/trunk/bin/catalina.sh (original) +++ tomcat/trunk/bin/catalina.sh Mon Jul 1 14:34:27 2013 @@ -469,6 +469,7 @@ elif [ "$1" = "stop" ] ; then fi fi + KILL_SLEEP_INTERVAL=5 if [ $FORCE -eq 1 ]; then if [ -z "$CATALINA_PID" ]; then echo "Kill failed: \$CATALINA_PID not set" @@ -477,9 +478,22 @@ elif [ "$1" = "stop" ] ; then PID=`cat "$CATALINA_PID"` echo "Killing Tomcat with the PID: $PID" kill -9 $PID -rm -f "$CATALINA_PID" >/dev/null 2>&1 -if [ $? != 0 ]; then - echo "Tomcat was killed but the PID file could not be removed." +while [ $KILL_SLEEP_INTERVAL -ge 0 ]; do +kill -0 `cat "$CATALINA_PID"` >/dev/null 2>&1 +if [ $? -gt 0 ]; then +rm -f "$CATALINA_PID" >/dev/null 2>&1 +if [ $? != 0 ]; then +echo "Tomcat was killed but the PID file could not be removed." +fi +break +fi +if [ $KILL_SLEEP_INTERVAL -gt 0 ]; then +sleep 1 +fi +KILL_SLEEP_INTERVAL=`expr $KILL_SLEEP_INTERVAL - 1 ` +done +if [ $KILL_SLEEP_INTERVAL -gt 0 ]; then +echo "Tomcat has not been killed completely yet. The process might be waiting on some system call or might be UNINTERRUPTIBLE." fi fi fi - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1498485 - in /tomcat/tc7.0.x/trunk: ./ bin/catalina.sh webapps/docs/changelog.xml
Author: markt Date: Mon Jul 1 14:37:43 2013 New Revision: 1498485 URL: http://svn.apache.org/r1498485 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54013 Give forced stop a short period (5s) to complete before returning. Patch provided by mukarram.baig Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/bin/catalina.sh tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1498482 Modified: tomcat/tc7.0.x/trunk/bin/catalina.sh URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/bin/catalina.sh?rev=1498485&r1=1498484&r2=1498485&view=diff == --- tomcat/tc7.0.x/trunk/bin/catalina.sh (original) +++ tomcat/tc7.0.x/trunk/bin/catalina.sh Mon Jul 1 14:37:43 2013 @@ -469,6 +469,7 @@ elif [ "$1" = "stop" ] ; then fi fi + KILL_SLEEP_INTERVAL=5 if [ $FORCE -eq 1 ]; then if [ -z "$CATALINA_PID" ]; then echo "Kill failed: \$CATALINA_PID not set" @@ -477,9 +478,22 @@ elif [ "$1" = "stop" ] ; then PID=`cat "$CATALINA_PID"` echo "Killing Tomcat with the PID: $PID" kill -9 $PID -rm -f "$CATALINA_PID" >/dev/null 2>&1 -if [ $? != 0 ]; then - echo "Tomcat was killed but the PID file could not be removed." +while [ $KILL_SLEEP_INTERVAL -ge 0 ]; do +kill -0 `cat "$CATALINA_PID"` >/dev/null 2>&1 +if [ $? -gt 0 ]; then +rm -f "$CATALINA_PID" >/dev/null 2>&1 +if [ $? != 0 ]; then +echo "Tomcat was killed but the PID file could not be removed." +fi +break +fi +if [ $KILL_SLEEP_INTERVAL -gt 0 ]; then +sleep 1 +fi +KILL_SLEEP_INTERVAL=`expr $KILL_SLEEP_INTERVAL - 1 ` +done +if [ $KILL_SLEEP_INTERVAL -gt 0 ]; then +echo "Tomcat has not been killed completely yet. The process might be waiting on some system call or might be UNINTERRUPTIBLE." fi fi fi Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1498485&r1=1498484&r2=1498485&view=diff == --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Mon Jul 1 14:37:43 2013 @@ -196,6 +196,11 @@ (kkolinko) +54013: When using a forced stop, allow a short period of time +(5s) for the process to die before returning. Patch provided by +mukarram.baig. (markt) + + 55119: Ensure that the build process produces Javadoc that is not vulnerable to CVE-2013-1571. Based on a patch by Uwe Schindler. (markt) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 54013] Catalina.sh force kill to wait till process exits completely
https://issues.apache.org/bugzilla/show_bug.cgi?id=54013 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #2 from Mark Thomas --- Thanks for the patch. It has been applied to trunk and 7.0.x and will be included in 7.0.42 onwards. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
buildbot success in ASF Buildbot on tomcat-7-trunk
The Buildbot has detected a restored build on builder tomcat-7-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/tomcat-7-trunk/builds/1271 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/tc7.0.x/trunk] 1498461 Blamelist: markt Build succeeded! sincerely, -The Buildbot
svn commit: r1498498 - in /tomcat/trunk: java/org/apache/catalina/realm/JAASRealm.java webapps/docs/config/realm.xml
Author: markt Date: Mon Jul 1 14:57:05 2013 New Revision: 1498498 URL: http://svn.apache.org/r1498498 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53777 Enable instances of the JAAS Realm to specify a dedicated configuration file. This is likely to be of particular use when the realm is specified at the Context level. Modified: tomcat/trunk/java/org/apache/catalina/realm/JAASRealm.java tomcat/trunk/webapps/docs/config/realm.xml Modified: tomcat/trunk/java/org/apache/catalina/realm/JAASRealm.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/realm/JAASRealm.java?rev=1498498&r1=1498497&r2=1498498&view=diff == --- tomcat/trunk/java/org/apache/catalina/realm/JAASRealm.java (original) +++ tomcat/trunk/java/org/apache/catalina/realm/JAASRealm.java Mon Jul 1 14:57:05 2013 @@ -14,11 +14,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - package org.apache.catalina.realm; - +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; +import java.net.URI; +import java.net.URISyntaxException; +import java.net.URL; import java.security.Principal; import java.util.ArrayList; import java.util.Iterator; @@ -27,6 +29,7 @@ import java.util.List; import javax.security.auth.Subject; import javax.security.auth.callback.CallbackHandler; import javax.security.auth.login.AccountExpiredException; +import javax.security.auth.login.Configuration; import javax.security.auth.login.CredentialExpiredException; import javax.security.auth.login.FailedLoginException; import javax.security.auth.login.LoginContext; @@ -39,7 +42,6 @@ import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; import org.apache.tomcat.util.ExceptionUtils; - /** * Implementation of Realm that authenticates users via the Java * Authentication and Authorization Service (JAAS). JAAS support requires @@ -125,9 +127,8 @@ org.foobar.auth.DatabaseLoginModule REQU * @version $Id$ */ -public class JAASRealm -extends RealmBase - { +public class JAASRealm extends RealmBase { + private static final Log log = LogFactory.getLog(JAASRealm.class); // - Instance Variables @@ -163,11 +164,34 @@ public class JAASRealm * True means use context ClassLoader, and True is the default * value. */ - protected boolean useContextClassLoader = true; +protected boolean useContextClassLoader = true; + + +/** + * Path to find a JAAS configuration file, if not set global JVM JAAS + * configuration will be used. + */ +protected String configFile; + +protected Configuration jaasConfiguration; +protected volatile boolean jaasConfigurationLoaded = false; // - Properties +/** + * Getter for the configfile member variable. + */ +public String getConfigFile() { +return configFile; +} + +/** + * Setter for the configfile member variable. + */ +public void setConfigFile(String configFile) { +this.configFile = configFile; +} /** * setter for the appName member variable @@ -369,7 +393,9 @@ public class JAASRealm } try { -loginContext = new LoginContext(appName, callbackHandler); +Configuration config = getConfig(); +loginContext = new LoginContext( +appName, null, callbackHandler, config); } catch (Throwable e) { ExceptionUtils.handleThrowable(e); log.error(sm.getString("jaasRealm.unexpectedError"), e); @@ -585,4 +611,50 @@ public class JAASRealm super.startInternal(); } + + +/** + * Load custom JAAS Configuration + */ +protected Configuration getConfig() { +try { +if (jaasConfigurationLoaded) { +return jaasConfiguration; +} +synchronized (this) { +if (configFile == null) { +jaasConfigurationLoaded = true; +return null; +} +URL resource = Thread.currentThread().getContextClassLoader(). +getResource(configFile); +URI uri = resource.toURI(); +Class sunConfigFile = (Class) + Class.forName("com.sun.security.auth.login.ConfigFile"); +Constructor constructor = +sunConfigFile.getConstructor(URI.class); +Configuration config = constructor.newInstance(uri); +this.jaasConfiguration = config; +this.jaasConfigurationLoaded = true; +return this.jaasConfiguration; +} +} catch (URISyntaxException
svn commit: r1498501 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/realm/JAASRealm.java webapps/docs/changelog.xml webapps/docs/config/realm.xml
Author: markt Date: Mon Jul 1 15:00:34 2013 New Revision: 1498501 URL: http://svn.apache.org/r1498501 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53777 Enable instances of the JAAS Realm to specify a dedicated configuration file. This is likely to be of particular use when the realm is specified at the Context level. Based on a patch by eolivelli. Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/JAASRealm.java tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml tomcat/tc7.0.x/trunk/webapps/docs/config/realm.xml Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1498498 Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/JAASRealm.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/JAASRealm.java?rev=1498501&r1=1498500&r2=1498501&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/JAASRealm.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/JAASRealm.java Mon Jul 1 15:00:34 2013 @@ -14,11 +14,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - package org.apache.catalina.realm; - +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; +import java.net.URI; +import java.net.URISyntaxException; +import java.net.URL; import java.security.Principal; import java.util.ArrayList; import java.util.Iterator; @@ -27,6 +29,7 @@ import java.util.List; import javax.security.auth.Subject; import javax.security.auth.callback.CallbackHandler; import javax.security.auth.login.AccountExpiredException; +import javax.security.auth.login.Configuration; import javax.security.auth.login.CredentialExpiredException; import javax.security.auth.login.FailedLoginException; import javax.security.auth.login.LoginContext; @@ -39,7 +42,6 @@ import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; import org.apache.tomcat.util.ExceptionUtils; - /** * Implementation of Realm that authenticates users via the Java * Authentication and Authorization Service (JAAS). JAAS support requires @@ -125,9 +127,8 @@ org.foobar.auth.DatabaseLoginModule REQU * @version $Id$ */ -public class JAASRealm -extends RealmBase - { +public class JAASRealm extends RealmBase { + private static final Log log = LogFactory.getLog(JAASRealm.class); // - Instance Variables @@ -170,12 +171,35 @@ public class JAASRealm * True means use context ClassLoader, and True is the default * value. */ - protected boolean useContextClassLoader = true; +protected boolean useContextClassLoader = true; + + +/** + * Path to find a JAAS configuration file, if not set global JVM JAAS + * configuration will be used. + */ +protected String configFile; + +protected Configuration jaasConfiguration; +protected volatile boolean jaasConfigurationLoaded = false; // - Properties - +/** + * Getter for the configfile member variable. + */ +public String getConfigFile() { +return configFile; +} + +/** + * Setter for the configfile member variable. + */ +public void setConfigFile(String configFile) { +this.configFile = configFile; +} + /** * setter for the appName member variable */ @@ -389,7 +413,9 @@ public class JAASRealm } try { -loginContext = new LoginContext(appName, callbackHandler); +Configuration config = getConfig(); +loginContext = new LoginContext( +appName, null, callbackHandler, config); } catch (Throwable e) { ExceptionUtils.handleThrowable(e); log.error(sm.getString("jaasRealm.unexpectedError"), e); @@ -605,4 +631,50 @@ public class JAASRealm super.startInternal(); } + + +/** + * Load custom JAAS Configuration + */ +protected Configuration getConfig() { +try { +if (jaasConfigurationLoaded) { +return jaasConfiguration; +} +synchronized (this) { +if (configFile == null) { +jaasConfigurationLoaded = true; +return null; +} +URL resource = Thread.currentThread().getContextClassLoader(). +getResource(configFile); +URI uri = resource.toURI(); +Class sunConfigFile = (Class) + Class.forName("com.sun.security.auth.login.ConfigFile"); +Constructor constructor = +
[Bug 53777] Ability to bundle JAAS Configuration in Webappp
https://issues.apache.org/bugzilla/show_bug.cgi?id=53777 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #7 from Mark Thomas --- Thanks for the patch. It has been applied (with minor changes) to trunk and 7.0.x and will be included in 7.0.42 onwards. I also added some documentation for the new option. -- 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: r1498503 - /tomcat/tc7.0.x/trunk/build.xml
Author: markt Date: Mon Jul 1 15:06:10 2013 New Revision: 1498503 URL: http://svn.apache.org/r1498503 Log: Tab police Modified: tomcat/tc7.0.x/trunk/build.xml Modified: tomcat/tc7.0.x/trunk/build.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/build.xml?rev=1498503&r1=1498502&r2=1498503&view=diff == --- tomcat/tc7.0.x/trunk/build.xml (original) +++ tomcat/tc7.0.x/trunk/build.xml Mon Jul 1 15:06:10 2013 @@ -1204,7 +1204,7 @@ - + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55176] New: SSI regular expressions parsing fails
https://issues.apache.org/bugzilla/show_bug.cgi?id=55176 Bug ID: 55176 Summary: SSI regular expressions parsing fails Product: Tomcat 7 Version: 7.0.39 Hardware: All OS: Linux Status: NEW Severity: normal Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: david.reit...@gmail.com Created attachment 30513 --> https://issues.apache.org/bugzilla/attachment.cgi?id=30513&action=edit test cases 1, 2 and 3 Regular Expressions in SSI fail to parse. This uses SSI in 7.0.39 using SSIFilter. The file is parsed, in principle, but whenever an IF expression with a certain regular expression is encountered, Tomcat seems to either show an exception (test case 2) stop processing the file and will not return any contents after that (for test case 3). Certain very simple regular expressions such as /a/ do not show an error (test case 1). Example: My request is: http://...:8080/tomcat7_ssi_bug/foo.html?year=234234 The relevant portion of the file is (test case 3): I have tried a number of variants, including $QUERY_STRING instead of ${...}. I find no error about this in the logs. I tried simpler regular expressions. The following Leads to the error below: java.lang.ClassCastException: org.apache.catalina.ssi.ExpressionParseTree$EqualNode cannot be cast to org.apache.catalina.ssi.ExpressionParseTree$StringNode org.apache.catalina.ssi.ExpressionParseTree$CompareNode.compareBranches(ExpressionParseTree.java:353) org.apache.catalina.ssi.ExpressionParseTree$EqualNode.evaluate(ExpressionParseTree.java:381) org.apache.catalina.ssi.ExpressionParseTree.evaluateTree(ExpressionParseTree.java:67) org.apache.catalina.ssi.SSIConditional.evaluateArguments(SSIConditional.java:124) org.apache.catalina.ssi.SSIConditional.process(SSIConditional.java:50) org.apache.catalina.ssi.SSIProcessor.process(SSIProcessor.java:160) org.apache.catalina.ssi.SSIFilter.doFilter(SSIFilter.java:144) This occurs whenever the regular expression does not contain any parenthesis. Attached war file contains foo.html, showing test cases 1 and 2, and bar.html, showing test case 1 and 3. By the way, these regular expressions work as intended in Apache (httpd) 2. See also feature request #53387. (The back reference in this example is not what causes the exception.) -- 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 55176] SSI regular expressions parsing fails
https://issues.apache.org/bugzilla/show_bug.cgi?id=55176 David Reitter changed: What|Removed |Added CC||david.reit...@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
[Bug 55177] New: connectionTimeout=-1 causes high CPU
https://issues.apache.org/bugzilla/show_bug.cgi?id=55177 Bug ID: 55177 Summary: connectionTimeout=-1 causes high CPU Product: Tomcat 7 Version: trunk Hardware: PC OS: Mac OS X 10.4 Status: NEW Severity: minor Priority: P2 Component: Connectors Assignee: dev@tomcat.apache.org Reporter: thrain...@gmail.com Created attachment 30514 --> https://issues.apache.org/bugzilla/attachment.cgi?id=30514&action=edit fix Setting connectionTimeout to -1 in server.xml causes each request to have high CPU java full version "1.6.0_51-b11-457" Example: Everywhere I looked there seemed to be a if statement looking to see if it was below zero except in Http11Processor class. Attached is patch file. Which has resolved the issue on my server. -- 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 55176] SSI regular expressions parsing fails
https://issues.apache.org/bugzilla/show_bug.cgi?id=55176 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |DUPLICATE --- Comment #1 from Mark Thomas --- Couple of issues here. 1. '=~' is perl RE syntax. That isn't what httpd uses in this case and Tomcat is aiming to emulate httpd. The expected syntax is '=' 2. You'll need the enhancement from bug 53387 to be implemented before your test will work. I'm therefore going to resolve this as a duplicate of 53387. *** This bug has been marked as a duplicate of bug 53387 *** -- 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 53387] SSI: Allow to use $1 to get result of regular expression matching
https://issues.apache.org/bugzilla/show_bug.cgi?id=53387 Mark Thomas changed: What|Removed |Added CC||david.reit...@gmail.com --- Comment #1 from Mark Thomas --- *** Bug 55176 has been marked as a duplicate of this bug. *** -- 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 55176] SSI regular expressions parsing fails
https://issues.apache.org/bugzilla/show_bug.cgi?id=55176 --- Comment #2 from David Reitter --- Created attachment 30515 --> https://issues.apache.org/bugzilla/attachment.cgi?id=30515&action=edit Another variant without =~ and without $1 -- 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 55176] SSI regular expressions parsing fails
https://issues.apache.org/bugzilla/show_bug.cgi?id=55176 --- Comment #3 from David Reitter --- Point 1: =~ is used in only one place in the test cases, and it is not what is causing this. See text of my bug report. Attaching foo2.html to demonstrate. Point 2: $1 is not what is causing this. See text of my bug report. Attaching foo2.html to demonstrate. foo2.html brings up the same two errors without use of =~ or $1. Sorry if my earlier test case contained these extra features. -- 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 55176] SSI regular expressions parsing fails
https://issues.apache.org/bugzilla/show_bug.cgi?id=55176 Mark Thomas changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|DUPLICATE |--- --- Comment #4 from Mark Thomas --- Re-opening to look at the new test cases. -- 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: r1498669 - /tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java
Author: markt Date: Mon Jul 1 20:28:01 2013 New Revision: 1498669 URL: http://svn.apache.org/r1498669 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55177 Correctly handle infinite soTimeout for BIO HTTP connector. Based on a patch by Nick Bunn. Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java?rev=1498669&r1=1498668&r2=1498669&view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java Mon Jul 1 20:28:01 2013 @@ -163,7 +163,11 @@ public class Http11Processor extends Abs } // Once the first byte has been read, the standard timeout should be // used so restore it here. -socket.getSocket().setSoTimeout(endpoint.getSoTimeout()); +if (endpoint.getSoTimeout()> 0) { +setSocketTimeout(endpoint.getSoTimeout()); +} else { +setSocketTimeout(0); +} } } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1498670 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/coyote/http11/Http11Processor.java webapps/docs/changelog.xml
Author: markt Date: Mon Jul 1 20:29:49 2013 New Revision: 1498670 URL: http://svn.apache.org/r1498670 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55177 Correctly handle infinite soTimeout for BIO HTTP connector. Based on a patch by Nick Bunn. Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/Http11Processor.java tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1498669 Modified: tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/Http11Processor.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/Http11Processor.java?rev=1498670&r1=1498669&r2=1498670&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/Http11Processor.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/Http11Processor.java Mon Jul 1 20:29:49 2013 @@ -175,7 +175,11 @@ public class Http11Processor extends Abs } // Once the first byte has been read, the standard timeout should be // used so restore it here. -socket.getSocket().setSoTimeout(endpoint.getSoTimeout()); +if (endpoint.getSoTimeout()> 0) { +setSocketTimeout(endpoint.getSoTimeout()); +} else { +setSocketTimeout(0); +} } } Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1498670&r1=1498669&r2=1498670&view=diff == --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Mon Jul 1 20:29:49 2013 @@ -141,6 +141,12 @@ + + + 55177: Correctly handle infinite soTimeout for BIO HTTP + connector. Based on a patch by Nick Bunn. (markt) + + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55177] connectionTimeout=-1 causes high CPU
https://issues.apache.org/bugzilla/show_bug.cgi?id=55177 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #1 from Mark Thomas --- Thanks for the report and the patch. This has been fixed in trunk and 7.0.x and will be included in 7.0.42 onwards. -- 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 55179] New: Incorrect Parameter Name in RemoteIpValve Examples
https://issues.apache.org/bugzilla/show_bug.cgi?id=55179 Bug ID: 55179 Summary: Incorrect Parameter Name in RemoteIpValve Examples Product: Tomcat 7 Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P2 Component: Documentation Assignee: dev@tomcat.apache.org Reporter: randomshel...@gmail.com The RemoteIpValve sample configurations incorrectly refer to a "remoteIpProxiesHeader" property, rather than the "proxiesHeader" property. http://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/valves/RemoteIpValve.html -- 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 55179] Incorrect Parameter Name in RemoteIpValve Examples
https://issues.apache.org/bugzilla/show_bug.cgi?id=55179 Shelley changed: What|Removed |Added URL||http://tomcat.apache.org/to ||mcat-7.0-doc/api/org/apache ||/catalina/valves/RemoteIpVa ||lve.html -- 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: r1498685 - in /tomcat/trunk/test/org/apache/catalina/ssi: ./ TestExpressionParseTree.java
Author: markt Date: Mon Jul 1 21:00:09 2013 New Revision: 1498685 URL: http://svn.apache.org/r1498685 Log: Add some basic SSI unit tests as preparation for some unit tests for bug 55176. Added: tomcat/trunk/test/org/apache/catalina/ssi/ tomcat/trunk/test/org/apache/catalina/ssi/TestExpressionParseTree.java (with props) Added: tomcat/trunk/test/org/apache/catalina/ssi/TestExpressionParseTree.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/ssi/TestExpressionParseTree.java?rev=1498685&view=auto == --- tomcat/trunk/test/org/apache/catalina/ssi/TestExpressionParseTree.java (added) +++ tomcat/trunk/test/org/apache/catalina/ssi/TestExpressionParseTree.java Mon Jul 1 21:00:09 2013 @@ -0,0 +1,169 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.catalina.ssi; + +import java.io.IOException; +import java.util.Collection; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +import org.junit.Assert; +import org.junit.Test; + +public class TestExpressionParseTree { + +private static final long LAST_MODIFIED = 60 * 60 * 24 * 1000; + + +@Test +public void testSimple1() throws Exception { +SSIMediator mediator = +new SSIMediator(new TesterSSIExternalResolver(), LAST_MODIFIED); +ExpressionParseTree ept = +new ExpressionParseTree("a = a", mediator); +Assert.assertTrue(ept.evaluateTree()); +} + + +@Test +public void testSimple2() throws Exception { +SSIMediator mediator = +new SSIMediator(new TesterSSIExternalResolver(), LAST_MODIFIED); +ExpressionParseTree ept = +new ExpressionParseTree("a = b", mediator); +Assert.assertFalse(ept.evaluateTree()); +} + + +@Test +public void testSimple3() throws Exception { +SSIMediator mediator = +new SSIMediator(new TesterSSIExternalResolver(), LAST_MODIFIED); +ExpressionParseTree ept = +new ExpressionParseTree("a = /a/", mediator); +Assert.assertTrue(ept.evaluateTree()); +} + + +@Test +public void testSimple4() throws Exception { +SSIMediator mediator = +new SSIMediator(new TesterSSIExternalResolver(), LAST_MODIFIED); +ExpressionParseTree ept = +new ExpressionParseTree("a = /b/", mediator); +Assert.assertFalse(ept.evaluateTree()); +} + + +@Test +public void testSimple5() throws Exception { +SSIExternalResolver r = new TesterSSIExternalResolver(); +r.setVariableValue("QUERY_STRING", "a"); +SSIMediator mediator = new SSIMediator(r, LAST_MODIFIED); +ExpressionParseTree ept = +new ExpressionParseTree("$QUERY_STRING = a", mediator); +Assert.assertTrue(ept.evaluateTree()); +} + + +@Test +public void testSimple6() throws Exception { +SSIExternalResolver r = new TesterSSIExternalResolver(); +r.setVariableValue("QUERY_STRING", "a"); +SSIMediator mediator = new SSIMediator(r, LAST_MODIFIED); +ExpressionParseTree ept = +new ExpressionParseTree("$QUERY_STRING = b", mediator); +Assert.assertFalse(ept.evaluateTree()); +} + + +@Test +public void testSimple7() throws Exception { +SSIExternalResolver r = new TesterSSIExternalResolver(); +r.setVariableValue("QUERY_STRING", "a"); +SSIMediator mediator = new SSIMediator(r, LAST_MODIFIED); +ExpressionParseTree ept = +new ExpressionParseTree("$QUERY_STRING = /a/", mediator); +Assert.assertTrue(ept.evaluateTree()); +} + + +@Test +public void testSimple8() throws Exception { +SSIExternalResolver r = new TesterSSIExternalResolver(); +r.setVariableValue("QUERY_STRING", "a"); +SSIMediator mediator = new SSIMediator(r, LAST_MODIFIED); +ExpressionParseTree ept = +new ExpressionParseTree("$QUERY_STRING = /b/", mediator); +Assert.assertFalse(ept.evaluateTree()); +} + + +/** + * Minimal implementation
buildbot failure in ASF Buildbot on tomcat-7-trunk
The Buildbot has detected a new failure on builder tomcat-7-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/tomcat-7-trunk/builds/1274 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/tc7.0.x/trunk] 1498670 Blamelist: markt BUILD FAILED: failed compile_1 sincerely, -The Buildbot
svn commit: r1498693 - in /tomcat/trunk: java/org/apache/catalina/ssi/ExpressionTokenizer.java test/org/apache/catalina/ssi/TestExpressionParseTree.java
Author: markt Date: Mon Jul 1 21:18:57 2013 New Revision: 1498693 URL: http://svn.apache.org/r1498693 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55176 SSI expression parser failed to correctly handle the use of an '=' character inside a regular expression. Includes a test case. Modified: tomcat/trunk/java/org/apache/catalina/ssi/ExpressionTokenizer.java tomcat/trunk/test/org/apache/catalina/ssi/TestExpressionParseTree.java Modified: tomcat/trunk/java/org/apache/catalina/ssi/ExpressionTokenizer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ssi/ExpressionTokenizer.java?rev=1498693&r1=1498692&r2=1498693&view=diff == --- tomcat/trunk/java/org/apache/catalina/ssi/ExpressionTokenizer.java (original) +++ tomcat/trunk/java/org/apache/catalina/ssi/ExpressionTokenizer.java Mon Jul 1 21:18:57 2013 @@ -135,8 +135,8 @@ public class ExpressionTokenizer { break; } int end = index; -// If it's a quoted string then end is the next unescaped quote if (currentChar == '"' || currentChar == '\'') { +// It's a quoted string and the end is the next unescaped quote char endChar = currentChar; boolean escaped = false; start++; @@ -150,6 +150,19 @@ public class ExpressionTokenizer { } end = index; index++; // Skip the end quote +} else if (currentChar == '/') { +// It's a regular expression and the end is the next unescaped / +char endChar = currentChar; +boolean escaped = false; +for (; index < length; index++) { +if (expr[index] == '\\' && !escaped) { +escaped = true; +continue; +} +if (expr[index] == endChar && !escaped) break; +escaped = false; +} +end = ++index; } else { // End is the next whitespace character for (; index < length; index++) { Modified: tomcat/trunk/test/org/apache/catalina/ssi/TestExpressionParseTree.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/ssi/TestExpressionParseTree.java?rev=1498693&r1=1498692&r2=1498693&view=diff == --- tomcat/trunk/test/org/apache/catalina/ssi/TestExpressionParseTree.java (original) +++ tomcat/trunk/test/org/apache/catalina/ssi/TestExpressionParseTree.java Mon Jul 1 21:18:57 2013 @@ -114,6 +114,28 @@ public class TestExpressionParseTree { } +@Test +public void testBug55176a() throws Exception { +SSIExternalResolver r = new TesterSSIExternalResolver(); +r.setVariableValue("QUERY_STRING", "a="); +SSIMediator mediator = new SSIMediator(r, LAST_MODIFIED); +ExpressionParseTree ept = +new ExpressionParseTree("$QUERY_STRING = /a=/", mediator); +Assert.assertTrue(ept.evaluateTree()); +} + + +@Test +public void testBug55176b() throws Exception { +SSIExternalResolver r = new TesterSSIExternalResolver(); +r.setVariableValue("QUERY_STRING", "a"); +SSIMediator mediator = new SSIMediator(r, LAST_MODIFIED); +ExpressionParseTree ept = +new ExpressionParseTree("$QUERY_STRING = /a=/", mediator); +Assert.assertFalse(ept.evaluateTree()); +} + + /** * Minimal implementation that provides the bare essentials require for the * unit tests. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1498694 - /tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
Author: markt Date: Mon Jul 1 21:21:14 2013 New Revision: 1498694 URL: http://svn.apache.org/r1498694 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55176 SSI expression parser failed to correctly handle the use of an '=' character inside a regular expression. Includes a test case. Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1498694&r1=1498693&r2=1498694&view=diff == --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Mon Jul 1 21:21:14 2013 @@ -139,6 +139,10 @@ 55160: Don't ignore connectionUploadTimeout setting when using HTTP NIO connector. (markt) + +55176: Correctly handle regular expressions within SSI +expressions that contain an equals character. (markt) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55176] SSI regular expressions parsing fails
https://issues.apache.org/bugzilla/show_bug.cgi?id=55176 Mark Thomas changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution|--- |FIXED --- Comment #5 from Mark Thomas --- Found the root cause. '=' inside a regular expression was not handled correctly. There are also a bunch of other characters that would have triggered similar failures. This has been fixed in trunk and 7.0.x and will be included in 7.0.42 onwards. Thanks for the test cases. I used a simplified version to create a couple of unit tests. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
buildbot failure in ASF Buildbot on tomcat-trunk
The Buildbot has detected a new failure on builder tomcat-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/tomcat-trunk/builds/4560 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1498669 Blamelist: markt BUILD FAILED: failed compile_1 sincerely, -The Buildbot
svn commit: r1498698 - /tomcat/trunk/java/org/apache/catalina/valves/RemoteIpValve.java
Author: markt Date: Mon Jul 1 21:25:05 2013 New Revision: 1498698 URL: http://svn.apache.org/r1498698 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55179 Correct attribute name. Modified: tomcat/trunk/java/org/apache/catalina/valves/RemoteIpValve.java Modified: tomcat/trunk/java/org/apache/catalina/valves/RemoteIpValve.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/RemoteIpValve.java?rev=1498698&r1=1498697&r2=1498698&view=diff == --- tomcat/trunk/java/org/apache/catalina/valves/RemoteIpValve.java (original) +++ tomcat/trunk/java/org/apache/catalina/valves/RemoteIpValve.java Mon Jul 1 21:25:05 2013 @@ -97,7 +97,7 @@ import org.apache.juli.logging.LogFactor * proxiesHeader * Name of the http header created by this valve to hold the list of proxies that have been processed in the incoming * remoteIpHeader - * RemoteIPProxiesHeader + * proxiesHeader * Compliant http header name * x-forwarded-by * @@ -165,7 +165,7 @@ import org.apache.juli.logging.LogFactor * className="org.apache.catalina.valves.RemoteIpValve" * internalProxies="192\.168\.0\.10|192\.168\.0\.11" * remoteIpHeader="x-forwarded-for" - * remoteIpProxiesHeader="x-forwarded-by" + * proxiesHeader="x-forwarded-by" * protocolHeader="x-forwarded-proto" * /> * @@ -227,7 +227,7 @@ import org.apache.juli.logging.LogFactor * className="org.apache.catalina.valves.RemoteIpValve" * internalProxies="192\.168\.0\.10|192\.168\.0\.11" * remoteIpHeader="x-forwarded-for" - * remoteIpProxiesHeader="x-forwarded-by" + * proxiesHeader="x-forwarded-by" * trustedProxies="proxy1|proxy2" * /> * @@ -269,7 +269,7 @@ import org.apache.juli.logging.LogFactor * className="org.apache.catalina.valves.RemoteIpValve" * internalProxies="192\.168\.0\.10|192\.168\.0\.11" * remoteIpHeader="x-forwarded-for" - * remoteIpProxiesHeader="x-forwarded-by" + * proxiesHeader="x-forwarded-by" * trustedProxies="proxy1|proxy2" * /> * @@ -312,7 +312,7 @@ import org.apache.juli.logging.LogFactor * className="org.apache.catalina.valves.RemoteIpValve" * internalProxies="192\.168\.0\.10|192\.168\.0\.11" * remoteIpHeader="x-forwarded-for" - * remoteIpProxiesHeader="x-forwarded-by" + * proxiesHeader="x-forwarded-by" * trustedProxies="proxy1|proxy2" * /> * - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1498699 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/valves/RemoteIpValve.java webapps/docs/changelog.xml
Author: markt Date: Mon Jul 1 21:27:53 2013 New Revision: 1498699 URL: http://svn.apache.org/r1498699 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55179 Correct attribute name. Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/RemoteIpValve.java tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1498698 Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/RemoteIpValve.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/RemoteIpValve.java?rev=1498699&r1=1498698&r2=1498699&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/RemoteIpValve.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/RemoteIpValve.java Mon Jul 1 21:27:53 2013 @@ -97,7 +97,7 @@ import org.apache.juli.logging.LogFactor * proxiesHeader * Name of the http header created by this valve to hold the list of proxies that have been processed in the incoming * remoteIpHeader - * RemoteIPProxiesHeader + * proxiesHeader * Compliant http header name * x-forwarded-by * @@ -165,7 +165,7 @@ import org.apache.juli.logging.LogFactor * className="org.apache.catalina.valves.RemoteIpValve" * internalProxies="192\.168\.0\.10|192\.168\.0\.11" * remoteIpHeader="x-forwarded-for" - * remoteIpProxiesHeader="x-forwarded-by" + * proxiesHeader="x-forwarded-by" * protocolHeader="x-forwarded-proto" * /> * @@ -227,7 +227,7 @@ import org.apache.juli.logging.LogFactor * className="org.apache.catalina.valves.RemoteIpValve" * internalProxies="192\.168\.0\.10|192\.168\.0\.11" * remoteIpHeader="x-forwarded-for" - * remoteIpProxiesHeader="x-forwarded-by" + * proxiesHeader="x-forwarded-by" * trustedProxies="proxy1|proxy2" * /> * @@ -269,7 +269,7 @@ import org.apache.juli.logging.LogFactor * className="org.apache.catalina.valves.RemoteIpValve" * internalProxies="192\.168\.0\.10|192\.168\.0\.11" * remoteIpHeader="x-forwarded-for" - * remoteIpProxiesHeader="x-forwarded-by" + * proxiesHeader="x-forwarded-by" * trustedProxies="proxy1|proxy2" * /> * @@ -312,7 +312,7 @@ import org.apache.juli.logging.LogFactor * className="org.apache.catalina.valves.RemoteIpValve" * internalProxies="192\.168\.0\.10|192\.168\.0\.11" * remoteIpHeader="x-forwarded-for" - * remoteIpProxiesHeader="x-forwarded-by" + * proxiesHeader="x-forwarded-by" * trustedProxies="proxy1|proxy2" * /> * Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1498699&r1=1498698&r2=1498699&view=diff == --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Mon Jul 1 21:27:53 2013 @@ -187,6 +187,11 @@ a javax.mail.Authenticator to mail sessions created via a JNDI resource. (markt) + +55179: Correct the Javadoc for the remote IP valve so the +correct name is used to refer to the proxiesHeader +property. (markt) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55179] Incorrect Parameter Name in RemoteIpValve Examples
https://issues.apache.org/bugzilla/show_bug.cgi?id=55179 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #1 from Mark Thomas --- Thanks for the report. This has been fixed in trunk and will be included in 7.0.42 onwards. -- 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 55176] SSI regular expressions parsing fails
https://issues.apache.org/bugzilla/show_bug.cgi?id=55176 --- Comment #6 from David Reitter --- Nice, thank you. That was certainly quick. -- 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: r1498719 - /tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameBase.java
Author: markt Date: Mon Jul 1 22:08:06 2013 New Revision: 1498719 URL: http://svn.apache.org/r1498719 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55174 WebSocket 1.0 Javadoc for Endpoint.onError states that it should be called for runtime errors in message handlers. Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameBase.java Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameBase.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameBase.java?rev=1498719&r1=1498718&r2=1498719&view=diff == --- tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameBase.java (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameBase.java Mon Jul 1 22:08:06 2013 @@ -28,6 +28,7 @@ import javax.websocket.CloseReason.Close import javax.websocket.MessageHandler; import javax.websocket.PongMessage; +import org.apache.tomcat.util.ExceptionUtils; import org.apache.tomcat.util.buf.Utf8Decoder; import org.apache.tomcat.util.res.StringManager; @@ -312,7 +313,14 @@ public abstract class WsFrameBase { MessageHandler.Whole mhPong = wsSession.getPongMessageHandler(); if (mhPong != null) { -mhPong.onMessage(new WsPongMessage(controlBufferBinary)); +try { +mhPong.onMessage(new WsPongMessage(controlBufferBinary)); +} catch (Throwable t) { +ExceptionUtils.handleThrowable(t); +wsSession.getLocal().onError(wsSession, t); +} finally { +controlBufferBinary.clear(); +} } } else { // Should have caught this earlier but just in case... @@ -344,15 +352,21 @@ public abstract class WsFrameBase { } } -if (mh instanceof MessageHandler.Partial) { -((MessageHandler.Partial) mh).onMessage( -messageBufferText.toString(), last); -} else { -// Caller ensures last == true if this branch is used -((MessageHandler.Whole) mh).onMessage( -messageBufferText.toString()); +try { +if (mh instanceof MessageHandler.Partial) { +((MessageHandler.Partial) mh).onMessage( +messageBufferText.toString(), last); +} else { +// Caller ensures last == true if this branch is used +((MessageHandler.Whole) mh).onMessage( +messageBufferText.toString()); +} +} catch (Throwable t) { +ExceptionUtils.handleThrowable(t); +wsSession.getLocal().onError(wsSession, t); +} finally { +messageBufferText.clear(); } -messageBufferText.clear(); } } @@ -520,11 +534,16 @@ public abstract class WsFrameBase { Long.valueOf(maxMessageSize; } } -if (mh instanceof MessageHandler.Partial) { -((MessageHandler.Partial) mh).onMessage(msg, last); -} else { -// Caller ensures last == true if this branch is used -((MessageHandler.Whole) mh).onMessage(msg); +try { +if (mh instanceof MessageHandler.Partial) { +((MessageHandler.Partial) mh).onMessage(msg, last); +} else { +// Caller ensures last == true if this branch is used +((MessageHandler.Whole) mh).onMessage(msg); +} +} catch(Throwable t) { +ExceptionUtils.handleThrowable(t); +wsSession.getLocal().onError(wsSession, t); } } } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55174] [jsr 356][websocket] MessageHandler never gets notified again after it throws exception
https://issues.apache.org/bugzilla/show_bug.cgi?id=55174 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED OS||All --- Comment #1 from Mark Thomas --- Thanks for the report. The javadoc for Endpoint.onError() states it should be called in this case. trunk has been updated to do this. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
buildbot success in ASF Buildbot on tomcat-7-trunk
The Buildbot has detected a restored build on builder tomcat-7-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/tomcat-7-trunk/builds/1275 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/tc7.0.x/trunk] 1498694 Blamelist: markt Build succeeded! sincerely, -The Buildbot
buildbot success in ASF Buildbot on tomcat-trunk
The Buildbot has detected a restored build on builder tomcat-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/tomcat-trunk/builds/4561 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1498693 Blamelist: markt Build succeeded! sincerely, -The Buildbot
[Bug 55180] New: connectionTimeout="-1" causes timeout can't be negative
https://issues.apache.org/bugzilla/show_bug.cgi?id=55180 Bug ID: 55180 Summary: connectionTimeout="-1" causes timeout can't be negative Product: Tomcat 7 Version: 7.0.30 Hardware: PC Status: NEW Severity: normal Priority: P2 Component: Connectors Assignee: dev@tomcat.apache.org Reporter: jmwmj...@163.com I configured server.xml like this: connectionTimeout="-1" disableUploadTimeout="false" connectionUploadTimeout="200" (maybe it is stupid to configure like this,if connectionTimeout=-1,can i make disableUploadTimeout=false?). It will cause : java.lang.IllegalArgumentException: timeout can't be negative at sun.nio.ch.SocketAdaptor.setSoTimeout(SocketAdaptor.java:361) at org.apache.coyote.http11.Http11NioProcessor.setSocketTimeout(Http11NioProcessor.java:251) .. because of : if (!disableUploadTimeout) { //endpoint.getSoTimeout()=-1. setSocketTimeout(endpoint.getSoTimeout()); } ~ another thing: if i configure connectionTimeout="0". in NioBlockingSelector.read(ByteBuffer buf, NioChannel socket, long readTimeout),readTimeout = 0, in case socket.read(buf) == 0, it make timeout=true. if (readTimeout >= 0 && (keycount == 0)) timedout = (System.currentTimeMillis() - time) >= readTimeout; then throw the SocketTimeoutException(). thank you. -- 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 55180] connectionTimeout="-1" causes timeout can't be negative
https://issues.apache.org/bugzilla/show_bug.cgi?id=55180 --- Comment #1 from Nick Bunn --- Created attachment 30519 --> https://issues.apache.org/bugzilla/attachment.cgi?id=30519&action=edit fix Attached the patch to fix the first issue. Might need to discuss why it was chose to make -1 the infiniti timeout. When in the socket class 0 is infiniti. I'm sure there is good reason. Just a thought. -- 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
[jira] [Created] (MTOMCAT-230) CLONE - Plugin uploads WAR file twice
Stanislav Grushevskiy created MTOMCAT-230: - Summary: CLONE - Plugin uploads WAR file twice Key: MTOMCAT-230 URL: https://issues.apache.org/jira/browse/MTOMCAT-230 Project: Apache Tomcat Maven Plugin Issue Type: Bug Components: tomcat6 Affects Versions: 2.0 Environment: Win7/64, Maven 3.0.4 Reporter: Stanislav Grushevskiy Assignee: Olivier Lamy (*$^¨%`£) When I deploy my WAR using maven, the target war (exact the same one) is being uploaded to the server twice. Can someone explain that? I am using this on my module: {code}clean install org.apache.tomcat.maven:tomcat6-maven-plugin:2.0:redeploy {code} >From the Log file {code =xml} [INFO] --- maven-war-plugin:2.1.1:war (default-war) @ mobile-server --- [INFO] Packaging webapp [INFO] Assembling webapp [mobile-server] in [C:\develope\mobile\mobile-server\target\mobile-server] [INFO] Processing war project [INFO] Copying webapp resources [C:\develope\mobile\mobile-server\src\main\webapp] [INFO] Webapp assembled in [241 msecs] [INFO] Building war: C:\develope\mobile\mobile-server\target\mobile-server.war [INFO] [INFO] <<< tomcat6-maven-plugin:2.0:redeploy (default-cli) @ mobile-server <<< [INFO] [INFO] --- tomcat6-maven-plugin:2.0:redeploy (default-cli) @ mobile-server --- [INFO] Deploying war to http://myserver.eu/pra-mobile-server Uploading: http://myserver.eu/manager-test/deploy?path=%2Fmobile-server&update=true Uploaded: http://myserver.eu/manager-test/deploy?path=%2Fmobile-server&update=true (12678 KB at 49.3 KB/sec) Uploading: http://myserver.eu/manager-test/deploy?path=%2Fmobile-server&update=true Uploaded: http://myserver.eu/manager-test/deploy?path=%2Fmobile-server&update=true {code} http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";> 4.0.0 eu.company.prj.pramobile mobile-parent ../mobile-parent/pom.xml 1.0-SNAPSHOT mobile-server war mobile server 1.1.2 com.springsource.repository.libs-milestone SpringSource Enterprise Bundle Repository - libs http://repo.springsource.org/libs-milestone/ ${project.groupId} mobile-test ${project.version} test ${project.groupId} mobile-common ${project.version} org.springframework spring-asm ${version.spring} org.springframework spring-aop ${version.spring} org.springframework.security spring-security-config ${version.spring} org.springframework spring-web ${version.spring} org.springframework spring-oxm ${version.spring} org.springframework spring-webmvc ${version.spring} org.springframework.security spring-security-web ${version.spring} commons-codec commons-codec 1.7 javax.servlet jsp-api 2.0 provided commons-io commons-io 2.4 commons-fileupload commons-fileupload 1.2.2 javax.servlet servlet-api 2.5 provided javax.servlet jstl 1.1.2 provided taglibs standard 1.1.2 provided commons-httpclient commons-httpclient 3.1 net.sf.ehcache ehcache 1.6.1 org.springmodules spring-modules-cache 0.8a org.springframework spring gigaspaces gigaspaces-ce jini jsk-lib jini jsk-platform jini mahalo jini reggie jini start jini boot jini webster commons-attributes commons-attributes-api commons-attributes commons-attributes-compiler jboss javassist jboss jboss-cache jbos
[jira] [Updated] (MTOMCAT-230) CLONE - Plugin uploads WAR file twice
[ https://issues.apache.org/jira/browse/MTOMCAT-230?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Stanislav Grushevskiy updated MTOMCAT-230: -- Description: To reproduce this issue you need to install apache and mod_jk and deploy application to apache, mod_jk, tomcat. If you deploy just to tomcat you will not reproduce it. When I deploy my WAR using maven, the target war (exact the same one) is being uploaded to the server twice. Can someone explain that? I am using this on my module: {code}clean install org.apache.tomcat.maven:tomcat6-maven-plugin:2.0:redeploy {code} >From the Log file {code =xml} [INFO] --- maven-war-plugin:2.1.1:war (default-war) @ mobile-server --- [INFO] Packaging webapp [INFO] Assembling webapp [mobile-server] in [C:\develope\mobile\mobile-server\target\mobile-server] [INFO] Processing war project [INFO] Copying webapp resources [C:\develope\mobile\mobile-server\src\main\webapp] [INFO] Webapp assembled in [241 msecs] [INFO] Building war: C:\develope\mobile\mobile-server\target\mobile-server.war [INFO] [INFO] <<< tomcat6-maven-plugin:2.0:redeploy (default-cli) @ mobile-server <<< [INFO] [INFO] --- tomcat6-maven-plugin:2.0:redeploy (default-cli) @ mobile-server --- [INFO] Deploying war to http://myserver.eu/pra-mobile-server Uploading: http://myserver.eu/manager-test/deploy?path=%2Fmobile-server&update=true Uploaded: http://myserver.eu/manager-test/deploy?path=%2Fmobile-server&update=true (12678 KB at 49.3 KB/sec) Uploading: http://myserver.eu/manager-test/deploy?path=%2Fmobile-server&update=true Uploaded: http://myserver.eu/manager-test/deploy?path=%2Fmobile-server&update=true {code} http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";> 4.0.0 eu.company.prj.pramobile mobile-parent ../mobile-parent/pom.xml 1.0-SNAPSHOT mobile-server war mobile server 1.1.2 com.springsource.repository.libs-milestone SpringSource Enterprise Bundle Repository - libs http://repo.springsource.org/libs-milestone/ ${project.groupId} mobile-test ${project.version} test ${project.groupId} mobile-common ${project.version} org.springframework spring-asm ${version.spring} org.springframework spring-aop ${version.spring} org.springframework.security spring-security-config ${version.spring} org.springframework spring-web ${version.spring} org.springframework spring-oxm ${version.spring} org.springframework spring-webmvc ${version.spring} org.springframework.security spring-security-web ${version.spring} commons-codec commons-codec 1.7 javax.servlet jsp-api 2.0 provided commons-io commons-io 2.4 commons-fileupload commons-fileupload 1.2.2 javax.servlet servlet-api 2.5 provided javax.servlet jstl 1.1.2 provided taglibs standard 1.1.2 provided commons-httpclient commons-httpclient 3.1 net.sf.ehcache ehcache 1.6.1 org.springmodules spring-modules-cache 0.8a org.springframework spring gigaspaces gigaspaces-ce jini jsk-lib jini jsk-platform jini mahalo jini reggie jini start jini boot jini webster commons-attributes commons-attributes-api commons-attributes commons-attributes-compiler jboss javassist jboss jboss-cache jboss jboss-common jboss jboss-jmx
[jira] [Updated] (MTOMCAT-230) CLONE - Plugin uploads WAR file twice
[ https://issues.apache.org/jira/browse/MTOMCAT-230?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Stanislav Grushevskiy updated MTOMCAT-230: -- Description: To reproduce this issue you need to install apache and mod_jk and deploy application to apache, mod_jk, tomcat. If you deploy just to tomcat you will not reproduce it. This situation is reproduced in tomcat 6, 7. When I deploy my WAR using maven, the target war (exact the same one) is being uploaded to the server twice. Can someone explain that? I am using this on my module: {code}clean install org.apache.tomcat.maven:tomcat6-maven-plugin:2.0:redeploy {code} >From the Log file {code =xml} [INFO] --- maven-war-plugin:2.1.1:war (default-war) @ mobile-server --- [INFO] Packaging webapp [INFO] Assembling webapp [mobile-server] in [C:\develope\mobile\mobile-server\target\mobile-server] [INFO] Processing war project [INFO] Copying webapp resources [C:\develope\mobile\mobile-server\src\main\webapp] [INFO] Webapp assembled in [241 msecs] [INFO] Building war: C:\develope\mobile\mobile-server\target\mobile-server.war [INFO] [INFO] <<< tomcat6-maven-plugin:2.0:redeploy (default-cli) @ mobile-server <<< [INFO] [INFO] --- tomcat6-maven-plugin:2.0:redeploy (default-cli) @ mobile-server --- [INFO] Deploying war to http://myserver.eu/pra-mobile-server Uploading: http://myserver.eu/manager-test/deploy?path=%2Fmobile-server&update=true Uploaded: http://myserver.eu/manager-test/deploy?path=%2Fmobile-server&update=true (12678 KB at 49.3 KB/sec) Uploading: http://myserver.eu/manager-test/deploy?path=%2Fmobile-server&update=true Uploaded: http://myserver.eu/manager-test/deploy?path=%2Fmobile-server&update=true {code} http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";> 4.0.0 eu.company.prj.pramobile mobile-parent ../mobile-parent/pom.xml 1.0-SNAPSHOT mobile-server war mobile server 1.1.2 com.springsource.repository.libs-milestone SpringSource Enterprise Bundle Repository - libs http://repo.springsource.org/libs-milestone/ ${project.groupId} mobile-test ${project.version} test ${project.groupId} mobile-common ${project.version} org.springframework spring-asm ${version.spring} org.springframework spring-aop ${version.spring} org.springframework.security spring-security-config ${version.spring} org.springframework spring-web ${version.spring} org.springframework spring-oxm ${version.spring} org.springframework spring-webmvc ${version.spring} org.springframework.security spring-security-web ${version.spring} commons-codec commons-codec 1.7 javax.servlet jsp-api 2.0 provided commons-io commons-io 2.4 commons-fileupload commons-fileupload 1.2.2 javax.servlet servlet-api 2.5 provided javax.servlet jstl 1.1.2 provided taglibs standard 1.1.2 provided commons-httpclient commons-httpclient 3.1 net.sf.ehcache ehcache 1.6.1 org.springmodules spring-modules-cache 0.8a org.springframework spring gigaspaces gigaspaces-ce jini jsk-lib jini jsk-platform jini mahalo jini reggie jini start jini boot jini webster commons-attributes commons-attributes-api commons-attributes commons-attributes-compiler jboss javassist jboss jboss-cache jboss jboss-common