Re: Tomcat-native patch for NPN support
On 02/01/2012 09:59 PM, Costin Manolache wrote: Hi, I have a patch to the jni library, I uploaded it to github for easy commenting: https://github.com/costinm/tomcat-native/commit/5e7d4b45bfa542e4b099bfdc2bda423b9a6cc85d Please let me know if it looks ok - I included a 'cmake' build, which can generate a libtcnative.so with no external dependencies - NPN requires the latest openssl1.0.1beta2, it may be trickier to install with the normal platform dependencies. ( only tested cmake on linux64 - when new ssl gets included in more platforms it won't be needed.) Probably you should go ahead and commit it and arrange the configure to require the new version of openssl. Cheers Jean-Frederic - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1239483 - /tomcat/trunk/java/org/apache/catalina/startup/Catalina.java
Author: markt Date: Thu Feb 2 08:39:26 2012 New Revision: 1239483 URL: http://svn.apache.org/viewvc?rev=1239483view=rev Log: Remove code that was added for handling the embedded case. Modified: tomcat/trunk/java/org/apache/catalina/startup/Catalina.java Modified: tomcat/trunk/java/org/apache/catalina/startup/Catalina.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/Catalina.java?rev=1239483r1=1239482r2=1239483view=diff == --- tomcat/trunk/java/org/apache/catalina/startup/Catalina.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/Catalina.java Thu Feb 2 08:39:26 2012 @@ -38,7 +38,6 @@ import org.apache.catalina.core.Standard import org.apache.catalina.security.SecurityConfig; import org.apache.juli.ClassLoaderLogManager; import org.apache.tomcat.util.ExceptionUtils; -import org.apache.tomcat.util.IntrospectionUtils; import org.apache.tomcat.util.digester.Digester; import org.apache.tomcat.util.digester.Rule; import org.apache.tomcat.util.digester.RuleSet; @@ -748,14 +747,6 @@ public class Catalina { if (catalinaHome == null) { if (System.getProperty(Globals.CATALINA_BASE_PROP) != null) { catalinaHome = System.getProperty(Globals.CATALINA_BASE_PROP); -} else { -// Use IntrospectionUtils and guess the dir -catalinaHome = IntrospectionUtils.guessInstall -(Globals.CATALINA_HOME_PROP, Globals.CATALINA_BASE_PROP, catalina.jar); -if (catalinaHome == null) { -catalinaHome = IntrospectionUtils.guessInstall -(tomcat.install, Globals.CATALINA_HOME_PROP, tomcat.jar); -} } } // last resort - for minimal/embedded cases. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1239485 - /tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java
Author: markt Date: Thu Feb 2 08:40:04 2012 New Revision: 1239485 URL: http://svn.apache.org/viewvc?rev=1239485view=rev Log: Deprecated code that is no longer used. Modified: tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java Modified: tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java?rev=1239485r1=1239484r2=1239485view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java Thu Feb 2 08:40:04 2012 @@ -34,6 +34,10 @@ public final class IntrospectionUtils { private static final org.apache.juli.logging.Log log= org.apache.juli.logging.LogFactory.getLog( IntrospectionUtils.class ); +/** + * @deprecated No longer required. Will be removed in Tomcat 8.0.x. + */ +@Deprecated public static String guessInstall(String installSysProp, String homeSysProp, String jarName) { return guessInstall(installSysProp, homeSysProp, jarName, null); @@ -48,7 +52,10 @@ public final class IntrospectionUtils { * both System properties are unset, install and home will be set to the * same value. This value will be the other System property that is set, or * the guessed value if neither is set. + * + * @deprecated No longer required. Will be removed in Tomcat 8.0.x. */ +@Deprecated public static String guessInstall(String installSysProp, String homeSysProp, String jarName, String classFile) { String install = null; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1239486 - /tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java
Author: markt Date: Thu Feb 2 08:40:41 2012 New Revision: 1239486 URL: http://svn.apache.org/viewvc?rev=1239486view=rev Log: Remove deprecated methods. Modified: tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java Modified: tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java?rev=1239486r1=1239485r2=1239486view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java Thu Feb 2 08:40:41 2012 @@ -17,13 +17,11 @@ package org.apache.tomcat.util; -import java.io.File; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.net.InetAddress; import java.net.UnknownHostException; import java.util.Hashtable; -import java.util.StringTokenizer; /** * Utils for introspection and reflection @@ -35,107 +33,6 @@ public final class IntrospectionUtils { org.apache.juli.logging.LogFactory.getLog( IntrospectionUtils.class ); /** - * @deprecated No longer required. Will be removed in Tomcat 8.0.x. - */ -@Deprecated -public static String guessInstall(String installSysProp, -String homeSysProp, String jarName) { -return guessInstall(installSysProp, homeSysProp, jarName, null); -} - -/** - * Guess a product install/home by analyzing the class path. It works for - * product using the pattern: lib/executable.jar or if executable.jar is - * included in classpath by a shell script. ( java -jar also works ) - * - * Insures both install and home System properties are set. If either or - * both System properties are unset, install and home will be set to the - * same value. This value will be the other System property that is set, or - * the guessed value if neither is set. - * - * @deprecated No longer required. Will be removed in Tomcat 8.0.x. - */ -@Deprecated -public static String guessInstall(String installSysProp, -String homeSysProp, String jarName, String classFile) { -String install = null; -String home = null; - -if (installSysProp != null) -install = System.getProperty(installSysProp); - -if (homeSysProp != null) -home = System.getProperty(homeSysProp); - -if (install != null) { -if (home == null) -System.getProperties().put(homeSysProp, install); -return install; -} - -// Find the directory where jarName.jar is located - -String cpath = System.getProperty(java.class.path); -String pathSep = System.getProperty(path.separator); -StringTokenizer st = new StringTokenizer(cpath, pathSep); -while (st.hasMoreTokens()) { -String path = st.nextToken(); -// log( path + path ); -if (path.endsWith(jarName)) { -home = path.substring(0, path.length() - jarName.length()); -try { -if (.equals(home)) { -home = new File(./).getCanonicalPath(); -} else if (home.endsWith(File.separator)) { -home = home.substring(0, home.length() - 1); -} -File f = new File(home); -String parentDir = f.getParent(); -if (parentDir == null) -parentDir = home; // unix style -File f1 = new File(parentDir); -install = f1.getCanonicalPath(); -if (installSysProp != null) -System.getProperties().put(installSysProp, install); -if (home == null homeSysProp != null) -System.getProperties().put(homeSysProp, install); -return install; -} catch (Exception ex) { -ex.printStackTrace(); -} -} else { -String fname = path + (path.endsWith(/) ? : /) -+ classFile; -if (new File(fname).exists()) { -try { -File f = new File(path); -String parentDir = f.getParent(); -if (parentDir == null) -parentDir = path; // unix style -File f1 = new File(parentDir); -install = f1.getCanonicalPath(); -if (installSysProp != null) -System.getProperties().put(installSysProp, install); -if (home == null homeSysProp != null) -System.getProperties().put(homeSysProp, install); -
svn commit: r1239487 - /tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java
Author: markt Date: Thu Feb 2 08:41:18 2012 New Revision: 1239487 URL: http://svn.apache.org/viewvc?rev=1239487view=rev Log: Remove deprecated method Modified: tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java Modified: tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java?rev=1239487r1=1239486r2=1239487view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java Thu Feb 2 08:41:18 2012 @@ -368,41 +368,6 @@ public final class IntrospectionUtils { } } -/** - * @deprecated Not used, though compliments callMethod1 and callMethodN here - */ -@Deprecated -public static Object callMethod0(Object target, String methodN) -throws Exception { -if (target == null) { -if (log.isDebugEnabled()) -log.debug(IntrospectionUtils: Assert: Illegal params + -target); -return null; -} -if (log.isDebugEnabled()) -log.debug(IntrospectionUtils: callMethod0 + -target.getClass().getName() + . + methodN); - -Class? params[] = new Class[0]; -Method m = findMethod(target.getClass(), methodN, params); -if (m == null) -throw new NoSuchMethodException(target.getClass().getName() + -+ methodN); -try { -return m.invoke(target, emptyArray); -} catch (InvocationTargetException ie) { -ExceptionUtils.handleThrowable(ie.getCause()); -throw ie; -} -} - -/** - * @deprecated Used only by deprecated method - */ -@Deprecated -private static final Object[] emptyArray = new Object[] {}; - public static Object callMethodN(Object target, String methodN, Object params[], Class? typeParams[]) throws Exception { Method m = null; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1239493 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/util/IntrospectionUtils.java
Author: markt Date: Thu Feb 2 09:01:06 2012 New Revision: 1239493 URL: http://svn.apache.org/viewvc?rev=1239493view=rev Log: Add deprecation missed in r1239489 Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java Propchange: tomcat/tc7.0.x/trunk/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Thu Feb 2 09:01:06 2012 @@ -1 +1 @@ -/tomcat/trunk:1156115,1156171,1156276,1156304,1156519,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1158426,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584,1162082,1162149,1162169,1162721,1162769,1162836,1162932,1163630,1164419,1164438,1164469,1164480,1164567,1165234,1165247-1165248,1165253,1165273,1165282,1165309,1165331,1165338,1165347,1165360-1165361,1165367-1165368,1165602,1165608,1165677,1165693,1165721,1165723,1165728,1165730,1165738,1165746,1165765,1165777,1165918,1165921,1166077,1166150-1166151,1166290,1166366,1166620,1166686,1166693,1166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172556,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096 ,1173241,1173256,1173288,117,1173342,1173461,1173614,1173630,1173659,1173722,1174061,1174239,1174322,1174325,1174329-1174330,1174337-1174339,1174343,1174353,1174799,1174882,1174884,1174975,1174983,1175155,1175158,1175167,1175182,1175190,1175201,1175272,1175275,1175283,1175582,1175589-1175590,1175594,1175602,1175613,1175633,1175690,1175713,1175798,1175889,1175896,1175907,1176584,1176590,1176799,1177050,1177060,1177125,1177152,1177160,1177245,1177850,1177862,1177978,1178209,1178228,1178233,1178449,1178542,1178681,1178684,1178721,1179268,1179274,1180261,1180865,1180891,1180894,1180907,1181028,1181123,1181125,1181136,1181291,1181743,1182796,1183078,1183105,1183142,1183328,1183339-1183340,1183492-1183494,1183605,1184917,1184919,1185018,1185020,1185200,1185588,1185626,1185756,1185758,1186011,1186042-1186045,1186104,1186123,1186137,1186153,1186254,1186257,1186377-1186379,1186479-1186480,1186712,1186743,1186750,1186763,1186890-1186892,1186894,1186949,1187018,1187027-1187028,1187 381,1187753,1187755,1187775,1187801,1187806,1187809,1187827,1188301,1188303-1188305,1188399,1188822,1188930-1188931,1189116,1189129,1189183,1189240,1189256,1189386,1189413-1189414,1189477,1189685,1189805,1189857,1189864,1189882,1190034,1190185,1190279,1190339,1190371,1190388-1190389,1190474,1190481,1194915,1195222-1195223,1195531,1195899,1195905,1195943,1195949,1195953,1195955,1195965,1195968,1196175,1196212,1196223,1196304-1196305,1196735,1196825,1196827,1197158,1197261,1197263,1197299-1197300,1197305,1197339-1197340,1197343,1197382,1197386-1197387,1197480,1197578,1198497,1198528,1198552,1198602,1198604,1198607,1198622,1198640,1198696,1198707,1199418,1199432,1199436,1199513,1199529,1199980,116,1200056,1200089,1200106-1200107,1200263,1200316,1200320,1200398-1200399,1200445-1200446,1200555,1200627,1200696,1200725,1200937,1200941,1201069,1201087,1201180,1201235-1201237,1201508,1201521,1201542,1201545-1201546,1201548,1201555-1201556,1201568,1201576,1201608,1201921-1201922,1 201931,1202035,1202039,1202271,1202565,1202578,1202705,1202828,1202860,1203047-1203052,1203078,1203091,1203253,1203278,1204182,1204856,1204867,1204936,1204938,1204982,1205033,1205065,1205082,1205097,1205112,1206200,1207692,1208046,1208073,1208096,1208114,1208145,1208772,1209194,1209277-1209278,1209686-1209731,1210894,1212091,1212095,1212099,1212118,1213469,1213906,1214853,1214855,1214864,1215115,1215118-1215119,1215121,1220293,1220295,1221038,1221842,1222189,101,176,1222300,1222690,1222850,1222852,1222855,1224607,1224617,1224648-1224652,1224657,1224662-1224663,1224682,1224801,1224910,1225000,1225219,1225343,1225465,1225627,1225629,1225634,1226069,1226158-1226159,1226177,1226196,1226214-1226215,1226385,1226394,1226500,1226537-1226538,1226546,1226551,1226975,1228196,1228360,1228376,1228724,1228908,1228918,1228920,1228922,1228929,1228969,1229307,1229536,1229549,1229724,1229726-1229731,1229997,1230539,1230711,1230729,1230762-1230763,1230765,1230955,1230957,1231285,123129 0,1231308,1231310,1231337,1231460-1231461,1231542-1231543,1231546-1231547,1231620-1231621,1231624-1231625,1231630,1231654-1231655,1231738,1231740,1231762-1231763,1231856,1231886,1231923,1231947,1232345,1232368,1232380,1232447,1232760,1232813,1232842-1232843,1232869,1233413,1233423,1233426,1234143,1234567,1235207,1236906-1236907,1236914,1237146,1237154-1237156,1237332,1237334,1237425,1237427,1237604,1237975,1237981,1237985,1238070,1238073,1239024,1239048,1239050,1239060,1239135,1239483
[jira] [Created] (MTOMCAT-118) tomcat7:run wont accept additionalClasspathDir arguments
tomcat7:run wont accept additionalClasspathDir arguments Key: MTOMCAT-118 URL: https://issues.apache.org/jira/browse/MTOMCAT-118 Project: Apache Tomcat Maven Plugin Issue Type: Bug Components: tomcat7 Affects Versions: 2.0-beta-1, 2.0 Reporter: Dave Lund Assignee: Olivier Lamy Using the below configuration, the following error is given: [ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:run (default-cli) on project XXX: A type incompatibility occured while executing org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:run: java.lang.String cannot be cast to java.io.File Example taken from docs site http://tomcat.apache.org/maven-plugin-2.0-SNAPSHOT/run-mojo-features.html plugin groupIdorg.apache.tomcat.maven/groupId artifactIdtomcat7-maven-plugin/artifactId version2.0-SNAPSHOT/version configuration !-- http port -- port9090/port path//path useTestClasspathfalse/useTestClasspath contextFilesrc/sandbox/tomcat/sandbox-context.xml/contextFile additionalClasspathDirs additionalClasspathDirsrc/test/resources/additionalClasspathDir /additionalClasspathDirs /configuration dependencies dependency groupIdmysql/groupId artifactIdmysql-connector-java/artifactId version${mysql.mysql-connector-java}/version /dependency dependency groupIdch.qos.logback/groupId artifactIdlogback-classic/artifactId version0.9.15/version /dependency /dependencies /plugin -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 52579] New: Tomcat5.5.35+Java1.5 cannot return proper value of a request parameter
https://issues.apache.org/bugzilla/show_bug.cgi?id=52579 Bug #: 52579 Summary: Tomcat5.5.35+Java1.5 cannot return proper value of a request parameter Product: Tomcat 5 Version: 5.5.35 Platform: All OS/Version: All Status: NEW Severity: regression Priority: P2 Component: Connector:HTTP AssignedTo: dev@tomcat.apache.org ReportedBy: hayashi...@nttdata.co.jp Classification: Unclassified Created attachment 28251 -- https://issues.apache.org/bugzilla/attachment.cgi?id=28251 JSP file to reproduce the matter (1) Overview When I install Tomcat5.5.35+jdk1.5.0_22 and run the JSP(please see the attached document), I cannot get proper value of a request parameter. I enter multibyte character (e.g. 10 or aa) into the textbox of the JSP, it runs correcly and i can get the input value (e.g. 10 or aa). But I enter 1 byte character (e.g. 1 or a), it runs incorrectly and i can get nothing. Please advise me. (Our customers are also waiting for the reason.) Thank you. (2) Steps to Reproduce [2-1] Install Tomcat5.5.35+jdk1.5.0_22 [2-2] Deploy the JSP file in the following directory. /apache-tomcat-5.5.35/webapps/jsp-examples [2-3] Enter the 1 byte character (e.g. 1 or 0) to the textbox and push ok button. (3) Actual Results The message shows nothing. (4) Expected Results The message shows the input character. (5) Build Date Platform Build 2012-02-02 on Windows7 (I suppose it does not depend on the Platform.) (6) Additional Information Tomcat5.5.34+jdk1.5.0_22 runs correctly. So the following codes may be the reason: --- org.apache.tomcat.util.buf.ByteChunk.toStringInternal() # Line514 CharBuffer cb; cb = charset.decode(ByteBuffer.wrap(buff, start, end-start)); return new String(cb.array(), cb.arrayOffset(), cb.length()); --- -- 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
[jira] [Commented] (MTOMCAT-118) tomcat7:run wont accept additionalClasspathDir arguments
[ https://issues.apache.org/jira/browse/MTOMCAT-118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13198652#comment-13198652 ] Olivier Lamy commented on MTOMCAT-118: -- which maven version are you using ? tomcat7:run wont accept additionalClasspathDir arguments Key: MTOMCAT-118 URL: https://issues.apache.org/jira/browse/MTOMCAT-118 Project: Apache Tomcat Maven Plugin Issue Type: Bug Components: tomcat7 Affects Versions: 2.0-beta-1, 2.0 Reporter: Dave Lund Assignee: Olivier Lamy Using the below configuration, the following error is given: [ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:run (default-cli) on project XXX: A type incompatibility occured while executing org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:run: java.lang.String cannot be cast to java.io.File Example taken from docs site http://tomcat.apache.org/maven-plugin-2.0-SNAPSHOT/run-mojo-features.html plugin groupIdorg.apache.tomcat.maven/groupId artifactIdtomcat7-maven-plugin/artifactId version2.0-SNAPSHOT/version configuration !-- http port -- port9090/port path//path useTestClasspathfalse/useTestClasspath contextFilesrc/sandbox/tomcat/sandbox-context.xml/contextFile additionalClasspathDirs additionalClasspathDirsrc/test/resources/additionalClasspathDir /additionalClasspathDirs /configuration dependencies dependency groupIdmysql/groupId artifactIdmysql-connector-java/artifactId version${mysql.mysql-connector-java}/version /dependency dependency groupIdch.qos.logback/groupId artifactIdlogback-classic/artifactId version0.9.15/version /dependency /dependencies /plugin -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: SPDY support
On Wed, 2012-02-01 at 13:54 -0800, Costin Manolache wrote: Hi, Some initial patch for SPDY - using the NPN SSL extension, as required by chrome/firefox. I used github so it's easy to add comments or test: https://github.com/costinm/tomcat/commit/e97def3314216c083cc4b68ad9731e5a94b2af28 Basic 'hello world' works in both jio and apr, looking for opinions on the integration with tomcat connectors. Please let me know :-) Ok, I think your light protocol concept to group any upgraded connections is appropriate. Not sure about spdy though, is anyone using it ? Of course, I'm even less sure about websockets since it's kind of a mess. Rémy - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[jira] [Updated] (MTOMCAT-118) tomcat7:run wont accept additionalClasspathDir arguments
[ https://issues.apache.org/jira/browse/MTOMCAT-118?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dave Lund updated MTOMCAT-118: -- Environment: Apache Maven 3.0 (r1004208; 2010-10-04 12:50:56+0100) Java version: 1.6.0_24 Java home: C:\dev\java\java\jre Default locale: en_GB, platform encoding: Cp1252 OS name: windows 7 version: 6.1 arch: amd64 Family: windows tomcat7:run wont accept additionalClasspathDir arguments Key: MTOMCAT-118 URL: https://issues.apache.org/jira/browse/MTOMCAT-118 Project: Apache Tomcat Maven Plugin Issue Type: Bug Components: tomcat7 Affects Versions: 2.0-beta-1, 2.0 Environment: Apache Maven 3.0 (r1004208; 2010-10-04 12:50:56+0100) Java version: 1.6.0_24 Java home: C:\dev\java\java\jre Default locale: en_GB, platform encoding: Cp1252 OS name: windows 7 version: 6.1 arch: amd64 Family: windows Reporter: Dave Lund Assignee: Olivier Lamy Using the below configuration, the following error is given: [ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:run (default-cli) on project XXX: A type incompatibility occured while executing org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:run: java.lang.String cannot be cast to java.io.File Example taken from docs site http://tomcat.apache.org/maven-plugin-2.0-SNAPSHOT/run-mojo-features.html plugin groupIdorg.apache.tomcat.maven/groupId artifactIdtomcat7-maven-plugin/artifactId version2.0-SNAPSHOT/version configuration !-- http port -- port9090/port path//path useTestClasspathfalse/useTestClasspath contextFilesrc/sandbox/tomcat/sandbox-context.xml/contextFile additionalClasspathDirs additionalClasspathDirsrc/test/resources/additionalClasspathDir /additionalClasspathDirs /configuration dependencies dependency groupIdmysql/groupId artifactIdmysql-connector-java/artifactId version${mysql.mysql-connector-java}/version /dependency dependency groupIdch.qos.logback/groupId artifactIdlogback-classic/artifactId version0.9.15/version /dependency /dependencies /plugin -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[jira] [Commented] (MTOMCAT-118) tomcat7:run wont accept additionalClasspathDir arguments
[ https://issues.apache.org/jira/browse/MTOMCAT-118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13198657#comment-13198657 ] Dave Lund commented on MTOMCAT-118: --- apologizes mvn --version output attached to environment field tomcat7:run wont accept additionalClasspathDir arguments Key: MTOMCAT-118 URL: https://issues.apache.org/jira/browse/MTOMCAT-118 Project: Apache Tomcat Maven Plugin Issue Type: Bug Components: tomcat7 Affects Versions: 2.0-beta-1, 2.0 Environment: Apache Maven 3.0 (r1004208; 2010-10-04 12:50:56+0100) Java version: 1.6.0_24 Java home: C:\dev\java\java\jre Default locale: en_GB, platform encoding: Cp1252 OS name: windows 7 version: 6.1 arch: amd64 Family: windows Reporter: Dave Lund Assignee: Olivier Lamy Using the below configuration, the following error is given: [ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:run (default-cli) on project XXX: A type incompatibility occured while executing org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:run: java.lang.String cannot be cast to java.io.File Example taken from docs site http://tomcat.apache.org/maven-plugin-2.0-SNAPSHOT/run-mojo-features.html plugin groupIdorg.apache.tomcat.maven/groupId artifactIdtomcat7-maven-plugin/artifactId version2.0-SNAPSHOT/version configuration !-- http port -- port9090/port path//path useTestClasspathfalse/useTestClasspath contextFilesrc/sandbox/tomcat/sandbox-context.xml/contextFile additionalClasspathDirs additionalClasspathDirsrc/test/resources/additionalClasspathDir /additionalClasspathDirs /configuration dependencies dependency groupIdmysql/groupId artifactIdmysql-connector-java/artifactId version${mysql.mysql-connector-java}/version /dependency dependency groupIdch.qos.logback/groupId artifactIdlogback-classic/artifactId version0.9.15/version /dependency /dependencies /plugin -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1239516 - in /tomcat/trunk/java/org/apache/catalina: Container.java core/ContainerBase.java startup/FailedContext.java
Author: markt Date: Thu Feb 2 10:28:48 2012 New Revision: 1239516 URL: http://svn.apache.org/viewvc?rev=1239516view=rev Log: Add the plumbing to make a canonical CATALINA_BASE File available via every Container. Modified: tomcat/trunk/java/org/apache/catalina/Container.java tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java tomcat/trunk/java/org/apache/catalina/startup/FailedContext.java Modified: tomcat/trunk/java/org/apache/catalina/Container.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Container.java?rev=1239516r1=1239515r2=1239516view=diff == --- tomcat/trunk/java/org/apache/catalina/Container.java (original) +++ tomcat/trunk/java/org/apache/catalina/Container.java Thu Feb 2 10:28:48 2012 @@ -18,6 +18,7 @@ package org.apache.catalina; import java.beans.PropertyChangeListener; +import java.io.File; import javax.management.ObjectName; import javax.naming.directory.DirContext; @@ -443,4 +444,10 @@ public interface Container extends Lifec * @param startStopThreadsThe new number of threads to be used */ public void setStartStopThreads(int startStopThreads); + + +/** + * + */ +public File getCatalinaBase(); } Modified: tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java?rev=1239516r1=1239515r2=1239516view=diff == --- tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java Thu Feb 2 10:28:48 2012 @@ -19,6 +19,8 @@ package org.apache.catalina.core; import java.beans.PropertyChangeListener; import java.beans.PropertyChangeSupport; +import java.io.File; +import java.io.IOException; import java.security.AccessController; import java.security.PrivilegedAction; import java.util.ArrayList; @@ -292,6 +294,9 @@ public abstract class ContainerBase exte private int startStopThreads = 1; protected ThreadPoolExecutor startStopExecutor; + +private File catalinaBase = null; + // - Properties @Override @@ -1332,8 +1337,34 @@ public abstract class ContainerBase exte } -// -- Protected Methods +@Override +public File getCatalinaBase() { + +if (catalinaBase != null) { +return catalinaBase; +} + +if (parent != null) { +return parent.getCatalinaBase(); +} + +String base = System.getProperty(Globals.CATALINA_BASE_PROP); +if (base == null) { +return null; +} else { +File f; +try { +f = new File(base).getCanonicalFile(); +} catch (IOException e) { +return null; +} +return f; +} +} + + +// -- Protected Methods /** * Notify all container event listeners that a particular event has Modified: tomcat/trunk/java/org/apache/catalina/startup/FailedContext.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/FailedContext.java?rev=1239516r1=1239515r2=1239516view=diff == --- tomcat/trunk/java/org/apache/catalina/startup/FailedContext.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/FailedContext.java Thu Feb 2 10:28:48 2012 @@ -17,6 +17,7 @@ package org.apache.catalina.startup; import java.beans.PropertyChangeListener; +import java.io.File; import java.net.URL; import java.util.Set; @@ -634,4 +635,7 @@ public class FailedContext extends Lifec @SuppressWarnings(unused) public synchronized void addValve(Valve valve) { /* NO-OP */ } + +@Override +public File getCatalinaBase() { return null; } } \ No newline at end of file - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1239518 - in /tomcat/trunk/java/org/apache/catalina: Container.java core/ContainerBase.java core/StandardContext.java core/StandardEngine.java mbeans/MBeanFactory.java startup/ContextConf
Author: markt Date: Thu Feb 2 10:29:44 2012 New Revision: 1239518 URL: http://svn.apache.org/viewvc?rev=1239518view=rev Log: Start to pull out the various custom methods to obtain CATALINA_BASE and replace them with a call to the Container. Modified: tomcat/trunk/java/org/apache/catalina/Container.java tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java tomcat/trunk/java/org/apache/catalina/core/StandardContext.java tomcat/trunk/java/org/apache/catalina/core/StandardEngine.java tomcat/trunk/java/org/apache/catalina/mbeans/MBeanFactory.java tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java Modified: tomcat/trunk/java/org/apache/catalina/Container.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Container.java?rev=1239518r1=1239517r2=1239518view=diff == --- tomcat/trunk/java/org/apache/catalina/Container.java (original) +++ tomcat/trunk/java/org/apache/catalina/Container.java Thu Feb 2 10:29:44 2012 @@ -16,7 +16,6 @@ */ package org.apache.catalina; - import java.beans.PropertyChangeListener; import java.io.File; Modified: tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java?rev=1239518r1=1239517r2=1239518view=diff == --- tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java Thu Feb 2 10:29:44 2012 @@ -20,7 +20,6 @@ package org.apache.catalina.core; import java.beans.PropertyChangeListener; import java.beans.PropertyChangeSupport; import java.io.File; -import java.io.IOException; import java.security.AccessController; import java.security.PrivilegedAction; import java.util.ArrayList; @@ -1337,6 +1336,11 @@ public abstract class ContainerBase exte } +public void setCatalinaBase(File catalinaBase) { +this.catalinaBase = catalinaBase; +} + + @Override public File getCatalinaBase() { @@ -1351,16 +1355,15 @@ public abstract class ContainerBase exte String base = System.getProperty(Globals.CATALINA_BASE_PROP); if (base == null) { +base = System.getProperty(Globals.CATALINA_HOME_PROP); +} + +if (base == null) { return null; -} else { -File f; -try { -f = new File(base).getCanonicalFile(); -} catch (IOException e) { -return null; -} -return f; } + +catalinaBase =new File(base).getAbsoluteFile(); +return catalinaBase; } Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContext.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardContext.java?rev=1239518r1=1239517r2=1239518view=diff == --- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Thu Feb 2 10:29:44 2012 @@ -2503,11 +2503,8 @@ public class StandardContext extends Con } File workDir = new File(getWorkDir()); if (!workDir.isAbsolute()) { -File catalinaHome = engineBase(); -String catalinaHomePath = null; try { -catalinaHomePath = catalinaHome.getCanonicalPath(); -workDir = new File(catalinaHomePath, +workDir = new File(getCatalinaBase().getCanonicalFile(), getWorkDir()); } catch (IOException e) { log.warn(sm.getString(standardContext.workPath, getName()), @@ -5650,20 +5647,6 @@ public class StandardContext extends Con /** - * Return a File object representing the base directory for the - * entire servlet container (i.e. the Engine container if present). - */ -protected File engineBase() { -String base=System.getProperty(Globals.CATALINA_BASE_PROP); -if( base == null ) { -StandardEngine eng=(StandardEngine)this.getParent().getParent(); -base=eng.getBaseDir(); -} -return (new File(base)); -} - - -/** * Bind current thread, both for CL purposes and for JNDI ENC support * during : startup, shutdown and realoading of the context. * @@ -5728,7 +5711,7 @@ public class StandardContext extends Con File file = new File(getDocBase()); if (!file.isAbsolute()) { if (container == null) { -docBase = (new File(engineBase(), getDocBase())).getPath(); +docBase = (new File(getCatalinaBase(), getDocBase())).getPath(); } else { // Use the
svn commit: r1239520 - in /tomcat/trunk/java/org/apache/catalina: core/ ha/deploy/ manager/ manager/host/ realm/ users/ valves/
Author: markt Date: Thu Feb 2 10:30:58 2012 New Revision: 1239520 URL: http://svn.apache.org/viewvc?rev=1239520view=rev Log: Obtain CATALINA_BASE in consistent way (though Container). Note: still some direct access to system property to review. Modified: tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java tomcat/trunk/java/org/apache/catalina/core/StandardHost.java tomcat/trunk/java/org/apache/catalina/ha/deploy/FarmWarDeployer.java tomcat/trunk/java/org/apache/catalina/manager/ManagerServlet.java tomcat/trunk/java/org/apache/catalina/manager/host/HostManagerServlet.java tomcat/trunk/java/org/apache/catalina/realm/JAASMemoryLoginModule.java tomcat/trunk/java/org/apache/catalina/realm/MemoryRealm.java tomcat/trunk/java/org/apache/catalina/users/MemoryUserDatabase.java tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java Modified: tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java?rev=1239520r1=1239519r2=1239520view=diff == --- tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java Thu Feb 2 10:30:58 2012 @@ -1359,6 +1359,9 @@ public abstract class ContainerBase exte } if (base == null) { +// In theory this should never happen. In 'standard' usage the start +// scripts will set the system property. In embedded usage either +// the system property will be set or it will be set explicitly. return null; } Modified: tomcat/trunk/java/org/apache/catalina/core/StandardHost.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardHost.java?rev=1239520r1=1239519r2=1239520view=diff == --- tomcat/trunk/java/org/apache/catalina/core/StandardHost.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/StandardHost.java Thu Feb 2 10:30:58 2012 @@ -16,7 +16,6 @@ */ package org.apache.catalina.core; - import java.io.File; import java.io.IOException; import java.util.ArrayList; @@ -29,7 +28,6 @@ import java.util.regex.Pattern; import org.apache.catalina.Container; import org.apache.catalina.Context; -import org.apache.catalina.Globals; import org.apache.catalina.Host; import org.apache.catalina.Lifecycle; import org.apache.catalina.LifecycleEvent; @@ -41,7 +39,6 @@ import org.apache.catalina.mbeans.MBeanU import org.apache.catalina.valves.ValveBase; import org.apache.tomcat.util.ExceptionUtils; - /** * Standard implementation of the bHost/b interface. Each * child container must be a Context implementation to process the @@ -208,9 +205,7 @@ public class StandardHost extends Contai // If not absolute, make it absolute if (!file.isAbsolute()) { -// This system property should always be set -file = new File(System.getProperty(Globals.CATALINA_BASE_PROP), -file.getPath()); +file = new File(getCatalinaBase(), file.getPath()); } // Make it canonical if possible Modified: tomcat/trunk/java/org/apache/catalina/ha/deploy/FarmWarDeployer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/deploy/FarmWarDeployer.java?rev=1239520r1=1239519r2=1239520view=diff == --- tomcat/trunk/java/org/apache/catalina/ha/deploy/FarmWarDeployer.java (original) +++ tomcat/trunk/java/org/apache/catalina/ha/deploy/FarmWarDeployer.java Thu Feb 2 10:30:58 2012 @@ -27,7 +27,6 @@ import javax.management.ObjectName; import org.apache.catalina.Container; import org.apache.catalina.Context; import org.apache.catalina.Engine; -import org.apache.catalina.Globals; import org.apache.catalina.Host; import org.apache.catalina.LifecycleException; import org.apache.catalina.ha.ClusterDeployer; @@ -162,8 +161,7 @@ public class FarmWarDeployer extends Clu } } -configBase = new File( -System.getProperty(Globals.CATALINA_BASE_PROP), conf); +configBase = new File(engine.getCatalinaBase(), conf); configBase = new File(configBase, engine.getName()); configBase = new File(configBase, hostname); Modified: tomcat/trunk/java/org/apache/catalina/manager/ManagerServlet.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/manager/ManagerServlet.java?rev=1239520r1=1239519r2=1239520view=diff == --- tomcat/trunk/java/org/apache/catalina/manager/ManagerServlet.java (original) +++ tomcat/trunk/java/org/apache/catalina/manager/ManagerServlet.java Thu Feb 2
svn commit: r1239521 - in /tomcat/trunk/java/org/apache/catalina/startup: ContextConfig.java HostConfig.java
Author: markt Date: Thu Feb 2 10:31:39 2012 New Revision: 1239521 URL: http://svn.apache.org/viewvc?rev=1239521view=rev Log: Couple more container based locations. Really need to move setting this to the server. Modified: tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java Modified: tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java?rev=1239521r1=1239520r2=1239521view=diff == --- tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java Thu Feb 2 10:31:39 2012 @@ -1097,8 +1097,12 @@ public class ContextConfig implements Li * Get config base. */ protected File getConfigBase() { -File configBase = -new File(System.getProperty(Globals.CATALINA_BASE_PROP), conf); +File catalinaBase = context.getCatalinaBase(); +if (catalinaBase == null) { +return null; +} + +File configBase = new File(catalinaBase, conf); if (!configBase.exists()) { return null; } Modified: tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java?rev=1239521r1=1239520r2=1239521view=diff == --- tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java Thu Feb 2 10:31:39 2012 @@ -16,7 +16,6 @@ */ package org.apache.catalina.startup; - import java.io.BufferedOutputStream; import java.io.File; import java.io.FileInputStream; @@ -46,7 +45,6 @@ import javax.management.ObjectName; import org.apache.catalina.Container; import org.apache.catalina.Context; import org.apache.catalina.Engine; -import org.apache.catalina.Globals; import org.apache.catalina.Host; import org.apache.catalina.Lifecycle; import org.apache.catalina.LifecycleEvent; @@ -387,9 +385,8 @@ public class HostConfig protected File returnCanonicalPath(String path) { File file = new File(path); -File base = new File(System.getProperty(Globals.CATALINA_BASE_PROP)); if (!file.isAbsolute()) -file = new File(base,path); +file = new File(host.getCatalinaBase(), path); try { return file.getCanonicalFile(); } catch (IOException e) { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1239522 - in /tomcat/trunk/java/org/apache/catalina: Server.java core/ContainerBase.java core/StandardEngine.java core/StandardServer.java mbeans/MBeanFactory.java startup/Tomcat.java
Author: markt Date: Thu Feb 2 10:32:34 2012 New Revision: 1239522 URL: http://svn.apache.org/viewvc?rev=1239522view=rev Log: Extend clean-up to Server Modified: tomcat/trunk/java/org/apache/catalina/Server.java tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java tomcat/trunk/java/org/apache/catalina/core/StandardEngine.java tomcat/trunk/java/org/apache/catalina/core/StandardServer.java tomcat/trunk/java/org/apache/catalina/mbeans/MBeanFactory.java tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java Modified: tomcat/trunk/java/org/apache/catalina/Server.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Server.java?rev=1239522r1=1239521r2=1239522view=diff == --- tomcat/trunk/java/org/apache/catalina/Server.java (original) +++ tomcat/trunk/java/org/apache/catalina/Server.java Thu Feb 2 10:32:34 2012 @@ -18,6 +18,8 @@ package org.apache.catalina; +import java.io.File; + import org.apache.catalina.deploy.NamingResources; import org.apache.catalina.startup.Catalina; @@ -139,6 +141,34 @@ public interface Server extends Lifecycl */ public void setCatalina(Catalina catalina); + +/** + * Obtain the configured base (instance) directory. Note that home and base + * may be the same (and are by default). If this is not set the value + * returned by {@link #getCatalinaHome()} will be used. + */ +public File getCatalinaBase(); + +/** + * Set the configured base (instance) directory. Note that home and base + * may be the same (and are by default). + */ +public void setCatalinaBase(File catalinaBase); + + +/** + * Obtain the configured home (binary) directory. Note that home and base + * may be the same (and are by default). + */ +public File getCatalinaHome(); + +/** + * Set the configured home (binary) directory. Note that home and base + * may be the same (and are by default). + */ +public void setCatalinaHome(File catalinaHome); + + // - Public Methods Modified: tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java?rev=1239522r1=1239521r2=1239522view=diff == --- tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java Thu Feb 2 10:32:34 2012 @@ -294,8 +294,6 @@ public abstract class ContainerBase exte protected ThreadPoolExecutor startStopExecutor; -private File catalinaBase = null; - // - Properties @Override @@ -1336,37 +1334,14 @@ public abstract class ContainerBase exte } -public void setCatalinaBase(File catalinaBase) { -this.catalinaBase = catalinaBase; -} - - @Override public File getCatalinaBase() { -if (catalinaBase != null) { -return catalinaBase; -} - -if (parent != null) { -return parent.getCatalinaBase(); -} - -String base = System.getProperty(Globals.CATALINA_BASE_PROP); - -if (base == null) { -base = System.getProperty(Globals.CATALINA_HOME_PROP); -} - -if (base == null) { -// In theory this should never happen. In 'standard' usage the start -// scripts will set the system property. In embedded usage either -// the system property will be set or it will be set explicitly. +if (parent == null) { return null; } -catalinaBase =new File(base).getAbsoluteFile(); -return catalinaBase; +return parent.getCatalinaBase(); } Modified: tomcat/trunk/java/org/apache/catalina/core/StandardEngine.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardEngine.java?rev=1239522r1=1239521r2=1239522view=diff == --- tomcat/trunk/java/org/apache/catalina/core/StandardEngine.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/StandardEngine.java Thu Feb 2 10:32:34 2012 @@ -18,6 +18,7 @@ package org.apache.catalina.core; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; +import java.io.File; import java.util.Locale; import java.util.concurrent.atomic.AtomicReference; @@ -33,6 +34,7 @@ import org.apache.catalina.LifecycleEven import org.apache.catalina.LifecycleException; import org.apache.catalina.LifecycleListener; import org.apache.catalina.Realm; +import org.apache.catalina.Server; import org.apache.catalina.Service; import org.apache.catalina.connector.Request;
svn commit: r1239523 - /tomcat/trunk/java/org/apache/catalina/startup/Bootstrap.java
Author: markt Date: Thu Feb 2 10:33:12 2012 New Revision: 1239523 URL: http://svn.apache.org/viewvc?rev=1239523view=rev Log: Deprecate unused methods. Modified: tomcat/trunk/java/org/apache/catalina/startup/Bootstrap.java Modified: tomcat/trunk/java/org/apache/catalina/startup/Bootstrap.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/Bootstrap.java?rev=1239523r1=1239522r2=1239523view=diff == --- tomcat/trunk/java/org/apache/catalina/startup/Bootstrap.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/Bootstrap.java Thu Feb 2 10:33:12 2012 @@ -472,10 +472,18 @@ public final class Bootstrap { } +/** + * @deprecated Unused. Will be removed in Tomcat 8.0.x. + */ +@Deprecated public void setCatalinaHome(String s) { System.setProperty(Globals.CATALINA_HOME_PROP, s); } +/** + * @deprecated Unused. Will be removed in Tomcat 8.0.x. + */ +@Deprecated public void setCatalinaBase(String s) { System.setProperty(Globals.CATALINA_BASE_PROP, s); } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1239524 - /tomcat/trunk/java/org/apache/catalina/startup/Bootstrap.java
Author: markt Date: Thu Feb 2 10:33:50 2012 New Revision: 1239524 URL: http://svn.apache.org/viewvc?rev=1239524view=rev Log: Remove unused code. Modified: tomcat/trunk/java/org/apache/catalina/startup/Bootstrap.java Modified: tomcat/trunk/java/org/apache/catalina/startup/Bootstrap.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/Bootstrap.java?rev=1239524r1=1239523r2=1239524view=diff == --- tomcat/trunk/java/org/apache/catalina/startup/Bootstrap.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/Bootstrap.java Thu Feb 2 10:33:50 2012 @@ -473,23 +473,6 @@ public final class Bootstrap { } /** - * @deprecated Unused. Will be removed in Tomcat 8.0.x. - */ -@Deprecated -public void setCatalinaHome(String s) { -System.setProperty(Globals.CATALINA_HOME_PROP, s); -} - -/** - * @deprecated Unused. Will be removed in Tomcat 8.0.x. - */ -@Deprecated -public void setCatalinaBase(String s) { -System.setProperty(Globals.CATALINA_BASE_PROP, s); -} - - -/** * Set the codecatalina.base/code System property to the current * working directory if it has not been set. */ - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1239525 - /tomcat/trunk/java/org/apache/catalina/authenticator/SpnegoAuthenticator.java
Author: markt Date: Thu Feb 2 10:34:27 2012 New Revision: 1239525 URL: http://svn.apache.org/viewvc?rev=1239525view=rev Log: Remove dependency on Bootstrap Modified: tomcat/trunk/java/org/apache/catalina/authenticator/SpnegoAuthenticator.java Modified: tomcat/trunk/java/org/apache/catalina/authenticator/SpnegoAuthenticator.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/authenticator/SpnegoAuthenticator.java?rev=1239525r1=1239524r2=1239525view=diff == --- tomcat/trunk/java/org/apache/catalina/authenticator/SpnegoAuthenticator.java (original) +++ tomcat/trunk/java/org/apache/catalina/authenticator/SpnegoAuthenticator.java Thu Feb 2 10:34:27 2012 @@ -30,7 +30,6 @@ import javax.servlet.http.HttpServletRes import org.apache.catalina.LifecycleException; import org.apache.catalina.connector.Request; import org.apache.catalina.deploy.LoginConfig; -import org.apache.catalina.startup.Bootstrap; import org.apache.catalina.util.Base64; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; @@ -86,7 +85,7 @@ public class SpnegoAuthenticator extends String krb5Conf = System.getProperty(Constants.KRB5_CONF_PROPERTY); if (krb5Conf == null) { // System property not set, use the Tomcat default -File krb5ConfFile = new File(Bootstrap.getCatalinaBase(), +File krb5ConfFile = new File(container.getCatalinaBase(), Constants.DEFAULT_KRB5_CONF); System.setProperty(Constants.KRB5_CONF_PROPERTY, krb5ConfFile.getAbsolutePath()); @@ -96,7 +95,7 @@ public class SpnegoAuthenticator extends String jaasConf = System.getProperty(Constants.JAAS_CONF_PROPERTY); if (jaasConf == null) { // System property not set, use the Tomcat default -File jaasConfFile = new File(Bootstrap.getCatalinaBase(), +File jaasConfFile = new File(container.getCatalinaBase(), Constants.DEFAULT_JAAS_CONF); System.setProperty(Constants.JAAS_CONF_PROPERTY, jaasConfFile.getAbsolutePath()); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1239526 - /tomcat/trunk/java/org/apache/catalina/startup/CatalinaProperties.java
Author: markt Date: Thu Feb 2 10:35:04 2012 New Revision: 1239526 URL: http://svn.apache.org/viewvc?rev=1239526view=rev Log: Remove duplicated code Modified: tomcat/trunk/java/org/apache/catalina/startup/CatalinaProperties.java Modified: tomcat/trunk/java/org/apache/catalina/startup/CatalinaProperties.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/CatalinaProperties.java?rev=1239526r1=1239525r2=1239526view=diff == --- tomcat/trunk/java/org/apache/catalina/startup/CatalinaProperties.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/CatalinaProperties.java Thu Feb 2 10:35:04 2012 @@ -25,8 +25,6 @@ import java.net.URL; import java.util.Enumeration; import java.util.Properties; -import org.apache.catalina.Globals; - /** * Utility class to read the bootstrap Catalina configuration. @@ -98,7 +96,7 @@ public class CatalinaProperties { if (is == null) { try { -File home = new File(getCatalinaBase()); +File home = new File(Bootstrap.getCatalinaBase()); File conf = new File(home, conf); File propsFile = new File(conf, catalina.properties); is = new FileInputStream(propsFile); @@ -148,23 +146,6 @@ public class CatalinaProperties { /** - * Get the value of the catalina.home environment variable. - */ -private static String getCatalinaHome() { -return System.getProperty(Globals.CATALINA_HOME_PROP, - System.getProperty(user.dir)); -} - - -/** - * Get the value of the catalina.base environment variable. - */ -private static String getCatalinaBase() { -return System.getProperty(Globals.CATALINA_BASE_PROP, getCatalinaHome()); -} - - -/** * Get the value of the configuration URL. */ private static String getConfigUrl() { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1239527 - in /tomcat/trunk/java/org/apache/catalina/startup: Bootstrap.java Catalina.java
Author: markt Date: Thu Feb 2 10:35:44 2012 New Revision: 1239527 URL: http://svn.apache.org/viewvc?rev=1239527view=rev Log: Align the various parts of start-up code that read/set home/base in slightly different ways. Modified: tomcat/trunk/java/org/apache/catalina/startup/Bootstrap.java tomcat/trunk/java/org/apache/catalina/startup/Catalina.java Modified: tomcat/trunk/java/org/apache/catalina/startup/Bootstrap.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/Bootstrap.java?rev=1239527r1=1239526r2=1239527view=diff == --- tomcat/trunk/java/org/apache/catalina/startup/Bootstrap.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/Bootstrap.java Thu Feb 2 10:35:44 2012 @@ -20,6 +20,7 @@ package org.apache.catalina.startup; import java.io.File; +import java.io.IOException; import java.lang.management.ManagementFactory; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; @@ -69,6 +70,68 @@ public final class Bootstrap { private static Bootstrap daemon = null; +private static final File catalinaBaseFile; +private static final File catalinaHomeFile; + +static { +// Will always be non-null +String userDir = System.getProperty(user.dir); + +// Home first +String home = System.getProperty(Globals.CATALINA_HOME_PROP); +File homeFile = null; + +if (home != null) { +File f = new File(home); +try { +homeFile = f.getCanonicalFile(); +} catch (IOException ioe) { +homeFile = f.getAbsoluteFile(); +} +} + +if (homeFile == null) { +// First fall-back. See if current directory is a bin directory +// in a normal Tomcat install +File bootstrapJar = new File(userDir, bootstrap.jar); + +if (bootstrapJar.exists()) { +File f = new File(userDir, ..); +try { +homeFile = f.getCanonicalFile(); +} catch (IOException ioe) { +homeFile = f.getAbsoluteFile(); +} +} +} + +if (homeFile == null) { +// Second fall-back. Use current directory +File f = new File(userDir); +try { +homeFile = f.getCanonicalFile(); +} catch (IOException ioe) { +homeFile = f.getAbsoluteFile(); +} +} + +catalinaHomeFile = homeFile; + +// Then base +String base = System.getProperty(Globals.CATALINA_BASE_PROP); +if (base == null) { +catalinaBaseFile = catalinaHomeFile; +} else { +File baseFile = new File(base); +try { +baseFile = baseFile.getCanonicalFile(); +} catch (IOException ioe) { +baseFile = baseFile.getAbsoluteFile(); +} +catalinaBaseFile = baseFile; +} +} + // -- Variables @@ -216,13 +279,7 @@ public final class Bootstrap { /** * Initialize daemon. */ -public void init() -throws Exception -{ - -// Set Catalina path -setCatalinaHome(); -setCatalinaBase(); +public void init() throws Exception { initClassLoaders(); @@ -472,67 +529,42 @@ public final class Bootstrap { } + /** - * Set the codecatalina.base/code System property to the current - * working directory if it has not been set. + * Obtain the name of configured home (binary) directory. Note that home and + * base may be the same (and are by default). */ -private void setCatalinaBase() { - -if (System.getProperty(Globals.CATALINA_BASE_PROP) != null) -return; -if (System.getProperty(Globals.CATALINA_HOME_PROP) != null) -System.setProperty(Globals.CATALINA_BASE_PROP, - System.getProperty(Globals.CATALINA_HOME_PROP)); -else -System.setProperty(Globals.CATALINA_BASE_PROP, - System.getProperty(user.dir)); - +public static String getCatalinaHome() { +return catalinaHomeFile.getPath(); } /** - * Set the codecatalina.home/code System property to the current - * working directory if it has not been set. + * Obtain the name of the configured base (instance) directory. Note that + * home and base may be the same (and are by default). If this is not set + * the value returned by {@link #getCatalinaHome()} will be used. */ -private void setCatalinaHome() { - -if (System.getProperty(Globals.CATALINA_HOME_PROP) != null) -return; -File bootstrapJar = -new
svn commit: r1239528 - /tomcat/trunk/webapps/docs/changelog.xml
Author: markt Date: Thu Feb 2 10:36:14 2012 New Revision: 1239528 URL: http://svn.apache.org/viewvc?rev=1239528view=rev Log: Update changelog Modified: tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1239528r1=1239527r2=1239528view=diff == --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Thu Feb 2 10:36:14 2012 @@ -57,6 +57,15 @@ bug51408/bug: Replace calls to codeCharset.defaultCharset()/code with an explicit reference to the ISO-8859-1 Charset. (markt) /scode + scode +Refactor initialization code to use a single, consistent approach to +determining the Catalina home (binary) and base (instance) directories. +The search order for home is codecatalina.home/code system property, +parent of current directory if boootstrap.jar is present and finally +current working directory. The search order for Catalina base is +codecatalina.base/code system property falling back to the value for +Catalina home. (markt) + /scode /changelog /subsection subsection name=Tribes - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 52579] Tomcat5.5.35+Java1.5 cannot return proper value of a request parameter
https://issues.apache.org/bugzilla/show_bug.cgi?id=52579 --- Comment #1 from Konstantin Kolinko knst.koli...@gmail.com 2012-02-02 10:37:21 UTC --- Similar recent discussion on users@: (POST data (single character) cleared when using tomcat 6.0.33 and Character Encoding Filter) http://marc.info/?t=13266801081r=1w=2 http://markmail.org/message/o7l2p7ve5cpswnzl You stumbled upon bug in charset implementation in Java 1.5: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6196991 -- 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: r1239531 - /tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
Author: markt Date: Thu Feb 2 10:38:43 2012 New Revision: 1239531 URL: http://svn.apache.org/viewvc?rev=1239531view=rev Log: Add the all important '!' missed in r1239082 Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContext.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardContext.java?rev=1239531r1=1239530r2=1239531view=diff == --- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Thu Feb 2 10:38:43 2012 @@ -5242,7 +5242,7 @@ public class StandardContext extends Con private void setClassLoaderProperty(String name, boolean value) { ClassLoader cl = getLoader().getClassLoader(); -if (IntrospectionUtils.setProperty(cl, name, Boolean.toString(value))) { +if (!IntrospectionUtils.setProperty(cl, name, Boolean.toString(value))) { // Failed to set log.info(sm.getString( standardContext.webappClassLoader.missingProperty, - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1239533 - /tomcat/trunk/java/org/apache/catalina/core/StandardEngine.java
Author: markt Date: Thu Feb 2 10:44:09 2012 New Revision: 1239533 URL: http://svn.apache.org/viewvc?rev=1239533view=rev Log: Remove unused code Modified: tomcat/trunk/java/org/apache/catalina/core/StandardEngine.java Modified: tomcat/trunk/java/org/apache/catalina/core/StandardEngine.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardEngine.java?rev=1239533r1=1239532r2=1239533view=diff == --- tomcat/trunk/java/org/apache/catalina/core/StandardEngine.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/StandardEngine.java Thu Feb 2 10:44:09 2012 @@ -94,12 +94,6 @@ public class StandardEngine extends Cont */ private Service service = null; -/** Allow the base dir to be specified explicitly for - * each engine. In time we should stop using catalina.base property - - * otherwise we loose some flexibility. - */ -private String baseDir = null; - /** * The JVM Route ID for this Tomcat instance. All Route ID's must be unique * across the cluster. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[jira] [Commented] (MTOMCAT-118) tomcat7:run wont accept additionalClasspathDir arguments
[ https://issues.apache.org/jira/browse/MTOMCAT-118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13198682#comment-13198682 ] Olivier Lamy commented on MTOMCAT-118: -- argh I see this can work only with 3.0.3+ I will fix that but until you must use 3.0.3/3.0.4 tomcat7:run wont accept additionalClasspathDir arguments Key: MTOMCAT-118 URL: https://issues.apache.org/jira/browse/MTOMCAT-118 Project: Apache Tomcat Maven Plugin Issue Type: Bug Components: tomcat7 Affects Versions: 2.0-beta-1, 2.0 Environment: Apache Maven 3.0 (r1004208; 2010-10-04 12:50:56+0100) Java version: 1.6.0_24 Java home: C:\dev\java\java\jre Default locale: en_GB, platform encoding: Cp1252 OS name: windows 7 version: 6.1 arch: amd64 Family: windows Reporter: Dave Lund Assignee: Olivier Lamy Fix For: 2.0 Using the below configuration, the following error is given: [ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:run (default-cli) on project XXX: A type incompatibility occured while executing org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:run: java.lang.String cannot be cast to java.io.File Example taken from docs site http://tomcat.apache.org/maven-plugin-2.0-SNAPSHOT/run-mojo-features.html plugin groupIdorg.apache.tomcat.maven/groupId artifactIdtomcat7-maven-plugin/artifactId version2.0-SNAPSHOT/version configuration !-- http port -- port9090/port path//path useTestClasspathfalse/useTestClasspath contextFilesrc/sandbox/tomcat/sandbox-context.xml/contextFile additionalClasspathDirs additionalClasspathDirsrc/test/resources/additionalClasspathDir /additionalClasspathDirs /configuration dependencies dependency groupIdmysql/groupId artifactIdmysql-connector-java/artifactId version${mysql.mysql-connector-java}/version /dependency dependency groupIdch.qos.logback/groupId artifactIdlogback-classic/artifactId version0.9.15/version /dependency /dependencies /plugin -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[jira] [Updated] (MTOMCAT-118) tomcat7:run wont accept additionalClasspathDir arguments
[ https://issues.apache.org/jira/browse/MTOMCAT-118?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Olivier Lamy updated MTOMCAT-118: - Fix Version/s: 2.0 tomcat7:run wont accept additionalClasspathDir arguments Key: MTOMCAT-118 URL: https://issues.apache.org/jira/browse/MTOMCAT-118 Project: Apache Tomcat Maven Plugin Issue Type: Bug Components: tomcat7 Affects Versions: 2.0-beta-1, 2.0 Environment: Apache Maven 3.0 (r1004208; 2010-10-04 12:50:56+0100) Java version: 1.6.0_24 Java home: C:\dev\java\java\jre Default locale: en_GB, platform encoding: Cp1252 OS name: windows 7 version: 6.1 arch: amd64 Family: windows Reporter: Dave Lund Assignee: Olivier Lamy Fix For: 2.0 Using the below configuration, the following error is given: [ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:run (default-cli) on project XXX: A type incompatibility occured while executing org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:run: java.lang.String cannot be cast to java.io.File Example taken from docs site http://tomcat.apache.org/maven-plugin-2.0-SNAPSHOT/run-mojo-features.html plugin groupIdorg.apache.tomcat.maven/groupId artifactIdtomcat7-maven-plugin/artifactId version2.0-SNAPSHOT/version configuration !-- http port -- port9090/port path//path useTestClasspathfalse/useTestClasspath contextFilesrc/sandbox/tomcat/sandbox-context.xml/contextFile additionalClasspathDirs additionalClasspathDirsrc/test/resources/additionalClasspathDir /additionalClasspathDirs /configuration dependencies dependency groupIdmysql/groupId artifactIdmysql-connector-java/artifactId version${mysql.mysql-connector-java}/version /dependency dependency groupIdch.qos.logback/groupId artifactIdlogback-classic/artifactId version0.9.15/version /dependency /dependencies /plugin -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira - 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/2700 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1239531 Blamelist: markt BUILD FAILED: failed compile_1 sincerely, -The Buildbot
DO NOT REPLY [Bug 52579] Tomcat5.5.35+Java1.5 cannot return proper value of a request parameter
https://issues.apache.org/bugzilla/show_bug.cgi?id=52579 --- Comment #2 from Konstantin Kolinko knst.koli...@gmail.com 2012-02-02 11:00:11 UTC --- Created attachment 28252 -- https://issues.apache.org/bugzilla/attachment.cgi?id=28252 Test.java - Test Charset.decode() I am attaching a test class that I wrote based on reproduction scenario in bug 6196991 + charset enumeration code from r1140904. This test prints names of charsets that cannot perform encoding+decoding roundtrip for single A character. Here is the list of charsets that are affected by this issue, tested with 1.5.0_20-b02, on Windows: --- Big5 Big5-HKSCS EUC-JP EUC-KR GB2312 GBK ISO-2022-JP JIS_X0212-1990 Shift_JIS windows-31j + two dozens of non-standard charsets whose names start with x- --- With 1.4.2_19-b04 on Windows the list is the same less GB2312 which is absent. With 1.6.0_30-b12 on Windows the list contains this only charset: JIS_X0212-1990 + 4 non-standard charsets whose names start with x- So: 1. The issue is indeed a bug in JRE. It is present in latest public versions of 1.4 and 1.5 that I have. I do not know anything about later Java for business versions. 2. The issue is absent in Oracle/Sun JDK 1.6.30. 3. The issue affects only certain encodings. If you can update your configuration and applications to use UTF-8, you would avoid this issue. -- 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 52580] New: javax.el.CompositeELResolver getValue throws NullPointerException
https://issues.apache.org/bugzilla/show_bug.cgi?id=52580 Bug #: 52580 Summary: javax.el.CompositeELResolver getValue throws NullPointerException Product: Tomcat 7 Version: 7.0.22 Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: Servlet JSP API AssignedTo: dev@tomcat.apache.org ReportedBy: qiuyunzh...@hotmail.com Classification: Unclassified I think this issue has the same root cause of bug 50293(javax.el.CompositeELResolver synchronization issue). When CompositeELResolver.getValue was called, sometimes it raised NullPointerException. Here is the stacktrace: Caused by: java.lang.NullPointerException at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:67) at org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:142) at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:67) at org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:71) at org.apache.el.parser.AstValue.getValue(AstValue.java:147) at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:189) at org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:985) at jsp.portal.portal_jsp._jspService(portal_jsp.java:143) The source code of javax.el.CompositeELResolver.getValue(): @Override public Object getValue(ELContext context, Object base, Object property) throws NullPointerException, PropertyNotFoundException, ELException { context.setPropertyResolved(false); int sz = this.size; Object result = null; for (int i = 0; i sz; i++) { result = this.resolvers[i].getValue(context, base, property);--line 67 if (context.isPropertyResolved()) { return result; } } return null; } Source code of org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.getValue is: @Override public Object getValue(final ELContext context, final Object base, final Object property)-131 { final FacesContext facesContext = FacesContext.getCurrentInstance();-133 if (facesContext == null) { return null; } final MapString, Object requestMap = facesContext.getExternalContext().getRequestMap(); try { setScope(requestMap); return super.getValue(context, base, property); -line 142 } finally { unsetScope(requestMap); } } It seems the resolvers[i] has been set to null yet. I don't visit the page concurrently, however, this exception still raise and it makes the page 500 error. Do we plan to fix this issue by add synchronize check or just as 50923's comment that from ELResolver spec it's not thread safe? This issue makes page unstable sometime and only restart tomcat to recover. Thanks a lot. -- 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 52580] javax.el.CompositeELResolver getValue throws NullPointerException
https://issues.apache.org/bugzilla/show_bug.cgi?id=52580 --- Comment #1 from qiuyunzh...@hotmail.com 2012-02-02 11:20:36 UTC --- javax.el.CompositeELResolver resides in el-api.jar file. I use myfaces 1.2.9. -- 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: POST data (single character) cleared when using tomcat 6.0.33 and Character Encoding Filter
cc: dev 2012/1/23 kitagawa kitagawawo...@gmail.com: While developing using ubuntu 11.04, tomcat 6.0.33 and java 1.5 I ran into a problem after setting the character encoding filter for requests. When posting a request, the value of any field with only a single character submitted is cleared. I also tested this issue with: tomcat 6.0.32 and java 1.5 (no problem) tomcat 6.0.35 and java 1.5 (same error occured) tomcat 6.0.33 and java 1.6 (no problem) tomcat 6.0.35 and java 1.6 (no problem) This can be repeated using the RequestParamExample that comes with tomcat. 1. uncomment the Set Character Encoding line in apache-tomcat-6.0.33\webapps\examples\WEB-INF\web.xml (lines 88 and 93) 2. start tomcat 3. go to http://localhost:8080/examples/servlets/servlet/RequestParamExample and enter a single character into the first or last name fields then post. The entered value does not show up. Instead, the value shows up blank. If I enter two characters they appear correctly. I researched it some more and found a bug in Java 1.5 in java.nio.charset.Charset.decode() that might be the cause. A ticket was submitted regarding a similar problem to sun in 2004 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6196991 (patched in Java 1.6) Tomcat 6.0.33 r1140904 the /tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/buf/ByteChunk.java class was changed to use java.nio.charset.Charset.decode(). This is probably why there was no problem before in version 6.0.32. FYI: The same issue reported against 5.5.35: https://issues.apache.org/bugzilla/show_bug.cgi?id=52579 Thank you for your research. I think you are right. Though I am not sure how much this can be fixed in Tomcat now. 1. r1140904 [1] in 6.0.33 is a fix for issue 51400. Reverting it will reintroduce the issue. 2. The recent code that uses Charset in 5.5.35 and 6.0.35 is part of fix for CVE-2012-0022 [2] So a different implementation might be needed. [1] http://svn.apache.org/viewvc?view=revisionrevision=1140904 [2] http://tomcat.apache.org/security.html The good news are that it does not affect UTF-8, so using that encoding may be a workaround. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[jira] [Commented] (MTOMCAT-118) tomcat7:run wont accept additionalClasspathDir arguments
[ https://issues.apache.org/jira/browse/MTOMCAT-118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13198702#comment-13198702 ] Dave Lund commented on MTOMCAT-118: --- Thanks for the work around - I've no problem with upgrading maven anyway tomcat7:run wont accept additionalClasspathDir arguments Key: MTOMCAT-118 URL: https://issues.apache.org/jira/browse/MTOMCAT-118 Project: Apache Tomcat Maven Plugin Issue Type: Bug Components: tomcat7 Affects Versions: 2.0-beta-1, 2.0 Environment: Apache Maven 3.0 (r1004208; 2010-10-04 12:50:56+0100) Java version: 1.6.0_24 Java home: C:\dev\java\java\jre Default locale: en_GB, platform encoding: Cp1252 OS name: windows 7 version: 6.1 arch: amd64 Family: windows Reporter: Dave Lund Assignee: Olivier Lamy Fix For: 2.0 Using the below configuration, the following error is given: [ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:run (default-cli) on project XXX: A type incompatibility occured while executing org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:run: java.lang.String cannot be cast to java.io.File Example taken from docs site http://tomcat.apache.org/maven-plugin-2.0-SNAPSHOT/run-mojo-features.html plugin groupIdorg.apache.tomcat.maven/groupId artifactIdtomcat7-maven-plugin/artifactId version2.0-SNAPSHOT/version configuration !-- http port -- port9090/port path//path useTestClasspathfalse/useTestClasspath contextFilesrc/sandbox/tomcat/sandbox-context.xml/contextFile additionalClasspathDirs additionalClasspathDirsrc/test/resources/additionalClasspathDir /additionalClasspathDirs /configuration dependencies dependency groupIdmysql/groupId artifactIdmysql-connector-java/artifactId version${mysql.mysql-connector-java}/version /dependency dependency groupIdch.qos.logback/groupId artifactIdlogback-classic/artifactId version0.9.15/version /dependency /dependencies /plugin -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: POST data (single character) cleared when using tomcat 6.0.33 and Character Encoding Filter
On 02/02/2012 11:25, Konstantin Kolinko wrote: cc: dev 2012/1/23 kitagawa kitagawawo...@gmail.com: While developing using ubuntu 11.04, tomcat 6.0.33 and java 1.5 I ran into a problem after setting the character encoding filter for requests. When posting a request, the value of any field with only a single character submitted is cleared. I also tested this issue with: tomcat 6.0.32 and java 1.5 (no problem) tomcat 6.0.35 and java 1.5 (same error occured) tomcat 6.0.33 and java 1.6 (no problem) tomcat 6.0.35 and java 1.6 (no problem) This can be repeated using the RequestParamExample that comes with tomcat. 1. uncomment the Set Character Encoding line in apache-tomcat-6.0.33\webapps\examples\WEB-INF\web.xml (lines 88 and 93) 2. start tomcat 3. go to http://localhost:8080/examples/servlets/servlet/RequestParamExample and enter a single character into the first or last name fields then post. The entered value does not show up. Instead, the value shows up blank. If I enter two characters they appear correctly. I researched it some more and found a bug in Java 1.5 in java.nio.charset.Charset.decode() that might be the cause. A ticket was submitted regarding a similar problem to sun in 2004 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6196991 (patched in Java 1.6) Tomcat 6.0.33 r1140904 the /tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/buf/ByteChunk.java class was changed to use java.nio.charset.Charset.decode(). This is probably why there was no problem before in version 6.0.32. FYI: The same issue reported against 5.5.35: https://issues.apache.org/bugzilla/show_bug.cgi?id=52579 Thank you for your research. I think you are right. Though I am not sure how much this can be fixed in Tomcat now. 1. r1140904 [1] in 6.0.33 is a fix for issue 51400. Reverting it will reintroduce the issue. 2. The recent code that uses Charset in 5.5.35 and 6.0.35 is part of fix for CVE-2012-0022 [2] So a different implementation might be needed. [1] http://svn.apache.org/viewvc?view=revisionrevision=1140904 [2] http://tomcat.apache.org/security.html The good news are that it does not affect UTF-8, so using that encoding may be a workaround. This only affects those using Java 5. It is resolved in the latest Java 6. Anyone using Java 5 will be in one of two positions: a) unsupported therefore they should upgrade to the latest Java 6 where this is fixed b) supported by Oracle in which case they can raise a bug with Oracle. Either way, I am leaning towards WONTFIX. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: SPDY support
On 02/02/2012 10:05, Remy Maucherat wrote: On Wed, 2012-02-01 at 13:54 -0800, Costin Manolache wrote: Hi, Some initial patch for SPDY - using the NPN SSL extension, as required by chrome/firefox. I used github so it's easy to add comments or test: https://github.com/costinm/tomcat/commit/e97def3314216c083cc4b68ad9731e5a94b2af28 Basic 'hello world' works in both jio and apr, looking for opinions on the integration with tomcat connectors. Please let me know :-) Ok, I think your light protocol concept to group any upgraded connections is appropriate. Agreed. I'll see if I can wrap this into the generic upgrade process I added as part of the WebSocket support. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 51235] Access Violation in httpd.exe originating in mod_jk code while getting sessionid from headers
https://issues.apache.org/bugzilla/show_bug.cgi?id=51235 --- Comment #10 from Pierre Boudreau pierre.boudr...@t4g.com 2012-02-02 11:58:41 UTC --- Sorry Rainer for the delay in getting back to you on this. The bad news is that the patch did not work. But the good news is that we upgraded to the versions of Apache and mod_JK below and have not seen the error since. It's been a bit over a month now and the problem was happening once every 2-3 days. Not sure if the fix was in Apache, mod_jk or in one of the Windows patches that we installed at the same time... but all is good now. This issue can be closed. Server Version: Apache/2.2.21 (Win32) mod_ssl/2.2.21 OpenSSL/0.9.8r mod_jk/1.2.28 (In reply to comment #9) Hi Pierre, do you have any update on this? Did the patch work? -- 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: POST data (single character) cleared when using tomcat 6.0.33 and Character Encoding Filter
2012/2/2 Mark Thomas ma...@apache.org: On 02/02/2012 11:25, Konstantin Kolinko wrote: cc: dev 2012/1/23 kitagawa kitagawawo...@gmail.com: While developing using ubuntu 11.04, tomcat 6.0.33 and java 1.5 I ran into a problem after setting the character encoding filter for requests. When posting a request, the value of any field with only a single character submitted is cleared. I also tested this issue with: tomcat 6.0.32 and java 1.5 (no problem) tomcat 6.0.35 and java 1.5 (same error occured) tomcat 6.0.33 and java 1.6 (no problem) tomcat 6.0.35 and java 1.6 (no problem) This can be repeated using the RequestParamExample that comes with tomcat. 1. uncomment the Set Character Encoding line in apache-tomcat-6.0.33\webapps\examples\WEB-INF\web.xml (lines 88 and 93) 2. start tomcat 3. go to http://localhost:8080/examples/servlets/servlet/RequestParamExample and enter a single character into the first or last name fields then post. The entered value does not show up. Instead, the value shows up blank. If I enter two characters they appear correctly. I researched it some more and found a bug in Java 1.5 in java.nio.charset.Charset.decode() that might be the cause. A ticket was submitted regarding a similar problem to sun in 2004 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6196991 (patched in Java 1.6) Tomcat 6.0.33 r1140904 the /tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/buf/ByteChunk.java class was changed to use java.nio.charset.Charset.decode(). This is probably why there was no problem before in version 6.0.32. FYI: The same issue reported against 5.5.35: https://issues.apache.org/bugzilla/show_bug.cgi?id=52579 Thank you for your research. I think you are right. Though I am not sure how much this can be fixed in Tomcat now. 1. r1140904 [1] in 6.0.33 is a fix for issue 51400. Reverting it will reintroduce the issue. 2. The recent code that uses Charset in 5.5.35 and 6.0.35 is part of fix for CVE-2012-0022 [2] So a different implementation might be needed. [1] http://svn.apache.org/viewvc?view=revisionrevision=1140904 [2] http://tomcat.apache.org/security.html The good news are that it does not affect UTF-8, so using that encoding may be a workaround. This only affects those using Java 5. It is resolved in the latest Java 6. Anyone using Java 5 will be in one of two positions: and Java 1.4 as my test in BZ 52579 shows a) unsupported therefore they should upgrade to the latest Java 6 where this is fixed b) supported by Oracle in which case they can raise a bug with Oracle. Either way, I am leaning towards WONTFIX. I also lean to WONTFIX. Maybe this also should be mentioned on security pages, because blindly applying the CVE-2012-0022 patches listed there to older versions of 5.5 and 6.0 will introduce the issue. Trivial note: Tomcat 7 is unaffected, because it requires minimum of Java 6. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 51235] Access Violation in httpd.exe originating in mod_jk code while getting sessionid from headers
https://issues.apache.org/bugzilla/show_bug.cgi?id=51235 --- Comment #11 from Pierre Boudreau pierre.boudr...@t4g.com 2012-02-02 12:02:47 UTC --- Actually, now that I look at it, we did not upgrade mod_jk. We are still running 1.2.28 which is the same version we had when I submitted this issue. The fix must have been in Apache between 2.2.17 and 2.2.21. (In reply to comment #10) Sorry Rainer for the delay in getting back to you on this. The bad news is that the patch did not work. But the good news is that we upgraded to the versions of Apache and mod_JK below and have not seen the error since. It's been a bit over a month now and the problem was happening once every 2-3 days. Not sure if the fix was in Apache, mod_jk or in one of the Windows patches that we installed at the same time... but all is good now. This issue can be closed. Server Version: Apache/2.2.21 (Win32) mod_ssl/2.2.21 OpenSSL/0.9.8r mod_jk/1.2.28 (In reply to comment #9) Hi Pierre, do you have any update on this? Did the patch work? -- 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: SPDY support
On 02/02/2012 10:05, Remy Maucherat wrote: On Wed, 2012-02-01 at 13:54 -0800, Costin Manolache wrote: Hi, Some initial patch for SPDY - using the NPN SSL extension, as required by chrome/firefox. I used github so it's easy to add comments or test: https://github.com/costinm/tomcat/commit/e97def3314216c083cc4b68ad9731e5a94b2af28 Basic 'hello world' works in both jio and apr, looking for opinions on the integration with tomcat connectors. Please let me know :-) Ok, I think your light protocol concept to group any upgraded connections is appropriate. Not sure about spdy though, is anyone using it ? Chrome users visiting Google websites. Seems like a chance of a decent number of people. Of course, I'm even less sure about websockets since it's kind of a mess. I'd say it was the other way round. WebSockets finalised before Xmas, and there's lots of interest from various communities to judge from the BZ. p Rémy - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org -- [key:62590808] signature.asc Description: OpenPGP digital signature
Re: SPDY support
On Thu, 2012-02-02 at 12:28 +, Pid wrote: Of course, I'm even less sure about websockets since it's kind of a mess. I'd say it was the other way round. WebSockets finalised before Xmas, and there's lots of interest from various communities to judge from the BZ. Websocrap is a bad transport. If it wasn't, we'd know if it was message or stream based, and it would be message based. Rémy - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: SPDY support
On Thu, Feb 2, 2012 at 3:33 AM, Mark Thomas ma...@apache.org wrote: On 02/02/2012 10:05, Remy Maucherat wrote: On Wed, 2012-02-01 at 13:54 -0800, Costin Manolache wrote: Hi, Some initial patch for SPDY - using the NPN SSL extension, as required by chrome/firefox. I used github so it's easy to add comments or test: https://github.com/costinm/tomcat/commit/e97def3314216c083cc4b68ad9731e5a94b2af28 Basic 'hello world' works in both jio and apr, looking for opinions on the integration with tomcat connectors. Please let me know :-) Ok, I think your light protocol concept to group any upgraded connections is appropriate. Agreed. I'll see if I can wrap this into the generic upgrade process I added as part of the WebSocket support. My concern with the current upgrade process added for WebSocket is that it's very heavy in memory use. I think it would be better to go the other way - and use the LightProtoocl for WebSockets. If the app needs the original Request/Response - we could save them, but in most cases I don't think they'll be needed. On use: I think next version of Firefox will also support SPDY, of course Chrome. It seems to be faster than HTTPS - and it's lighter on the server as well, fewer connections. It is also a very good protocol for web frontend ( load balancer, etc ) to tomcat - i.e. a possible replacement for AJP or simple HTTP proxy, in particular if you expect a lot of long-lived connections ( comet or websockets ). Remy: I don't think websockets is 'stream' based, just our current implementation uses InputStream to abstract long messages ( which I don't like either ). The websocket protocol is message based - but the messages can be 'text' or 'binary'. I would guess most real-life web apps will send/receive text json, but it doesn't mean our implementation must make a big distinction - it could just send bytes. Costin Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Tomcat-native patch for NPN support
On Thu, Feb 2, 2012 at 12:21 AM, jean-frederic clere jfcl...@gmail.comwrote: On 02/01/2012 09:59 PM, Costin Manolache wrote: Hi, I have a patch to the jni library, I uploaded it to github for easy commenting: https://github.com/costinm/**tomcat-native/commit/** 5e7d4b45bfa542e4b099bfdc2bda42**3b9a6cc85dhttps://github.com/costinm/tomcat-native/commit/5e7d4b45bfa542e4b099bfdc2bda423b9a6cc85d Please let me know if it looks ok - I included a 'cmake' build, which can generate a libtcnative.so with no external dependencies - NPN requires the latest openssl1.0.1beta2, it may be trickier to install with the normal platform dependencies. ( only tested cmake on linux64 - when new ssl gets included in more platforms it won't be needed.) Probably you should go ahead and commit it and arrange the configure to require the new version of openssl. It's not that easy - I don't think there are deb/rpm with the new openssl, having both old and new at the same time may be tricky - and not everyone will need this feature. I tested the 'configure' with old openssl and with new openssl installed in /usr/local ( i.e. with 2 versions of openssl in the same system ), it seems to work in both cases. 'cmake' is generating a tcnative.so that links in the openssl ( and apr) dependencies, so it can be installed in a system with no extra deps. I couldn't get this to work with libtool ( in particular the libtool we link from apr ). Costin Cheers Jean-Frederic --**--**- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.**orgdev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: SPDY support
On 02/02/2012 14:14, Costin Manolache wrote: On Thu, Feb 2, 2012 at 3:33 AM, Mark Thomas ma...@apache.org wrote: On 02/02/2012 10:05, Remy Maucherat wrote: Ok, I think your light protocol concept to group any upgraded connections is appropriate. Agreed. I'll see if I can wrap this into the generic upgrade process I added as part of the WebSocket support. My concern with the current upgrade process added for WebSocket is that it's very heavy in memory use. That is what I was agreeing with. I meant that I'll see if I can turn the current heavy-weight upgrade process into a light-weight one. As I have said before, this is already on my to-do list. I'll bump it up and start on it now so you have something to work with in trunk. I can steal ideas of you along the way :). That way we can hopefully get something pretty quickly into trunk that works for WebSocket and SPDY. I think it would be better to go the other way - and use the LightProtoocl for WebSockets. Exactly. If the app needs the original Request/Response - we could save them, but in most cases I don't think they'll be needed. I don;t see the need for that. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 51294] Since 7.0.12 do not work option unpackWARs=true for WARs outside appBase
https://issues.apache.org/bugzilla/show_bug.cgi?id=51294 Philippe Busque pbus...@mediagrif.com changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED | --- Comment #9 from Philippe Busque pbus...@mediagrif.com 2012-02-02 15:05:37 UTC --- This if is a major show stopper. It was working fine before, why 'fix' it? We are currently investigating into upgrading from Tomcat 6 to Tomcat 7. We have HUNDREDS of Tomcat application running. Some of require to be able to manipulate the webapps content at runtime. Due to the amount of instance to manage, we link our war outside the webapp for better management. This 'fix' break any Tomcat server that require an unpacked war and use any management tools to manage their configuration and data. As mentioned by another user, there should be an option to allow unpacking a WAR located outside of the Webapps. It was mentioned in another thread the reason it isn't so is it complicate the autodeploy. Well, make those feature mutually exclusive. You cannot use autoDeploy if unpackWarOutsideWebapp is true. I know we don't use autoDeploy for security reason. We're strongly thinking of stopping the Tomcat 7 migration project and stick to Tomcat 6 until the EOL if this 'fix' is not rollabacked or offer a workaround. Nowhere in the documentation of Tomcat 6 was it mentioned the war need to be in the Webapp to be unpacked. I haven't found any specification mentioning that this has to be that way too. So changing this behaviour without first consulting people and on an haunch really was a bad move. If it's working, don't fix it. Right now, it's broken for a tomcat instance fully relying on configuration files to manage context and deployment. -- 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
[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: 6 mins 43 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-02022012.jar -Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-02022012-native-src.tar.gz -Dtomcat-native.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-02022012-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-02022012.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-02022012.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 51294] Since 7.0.12 do not work option unpackWARs=true for WARs outside appBase
https://issues.apache.org/bugzilla/show_bug.cgi?id=51294 Tiago Cruz tiago.tuxkil...@gmail.com changed: What|Removed |Added CC||pbus...@mediagrif.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
DO NOT REPLY [Bug 51294] Since 7.0.12 do not work option unpackWARs=true for WARs outside appBase
https://issues.apache.org/bugzilla/show_bug.cgi?id=51294 Mark Thomas ma...@apache.org changed: What|Removed |Added Severity|minor |enhancement --- Comment #10 from Mark Thomas ma...@apache.org 2012-02-02 16:24:46 UTC --- (In reply to comment #9) Nowhere in the documentation of Tomcat 6 was it mentioned the war need to be in the Webapp to be unpacked. I haven't found any specification mentioning that this has to be that way too. So changing this behaviour without first consulting people and on an haunch really was a bad move. The Tomcat documentation for the host element has contained variations of the following since the 6.0.0 tag (and probably earlier but I didn't go back into the 5.5.x series): quote upackWARs: Set to true if you want web applications that are placed in the appBase directory as web application archive (WAR) files to be unpacked into a corresponding disk directory structure, false to run such web applications directly from a WAR file. /quote The Servlet specification is quite clear that applications should not rely on running in expanded form on a file system. If I recall correctly, it mentions that they might be located in a database. The behaviour if the WAR is placed outside the appBase was undefined until 7.0.12 where it was defined that they would not be expanded due, as you say, to complications this creates for auto-deployment. The simplest work-around is to deploy as an expanded directory rather than as a WAR or deploy into the appBase. I'm moving this issue to an enhancement. Any patch that addresses this needs to take account of the various edge cases as per the referenced discussions. -- 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: buildbot failure in ASF Buildbot on tomcat-trunk
Nearly all tests at both Gump and Buildbot are currently failing with null java.lang.NullPointerException at java.io.File.init(File.java:239) at org.apache.catalina.startup.Tomcat.initBaseDir(Tomcat.java:609) at org.apache.catalina.startup.Tomcat.getServer(Tomcat.java:466) at org.apache.catalina.startup.Tomcat.getService(Tomcat.java:412) at org.apache.catalina.startup.TomcatBaseTest.setUp(TomcatBaseTest.java:108) Best regards, Konstantin Kolinko 2012/2/2 build...@apache.org: 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/2700 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1239531 Blamelist: markt BUILD FAILED: failed compile_1 sincerely, -The Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: buildbot failure in ASF Buildbot on tomcat-trunk
On 02/02/2012 18:10, Konstantin Kolinko wrote: Nearly all tests at both Gump and Buildbot are currently failing with null java.lang.NullPointerException at java.io.File.init(File.java:239) at org.apache.catalina.startup.Tomcat.initBaseDir(Tomcat.java:609) at org.apache.catalina.startup.Tomcat.getServer(Tomcat.java:466) at org.apache.catalina.startup.Tomcat.getService(Tomcat.java:412) at org.apache.catalina.startup.TomcatBaseTest.setUp(TomcatBaseTest.java:108) That'll be me. Sorry. Trying to do too much in parallel. Mark Best regards, Konstantin Kolinko 2012/2/2 build...@apache.org: 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/2700 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1239531 Blamelist: markt BUILD FAILED: failed compile_1 sincerely, -The Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 52500] Improve client certificate authentication
https://issues.apache.org/bugzilla/show_bug.cgi?id=52500 --- Comment #17 from Michael michael_fur...@hotmail.com 2012-02-02 18:31:36 UTC --- Dear Christopher, Thank you for your comments! I need couple of clarifications 1)I do not like the place that I use now to call to createUserIdentifierRetriever method I want to call it when Realm is instantiated and all properties are set. I need method like afterPropertiesSet of Spring or like javax.annotation.PostConstruct. Do you have something like this for Realm? 2) In the future, please provide more democratic documentation. For instance, plain-text or OpenDocument format. Plain text is better because it does not require a viewer external to the we browser. How can I provide a plain text together with pictures? Do you know a tool for conversion from MS-Word documents to OpenDocument format? I will more than happy for your comments. Best regards, Michael -- 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 52586] New: When requests are forwarded, the request attribute javax.servlet.forward.path_info is assigned an incorrect value.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52586 Bug #: 52586 Summary: When requests are forwarded, the request attribute javax.servlet.forward.path_info is assigned an incorrect value. Product: Tomcat 7 Version: 7.0.23 Platform: PC OS/Version: Linux Status: NEW Severity: major Priority: P2 Component: Servlet JSP API AssignedTo: dev@tomcat.apache.org ReportedBy: diego.rivera...@gmail.com Classification: Unclassified As per the servlet spec, the values for: javax.servlet.forward.request_uri javax.servlet.forward.context javax.servlet.forward.servlet_path javax.servlet.forward.path_info javax.servlet.forward.query_string MUST be set to the values from the very first servlet that serviced the current request. However, it seems that Tomcat is populating path_info with the value of the LAST path_info serviced in the request (i.e. the final servlet that serviced the request). It's possible the other value assignments are afflicted by similar defects, I've not explicitly tested for this. Because of this issue, it's impossible to correctly reconstruct the original request's URI piecemeal by concatenating context+servlet_path+path_info+?+query_string, since path_info will contain the path to another servlet and thus this concatenation will produce a probably invalid URI target. Therefore, creating click here to retry links is impossible without workaround code. The critical issue here is the deviation from the servlet spec, which spells out the behavior of those attributes. -- 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: r1239784 - /tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java
Author: markt Date: Thu Feb 2 19:39:31 2012 New Revision: 1239784 URL: http://svn.apache.org/viewvc?rev=1239784view=rev Log: Correct typo that broke nearly all the tests Modified: tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java Modified: tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java?rev=1239784r1=1239783r2=1239784view=diff == --- tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java Thu Feb 2 19:39:31 2012 @@ -605,7 +605,7 @@ public class Tomcat { } server.setCatalinaBase(baseFile); -if (catalinaHome == null) { +if (catalinaHome != null) { File homeFile = new File(catalinaHome); homeFile.mkdirs(); if (!homeFile.isAbsolute()) { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 52587] New: NPE in authenticator when no realm/resource is defined
https://issues.apache.org/bugzilla/show_bug.cgi?id=52587 Bug #: 52587 Summary: NPE in authenticator when no realm/resource is defined Product: Tomcat 7 Version: 7.0.25 Platform: PC OS/Version: Mac OS X 10.4 Status: NEW Severity: minor Priority: P2 Component: Catalina AssignedTo: dev@tomcat.apache.org ReportedBy: ch...@christopherschultz.net Classification: Unclassified When no Realm is available to authenticate against, an NPE is thrown. STR: 1. Start with a stock 7.0.25 and modify server.xml: 2. Comment-out Resource in GlobalNamingResources 3. Comment-out Realm in Engine 4. Deploy manager app and try to log in java.lang.NullPointerException org.apache.catalina.realm.RealmBase.authenticate(RealmBase.java:340) org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:158) org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:544) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987) org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579) org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1600) java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) java.lang.Thread.run(Thread.java:680) Clearly, this is a pathological setup, but it might be nice to get a decent error message instead of an NPE. -- 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/2702 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1239784 Blamelist: markt Build succeeded! sincerely, -The Buildbot
DO NOT REPLY [Bug 51235] Access Violation in httpd.exe originating in mod_jk code while getting sessionid from headers
https://issues.apache.org/bugzilla/show_bug.cgi?id=51235 Rainer Jung rainer.j...@kippdata.de changed: What|Removed |Added Status|NEEDINFO|RESOLVED Resolution||INVALID --- Comment #12 from Rainer Jung rainer.j...@kippdata.de 2012-02-02 21:06:52 UTC --- Thanks for the update. Will close the issue then. -- 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 52586] When requests are forwarded, the request attribute javax.servlet.forward.path_info is assigned an incorrect value.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52586 --- Comment #1 from diego.rivera...@gmail.com diego.rivera...@gmail.com 2012-02-02 21:48:48 UTC --- The problem seems to be in StandardHostValve, on (or about) line 438: private boolean custom(Request request, Response response, ErrorPage errorPage) { if (container.getLogger().isDebugEnabled()) container.getLogger().debug(Processing + errorPage); request.setPathInfo(errorPage.getLocation()); try { // Forward control to the specified location ServletContext servletContext = request.getContext().getServletContext(); Here, evidently the pathinfo for the request being serviced is set to the location of the error page being forwarded to: request.setPathInfo(errorPage.getLocation()); This is evidently incorrect: pathInfo should be set to the path info of the topmost request on the stack, not the location of the error page being forwarded to (this explicitly contradicts the Servlet spec). In my mind, this line should simply not exist. I'll leave it up to you Tomcat experts to determine what the impact of that is. -- 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: r1239899 - in /tomcat/trunk: java/org/apache/catalina/manager/JMXProxyServlet.java webapps/docs/manager-howto.xml
Author: schultz Date: Thu Feb 2 22:46:38 2012 New Revision: 1239899 URL: http://svn.apache.org/viewvc?rev=1239899view=rev Log: Added support to the JMXProxyServlet for fetching a specific key from a CompositeData value. Added documentation for the entire 'get' command for the JMXProxyServlet, including the new optional 'key' parameter. Modified: tomcat/trunk/java/org/apache/catalina/manager/JMXProxyServlet.java tomcat/trunk/webapps/docs/manager-howto.xml Modified: tomcat/trunk/java/org/apache/catalina/manager/JMXProxyServlet.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/manager/JMXProxyServlet.java?rev=1239899r1=1239898r2=1239899view=diff == --- tomcat/trunk/java/org/apache/catalina/manager/JMXProxyServlet.java (original) +++ tomcat/trunk/java/org/apache/catalina/manager/JMXProxyServlet.java Thu Feb 2 22:46:38 2012 @@ -25,6 +25,7 @@ import javax.management.MBeanOperationIn import javax.management.MBeanParameterInfo; import javax.management.MBeanServer; import javax.management.ObjectName; +import javax.management.openmbean.CompositeData; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; @@ -97,7 +98,7 @@ public class JMXProxyServlet extends Htt qry=request.getParameter(get); if( qry!= null ) { String name=request.getParameter(att); -getAttribute( writer, qry, name ); +getAttribute( writer, qry, name, request.getParameter(key) ); return; } qry = request.getParameter(invoke); @@ -122,18 +123,35 @@ public class JMXProxyServlet extends Htt } -public void getAttribute(PrintWriter writer, String onameStr, String att) { +public void getAttribute(PrintWriter writer, String onameStr, String att, String key) { try { ObjectName oname = new ObjectName(onameStr); Object value = mBeanServer.getAttribute(oname, att); + +if(null != key value instanceof CompositeData) + value = ((CompositeData)value).get(key); + String valueStr; if (value != null) { valueStr = value.toString(); } else { valueStr = null; } -writer.println(OK - Attribute get ' + onameStr + ' - + att -+ = + MBeanDumper.escape(valueStr)); + +writer.print(OK - Attribute get '); +writer.print(onameStr); +writer.print(' - ); +writer.print(att); + +if(null != key) { +writer.print( - key '); +writer.print(key); +writer.print('); +} + +writer.print( = ); + +writer.println(MBeanDumper.escape(valueStr)); } catch (Exception ex) { writer.println(Error - + ex.toString()); ex.printStackTrace(writer); Modified: tomcat/trunk/webapps/docs/manager-howto.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/manager-howto.xml?rev=1239899r1=1239898r2=1239899view=diff == --- tomcat/trunk/webapps/docs/manager-howto.xml (original) +++ tomcat/trunk/webapps/docs/manager-howto.xml Thu Feb 2 22:46:38 2012 @@ -1265,6 +1265,37 @@ http://webserver/manager/jmxproxy/?qry=S you may run. /subsection + subsection name=JMX Get command +The JXMProxyServlet also supports a get command that you can use to +fetch the value of a specific MBean's attribute. The general form of +the codeget/code command is: + +source + http://webserver/manager/jmxproxy/?get=BEANNAMEamp;att=MYATTRIBUTEamp;key=MYKEY +/source + +You must provide the following parameters: +ol + licodeget/code: The full bean name/li + licodeatt/code: The attribute you wish to fetch/li + licodekey/code: (optional) The key into a CompositeData MBean attribute/li +/ol + +If all goes well, then it will say OK, otherwise an error message will +be shown. For example, let's say we wish to fetch the current heap memory +data: + +source + http://webserver/manager/jmxproxy/?get=java.lang:type=Memoryamp;att=HeapMemoryUsage +/source + +Or, if you only want the used key: + +source + http://webserver/manager/jmxproxy/?get=java.lang:type=Memoryamp;att=HeapMemoryUsageamp;key=used +/source + /subsection + subsection name=JMX Set command Now that you can query an MBean, its time to muck with Tomcat's internals! The general form of the set command is : - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
WebSocket implementation - patch incoming
I've have a patch [1] that uses a much lighter Processor object, while broadly keeping in line with the previous integration points. It is a little more invasive therefore I wanted to give folks a chance to look at it - particularly the integration points before I hit commit. There is scope to make this cleaner and lighter in Tomcat 8 but that requires more refactoring of existing code than I really want to do in 7.0.x. Please keep in mind that this is an initial plumb it together and get it to work implementation. It is far from an optimal solution (lots of single byte read / writes) but these are things that can be addressed without changing the integration points with the existing connectors. Assuming there is no objections, I plan to commit this early next week. Mark [1] http://people.apache.org/~markt/patches/draft/2012-02-02-websocket-light.patch - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1239522 - in /tomcat/trunk/java/org/apache/catalina: Server.java core/ContainerBase.java core/StandardEngine.java core/StandardServer.java mbeans/MBeanFactory.java startup/Tomcat.java
2012/2/2 ma...@apache.org: Author: markt Date: Thu Feb 2 10:32:34 2012 New Revision: 1239522 URL: http://svn.apache.org/viewvc?rev=1239522view=rev Log: Extend clean-up to Server Modified: tomcat/trunk/java/org/apache/catalina/Server.java tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java tomcat/trunk/java/org/apache/catalina/core/StandardEngine.java tomcat/trunk/java/org/apache/catalina/core/StandardServer.java tomcat/trunk/java/org/apache/catalina/mbeans/MBeanFactory.java tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java Several comments regarding the changes in Tomcat.initBaseDir(): 0. Trivial note: one typo was already fixed in http://svn.apache.org/viewvc?view=revisionrevision=1239784 1. Tomcat#setBaseDir() Javadoc says that if system properties are unset the value used is $HOME/tomcat.$PORT. Though further it says TODO: better default ? Maybe current dir ? The actual implementation of iniBaseDir() uses System.getProperty(user.dir) which is $PWD. The home directory property name would be user.home. 2. Old implementation of initBaseDir() updated Tomcat#basedir field. basedir = home.getCanonicalPath(); That is no longer done. It could be basedir = baseFile.getPath(); though honestly that field has no getters (but it has protected visibility). It was String because the property that it was used to set was String. 3. There are two further bugs in setting catalinaHome besides the one fixed by r1239784: 1) s/setCatalinaBase()/setCatalinaHome()/ 2) If catalina home value is null it should fallback to the value of catalina base. In the old code it was: System.setProperty(Globals.CATALINA_HOME_PROP, basedir); 4. if (!homeFile.isAbsolute()) checks when setting base and home: I wonder whether isAbsolute() check is needed. Though it matches with what the old code was doing. The Bootstrap class (as updated in r1239527) always converts both paths to canonical form unconditionally. The old code in Catalina#initDirs() (removed in r1239527) did conversion conditionally. I think it is safer to convert it to canonical form here as well, and that would be more consistent with bootstrap. I wonder whether there is a use case that requires absolute but non-canonical value here. Anyway we are already using canonical paths in many places internally. If someone expects that he can change absolute-canonical mapping while tomcat is running (e.g. change a symlink) he wouldn't go far with that already. SecurityManager also operates on canonical paths IIRC. So I think it is OK to convert to canonical form unconditionally, though it is slight change in behaviour. Best regards, Konstantin Kolinko Modified: tomcat/trunk/java/org/apache/catalina/Server.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Server.java?rev=1239522r1=1239521r2=1239522view=diff --- tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java Thu Feb 2 10:32:34 2012 @@ -459,11 +459,12 @@ public class Tomcat { return server; } - initBaseDir(); - System.setProperty(catalina.useNaming, false); server = new StandardServer(); + + initBaseDir(); + server.setPort( -1 ); service = new StandardService(); @@ -591,20 +592,31 @@ public class Tomcat { // Create a temp dir. basedir = System.getProperty(user.dir) + /tomcat. + port; - File home = new File(basedir); - home.mkdir(); - if (!home.isAbsolute()) { + } + + File baseFile = new File(basedir); + baseFile.mkdirs(); + if (!baseFile.isAbsolute()) { + try { + baseFile = baseFile.getCanonicalFile(); + } catch (IOException e) { + baseFile = baseFile.getAbsoluteFile(); + } + } + server.setCatalinaBase(baseFile); + + if (catalinaHome == null) { + File homeFile = new File(catalinaHome); + homeFile.mkdirs(); + if (!homeFile.isAbsolute()) { try { - basedir = home.getCanonicalPath(); + homeFile = homeFile.getCanonicalFile(); } catch (IOException e) { - basedir = home.getAbsolutePath(); + homeFile = homeFile.getAbsoluteFile(); } } + server.setCatalinaBase(homeFile); } - if (catalinaHome == null) { - System.setProperty(Globals.CATALINA_HOME_PROP, basedir); - } - System.setProperty(Globals.CATALINA_BASE_PROP, basedir); } static final String[] silences = new String[] { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands,