Re: svn commit: r1302479 - /tomcat/jk/trunk/native/common/jk_lb_worker.c
On 03/26/2012 11:46 PM, Rainer Jung wrote: Hi Mladen, for (i = 0; i p-num_of_workers; i++) { lb_sub_worker_t *w =p-lb_workers[i]; - if (w-sequence != w-s-h.sequence) { + if (w-sequence w-s-h.sequence) { I think this one is wrong. It is inside push not pull, so it should be if (local shared) and not . ... continue from first mail Inside lb_worker::init we have 1787: p-sequence++; 1788: jk_lb_push(p, JK_TRUE, log); Now, this is completely wrong. It will always set sequence to 1, so in case worker process gets recycled we have things out of sync. Anyhow why push at init stage? ... next inside lb_push we have 393: p-s-h.sequence = p-sequence; Now this should actually be p-s-h.sequence++; The shm sequence can be generations ahead of heap sequence number. Anyhow, like said, *-s-h.sequence should be updated only when someone explicitly clicks on the jkstatus page. Other then that I see no reason for its update. All other runtime params are intrinsic and volatile should guarantee its consistency. Regards -- ^TM - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1305756 - in /tomcat/jk/trunk/native/common: jk_pool.c jk_pool.h
Author: mturk Date: Tue Mar 27 07:33:18 2012 New Revision: 1305756 URL: http://svn.apache.org/viewvc?rev=1305756view=rev Log: Add pool_calloc so we don't need to call alloc/memzero. Also make sure that excess realloced memory is zeroed Modified: tomcat/jk/trunk/native/common/jk_pool.c tomcat/jk/trunk/native/common/jk_pool.h Modified: tomcat/jk/trunk/native/common/jk_pool.c URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/common/jk_pool.c?rev=1305756r1=1305755r2=1305756view=diff == --- tomcat/jk/trunk/native/common/jk_pool.c (original) +++ tomcat/jk/trunk/native/common/jk_pool.c Tue Mar 27 07:33:18 2012 @@ -92,17 +92,27 @@ void *jk_pool_alloc(jk_pool_t *p, size_t return rc; } +void *jk_pool_calloc(jk_pool_t *p, size_t size) +{ +void *rc = jk_pool_alloc(p, size); +if (rc) +memset(rc, 0, size); +return rc; +} + void *jk_pool_realloc(jk_pool_t *p, size_t sz, const void *old, size_t old_sz) { -void *rc; +char *rc; if (!p || (!old old_sz)) { return NULL; } -rc = jk_pool_alloc(p, sz); +rc = (char *)jk_pool_alloc(p, sz); if (rc) { memcpy(rc, old, old_sz); +if (sz old_sz) +memset(rc + old_sz, 0, sz - old_sz); } return rc; Modified: tomcat/jk/trunk/native/common/jk_pool.h URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/common/jk_pool.h?rev=1305756r1=1305755r2=1305756view=diff == --- tomcat/jk/trunk/native/common/jk_pool.h (original) +++ tomcat/jk/trunk/native/common/jk_pool.h Tue Mar 27 07:33:18 2012 @@ -115,6 +115,8 @@ void jk_reset_pool(jk_pool_t *p); void *jk_pool_alloc(jk_pool_t *p, size_t sz); +void *jk_pool_calloc(jk_pool_t *p, size_t sz); + void *jk_pool_realloc(jk_pool_t *p, size_t sz, const void *old, size_t old_sz); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1305758 - in /tomcat/tc6.0.x/trunk: ./ java/org/apache/catalina/ha/authenticator/ webapps/docs/
Author: kfujino Date: Tue Mar 27 07:39:45 2012 New Revision: 1305758 URL: http://svn.apache.org/viewvc?rev=1305758view=rev Log: Replicate Principal in ClusterSingleSignOn. Modified: tomcat/tc6.0.x/trunk/STATUS.txt tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/authenticator/ClusterSingleSignOn.java tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/authenticator/ClusterSingleSignOnListener.java tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/authenticator/SingleSignOnMessage.java tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Modified: tomcat/tc6.0.x/trunk/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1305758r1=1305757r2=1305758view=diff == --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Mar 27 07:39:45 2012 @@ -86,11 +86,6 @@ PATCHES PROPOSED TO BACKPORT: -0: markt - https://issues.apache.org/bugzilla/show_bug.cgi?id=52579#c8 -1: -* Replicate Principal in ClusterSingleSignOn. - http://svn.apache.org/viewvc?view=revisionrevision=1298299 - +1: kfujino, fhanik, markt - -1: - * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=52500 Add configurable mechanism to retrieve user names from X509 client certificates. trunk patch: http://svn.apache.org/viewvc?view=revisionrevision=r1298476 Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/authenticator/ClusterSingleSignOn.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/authenticator/ClusterSingleSignOn.java?rev=1305758r1=1305757r2=1305758view=diff == --- tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/authenticator/ClusterSingleSignOn.java (original) +++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/authenticator/ClusterSingleSignOn.java Tue Mar 27 07:39:45 2012 @@ -21,8 +21,8 @@ package org.apache.catalina.ha.authentic import java.security.Principal; -import org.apache.catalina.Container; import org.apache.catalina.Cluster; +import org.apache.catalina.Container; import org.apache.catalina.Engine; import org.apache.catalina.Host; import org.apache.catalina.LifecycleException; @@ -31,6 +31,8 @@ import org.apache.catalina.Session; import org.apache.catalina.authenticator.SingleSignOn; import org.apache.catalina.ha.CatalinaCluster; import org.apache.catalina.ha.ClusterManager; +import org.apache.catalina.ha.session.SerializablePrincipal; +import org.apache.catalina.realm.GenericPrincipal; @@ -333,6 +335,12 @@ public class ClusterSingleSignOn msg.setUsername(username); msg.setPassword(password); +SerializablePrincipal sp = null; +if (principal instanceof GenericPrincipal) { +sp = SerializablePrincipal.createPrincipal((GenericPrincipal) principal); +msg.setPrincipal(sp); +} + cluster.sendClusterDomain(msg); if (containerLog.isDebugEnabled()) containerLog.debug(SingleSignOnMessage Send with action @@ -390,6 +398,12 @@ public class ClusterSingleSignOn msg.setUsername(username); msg.setPassword(password); +SerializablePrincipal sp = null; +if (principal instanceof GenericPrincipal) { +sp = SerializablePrincipal.createPrincipal((GenericPrincipal) principal); +msg.setPrincipal(sp); +} + cluster.sendClusterDomain(msg); if (containerLog.isDebugEnabled()) containerLog.debug(SingleSignOnMessage Send with action Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/authenticator/ClusterSingleSignOnListener.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/authenticator/ClusterSingleSignOnListener.java?rev=1305758r1=1305757r2=1305758view=diff == --- tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/authenticator/ClusterSingleSignOnListener.java (original) +++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/authenticator/ClusterSingleSignOnListener.java Tue Mar 27 07:39:45 2012 @@ -17,6 +17,7 @@ package org.apache.catalina.ha.authenticator; +import java.security.Principal; import java.util.Map; import java.io.IOException; @@ -88,6 +89,7 @@ public class ClusterSingleSignOnListener SingleSignOnMessage msg = (SingleSignOnMessage) myobj; int action = msg.getAction(); Session session = null; +Principal principal = null; if (log.isDebugEnabled()) log.debug(SingleSignOnMessage Received with action @@ -110,12 +112,18 @@ public class ClusterSingleSignOnListener clusterSSO.deregisterLocal(msg.getSsoId()); break; case SingleSignOnMessage.REGISTER_SESSION: -
svn commit: r1305768 - in /tomcat/jk/trunk/native/common: jk_map.c jk_pool.c
Author: mturk Date: Tue Mar 27 08:04:53 2012 New Revision: 1305768 URL: http://svn.apache.org/viewvc?rev=1305768view=rev Log: Use realloc instead alloc/copy. We have that API exactly for that Modified: tomcat/jk/trunk/native/common/jk_map.c tomcat/jk/trunk/native/common/jk_pool.c Modified: tomcat/jk/trunk/native/common/jk_map.c URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/common/jk_map.c?rev=1305768r1=1305767r2=1305768view=diff == --- tomcat/jk/trunk/native/common/jk_map.c (original) +++ tomcat/jk/trunk/native/common/jk_map.c Tue Mar 27 08:04:53 2012 @@ -657,28 +657,22 @@ static size_t trim(char *s) static int map_realloc(jk_map_t *m) { if (m-size == m-capacity) { -char **names; -void **values; +const char **names; +const void **values; unsigned int *keys; -int capacity = m-capacity + CAPACITY_INC_SIZE; - -names = (char **)jk_pool_alloc(m-p, sizeof(char *) * capacity); -values = (void **)jk_pool_alloc(m-p, sizeof(void *) * capacity); -keys = (unsigned int *)jk_pool_alloc(m-p, sizeof(unsigned int) * capacity); - -if (values names) { -if (m-capacity m-names) -memcpy(names, m-names, sizeof(char *) * m-capacity); - -if (m-capacity m-values) -memcpy(values, m-values, sizeof(void *) * m-capacity); - -if (m-capacity m-keys) -memcpy(keys, m-keys, sizeof(unsigned int) * m-capacity); - -m-names = (const char **)names; -m-values = (const void **)values; -m-keys = keys; +int capacity = m-capacity + CAPACITY_INC_SIZE; +size_t old_sz = m-capacity * sizeof(void *); +size_t new_sz = capacity * sizeof(void *); + +names = (const char **)jk_pool_realloc(m-p, new_sz, m-names, old_sz); +values = (const void **)jk_pool_realloc(m-p, new_sz, m-values, old_sz); +keys = (unsigned int *)jk_pool_realloc(m-p, new_sz, m-keys, old_sz); + +if (values names keys) { + +m-names = names; +m-values = values; +m-keys = keys; m-capacity = capacity; return JK_TRUE; Modified: tomcat/jk/trunk/native/common/jk_pool.c URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/common/jk_pool.c?rev=1305768r1=1305767r2=1305768view=diff == --- tomcat/jk/trunk/native/common/jk_pool.c (original) +++ tomcat/jk/trunk/native/common/jk_pool.c Tue Mar 27 08:04:53 2012 @@ -104,15 +104,15 @@ void *jk_pool_realloc(jk_pool_t *p, size { char *rc; -if (!p || (!old old_sz)) { +if (!p || (sz old_sz)) { return NULL; } - +if (!old) +return jk_pool_calloc(p, sz); rc = (char *)jk_pool_alloc(p, sz); if (rc) { memcpy(rc, old, old_sz); -if (sz old_sz) -memset(rc + old_sz, 0, sz - old_sz); +memset(rc + old_sz, 0, sz - old_sz); } return rc; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1305771 - in /tomcat/jk/trunk/native/common: jk_ajp12_worker.c jk_connect.c jk_lb_worker.c jk_map.c jk_shm.c jk_url.c jk_util.h
Author: mturk Date: Tue Mar 27 08:16:32 2012 New Revision: 1305771 URL: http://svn.apache.org/viewvc?rev=1305771view=rev Log: Unify ctype's isxxx as global macros instead those cryptic casts all over the place. No functional change Modified: tomcat/jk/trunk/native/common/jk_ajp12_worker.c tomcat/jk/trunk/native/common/jk_connect.c tomcat/jk/trunk/native/common/jk_lb_worker.c tomcat/jk/trunk/native/common/jk_map.c tomcat/jk/trunk/native/common/jk_shm.c tomcat/jk/trunk/native/common/jk_url.c tomcat/jk/trunk/native/common/jk_util.h Modified: tomcat/jk/trunk/native/common/jk_ajp12_worker.c URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/common/jk_ajp12_worker.c?rev=1305771r1=1305770r2=1305771view=diff == --- tomcat/jk/trunk/native/common/jk_ajp12_worker.c (original) +++ tomcat/jk/trunk/native/common/jk_ajp12_worker.c Tue Mar 27 08:16:32 2012 @@ -560,7 +560,7 @@ static int ajpv12_handle_response(ajp12_ } name = line; -while (isspace((int)(*name)) *name) { +while (jk_isspace(*name) *name) { name++; /* Skip leading white chars */ } if (!*name) { /* Empty header name */ @@ -575,7 +575,7 @@ static int ajpv12_handle_response(ajp12_ } *value = '\0'; value++; -while (isspace((int)(*value)) *value) { +while (jk_isspace(*value) *value) { value++;/* Skip leading white chars */ } if (!*value) { /* Empty header value */ Modified: tomcat/jk/trunk/native/common/jk_connect.c URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/common/jk_connect.c?rev=1305771r1=1305770r2=1305771view=diff == --- tomcat/jk/trunk/native/common/jk_connect.c (original) +++ tomcat/jk/trunk/native/common/jk_connect.c Tue Mar 27 08:16:32 2012 @@ -339,7 +339,7 @@ int jk_resolve(const char *host, int por /* Check if we only have digits in the string */ for (x = 0; host[x] != '\0'; x++) { -if (!isdigit((int)(host[x])) host[x] != '.') { +if (!jk_isdigit(host[x]) host[x] != '.') { break; } } Modified: tomcat/jk/trunk/native/common/jk_lb_worker.c URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/common/jk_lb_worker.c?rev=1305771r1=1305770r2=1305771view=diff == --- tomcat/jk/trunk/native/common/jk_lb_worker.c (original) +++ tomcat/jk/trunk/native/common/jk_lb_worker.c Tue Mar 27 08:16:32 2012 @@ -447,9 +447,9 @@ static char *get_cookie(jk_ws_service_t id_start; id_start = strstr(id_start + 1, name)) { if (id_start == s-headers_values[i] || id_start[-1] == ';' || -id_start[-1] == ',' || isspace((int)id_start[-1])) { +id_start[-1] == ',' || jk_isspace(id_start[-1])) { id_start += strlen(name); -while (*id_start isspace((int)(*id_start))) +while (*id_start jk_isspace(*id_start)) ++id_start; if (*id_start == '=' id_start[1]) { /* Modified: tomcat/jk/trunk/native/common/jk_map.c URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/common/jk_map.c?rev=1305771r1=1305770r2=1305771view=diff == --- tomcat/jk/trunk/native/common/jk_map.c (original) +++ tomcat/jk/trunk/native/common/jk_map.c Tue Mar 27 08:16:32 2012 @@ -636,8 +636,8 @@ static size_t trim(char *s) if (!(len = strlen(s))) return 0; for (len = len - 1; (len 0) -isspace((int)((unsigned char)s[len])); len--); -if ((len 0) || !isspace((int)((unsigned char)s[len]))) { +jk_isspace(s[len]); len--); +if ((len 0) || !jk_isspace(s[len])) { len++; } @@ -645,7 +645,7 @@ static size_t trim(char *s) len++; for (first = 0; (s[first] != '\0') -isspace((int)((unsigned char)s[first])); first++); +jk_isspace(s[first]); first++); if (first 0) { memmove(s, s + first, len - first); Modified: tomcat/jk/trunk/native/common/jk_shm.c URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/common/jk_shm.c?rev=1305771r1=1305770r2=1305771view=diff == --- tomcat/jk/trunk/native/common/jk_shm.c (original) +++ tomcat/jk/trunk/native/common/jk_shm.c Tue Mar 27 08:16:32 2012 @@ -178,7 +178,7 @@ int jk_shm_open(const char *fname, size_ strcpy(shname, Global\\); strncat(shname, fname, MAX_PATH - 8); for(i = 7; i (int)strlen(shname); i++) { -if (!isalnum((unsigned char)shname[i])) +
[JK] Shared memory design problems
Just wanted to note the problems we have with shared memory ... Currently we presume that 'someone' will initialize the shared memory and setup all struct data before the first request. This is wrong presumption, cause shared memory on IIS is initialized on first request, and with multiple workers processes kicking on during burst load, that's a disaster. Solution (as I see it) 1. Instead linear alloc use key based slot memory. This will waste few bytes for some workers cause each allocation slot would need to be of the same size. (maximum size of any one structure, probably deducted manually) 2. On 'pull' always search by object name (calculate ID for speed) This means that pull will alloc object in shared memory if it doesn't exists This solves both reconfig and recycle 3. Make sure we push/pull only on config parameter change. Runtime params like lb_factors should depend on volatile. 4. Update sequence in shared memory only from jkstatus or from worker.properties reload. Ensure we pull only if behind shared memory sequence. The major design problem is how to calculate unique shared memory object ID. Think we can have multiple objects with the same name, so beside name we need type I suppose and then if we can have multiple name-type objects (eg. workers having the same name under different balancers) add something to that as well. Push/pull will go trough each slot in shared memory and seek for exact object. I know, not as performant, but we could add slot_id once resolved. In essence this would mean that shm_pull and shm_alloc will be one function and actual shared memory slot will be allocated on first use (for all web servers) Comments? Regards -- ^TM - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: AccessLogValve enhancement
Ok. I am back working on this again. From the previous comments, I am not sure my efforts are going in the right direction. However, I have a working implementation that uses the standard logging mechanism now, while addressing some of the previous concerns. I did a quick performance test, and it is true that the default mechanism is quite a bit faster than the standard JULI logger. For this test, I just modified the source code to write each log message 1000 times. The first set of timings (in millis) is from the current AccessLogValve, and the second set is using JULI. AccessLogValve Elapsed Time: 8 AccessLogValve Elapsed Time: 19 AccessLogValve Elapsed Time: 63 AccessLogValve Elapsed Time: 6 AccessLogValve Elapsed Time: 7 AccessLogValve Elapsed Time: 8 INFO: AccessLogValve Elapsed Time: 830 INFO: AccessLogValve Elapsed Time: 1122 INFO: AccessLogValve Elapsed Time: 451 INFO: AccessLogValve Elapsed Time: 531 INFO: AccessLogValve Elapsed Time: 764 INFO: AccessLogValve Elapsed Time: 347 Granted, this certainly falls into the Contrived micro-benchmark realm. A real test would involve lots of threads each writing very little. Also, each thread would be doing a lot of other things, making the time spent in the access logger less significant. However, even in the worse case, it still only took a millis to write one message. Honing my test case to test the speed of 1 single message (not just the write, but the whole process of creating and then writing the message), I got that it takes between 0 - 1 millis in the first case, and 0 - 2 millis with JULI. Most messages took 1 millis for each. (I have a pretty old machine I am testing on now.) I didn't test the speed of the file rolling and such. Also, I have no idea which would perform better under a heavy load. I don't really have the facilities to do a realistic performance test. However, I think something can be gleaned from the above results. Does anyone have any advice or suggestions on what direction I should go? My main goal is to have automatic deletion of old log files. This is something I would imagine others would like as well, so I thought I would present here instead of just doing something myself. I certainly do not what to make anything more complicated to use / configure than it has to be. I am considering 5 options: 1) I can add my outputLoggerName attribute, which will switch the valve to use the JULI logger 2) I can create some sort of AccessLogWriter that the AccessLogValves will delegate their writing to - With 2 implementations, one being the current method and one being a JULI implementation - Potentially removing one in the future if performance is not an issue. 3) I can just add an attribute to the AccessLogValves to automatically delete older files 4) I can just make my own private subclass to do what I want, and leave the tomcat code unaltered 5) Scrap the current file writing implementation in the AccessLogValve and go straight JULI I would welcome any advice. Thanks, Mark
svn commit: r1305835 - /tomcat/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/DefaultProperties.java
Author: markt Date: Tue Mar 27 13:38:15 2012 New Revision: 1305835 URL: http://svn.apache.org/viewvc?rev=1305835view=rev Log: Fix warning Modified: tomcat/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/DefaultProperties.java Modified: tomcat/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/DefaultProperties.java URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/DefaultProperties.java?rev=1305835r1=1305834r2=1305835view=diff == --- tomcat/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/DefaultProperties.java (original) +++ tomcat/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/DefaultProperties.java Tue Mar 27 13:38:15 2012 @@ -26,6 +26,8 @@ import org.apache.tomcat.jdbc.pool.PoolP * @version 1.0 */ public class DefaultProperties extends PoolProperties { +private static final long serialVersionUID = 1L; + public DefaultProperties() { dbProperties = new Properties(); - 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/2892 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1305835 Blamelist: markt BUILD FAILED: failed compile_1 sincerely, -The Buildbot
DO NOT REPLY [Bug 52318] Version in tomcat-jdbc POM is conflicted with Version in MANIFEST for JULI JAR
https://issues.apache.org/bugzilla/show_bug.cgi?id=52318 --- Comment #7 from Filip Hanik fha...@apache.org 2012-03-27 14:41:40 UTC --- (In reply to comment #6) [6.0.18, 7.0.0) means all versions from including 6.0.18 to except 7.0.0 - not including versions under 6.0.18 or above 7.0.0. To fix this issue, you have to change the MANIFEST: MANIFEST: org.apache.juli.logging;version=[7.0.0, 7.1.0) OR org.apache.juli.logging;version=[7.0.0, 8.0.0) Please refet to my last post in Bug 52381 Regards Pancho aren't you excluding version 6.0.18+ here? -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1305859 - /tomcat/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/DefaultTestCase.java
Author: fhanik Date: Tue Mar 27 14:59:03 2012 New Revision: 1305859 URL: http://svn.apache.org/viewvc?rev=1305859view=rev Log: Account for known missing properties Modified: tomcat/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/DefaultTestCase.java Modified: tomcat/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/DefaultTestCase.java URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/DefaultTestCase.java?rev=1305859r1=1305858r2=1305859view=diff == --- tomcat/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/DefaultTestCase.java (original) +++ tomcat/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/DefaultTestCase.java Tue Mar 27 14:59:03 2012 @@ -87,9 +87,16 @@ public class DefaultTestCase extends Tes get = PoolProperties.class.getMethod(name, new Class[0]); }catch (NoSuchMethodException x) { try { -get = PoolProperties.class.getMethod(bname, new Class[0]); +get = PoolProperties.class.getMethod(bname, new Class[0]); }catch (NoSuchMethodException x2) { -System.err.println(x2.getMessage()); +String msg = x2.getMessage(); +if (msg.indexOf(isPoolPreparedStatements)=0) { +//noop - ignore known missing properties +} else if (msg.indexOf(isMaxOpenPreparedStatements)=0) { +//noop - ignore known missing properties +} else { +System.err.println(Missing property:+x2.getMessage()); +} } } if (get!=null) { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1305861 - in /tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool: DisposableConnectionFacade.java JdbcInterceptor.java PoolProperties.java
Author: fhanik Date: Tue Mar 27 15:04:29 2012 New Revision: 1305861 URL: http://svn.apache.org/viewvc?rev=1305861view=rev Log: https://issues.apache.org/bugzilla/show_bug.cgi?id=52002 Improvements to the pool - the default should be that multi thread close should not affect the connection isValid should return false if a connection has been closed Modified: tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DisposableConnectionFacade.java tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/JdbcInterceptor.java tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PoolProperties.java Modified: tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DisposableConnectionFacade.java URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DisposableConnectionFacade.java?rev=1305861r1=1305860r2=1305861view=diff == --- tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DisposableConnectionFacade.java (original) +++ tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DisposableConnectionFacade.java Tue Mar 27 15:04:29 2012 @@ -48,6 +48,9 @@ public class DisposableConnectionFacade if (compare(CLOSE_VAL, method) getNext() == null) { return null; } +if (compare(ISVALID_VAL, method) getNext() == null) { +return Boolean.FALSE; +} try { return super.invoke(proxy, method, args); @@ -56,7 +59,7 @@ public class DisposableConnectionFacade if (compare(TOSTRING_VAL, method)) { return DisposableConnectionFacade[null]; } -throw new SQLException(Connection has already been closed.); +throw new SQLException(PooledConnection has already been closed.); } throw e; Modified: tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/JdbcInterceptor.java URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/JdbcInterceptor.java?rev=1305861r1=1305860r2=1305861view=diff == --- tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/JdbcInterceptor.java (original) +++ tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/JdbcInterceptor.java Tue Mar 27 15:04:29 2012 @@ -61,6 +61,10 @@ public abstract class JdbcInterceptor im */ public static final String ISWRAPPERFOR_VAL = isWrapperFor; +/** + * {@link java.sql.Connection#isValid(boolean)} method name + */ +public static final String ISVALID_VAL = isValid; /** * Properties for this interceptor. Modified: tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PoolProperties.java URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PoolProperties.java?rev=1305861r1=1305860r2=1305861view=diff == --- tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PoolProperties.java (original) +++ tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PoolProperties.java Tue Mar 27 15:04:29 2012 @@ -86,7 +86,7 @@ public class PoolProperties implements P protected boolean alternateUsernameAllowed = false; protected boolean commitOnReturn = false; protected boolean rollbackOnReturn = false; -protected boolean useDisposableConnectionFacade = false; +protected boolean useDisposableConnectionFacade = true; protected boolean logValidationErrors = false; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1305862 - /tomcat/trunk/modules/jdbc-pool/doc/jdbc-pool.xml
Author: fhanik Date: Tue Mar 27 15:05:31 2012 New Revision: 1305862 URL: http://svn.apache.org/viewvc?rev=1305862view=rev Log: https://issues.apache.org/bugzilla/show_bug.cgi?id=52002 Documentation change to reflect the new default value Modified: tomcat/trunk/modules/jdbc-pool/doc/jdbc-pool.xml Modified: tomcat/trunk/modules/jdbc-pool/doc/jdbc-pool.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/doc/jdbc-pool.xml?rev=1305862r1=1305861r2=1305862view=diff == --- tomcat/trunk/modules/jdbc-pool/doc/jdbc-pool.xml (original) +++ tomcat/trunk/modules/jdbc-pool/doc/jdbc-pool.xml Tue Mar 27 15:05:31 2012 @@ -456,7 +456,7 @@ /attribute attribute name=useDisposableConnectionFacade required=false p(boolean) Set this to true if you wish to put a facade on your connection so that it cannot be reused after it has been closed. This prevents a thread holding on to a - reference of a connection it has already called closed on, to execute queries on it. Default value is codefalse/code for backwards compatibility. + reference of a connection it has already called closed on, to execute queries on it. Default value is codetrue/code. /p /attribute attribute name=logValidationErrors required=false - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1305866 - in /tomcat/tc7.0.x/trunk: modules/ webapps/docs/changelog.xml
Author: fhanik Date: Tue Mar 27 15:12:13 2012 New Revision: 1305866 URL: http://svn.apache.org/viewvc?rev=1305866view=rev Log: Complete the fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=52002 useDisposableConnectionFacade is by default true Modified: tomcat/tc7.0.x/trunk/modules/ (props changed) tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/modules/ -- --- svn:externals (original) +++ svn:externals Tue Mar 27 15:12:13 2012 @@ -1 +1 @@ -^/tomcat/trunk/modules/jdbc-pool@1303096 jdbc-pool +^/tomcat/trunk/modules/jdbc-pool@1305863 jdbc-pool 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=1305866r1=1305865r2=1305866view=diff == --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Tue Mar 27 15:12:13 2012 @@ -223,7 +223,9 @@ /fix fix bug52002/bug (rev1302948/rev): -Add in configuration option to disallow connection reuse. (fhanik) +Add in configuration option to disallow connection reuse. +(rev1305862/rev): +useDisposableConnectionFacade is by default enabled (fhanik) /fix fix bug52493/bug (rev1302969/rev): - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 52002] Pool re-opens and re-issues closed connection
https://issues.apache.org/bugzilla/show_bug.cgi?id=52002 Filip Hanik fha...@apache.org changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution||FIXED --- Comment #8 from Filip Hanik fha...@apache.org 2012-03-27 15:12:25 UTC --- The Facade is now enabled by default Fixed in r1305861 r1305862 r1305866 -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 52066] ConnectionPool.borrowConnection swallows interrupt state.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52066 Filip Hanik fha...@apache.org changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution||WONTFIX --- Comment #5 from Filip Hanik fha...@apache.org 2012-03-27 15:16:28 UTC --- Our library could definitely initiate the interruption. The easiest use case would be pool.close() to get rid of all the waiting threads. and the waiting thread in this case, would receive a SQLException In the above use case, it should absolutely be cleared. Since the waiting thread receives the SQLException, I am still not convinced. the call DataSource.getConnection does not have any interrupted exceptions associated with it. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: AccessLogValve enhancement
That improved my timings considerably. Instead of between 300 - 1100, they are between 100 - 330. However, they are still slower than the current mechanism. (Although, I am not sure how much this benchmark is worth, anyway.) I would imagine that the Async logger has lots of optimizations in it to handle the threading aspects; I wonder if it would be better under load than the current mechanism? This info is not going to catalina.out. Other comments? Suggestions for direction: 1) I can add my outputLoggerName attribute, which will switch the valve to use the JULI logger 2) I can create some sort of AccessLogWriter that the AccessLogValves will delegate their writing to - With 2 implementations, one being the current method and one being a JULI implementation - Potentially removing one in the future if performance is not an issue. 3) I can just add an attribute to the AccessLogValves to automatically delete older files 4) I can just make my own private subclass to do what I want, and leave the tomcat code unaltered 5) Scrap the current file writing implementation in the AccessLogValve and go straight JULI I would welcome any advice. Mark On Tue, Mar 27, 2012 at 9:46 AM, Konstantin Kolinko knst.koli...@gmail.comwrote: 2012/3/27 Mark Claassen markclaass...@gmail.com: I did a quick performance test, and it is true that the default mechanism is quite a bit faster than the standard JULI logger. For this test, I just modified the source code to write each log message 1000 times. The first set of timings (in millis) is from the current AccessLogValve, and the second set is using JULI. AccessLogValve Elapsed Time: 8 AccessLogValve Elapsed Time: 19 AccessLogValve Elapsed Time: 63 AccessLogValve Elapsed Time: 6 AccessLogValve Elapsed Time: 7 AccessLogValve Elapsed Time: 8 INFO: AccessLogValve Elapsed Time: 830 INFO: AccessLogValve Elapsed Time: 1122 INFO: AccessLogValve Elapsed Time: 451 INFO: AccessLogValve Elapsed Time: 531 INFO: AccessLogValve Elapsed Time: 764 INFO: AccessLogValve Elapsed Time: 347 1. Try to configure JULI with org.apache.juli.AsyncFileHandler. It might show better numbers. (The usual FileHandler by default performs flush() after each log message). 2. Is the same printed to console? If yes then remove ConsoleHandler. Best regards, Konstantin Kolinko - 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-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/2893 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1305859 Blamelist: fhanik Build succeeded! sincerely, -The Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
buildbot 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/507 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] 1305866 Blamelist: fhanik BUILD FAILED: failed compile_1 sincerely, -The Buildbot
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/2894 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1305862 Blamelist: fhanik BUILD FAILED: failed compile_1 sincerely, -The Buildbot
[GUMP@vmgump]: Project tomcat-trunk-test (in module tomcat-trunk) failed
To whom it may engage... This is an automated request, but not an unsolicited one. For more information please visit http://gump.apache.org/nagged.html, and/or contact the folk at gene...@gump.apache.org. Project tomcat-trunk-test has an issue affecting its community integration. This issue affects 1 projects. The current state of this project is 'Failed', with reason 'Build Failed'. For reference only, the following projects are affected by this: - tomcat-trunk-test : Tomcat 8.x, a web server implementing Java Servlet 3.1, ... Full details are available at: http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test/index.html That said, some information snippets are provided here. The following annotations (debug/informational/warning/error messages) were provided: -DEBUG- Dependency on tomcat-trunk-dbcp exists, no need to add for property tomcat-dbcp-src.jar. -DEBUG- Dependency on commons-daemon exists, no need to add for property commons-daemon.native.src.tgz. -DEBUG- Dependency on commons-daemon exists, no need to add for property tomcat-native.tar.gz. -DEBUG- Dependency on tomcat-trunk-dbcp exists, no need to add for property tomcat-dbcp.home. -INFO- Failed with reason build failed -INFO- Project Reports in: /srv/gump/public/workspace/tomcat-trunk/output/build/logs The following work was performed: http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test/gump_work/build_tomcat-trunk_tomcat-trunk-test.html Work Name: build_tomcat-trunk_tomcat-trunk-test (Type: Build) Work ended in a state of : Failed Elapsed: 22 mins 10 secs Command Line: /usr/lib/jvm/java-6-openjdk/bin/java -Djava.awt.headless=true -Dbuild.sysclasspath=only org.apache.tools.ant.Main -Dgump.merge=/srv/gump/public/gump/work/merge.xml -Djunit.jar=/srv/gump/public/workspace/junit/dist/junit-27032012.jar -Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-27032012-native-src.tar.gz -Dtomcat-native.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-27032012-native-src.tar.gz -Dexamples.sources.skip=true -Dtomcat-dbcp.home=/srv/gump/public/workspace/tomcat-trunk/tomcat-deps -Djdt.jar=/srv/gump/packages/eclipse/plugins/org.eclipse.jdt.core_3.4.2/jdtcore.jar -Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-27032012.jar -Dtomcat-dbcp-src.jar=/srv/gump/public/workspace/tomcat-trunk/tomcat-deps/tomcat-dbcp-src.jar -Dtest.accesslog=true -Dcommons-pool.home=/srv/gump/public/workspace/commons-pool-1.x -Dcommons-dbcp.home=/ srv/gump/public/workspace/commons-dbcp-1.x -Dtomcat-dbcp.jar=/srv/gump/public/workspace/tomcat-trunk/tomcat-deps/tomcat-dbcp-27032012.jar test [Working Directory: /srv/gump/public/workspace/tomcat-trunk] CLASSPATH: /usr/lib/jvm/java-6-openjdk/lib/tools.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-trunk/output/testclasses:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/servlet-api.jar:/srv/gump/public/workspace/tomcat-trunk/outp ut/build/lib/jsp-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/el-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-ant.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-coyote.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jasper.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jasper-el.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-tribes.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-ha.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-util.jar:/srv/gump/packages/javamail-1.4/mail.jar:/srv/gump/packages/javamail-1.4/lib/mailapi.jar:/srv/gump/packages/jaf-1.1ea/activation.jar:/srv/gump/packages/eclipse/plugins/org.eclipse.jdt.core_3.4.2/jdtcore.jar:/srv/gump/public/workspace/tomcat-tr
DO NOT REPLY [Bug 52066] ConnectionPool.borrowConnection swallows interrupt state.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52066 Alexander Pogrebnyak alex-pub.apache-...@reflexion.net changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|WONTFIX | --- Comment #6 from Alexander Pogrebnyak alex-pub.apache-...@reflexion.net 2012-03-27 17:03:49 UTC --- (In reply to comment #5) Our library could definitely initiate the interruption. The easiest use case would be pool.close() to get rid of all the waiting threads. and the waiting thread in this case, would receive a SQLException In the above use case, it should absolutely be cleared. Since the waiting thread receives the SQLException, I am still not convinced. the call DataSource.getConnection does not have any interrupted exceptions associated with it. OK, Let's get to this problem from the other end. Is it possible to provide a user preference that by default executes a current code, but when set preserved the thread interrupted status? I really hate to implement yet another facade to your otherwise feature complete product. If this approach is acceptable to you I am willing to contribute the required patch for review. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1305921 - /tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DisposableConnectionFacade.java
Author: fhanik Date: Tue Mar 27 17:32:49 2012 New Revision: 1305921 URL: http://svn.apache.org/viewvc?rev=1305921view=rev Log: simplify logic, less comparisons on each call Modified: tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DisposableConnectionFacade.java Modified: tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DisposableConnectionFacade.java URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DisposableConnectionFacade.java?rev=1305921r1=1305920r2=1305921view=diff == --- tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DisposableConnectionFacade.java (original) +++ tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DisposableConnectionFacade.java Tue Mar 27 17:32:49 2012 @@ -42,14 +42,16 @@ public class DisposableConnectionFacade @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { -if (compare(ISCLOSED_VAL, method) getNext() == null) { -return Boolean.TRUE; -} -if (compare(CLOSE_VAL, method) getNext() == null) { -return null; -} -if (compare(ISVALID_VAL, method) getNext() == null) { -return Boolean.FALSE; +if (getNext()==null) { +if (compare(ISCLOSED_VAL, method)) { +return Boolean.TRUE; +} +else if (compare(CLOSE_VAL, method)) { +return null; +} +else if (compare(ISVALID_VAL, method)) { +return Boolean.FALSE; +} } try { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1305931 - in /tomcat/trunk/modules/jdbc-pool: doc/ src/main/java/org/apache/tomcat/jdbc/pool/ src/main/java/org/apache/tomcat/jdbc/pool/jmx/
Author: fhanik Date: Tue Mar 27 17:55:41 2012 New Revision: 1305931 URL: http://svn.apache.org/viewvc?rev=1305931view=rev Log: https://issues.apache.org/bugzilla/show_bug.cgi?id=52066 Add in a configuration attribute to allow a thread interrupt state to be retained for the calling library to see Modified: tomcat/trunk/modules/jdbc-pool/doc/jdbc-pool.xml tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PoolConfiguration.java tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PoolProperties.java tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPool.java Modified: tomcat/trunk/modules/jdbc-pool/doc/jdbc-pool.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/doc/jdbc-pool.xml?rev=1305931r1=1305930r2=1305931view=diff == --- tomcat/trunk/modules/jdbc-pool/doc/jdbc-pool.xml (original) +++ tomcat/trunk/modules/jdbc-pool/doc/jdbc-pool.xml Tue Mar 27 17:55:41 2012 @@ -463,6 +463,11 @@ p(boolean) Set this to true to log errors during the validation phase to the log file. If set to true, errors will be logged as SEVERE. Default value is codefalse/code for backwards compatibility. /p /attribute +attribute name=propagateInterruptState required=false + p(boolean) Set this to true to propagate the interrupt state for a thread that has been interrupted (not clearing the interrupt state). Default value is codefalse/code for backwards compatibility. + /p +/attribute + /attributes /subsection /section Modified: tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java?rev=1305931r1=1305930r2=1305931view=diff == --- tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java (original) +++ tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java Tue Mar 27 17:55:41 2012 @@ -381,7 +381,9 @@ public class ConnectionPool { } } //while } catch (InterruptedException ex) { -Thread.interrupted(); +if (!getPoolProperties().getPropagateInterruptState()) { +Thread.interrupted(); +} } if (pool.size()==0 force pool!=busy) pool = busy; } @@ -626,7 +628,9 @@ public class ConnectionPool { //retrieve an existing connection con = idle.poll(timetowait, TimeUnit.MILLISECONDS); } catch (InterruptedException ex) { -Thread.interrupted();//clear the flag, and bail out +if (!getPoolProperties().getPropagateInterruptState()) { +Thread.interrupted(); +} SQLException sx = new SQLException(Pool wait interrupted.); sx.initCause(ex); throw sx; Modified: tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java?rev=1305931r1=1305930r2=1305931view=diff == --- tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java (original) +++ tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java Tue Mar 27 17:55:41 2012 @@ -1268,4 +1268,20 @@ public class DataSourceProxy implements return getPoolProperties().getLogValidationErrors(); } +/** + * {@inheritDoc} + */ +@Override +public boolean getPropagateInterruptState() { +return getPoolProperties().getPropagateInterruptState(); +} + +/** + * {@inheritDoc} + */ +@Override +public void setPropagateInterruptState(boolean propagateInterruptState) { + getPoolProperties().setPropagateInterruptState(propagateInterruptState); +} + } Modified: tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PoolConfiguration.java URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PoolConfiguration.java?rev=1305931r1=1305930r2=1305931view=diff == ---
svn commit: r1305933 - in /tomcat/tc7.0.x/trunk: modules/ webapps/docs/changelog.xml
Author: fhanik Date: Tue Mar 27 17:58:41 2012 New Revision: 1305933 URL: http://svn.apache.org/viewvc?rev=1305933view=rev Log: https://issues.apache.org/bugzilla/show_bug.cgi?id=52066 Add in configuration option to allow a thread to retain its interrupt state. Modified: tomcat/tc7.0.x/trunk/modules/ (props changed) tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/modules/ -- --- svn:externals (original) +++ svn:externals Tue Mar 27 17:58:41 2012 @@ -1 +1 @@ -^/tomcat/trunk/modules/jdbc-pool@1305863 jdbc-pool +^/tomcat/trunk/modules/jdbc-pool@1305931 jdbc-pool 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=1305933r1=1305932r2=1305933view=diff == --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Tue Mar 27 17:58:41 2012 @@ -239,6 +239,11 @@ bug50860/bug (rev1303031/rev): Add in option to configure logging for validation errors. (fhanik) /fix + fix +bug52066/bug (rev1305931/rev): +Add in configuration option, progagateInterruptState, to allow threads to +retain the interrupt state. (fhanik) + /fix /changelog /subsection subsection name=Other - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 52066] ConnectionPool.borrowConnection swallows interrupt state.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52066 Filip Hanik fha...@apache.org changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution||FIXED --- Comment #7 from Filip Hanik fha...@apache.org 2012-03-27 17:59:03 UTC --- Good idea Fixed in r1305931 r1305933 -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
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/2895 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1305921 Blamelist: fhanik Build succeeded! sincerely, -The Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 52744] [Jasper] JSP files are always recompiled in development mode
https://issues.apache.org/bugzilla/show_bug.cgi?id=52744 --- Comment #9 from Mark Thomas ma...@apache.org 2012-03-27 18:10:33 UTC --- I can't reproduce this. What tool on what platform is being used to create zip files with entries with a precision of better than 1s? -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 52744] [Jasper] JSP files are always recompiled in development mode
https://issues.apache.org/bugzilla/show_bug.cgi?id=52744 Mark Thomas ma...@apache.org changed: What|Removed |Added Status|REOPENED|NEEDINFO -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 52853] @HandlesTypes not resolving classes when added as repository directory
https://issues.apache.org/bugzilla/show_bug.cgi?id=52853 Mark Thomas ma...@apache.org changed: What|Removed |Added Status|REOPENED|NEEDINFO --- Comment #8 from Mark Thomas ma...@apache.org 2012-03-27 18:13:35 UTC --- Waiting for a test case that reproduces this. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1305943 - /tomcat/trunk/java/org/apache/catalina/core/StandardServer.java
Author: markt Date: Tue Mar 27 18:28:35 2012 New Revision: 1305943 URL: http://svn.apache.org/viewvc?rev=1305943view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=52833 Fix NPE in some embedded / osgi scenarios where the class loader my not have the system class loader as a parent. Modified: tomcat/trunk/java/org/apache/catalina/core/StandardServer.java Modified: tomcat/trunk/java/org/apache/catalina/core/StandardServer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardServer.java?rev=1305943r1=1305942r2=1305943view=diff == --- tomcat/trunk/java/org/apache/catalina/core/StandardServer.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/StandardServer.java Tue Mar 27 18:28:35 2012 @@ -796,11 +796,10 @@ public final class StandardServer extend // Populate the extension validator with JARs from common and shared // class loaders if (getCatalina() != null) { -ClassLoader cl = -getCatalina().getParentClassLoader(); +ClassLoader cl = getCatalina().getParentClassLoader(); // Walk the class loader hierarchy. Stop at the system class loader. // This will add the shared (if present) and common class loaders -while (cl != ClassLoader.getSystemClassLoader()) { +while (cl != null cl != ClassLoader.getSystemClassLoader()) { if (cl instanceof URLClassLoader) { URL[] urls = ((URLClassLoader) cl).getURLs(); for (URL url : urls) { - 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/2896 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1305931 Blamelist: fhanik BUILD FAILED: failed compile_1 sincerely, -The Buildbot
svn commit: r1305949 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/core/StandardServer.java webapps/docs/changelog.xml
Author: markt Date: Tue Mar 27 18:41:42 2012 New Revision: 1305949 URL: http://svn.apache.org/viewvc?rev=1305949view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=52833 Fix NPE in some embedded / osgi scenarios where the class loader my not have the system class loader as a parent. Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardServer.java tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1305943 Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardServer.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardServer.java?rev=1305949r1=1305948r2=1305949view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardServer.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardServer.java Tue Mar 27 18:41:42 2012 @@ -784,11 +784,10 @@ public final class StandardServer extend // Populate the extension validator with JARs from common and shared // class loaders if (getCatalina() != null) { -ClassLoader cl = -getCatalina().getParentClassLoader(); +ClassLoader cl = getCatalina().getParentClassLoader(); // Walk the class loader hierarchy. Stop at the system class loader. // This will add the shared (if present) and common class loaders -while (cl != ClassLoader.getSystemClassLoader()) { +while (cl != null cl != ClassLoader.getSystemClassLoader()) { if (cl instanceof URLClassLoader) { URL[] urls = ((URLClassLoader) cl).getURLs(); for (URL url : urls) { 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=1305949r1=1305948r2=1305949view=diff == --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Tue Mar 27 18:41:42 2012 @@ -90,6 +90,11 @@ codejavax.naming.Name/code to identify the resource rather than a codejava.lang.String/code. (markt) /fix + fix +bug52833/bug: Handle the case where the parent class loader for the +Catalina object does not have the system class loader in its hierarchy. +This may happen when embedding. Patch provided by olamy. (markt) + /fix add bug52839/bug: Add a unit test for DigestAuthenticator and SingleSignOn. Patch provide by Brian Burch. (markt) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 52833] NPE with 7.0.26
https://issues.apache.org/bugzilla/show_bug.cgi?id=52833 Mark Thomas ma...@apache.org changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Comment #14 from Mark Thomas ma...@apache.org 2012-03-27 18:41:46 UTC --- Given that the root cause is a class loader that does not have the 'normal' hierarchy we see in the normal (non-embedded) use case (rather than something setting the Catalina's parent class loader to null) then adding the null check is a reasonable solution. I've looked for other places in the codebase where we traverse the class loader hierarchy and don't see a need for further changes. The fix has been applied to trunk and 7.0.x and will be included in 7.0.27 onwards. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1305951 - /tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPool.java
Author: markt Date: Tue Mar 27 18:49:51 2012 New Revision: 1305951 URL: http://svn.apache.org/viewvc?rev=1305951view=rev Log: Fix unused import Modified: tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPool.java Modified: tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPool.java URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPool.java?rev=1305951r1=1305950r2=1305951view=diff == --- tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPool.java (original) +++ tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPool.java Tue Mar 27 18:49:51 2012 @@ -30,7 +30,6 @@ import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; import org.apache.tomcat.jdbc.pool.PoolConfiguration; import org.apache.tomcat.jdbc.pool.PoolProperties.InterceptorDefinition; -import org.apache.tomcat.jdbc.pool.PoolExhaustedException; import org.apache.tomcat.jdbc.pool.PoolUtilities; import org.apache.tomcat.jdbc.pool.Validator; - 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-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/2897 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1305943 Blamelist: markt Build succeeded! sincerely, -The Buildbot
DO NOT REPLY [Bug 52318] Version in tomcat-jdbc POM is conflicted with Version in MANIFEST for JULI JAR
https://issues.apache.org/bugzilla/show_bug.cgi?id=52318 --- Comment #8 from pan4o ssku4...@web.de 2012-03-27 19:20:09 UTC --- (In reply to comment #7) Yes, because ... tomcat-jdbc in the version 7.0.22 has a dependency in the pom file to tomcat-juli in the version 7.0.22 ... soo MANIFEST: Import-Package: org.apache.juli.logging;version=[7.0.0, 7.1.0) (In reply to comment #6) [6.0.18, 7.0.0) means all versions from including 6.0.18 to except 7.0.0 - not including versions under 6.0.18 or above 7.0.0. To fix this issue, you have to change the MANIFEST: MANIFEST: org.apache.juli.logging;version=[7.0.0, 7.1.0) OR org.apache.juli.logging;version=[7.0.0, 8.0.0) Please refet to my last post in Bug 52381 Regards Pancho aren't you excluding version 6.0.18+ here? -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1305965 - /tomcat/trunk/java/org/apache/catalina/startup/WebAnnotationSet.java
Author: markt Date: Tue Mar 27 19:20:10 2012 New Revision: 1305965 URL: http://svn.apache.org/viewvc?rev=1305965view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=52974 Fix NameNotFoundException when field/method is annotated with @Resource annotation Patch provided by Violet Agg. Modified: tomcat/trunk/java/org/apache/catalina/startup/WebAnnotationSet.java Modified: tomcat/trunk/java/org/apache/catalina/startup/WebAnnotationSet.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/WebAnnotationSet.java?rev=1305965r1=1305964r2=1305965view=diff == --- tomcat/trunk/java/org/apache/catalina/startup/WebAnnotationSet.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/WebAnnotationSet.java Tue Mar 27 19:20:10 2012 @@ -19,6 +19,11 @@ package org.apache.catalina.startup; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.security.AccessController; +import java.security.PrivilegedAction; + import javax.annotation.Resource; import javax.annotation.Resources; import javax.annotation.security.DeclareRoles; @@ -26,7 +31,9 @@ import javax.annotation.security.RunAs; import org.apache.catalina.Container; import org.apache.catalina.Context; +import org.apache.catalina.Globals; import org.apache.catalina.Wrapper; +import org.apache.catalina.core.DefaultInstanceManager; import org.apache.catalina.deploy.ContextEnvironment; import org.apache.catalina.deploy.ContextResource; import org.apache.catalina.deploy.ContextResourceEnvRef; @@ -44,6 +51,7 @@ import org.apache.catalina.deploy.Messag public class WebAnnotationSet { +private static final String SEPARATOR = /; // - Public Methods @@ -68,9 +76,17 @@ public class WebAnnotationSet { * Process the annotations for the listeners. */ protected static void loadApplicationListenerAnnotations(Context context) { +Class? classClass = null; String[] applicationListeners = context.findApplicationListeners(); for (int i = 0; i applicationListeners.length; i++) { -loadClassAnnotation(context, applicationListeners[i]); +classClass = loadClass(context, applicationListeners[i]); +if (classClass == null) { +continue; +} + +loadClassAnnotation(context, classClass); +loadFieldsAnnotation(context, classClass); +loadMethodsAnnotation(context, classClass); } } @@ -79,9 +95,17 @@ public class WebAnnotationSet { * Process the annotations for the filters. */ protected static void loadApplicationFilterAnnotations(Context context) { +Class? classClass = null; FilterDef[] filterDefs = context.findFilterDefs(); for (int i = 0; i filterDefs.length; i++) { -loadClassAnnotation(context, (filterDefs[i]).getFilterClass()); +classClass = loadClass(context, (filterDefs[i]).getFilterClass()); +if (classClass == null) { +continue; +} + +loadClassAnnotation(context, classClass); +loadFieldsAnnotation(context, classClass); +loadMethodsAnnotation(context, classClass); } } @@ -91,7 +115,6 @@ public class WebAnnotationSet { */ protected static void loadApplicationServletAnnotations(Context context) { -ClassLoader classLoader = context.getLoader().getClassLoader(); Wrapper wrapper = null; Class? classClass = null; @@ -104,19 +127,15 @@ public class WebAnnotationSet { continue; } -try { -classClass = classLoader.loadClass(wrapper.getServletClass()); -} catch (ClassNotFoundException e) { -// We do nothing -} catch (NoClassDefFoundError e) { -// We do nothing -} - +classClass = loadClass(context, wrapper.getServletClass()); if (classClass == null) { continue; } -loadClassAnnotation(context, wrapper.getServletClass()); +loadClassAnnotation(context, classClass); +loadFieldsAnnotation(context, classClass); +loadMethodsAnnotation(context, classClass); + /* Process RunAs annotation which can be only on servlets. * Ref JSR 250, equivalent to the run-as element in * the deployment descriptor @@ -135,25 +154,9 @@ public class WebAnnotationSet { /** * Process the annotations on a context for a given className. */ -protected static void loadClassAnnotation(Context context, String fileString) { - -ClassLoader classLoader =
svn commit: r1305966 - /tomcat/trunk/modules/jdbc-pool/doc/jdbc-pool.xml
Author: markt Date: Tue Mar 27 19:20:22 2012 New Revision: 1305966 URL: http://svn.apache.org/viewvc?rev=1305966view=rev Log: Whitespace police Modified: tomcat/trunk/modules/jdbc-pool/doc/jdbc-pool.xml Modified: tomcat/trunk/modules/jdbc-pool/doc/jdbc-pool.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/doc/jdbc-pool.xml?rev=1305966r1=1305965r2=1305966view=diff == --- tomcat/trunk/modules/jdbc-pool/doc/jdbc-pool.xml (original) +++ tomcat/trunk/modules/jdbc-pool/doc/jdbc-pool.xml Tue Mar 27 19:20:22 2012 @@ -467,7 +467,7 @@ p(boolean) Set this to true to propagate the interrupt state for a thread that has been interrupted (not clearing the interrupt state). Default value is codefalse/code for backwards compatibility. /p /attribute - + /attributes /subsection /section - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1305971 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/startup/WebAnnotationSet.java webapps/docs/changelog.xml
Author: markt Date: Tue Mar 27 19:27:39 2012 New Revision: 1305971 URL: http://svn.apache.org/viewvc?rev=1305971view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=52974 Fix NameNotFoundException when field/method is annotated with @Resource annotation Patch provided by Violet Agg. Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/WebAnnotationSet.java tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1305965 Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/WebAnnotationSet.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/WebAnnotationSet.java?rev=1305971r1=1305970r2=1305971view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/WebAnnotationSet.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/WebAnnotationSet.java Tue Mar 27 19:27:39 2012 @@ -19,6 +19,11 @@ package org.apache.catalina.startup; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.security.AccessController; +import java.security.PrivilegedAction; + import javax.annotation.Resource; import javax.annotation.Resources; import javax.annotation.security.DeclareRoles; @@ -26,7 +31,9 @@ import javax.annotation.security.RunAs; import org.apache.catalina.Container; import org.apache.catalina.Context; -import org.apache.catalina.core.StandardWrapper; +import org.apache.catalina.Globals; +import org.apache.catalina.Wrapper; +import org.apache.catalina.core.DefaultInstanceManager; import org.apache.catalina.deploy.ContextEnvironment; import org.apache.catalina.deploy.ContextResource; import org.apache.catalina.deploy.ContextResourceEnvRef; @@ -43,8 +50,9 @@ import org.apache.catalina.deploy.Messag */ public class WebAnnotationSet { - - + +private static final String SEPARATOR = /; + // - Public Methods @@ -68,9 +76,17 @@ public class WebAnnotationSet { * Process the annotations for the listeners. */ protected static void loadApplicationListenerAnnotations(Context context) { +Class? classClass = null; String[] applicationListeners = context.findApplicationListeners(); for (int i = 0; i applicationListeners.length; i++) { -loadClassAnnotation(context, applicationListeners[i]); +classClass = loadClass(context, applicationListeners[i]); +if (classClass == null) { +continue; +} + +loadClassAnnotation(context, classClass); +loadFieldsAnnotation(context, classClass); +loadMethodsAnnotation(context, classClass); } } @@ -79,9 +95,17 @@ public class WebAnnotationSet { * Process the annotations for the filters. */ protected static void loadApplicationFilterAnnotations(Context context) { +Class? classClass = null; FilterDef[] filterDefs = context.findFilterDefs(); for (int i = 0; i filterDefs.length; i++) { -loadClassAnnotation(context, (filterDefs[i]).getFilterClass()); +classClass = loadClass(context, (filterDefs[i]).getFilterClass()); +if (classClass == null) { +continue; +} + +loadClassAnnotation(context, classClass); +loadFieldsAnnotation(context, classClass); +loadMethodsAnnotation(context, classClass); } } @@ -91,32 +115,27 @@ public class WebAnnotationSet { */ protected static void loadApplicationServletAnnotations(Context context) { -ClassLoader classLoader = context.getLoader().getClassLoader(); -StandardWrapper wrapper = null; +Wrapper wrapper = null; Class? classClass = null; Container[] children = context.findChildren(); for (int i = 0; i children.length; i++) { -if (children[i] instanceof StandardWrapper) { +if (children[i] instanceof Wrapper) { -wrapper = (StandardWrapper) children[i]; +wrapper = (Wrapper) children[i]; if (wrapper.getServletClass() == null) { continue; } -try { -classClass = classLoader.loadClass(wrapper.getServletClass()); -} catch (ClassNotFoundException e) { -// We do nothing -} catch (NoClassDefFoundError e) { -// We do nothing -} - +classClass = loadClass(context, wrapper.getServletClass());
DO NOT REPLY [Bug 52974] NameNotFoundException is thrown when field/method is annotated with @Resource annotation
https://issues.apache.org/bugzilla/show_bug.cgi?id=52974 Mark Thomas ma...@apache.org changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Comment #2 from Mark Thomas ma...@apache.org 2012-03-27 19:28:05 UTC --- Many thanks for the patch. It has been applied to trunk and 7.0.x and will be included in 7.0.27 onwards. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
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/2898 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1305951 Blamelist: markt BUILD FAILED: failed compile_1 sincerely, -The Buildbot
Time for 7.0.27
The 7.0.x change log is looking long again and with the only open TC7 bugs in NEEDINFO state, I am going to start the process of rolling the 7.0.27 release. I'm not going to tag 7.0.27 until I've confirmed that all the various tests pass and they'll probably take a day or so to run. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1305976 - /tomcat/tc7.0.x/trunk/modules/
Author: markt Date: Tue Mar 27 19:35:13 2012 New Revision: 1305976 URL: http://svn.apache.org/viewvc?rev=1305976view=rev Log: Pick-up clean-up Modified: tomcat/tc7.0.x/trunk/modules/ (props changed) Propchange: tomcat/tc7.0.x/trunk/modules/ -- --- svn:externals (original) +++ svn:externals Tue Mar 27 19:35:13 2012 @@ -1 +1 @@ -^/tomcat/trunk/modules/jdbc-pool@1305931 jdbc-pool +^/tomcat/trunk/modules/jdbc-pool@1305966 jdbc-pool - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [VOTE] Release Apache Taglibs Parent POM 3
+1 2012/3/26 Jeremy Boynes jboy...@apache.org: The proposed 3 release of Apache Taglibs Parent POM is now available for voting. This release addresses issues found during the 1 release process including duplicate LICENSE files and poor site configuration, and updates the copyright date in the NOTICE file from release 2 (withdrawn). The Maven staging repo is: https://repository.apache.org/content/repositories/orgapachetomcat-111/ and SVN tag is: http://svn.apache.org/repos/asf/tomcat/taglibs/taglibs-parent/tags/taglibs-parent-3/ Please vote on whether Apache Taglibs Parent 3 should be: [+1] Released, or [-1] Not released because ... Thanks Jeremy -- Olivier Lamy Talend: http://coders.talend.com 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
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/2899 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1305966 Blamelist: markt Build succeeded! sincerely, -The Buildbot
DO NOT REPLY [Bug 51744] JNDI Lookup Error after a Context is closed
https://issues.apache.org/bugzilla/show_bug.cgi?id=51744 --- Comment #15 from mmaure...@gmail.com 2012-03-27 22:03:48 UTC --- I'm using Tomcat 7.0.25 and am still seeing this same issue. Any attempt to close a Context object results in the exception Context is read only, and I am unable to instantiate a JNDI DataSource. My code worked fine on previous versions (earlier than 7.0.22), but is now broken. Are we supposed to just leave the Context open, and it will not cause memory leaks? -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 51744] JNDI Lookup Error after a Context is closed
https://issues.apache.org/bugzilla/show_bug.cgi?id=51744 mmaure...@gmail.com changed: What|Removed |Added CC||mmaure...@gmail.com -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Time for 7.0.27
2012/3/27 Mark Thomas ma...@apache.org: The 7.0.x change log is looking long again and with the only open TC7 bugs in NEEDINFO state, I am going to start the process of rolling the 7.0.27 release. I'm not going to tag 7.0.27 until I've confirmed that all the various tests pass and they'll probably take a day or so to run. There are two issues that I know 1) a problem from r1210012 2) performance issue with ExpressionFactory.newInstance(), reported in [1] on dev@ [1] http://tomcat.markmail.org/thread/7bbvzmkvyvryvn44 I'll commit interim fix for 1) shortly and add 2) to bugzilla. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1306130 - in /tomcat/trunk/java/org/apache/catalina/startup: LocalStrings.properties UserConfig.java
Author: kfujino Date: Wed Mar 28 02:51:21 2012 New Revision: 1306130 URL: http://svn.apache.org/viewvc?rev=1306130view=rev Log: Add support for multi-thread deployment in UserConfig. Modified: tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties tomcat/trunk/java/org/apache/catalina/startup/UserConfig.java Modified: tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties?rev=1306130r1=1306129r2=1306130view=diff == --- tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties (original) +++ tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties Wed Mar 28 02:51:21 2012 @@ -121,6 +121,7 @@ userConfig.deploying=Deploying user web userConfig.error=Error deploying web application for user {0} userConfig.start=UserConfig: Processing START userConfig.stop=UserConfig: Processing STOP +userConfig.deploy.threaded.error=Error waiting for multi-thread deployment of user directories to complete webRuleSet.absoluteOrdering=absolute-ordering element not valid in web-fragment.xml and will be ignored webRuleSet.absoluteOrderingCount=absolute-ordering element is limited to 1 occurrence webRuleSet.nameCount=name element is limited to 1 occurrence Modified: tomcat/trunk/java/org/apache/catalina/startup/UserConfig.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/UserConfig.java?rev=1306130r1=1306129r2=1306130view=diff == --- tomcat/trunk/java/org/apache/catalina/startup/UserConfig.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/UserConfig.java Wed Mar 28 02:51:21 2012 @@ -20,7 +20,11 @@ package org.apache.catalina.startup; import java.io.File; +import java.util.ArrayList; import java.util.Enumeration; +import java.util.List; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Future; import org.apache.catalina.Context; import org.apache.catalina.Host; @@ -258,14 +262,24 @@ public final class UserConfig return; } +ExecutorService executor = host.getStartStopExecutor(); +ListFuture? results = new ArrayListFuture?(); + // Deploy the web application (if any) for each defined user EnumerationString users = database.getUsers(); while (users.hasMoreElements()) { String user = users.nextElement(); String home = database.getHome(user); -deploy(user, home); +results.add(executor.submit(new DeployUserDirectory(this, user, home))); } +for (Future? result : results) { +try { +result.get(); +} catch (Exception e) { + host.getLogger().error(sm.getString(userConfig.deploy.threaded.error), e); +} +} } @@ -334,5 +348,22 @@ public final class UserConfig } +private static class DeployUserDirectory implements Runnable { + +private UserConfig config; +private String user; +private String home; + +public DeployUserDirectory(UserConfig config, String user, String home) { +this.config = config; +this.user = user; +this.home= home; +} + +@Override +public void run() { +config.deploy(user, home); +} +} } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1306131 - in /tomcat/tc7.0.x/trunk: java/org/apache/catalina/startup/LocalStrings.properties java/org/apache/catalina/startup/UserConfig.java webapps/docs/changelog.xml
Author: kfujino Date: Wed Mar 28 02:55:37 2012 New Revision: 1306131 URL: http://svn.apache.org/viewvc?rev=1306131view=rev Log: Add support for multi-thread deployment in UserConfig. Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/LocalStrings.properties tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/UserConfig.java tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/LocalStrings.properties?rev=1306131r1=1306130r2=1306131view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/LocalStrings.properties (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/LocalStrings.properties Wed Mar 28 02:55:37 2012 @@ -128,6 +128,7 @@ userConfig.deploying=Deploying user web userConfig.error=Error deploying web application for user {0} userConfig.start=UserConfig: Processing START userConfig.stop=UserConfig: Processing STOP +userConfig.deploy.threaded.error=Error waiting for multi-thread deployment of user directories to complete webRuleSet.absoluteOrdering=absolute-ordering element not valid in web-fragment.xml and will be ignored webRuleSet.absoluteOrderingCount=absolute-ordering element is limited to 1 occurrence webRuleSet.nameCount=name element is limited to 1 occurrence Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/UserConfig.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/UserConfig.java?rev=1306131r1=1306130r2=1306131view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/UserConfig.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/UserConfig.java Wed Mar 28 02:55:37 2012 @@ -20,7 +20,11 @@ package org.apache.catalina.startup; import java.io.File; +import java.util.ArrayList; import java.util.Enumeration; +import java.util.List; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Future; import org.apache.catalina.Context; import org.apache.catalina.Host; @@ -258,14 +262,24 @@ public final class UserConfig return; } +ExecutorService executor = host.getStartStopExecutor(); +ListFuture? results = new ArrayListFuture?(); + // Deploy the web application (if any) for each defined user EnumerationString users = database.getUsers(); while (users.hasMoreElements()) { String user = users.nextElement(); String home = database.getHome(user); -deploy(user, home); +results.add(executor.submit(new DeployUserDirectory(this, user, home))); } +for (Future? result : results) { +try { +result.get(); +} catch (Exception e) { + host.getLogger().error(sm.getString(userConfig.deploy.threaded.error), e); +} +} } @@ -334,5 +348,22 @@ public final class UserConfig } +private static class DeployUserDirectory implements Runnable { + +private UserConfig config; +private String user; +private String home; + +public DeployUserDirectory(UserConfig config, String user, String home) { +this.config = config; +this.user = user; +this.home= home; +} + +@Override +public void run() { +config.deploy(user, home); +} +} } 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=1306131r1=1306130r2=1306131view=diff == --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Wed Mar 28 02:55:37 2012 @@ -147,6 +147,9 @@ field/method is annotated with code@Resource/code annotation. Patch provided by Violet Agg. (markt) /fix + add +Add support for multi-thread deployment in UserConfig. (kfujino) + /add /changelog /subsection subsection name=Coyote - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[jira] [Updated] (MTOMCAT-131) maven-Tomcat-plugin Overlay Task execution fails in windows with java.io.IOException[The filename, directory name, or volume label syntax is incorrect], when targetPath
[ https://issues.apache.org/jira/browse/MTOMCAT-131?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tony Kollamparambil updated MTOMCAT-131: Priority: Critical (was: Minor) Overlay is failing in windows. And its/Overlay feature is not useful without targetpath. Please resolve it with priority maven-Tomcat-plugin Overlay Task execution fails in windows with java.io.IOException[The filename, directory name, or volume label syntax is incorrect], when targetPath is present --- Key: MTOMCAT-131 URL: https://issues.apache.org/jira/browse/MTOMCAT-131 Project: Apache Tomcat Maven Plugin Issue Type: Bug Environment: Fails in Windows, it works fine in Mac Linux/Unix Reporter: Tony Kollamparambil Priority: Critical Thanks for introducing the Overlay concept, which is very helpful. we have a scenario in which we need to overlay a war file over the other. maven install is failing with java.io exception when we build the module in WINDOWS with some path in the overlays:overlay:targetpath tag(its works fine in the mac/linux/unix/solaris). Trace : ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on project xx: Failed to copy file for overlay [ id xxx:]: The filename, directory name, or volume label syntax is incorrect - [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on project xxx-: Failed to copy file for overlay [ id xxx:]. Root Cause: As per the analysis that we had performed, its a code bug. Please refer line# 84-88 present in the http://code.google.com/p/maven-alfresco-archetypes/source/browse/trunk/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/packaging/OverlayPackagingTask.java?r=127. ie; String targetPath = overlay.getTargetPath(); if (!targetPath.endsWith( / )) { targetPath = targetPath + /; } by considering the above code snippet as a source of truth, windows will not recognize the forward slash (/) as a valid file separator. file separator would vary from OS to OS, and hence It must not be hardcoded(it works fine in linux and mac, since the file separator for these operating systems are /). System.getProperties(file.separator) can be used for computing the file separator during runtime. Please do the needful. Thanks in advance Stack Trace : [DEBUG] OverlayPackagingTask performPackaging overlay.getTargetPath() C:\projects\xxx\yy\target [INFO] Processing overlay [ id xxx:] [DEBUG] Overlay [ id xxx:] was already unpacked ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on project enrollment-rest: Failed to copy file for overlay [ id xxx:]: The filename, directory name, or volume label syntax is incorrect - [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on project xxx-: Failed to copy file for overlay [ id xxx:]. at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597)
[jira] [Updated] (MTOMCAT-131) maven-Tomcat-plugin Overlay Task execution fails in windows with java.io.IOException[The filename, directory name, or volume label syntax is incorrect], when targetPath
[ https://issues.apache.org/jira/browse/MTOMCAT-131?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tony Kollamparambil updated MTOMCAT-131: Environment: Windows (was: Fails in Windows, it works fine in Mac Linux/Unix) maven-Tomcat-plugin Overlay Task execution fails in windows with java.io.IOException[The filename, directory name, or volume label syntax is incorrect], when targetPath is present --- Key: MTOMCAT-131 URL: https://issues.apache.org/jira/browse/MTOMCAT-131 Project: Apache Tomcat Maven Plugin Issue Type: Bug Environment: Windows Reporter: Tony Kollamparambil Priority: Critical Thanks for introducing the Overlay concept, which is very helpful. we have a scenario in which we need to overlay a war file over the other. maven install is failing with java.io exception when we build the module in WINDOWS with some path in the overlays:overlay:targetpath tag(its works fine in the mac/linux/unix/solaris). Trace : ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on project xx: Failed to copy file for overlay [ id xxx:]: The filename, directory name, or volume label syntax is incorrect - [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on project xxx-: Failed to copy file for overlay [ id xxx:]. Root Cause: As per the analysis that we had performed, its a code bug. Please refer line# 84-88 present in the http://code.google.com/p/maven-alfresco-archetypes/source/browse/trunk/plugins/maven-amp-plugin/src/main/java/org/alfresco/maven/plugin/amp/packaging/OverlayPackagingTask.java?r=127. ie; String targetPath = overlay.getTargetPath(); if (!targetPath.endsWith( / )) { targetPath = targetPath + /; } by considering the above code snippet as a source of truth, windows will not recognize the forward slash (/) as a valid file separator. file separator would vary from OS to OS, and hence It must not be hardcoded(it works fine in linux and mac, since the file separator for these operating systems are /). System.getProperties(file.separator) can be used for computing the file separator during runtime. Please do the needful. Thanks in advance Stack Trace : [DEBUG] OverlayPackagingTask performPackaging overlay.getTargetPath() C:\projects\xxx\yy\target [INFO] Processing overlay [ id xxx:] [DEBUG] Overlay [ id xxx:] was already unpacked ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on project enrollment-rest: Failed to copy file for overlay [ id xxx:]: The filename, directory name, or volume label syntax is incorrect - [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on project xxx-: Failed to copy file for overlay [ id xxx:]. at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at
[GUMP@vmgump]: Project tomcat-tc7.0.x-test (in module tomcat-7.0.x) failed
To whom it may engage... This is an automated request, but not an unsolicited one. For more information please visit http://gump.apache.org/nagged.html, and/or contact the folk at gene...@gump.apache.org. Project tomcat-tc7.0.x-test has an issue affecting its community integration. This issue affects 1 projects, and has been outstanding for 4 runs. The current state of this project is 'Failed', with reason 'Build Failed'. For reference only, the following projects are affected by this: - tomcat-tc7.0.x-test : Tomcat 7.x, a web server implementing Java Servlet 3.0, ... Full details are available at: http://vmgump.apache.org/gump/public/tomcat-7.0.x/tomcat-tc7.0.x-test/index.html That said, some information snippets are provided here. The following annotations (debug/informational/warning/error messages) were provided: -DEBUG- Dependency on tomcat-tc7.0.x-dbcp exists, no need to add for property tomcat-dbcp-src.jar. -DEBUG- Dependency on commons-daemon exists, no need to add for property commons-daemon.native.src.tgz. -DEBUG- Dependency on commons-daemon exists, no need to add for property tomcat-native.tar.gz. -DEBUG- Dependency on tomcat-tc7.0.x-dbcp exists, no need to add for property tomcat-dbcp.home. -INFO- Failed with reason build failed -INFO- Project Reports in: /srv/gump/public/workspace/tomcat-7.0.x/output/build/logs The following work was performed: http://vmgump.apache.org/gump/public/tomcat-7.0.x/tomcat-tc7.0.x-test/gump_work/build_tomcat-7.0.x_tomcat-tc7.0.x-test.html Work Name: build_tomcat-7.0.x_tomcat-tc7.0.x-test (Type: Build) Work ended in a state of : Failed Elapsed: 22 mins 11 secs Command Line: /usr/lib/jvm/java-6-openjdk/bin/java -Djava.awt.headless=true -Dbuild.sysclasspath=only org.apache.tools.ant.Main -Dgump.merge=/srv/gump/public/gump/work/merge.xml -Djunit.jar=/srv/gump/public/workspace/junit/dist/junit-28032012.jar -Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-28032012-native-src.tar.gz -Dtomcat-native.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-28032012-native-src.tar.gz -Dexamples.sources.skip=true -Dtomcat-dbcp.home=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps -Djdt.jar=/srv/gump/packages/eclipse/plugins/org.eclipse.jdt.core_3.4.2/jdtcore.jar -Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-28032012.jar -Dtomcat-dbcp-src.jar=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps/tomcat-dbcp-src.jar -Dtest.accesslog=true -Dcommons-pool.home=/srv/gump/public/workspace/commons-pool-1.x -Dcommons-dbcp.home=/ srv/gump/public/workspace/commons-dbcp-1.x -Dtomcat-dbcp.jar=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps/tomcat-dbcp-28032012.jar test [Working Directory: /srv/gump/public/workspace/tomcat-7.0.x] CLASSPATH: /usr/lib/jvm/java-6-openjdk/lib/tools.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-7.0.x/output/testclasses:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/servlet-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/outp ut/build/lib/jsp-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/el-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina-ant.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/tomcat-coyote.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/jasper.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/jasper-el.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina-tribes.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina-ha.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/tomcat-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/tomcat-util.jar:/srv/gump/packages/javamail-1.4/mail.jar:/srv/gump/packages/javamail-1.4/lib/mailapi.jar:/srv/gump/packages/jaf-1.1ea/activation.jar:/srv/gump/packages/eclipse/plugins/org.eclipse.jdt.core_3.4.2/jdtcore.jar:/srv/gump/public/workspace/tomcat-7.
[GUMP@vmgump]: Project tomcat-trunk-test (in module tomcat-trunk) failed
To whom it may engage... This is an automated request, but not an unsolicited one. For more information please visit http://gump.apache.org/nagged.html, and/or contact the folk at gene...@gump.apache.org. Project tomcat-trunk-test has an issue affecting its community integration. This issue affects 1 projects, and has been outstanding for 2 runs. The current state of this project is 'Failed', with reason 'Build Failed'. For reference only, the following projects are affected by this: - tomcat-trunk-test : Tomcat 8.x, a web server implementing Java Servlet 3.1, ... Full details are available at: http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test/index.html That said, some information snippets are provided here. The following annotations (debug/informational/warning/error messages) were provided: -DEBUG- Dependency on tomcat-trunk-dbcp exists, no need to add for property tomcat-dbcp-src.jar. -DEBUG- Dependency on commons-daemon exists, no need to add for property commons-daemon.native.src.tgz. -DEBUG- Dependency on commons-daemon exists, no need to add for property tomcat-native.tar.gz. -DEBUG- Dependency on tomcat-trunk-dbcp exists, no need to add for property tomcat-dbcp.home. -INFO- Failed with reason build failed -INFO- Project Reports in: /srv/gump/public/workspace/tomcat-trunk/output/build/logs The following work was performed: http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test/gump_work/build_tomcat-trunk_tomcat-trunk-test.html Work Name: build_tomcat-trunk_tomcat-trunk-test (Type: Build) Work ended in a state of : Failed Elapsed: 22 mins 29 secs Command Line: /usr/lib/jvm/java-6-openjdk/bin/java -Djava.awt.headless=true -Dbuild.sysclasspath=only org.apache.tools.ant.Main -Dgump.merge=/srv/gump/public/gump/work/merge.xml -Djunit.jar=/srv/gump/public/workspace/junit/dist/junit-28032012.jar -Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-28032012-native-src.tar.gz -Dtomcat-native.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-28032012-native-src.tar.gz -Dexamples.sources.skip=true -Dtomcat-dbcp.home=/srv/gump/public/workspace/tomcat-trunk/tomcat-deps -Djdt.jar=/srv/gump/packages/eclipse/plugins/org.eclipse.jdt.core_3.4.2/jdtcore.jar -Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-28032012.jar -Dtomcat-dbcp-src.jar=/srv/gump/public/workspace/tomcat-trunk/tomcat-deps/tomcat-dbcp-src.jar -Dtest.accesslog=true -Dcommons-pool.home=/srv/gump/public/workspace/commons-pool-1.x -Dcommons-dbcp.home=/ srv/gump/public/workspace/commons-dbcp-1.x -Dtomcat-dbcp.jar=/srv/gump/public/workspace/tomcat-trunk/tomcat-deps/tomcat-dbcp-28032012.jar test [Working Directory: /srv/gump/public/workspace/tomcat-trunk] CLASSPATH: /usr/lib/jvm/java-6-openjdk/lib/tools.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-trunk/output/testclasses:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/servlet-api.jar:/srv/gump/public/workspace/tomcat-trunk/outp ut/build/lib/jsp-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/el-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-ant.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-coyote.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jasper.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jasper-el.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-tribes.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-ha.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-util.jar:/srv/gump/packages/javamail-1.4/mail.jar:/srv/gump/packages/javamail-1.4/lib/mailapi.jar:/srv/gump/packages/jaf-1.1ea/activation.jar:/srv/gump/packages/eclipse/plugins/org.eclipse.jdt.core_3.4.2/jdtcore.jar:/srv/gump/public/workspace/tomcat-tr