org.apache.commons.net.ftp.listFiles(String).lenght() forced 2000 bug?
Hi apache commons developers, may be this posting is not 100% in the scope of the dev list - but this topic is very urgent for me and i didnt get any replies from the users list. would be glad to get some hints - the problem org.apache.commons.net.ftp.listFiles(String) doesnt deliver more than 2000 entries! I increased both buffer size and timeout-no result! Its not on the server side either because other ftp clients are fine. What to do? Thanks Regards, Felix. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Created: (EMAIL-66) to create web mail in James
to create web mail in James --- Key: EMAIL-66 URL: https://issues.apache.org/jira/browse/EMAIL-66 Project: Commons Email Issue Type: Bug Environment: Wins Server 2003, James 2.3.0, MySQL Server 4.1,Java 2 RE 1.4 Reporter: wany Priority: Critical hello, i'm wany, i have to problem to create web mail in James. anyone can help me to create web mail in James to send email. please help me.. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[nightly build] id failed.
Failed build logs: http://vmbuild.apache.org/~commons/nightly/logs//20070508/id.log - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Commented: (EMAIL-66) to create web mail in James
[ https://issues.apache.org/jira/browse/EMAIL-66?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494273 ] Joe Germuska commented on EMAIL-66: --- This is not the appropriate place or style for your question. It doesn't appear that you are trying to use the commons-email library to solve a problem; James is something else. Furthermore, this system is for use in tracking bugs and feature enhancements, not for seeking help. If you are just trying to send mail, you don't necessarily need James, and comons-email may be a good tool for you to use. If that's the case, you should check out the Jakarta Commons User email list: http://jakarta.apache.org/site/mail2.html#Commons If you are trying to use James to run a Java based email server, you should look at that project's own mailing lists: http://james.apache.org/mail.html This ticket should be closed. to create web mail in James --- Key: EMAIL-66 URL: https://issues.apache.org/jira/browse/EMAIL-66 Project: Commons Email Issue Type: Bug Environment: Wins Server 2003, James 2.3.0, MySQL Server 4.1,Java 2 RE 1.4 Reporter: wany Priority: Critical hello, i'm wany, i have to problem to create web mail in James. anyone can help me to create web mail in James to send email. please help me.. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [logging] JCL in SLF4J flavour - a demo for discussion
Hi, I just had a quick look at the 2.0.0 api, and there are some features that seem to be missing which would be really nice to have. For one of them I already created a JIRA entry a time ago, another one I came across because I use SLF4J a lot now. 1) It would be nice to have a generic log method in the Log interface, which allows you to log with an arbitrary log level (LOGGING-110). 2) It would be nice to have formatting of log messages as SLF4J has with the MessageFormat api. In combination with varargs (java5); this makes for a really flexible logging mechanism which makes the code much more concise and avoids testing for log level and formatting of messages yourself while still remaining efficient, e.g., something like this: log.debug(The disk \{1}\ contains {0} file(s)., count, disk); A possible method signature problem could occur here (if there is a var args version of the method) because it would conflict with the version that also has the throwable as an argument. A solution would be to have the throwable first, i.e., log.debug(throwable, messageFormat, arguments...). If JCL 2.0.0 needs to be designed to be java 1.4 compatible, having versions with the Object[]'s instead of varargs would still be immensely useful though. Just some thoughts, Sebastiaan van Erk. Boris Unckel wrote: Hello, I have seen the recent discussions on JCL 2.0.0 and a version without autodiscovery. Someone stated to stop any further development (with good reasons behind) but I am thinking different. Please have a look at the (working) code: https://issues.apache.org/jira/browse/LOGGING-112 It has a static binding, some improvements in the logfactories (recognizes native implementations). API and implementations are cleanly separated, the 1.1.x diagnostic function is still used. What are your thoughts? Is this a possible direction? Is it worth to put more time and energy into this? Regards Boris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Commented: (DIGESTER-113) Can sources attachment for Digester 1.8 be uploaded to Maven repo on ibiblio?
[ https://issues.apache.org/jira/browse/DIGESTER-113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494296 ] Henri Yandell commented on DIGESTER-113: Nope - however I'll go ahead and get it uploaded (or one like it) via the Apache rsync repository. That way we retain a copy of the Apache slice of the Maven repository at the ASF in case of failure. Can sources attachment for Digester 1.8 be uploaded to Maven repo on ibiblio? - Key: DIGESTER-113 URL: https://issues.apache.org/jira/browse/DIGESTER-113 Project: Commons Digester Issue Type: Wish Affects Versions: 1.8 Reporter: Matt Whitlock Priority: Minor Please see http://jira.codehaus.org/browse/MAVENUPLOAD-1521 . I am supposed to ask if you will allow http://www.mattwhitlock.com/commons-digester-1.8-sources.jar to be uploaded to the Maven central repository on ibiblio as the source attachment for the commons-digester:commons-digester:1.8:jar artifact. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Commented: (ATTRIBUTES-9) Commons Attribute Compiler POM for 2.2 reports its version as 2.1
[ https://issues.apache.org/jira/browse/ATTRIBUTES-9?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494300 ] Henri Yandell commented on ATTRIBUTES-9: Asking on repository@ to find out whether we can fix this in the repository or if the house has bolted. Commons Attribute Compiler POM for 2.2 reports its version as 2.1 - Key: ATTRIBUTES-9 URL: https://issues.apache.org/jira/browse/ATTRIBUTES-9 Project: Commons Attributes Issue Type: Bug Affects Versions: 2.2 Environment: All Reporter: Eric Bowman Priority: Minor This causes Ivy to fail (or at least I haven't yet figured out a workaround). All the mirrors have it; if you look at for instance: http://mirrors.ibiblio.org/pub/mirrors/maven2/commons-attributes/commons-attributes-compiler/2.2/commons-attributes-compiler-2.2.pom ...you can see its version didn't get bumped to 2.2. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Jakarta-commons Wiki] Update of TLPResolution by HenriYandell
Dear Wiki user, You have subscribed to a wiki page or wiki category on Jakarta-commons Wiki for change notification. The following page has been changed by HenriYandell: http://wiki.apache.org/jakarta-commons/TLPResolution The comment on the change is: Torsten has volunteered as chair -- * Matt Benson [EMAIL PROTECTED] * Martin Cooper[EMAIL PROTECTED] * Phil Steitz [EMAIL PROTECTED] + * Torsten Curdt[EMAIL PROTECTED] -NOW, THEREFORE, BE IT FURTHER RESOLVED, that XXX +NOW, THEREFORE, BE IT FURTHER RESOLVED, that Torsten Curdt be appointed to the office of Vice President, Commons, to serve in accordance with and subject to the direction of the Board of Directors and the Bylaws of the Foundation until death, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Having an daemon release
Hi, I spoke with couple of Jakarta PMC members at the ApacheCon EU, and it looks like we don't have an daemons release for quite some time. Well, the reason is, as I vividly explained :) because daemons is so stable that we for example inside Tomcat use the trunk as a stable version. Yes, I know :) However, think we'd need a cut. At least just appear as a live Jakarta project. I even volunteer to act as a RM. Any objections? Regards, Mladen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r536283 - in /jakarta/commons/proper/math/trunk: src/java/org/apache/commons/math/analysis/ src/test/org/apache/commons/math/analysis/ xdocs/
Author: luc Date: Tue May 8 11:16:52 2007 New Revision: 536283 URL: http://svn.apache.org/viewvc?view=revrev=536283 Log: [MATH-156] use initial guess provided by the caller to BrentSolver.solve(), thus improving speed Added: jakarta/commons/proper/math/trunk/src/test/org/apache/commons/math/analysis/MonitoredFunction.java (with props) Modified: jakarta/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/BrentSolver.java jakarta/commons/proper/math/trunk/src/test/org/apache/commons/math/analysis/BrentSolverTest.java jakarta/commons/proper/math/trunk/xdocs/changes.xml Modified: jakarta/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/BrentSolver.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/BrentSolver.java?view=diffrev=536283r1=536282r2=536283 == --- jakarta/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/BrentSolver.java (original) +++ jakarta/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/BrentSolver.java Tue May 8 11:16:52 2007 @@ -43,24 +43,67 @@ } /** - * Find a zero in the given interval. - * p - * Throws codeConvergenceException/code if the values of the function - * at the endpoints of the interval have the same sign. + * Find a zero in the given interval with an initial guess. + * pThrows codeIllegalArgumentException/code if the values of the + * function at the three points have the same sign (note that it is + * allowed to have endpoints with the same signe if the initial point has + * opposite sign function-wise)./p * * @param min the lower bound for the interval. * @param max the upper bound for the interval. - * @param initial the start value to use (ignored). + * @param initial the start value to use (must be set to x0 if no + * initial point is known). * @return the value where the function is zero - * @throws MaxIterationsExceededException the maximum iteration count is exceeded + * @throws MaxIterationsExceededException the maximum iteration count + * is exceeded * @throws FunctionEvaluationException if an error occurs evaluating * the function * @throws IllegalArgumentException if initial is not between min and max + * (even if it emis/em a root) */ public double solve(double min, double max, double initial) throws MaxIterationsExceededException, FunctionEvaluationException { - -return solve(min, max); + +if (((initial - min) * (max -initial)) 0) { +throw new IllegalArgumentException(Initial guess is not in search ++ interval. + Initial: + initial ++Endpoints: [ + min + , + max + ]); +} + +// return the initial guess if it is good enough +double yInitial = f.value(initial); +if (Math.abs(yInitial) = functionValueAccuracy) { +setResult(initial, 0); +return result; +} + +// return the first endpoint if it is good enough +double yMin = f.value(min); +if (Math.abs(yMin) = functionValueAccuracy) { +setResult(yMin, 0); +return result; +} + +// reduce interval if min and initial bracket the root +if (yInitial * yMin 0) { +return solve(min, yMin, initial, yInitial, min, yMin); +} + +// return the second endpoint if it is good enough +double yMax = f.value(max); +if (Math.abs(yMax) = functionValueAccuracy) { +setResult(yMax, 0); +return result; +} + +// reduce interval if initial and max bracket the root +if (yInitial * yMax 0) { +return solve(initial, yInitial, max, yMax, initial, yInitial); +} + +// full Brent algorithm starting with provided initial guess +return solve(min, yMin, max, yMax, initial, yInitial); + } /** @@ -85,32 +128,50 @@ clearResult(); verifyInterval(min, max); -// Index 0 is the old approximation for the root. -// Index 1 is the last calculated approximation for the root. -// Index 2 is a bracket for the root with respect to x1. -double x0 = min; -double x1 = max; -double y0; -double y1; -y0 = f.value(x0); -y1 = f.value(x1); +double yMin = f.value(min); +double yMax = f.value(max); // Verify bracketing -if (y0 * y1 = 0) { +if (yMin * yMax = 0) { throw new IllegalArgumentException (Function values at endpoints do not have different signs. + Endpoints: [ + min + , + max + ] + - Values: [ + y0 + , + y1 +
[jira] Created: (LANG-331) Fix for LANG-259 broke ValuedEnum.compareTo() on subclassed enumerations
Fix for LANG-259 broke ValuedEnum.compareTo() on subclassed enumerations Key: LANG-331 URL: https://issues.apache.org/jira/browse/LANG-331 Project: Commons Lang Issue Type: Bug Reporter: Michael Sclafani I have a ValuedEnum abstract subclass that I further subclass to attach useful implementation behaviors. The base class overrides getEnumClass(). The fix for LANG-259 broke compareTo() since it compares getClass(), not getEnumClass(). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r536288 - /jakarta/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/BrentSolver.java
Author: luc Date: Tue May 8 11:21:47 2007 New Revision: 536288 URL: http://svn.apache.org/viewvc?view=revrev=536288 Log: fixed javadoc Modified: jakarta/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/BrentSolver.java Modified: jakarta/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/BrentSolver.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/BrentSolver.java?view=diffrev=536288r1=536287r2=536288 == --- jakarta/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/BrentSolver.java (original) +++ jakarta/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/BrentSolver.java Tue May 8 11:21:47 2007 @@ -46,12 +46,12 @@ * Find a zero in the given interval with an initial guess. * pThrows codeIllegalArgumentException/code if the values of the * function at the three points have the same sign (note that it is - * allowed to have endpoints with the same signe if the initial point has + * allowed to have endpoints with the same sign if the initial point has * opposite sign function-wise)./p * * @param min the lower bound for the interval. * @param max the upper bound for the interval. - * @param initial the start value to use (must be set to x0 if no + * @param initial the start value to use (must be set to min if no * initial point is known). * @return the value where the function is zero * @throws MaxIterationsExceededException the maximum iteration count - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Commented: (MATH-164) Complex - Issue with non-compliance to C99!
[ https://issues.apache.org/jira/browse/MATH-164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494375 ] Luc Maisonobe commented on MATH-164: I confirm the issue. Currently, the multiplication operator is implemented using a single check for NaN and using the simple rules on real and imaginary parts if the check succeeds. A quick check shows that there are several other related problems. For example, the isInfinite method checks for isNaN first and checks for infinite parts only afterwards. However, C99 explicitely states that a complex is considered to be an infinity as soon as one part is infinity, even if the other one is NaN. So it appears that the handling of special values like NaN and infinity in the Complex class is not compliant with C99 at several places. Solving this needs some forethought. Thanks for reporting it. Complex - Issue with non-compliance to C99! --- Key: MATH-164 URL: https://issues.apache.org/jira/browse/MATH-164 Project: Commons Math Issue Type: Wish Affects Versions: 1.1 Reporter: Richard Lyon Priority: Minor Complex z1, z2, z3; // assign values to the two complex numbers z1 = new Complex(1.0, 0.0); z2 = new Complex(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY); // multiply the two complex numbers z3 = z1.multiply(z2); The result is that both the real and imaginary part of z3 are NaN. Isn't it somewhat desirable that both parts of the complex should be Infinity? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Having an daemon release
can the daemon support thread dumps? If not it is still crippling for many operations teams that wish to use it for production For those interested, I would like to add it to the enhancement list Filip Mladen Turk wrote: Hi, I spoke with couple of Jakarta PMC members at the ApacheCon EU, and it looks like we don't have an daemons release for quite some time. Well, the reason is, as I vividly explained :) because daemons is so stable that we for example inside Tomcat use the trunk as a stable version. Yes, I know :) However, think we'd need a cut. At least just appear as a live Jakarta project. I even volunteer to act as a RM. Any objections? Regards, Mladen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Having Trouble with Validator JavaScript
Hi, Can anyone guide me on how to configure the Validator to use one of built in JavaScript functions? What must be done in validation-rules.xml and what must be done in the JSP file? Rechell Schwartz CE Development Phone: (212)919-3853 - This message, and any attachments to it, may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, you are notified that any use, dissemination, distribution, copying, or communication of this message is strictly prohibited. If you have received this message in error, please notify the sender immediately by return e-mail and delete the message and any attachments. Thank you.
Re: Having an daemon release
Filip Hanik - Dev Lists wrote: can the daemon support thread dumps? If not it is still crippling for many operations teams that wish to use it for production For those interested, I would like to add it to the enhancement list Impossible without a native part inside JVM (at least for Windows). Kill -3 should work in all other use cases. However Windows procrunw (tomcat6w.exe) even has a 'Thread Dump' button. Just look at the log file, it should make a thread dump even from the service. Anyhow, if it doesn't work we have a goal for the next release ;) Cheers, Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[DBCP] Bugzilla id 33167
Hi, I had originally filed a bug/enhancement for Commons DBCP which I am trying to get added to the main build. http://issues.apache.org/bugzilla/show_bug.cgi?id=33167 I could not find that in the new jira issue tracker. Could you tell me if there is any intention of moving this into the main build? Thanks Srinath.
[Jakarta-commons Wiki] Update of TLPResolution by DanielSavarese
Dear Wiki user, You have subscribed to a wiki page or wiki category on Jakarta-commons Wiki for change notification. The following page has been changed by DanielSavarese: http://wiki.apache.org/jakarta-commons/TLPResolution -- * Martin Cooper[EMAIL PROTECTED] * Phil Steitz [EMAIL PROTECTED] * Torsten Curdt[EMAIL PROTECTED] + * Daniel Savarese dfs at apache.org + * Rory Winston rwinston at apache.org NOW, THEREFORE, BE IT FURTHER RESOLVED, that Torsten Curdt be appointed to the office of Vice President, Commons, to serve - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [DBCP] Bugzilla id 33167
Srinath Narasimhan wrote: Hi, I had originally filed a bug/enhancement for Commons DBCP which I am trying to get added to the main build. http://issues.apache.org/bugzilla/show_bug.cgi?id=33167 Please see: https://issues.apache.org/jira/browse/DBCP-61 I could not find that in the new jira issue tracker. Could you tell me if there is any intention of moving this into the main build? Thanks Srinath. -- Dennis Lundberg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [DBCP] Bugzilla id 33167
Thanks for the quick response. The next question is it going to get added in any release ? -Original Message- From: Dennis Lundberg [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 08, 2007 4:38 PM To: Jakarta Commons Developers List Subject: Re: [DBCP] Bugzilla id 33167 Srinath Narasimhan wrote: Hi, I had originally filed a bug/enhancement for Commons DBCP which I am trying to get added to the main build. http://issues.apache.org/bugzilla/show_bug.cgi?id=33167 Please see: https://issues.apache.org/jira/browse/DBCP-61 I could not find that in the new jira issue tracker. Could you tell me if there is any intention of moving this into the main build? Thanks Srinath. -- Dennis Lundberg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [DBCP] Bugzilla id 33167
In JIRA the Fix Version/s indicates which version a fix for an issue is scheduled to be included. In this case it is set to 1.3. No release date has been set for that version. Srinath Narasimhan wrote: Thanks for the quick response. The next question is it going to get added in any release ? -Original Message- From: Dennis Lundberg [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 08, 2007 4:38 PM To: Jakarta Commons Developers List Subject: Re: [DBCP] Bugzilla id 33167 Srinath Narasimhan wrote: Hi, I had originally filed a bug/enhancement for Commons DBCP which I am trying to get added to the main build. http://issues.apache.org/bugzilla/show_bug.cgi?id=33167 Please see: https://issues.apache.org/jira/browse/DBCP-61 I could not find that in the new jira issue tracker. Could you tell me if there is any intention of moving this into the main build? Thanks Srinath. -- Dennis Lundberg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [all] Going TLP?
+1 to you :) Mvgr, Martin Torsten Curdt wrote: On 06.05.2007, at 19:51, Henri Yandell wrote: On 5/1/07, Henri Yandell [EMAIL PROTECTED] wrote: On 5/1/07, Jochen Wiedmann [EMAIL PROTECTED] wrote: On 5/2/07, Henri Yandell [EMAIL PROTECTED] wrote: (http://wiki.apache.org/jakarta-commons/TLPResolution) and secondly, anyone want to volunteer to chair things? As you are one of the most active persons here and also the one who is pushing this forward: How about yourself? :-) A bunch of projects do a one year term, which I think is probably a very healthy thing. I'm happy to do the chair bit if no one else wants to, but I'll happily support anyone if they're interested. No one interested in volunteering as Commons chair? I would also do it (How come I am not in the list? Did I miss the call?) cheers -- Torsten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r536324 - in /jakarta/commons/proper/configuration/trunk/src: java/org/apache/commons/configuration/PropertyConverter.java test/org/apache/commons/configuration/TestPropertyConverter.java
Author: oheger Date: Tue May 8 13:54:33 2007 New Revision: 536324 URL: http://svn.apache.org/viewvc?view=revrev=536324 Log: CONFIGURATION-268: Updated splitting of list values so that the escape character can be itself escaped Modified: jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/PropertyConverter.java jakarta/commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestPropertyConverter.java Modified: jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/PropertyConverter.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/PropertyConverter.java?view=diffrev=536324r1=536323r2=536324 == --- jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/PropertyConverter.java (original) +++ jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/PropertyConverter.java Tue May 8 13:54:33 2007 @@ -54,8 +54,11 @@ */ public final class PropertyConverter { -/** Constant for the list delimiter escaping character.*/ -static final String LIST_ESCAPE = \\; +/** Constant for the list delimiter as char.*/ +static final char LIST_ESC_CHAR = '\\'; + +/** Constant for the list delimiter escaping character as string.*/ +static final String LIST_ESCAPE = String.valueOf(LIST_ESC_CHAR); /** Constant for the prefix of hex numbers.*/ private static final String HEX_PREFIX = 0x; @@ -506,39 +509,53 @@ StringBuffer token = new StringBuffer(); int begin = 0; -int end = 0; -while (begin = s.length()) -{ -// find the next delimiter -int index = s.indexOf(delimiter, end); - -// move the end index at the end of the string if the delimiter is not found -end = (index != -1) ? index : s.length(); +boolean inEscape = false; -// extract the chunk -String chunk = s.substring(begin , end); - -if (chunk.endsWith(LIST_ESCAPE) end != s.length()) +while (begin s.length()) +{ +char c = s.charAt(begin); +if (inEscape) { -token.append(chunk.substring(0, chunk.length() - 1)); -token.append(delimiter); +// last character was the escape marker +// can current character be escaped? +if (c != delimiter c != LIST_ESC_CHAR) +{ +// no, also add escape character +token.append(LIST_ESC_CHAR); +} +token.append(c); +inEscape = false; } + else { -// append the chunk to the token -token.append(chunk); - -// add the token to the list -list.add(token.toString().trim()); - -// reset the token -token = new StringBuffer(); +if (c == delimiter) +{ +// found a list delimiter - add token and reset buffer +list.add(token.toString().trim()); +token = new StringBuffer(); +} +else if (c == LIST_ESC_CHAR) +{ +// eventually escape next character +inEscape = true; +} +else +{ +token.append(c); +} } -// move to the next chunk -end = end + 1; -begin = end; +begin++; +} + +// Trailing delimiter? +if (inEscape) +{ +token.append(LIST_ESC_CHAR); } +// Add last token +list.add(token.toString().trim()); return list; } @@ -548,7 +565,7 @@ * method ensures that list delimiter characters that are part of a * property's value are correctly escaped when a configuration is saved to a * file. Otherwise when loaded again the property will be treated as a list - * property. + * property. A single backslash will also be escaped. * * @param s the string with the value * @param delimiter the list delimiter to use @@ -556,7 +573,8 @@ */ public static String escapeDelimiters(String s, char delimiter) { -return StringUtils.replace(s, String.valueOf(delimiter), LIST_ESCAPE + delimiter); +String s1 = StringUtils.replace(s, LIST_ESCAPE, LIST_ESCAPE + LIST_ESCAPE); +return StringUtils.replace(s1, String.valueOf(delimiter), LIST_ESCAPE + delimiter); } /** Modified:
svn commit: r536326 - in /jakarta/commons/proper/configuration/trunk: conf/test.xml src/java/org/apache/commons/configuration/XMLConfiguration.java src/test/org/apache/commons/configuration/TestXMLCon
Author: oheger Date: Tue May 8 13:55:42 2007 New Revision: 536326 URL: http://svn.apache.org/viewvc?view=revrev=536326 Log: CONFIGURATION-268: Perform correct splitting and escaping when delimiter parsing is disabled for XMLConfiguration Modified: jakarta/commons/proper/configuration/trunk/conf/test.xml jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/XMLConfiguration.java jakarta/commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestXMLConfiguration.java jakarta/commons/proper/configuration/trunk/xdocs/changes.xml Modified: jakarta/commons/proper/configuration/trunk/conf/test.xml URL: http://svn.apache.org/viewvc/jakarta/commons/proper/configuration/trunk/conf/test.xml?view=diffrev=536326r1=536325r2=536326 == --- jakarta/commons/proper/configuration/trunk/conf/test.xml (original) +++ jakarta/commons/proper/configuration/trunk/conf/test.xml Tue May 8 13:55:42 2007 @@ -85,4 +85,9 @@ a name=y1,2,3/a a name=u,v,w test=yesvalue1,value2/a /attrList + +!-- An attribute with multiple values and escape characters for testing + splitting when delimiter parsing is disabled. +-- +expressions value=a \|\| (b amp;amp; c)|!d/ /testconfig Modified: jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/XMLConfiguration.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/XMLConfiguration.java?view=diffrev=536326r1=536325r2=536326 == --- jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/XMLConfiguration.java (original) +++ jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/XMLConfiguration.java Tue May 8 13:55:42 2007 @@ -40,7 +40,6 @@ import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; -import org.apache.commons.collections.iterators.SingletonIterator; import org.w3c.dom.Attr; import org.w3c.dom.CDATASection; import org.w3c.dom.DOMException; @@ -93,6 +92,35 @@ * codecite/code element the comma is escaped, so that no splitting is * performed./p * + * pThe configuration API allows setting multiple values for a single attribute, + * e.g. something like the following is legal (assuming that the default + * expression engine is used): + * pre + * XMLConfiguration config = new XMLConfiguration(); + * config.addProperty([EMAIL PROTECTED], C:\\Temp\\); + * config.addProperty([EMAIL PROTECTED], D:\\Data\\); + * /pre/p + * + * pBecause in XML such a constellation is not directly supported (an attribute + * can appear only once for a single element), the values are concatenated to a + * single value. If delimiter parsing is enabled (refer to the + * code[EMAIL PROTECTED] #setDelimiterParsingDisabled(boolean)}/code method), the + * current list delimiter character will be used as separator. Otherwise the + * pipe symbol (|) will be used for this purpose. No matter which character is + * used as delimiter, it can always be escaped with a backslash. A backslash + * itself can also be escaped with another backslash. Consider the following + * example fragment from a configuration file: + * pre + * lt;directories names=C:\Temp\\|D:\Data\/gt; + * /pre + * Here the backslash after Temp is escaped. This is necessary because it + * would escape the list delimiter (the pipe symbol assuming that list delimiter + * parsing is disabled) otherwise. So this attribute would have two values./p + * + * pNote: You should ensure that the emdelimiter parsing disabled/em + * property is always consistent when you load and save a configuration file. + * Otherwise the values of properties can become corrupted./p + * * pcodeXMLConfiguration/code implements the code[EMAIL PROTECTED] FileConfiguration}/code * interface and thus provides full support for loading XML documents from * different sources like files, URLs, or streams. A full description of these @@ -102,7 +130,7 @@ * @since commons-configuration 1.0 * * @author Jouml;rg Schaible - * @author a href=mailto:[EMAIL PROTECTED]Oliver Heger /a + * @author Oliver Heger * @version $Revision$, $Date$ */ public class XMLConfiguration extends AbstractHierarchicalFileConfiguration @@ -115,6 +143,9 @@ /** Constant for the default root element name. */ private static final String DEFAULT_ROOT_NAME = configuration; +/** Constant for the delimiter for multiple attribute values.*/ +private static final char ATTR_VALUE_DELIMITER = '|'; + /** The document from this configuration's data source. */ private Document document; @@ -432,15 +463,10 @@ if (w3cNode instanceof Attr) { Attr attr = (Attr) w3cNode; -
[jira] Resolved: (CONFIGURATION-268) XMLConfiguration does not fully support disabled delimiter parsing
[ https://issues.apache.org/jira/browse/CONFIGURATION-268?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Oliver Heger resolved CONFIGURATION-268. Resolution: Fixed A fix was committed. There are also some more unit tests for the pathological cases with escaped and non escaped delimiter characters. XMLConfiguration does not fully support disabled delimiter parsing -- Key: CONFIGURATION-268 URL: https://issues.apache.org/jira/browse/CONFIGURATION-268 Project: Commons Configuration Issue Type: Bug Affects Versions: 1.4 Reporter: Oliver Heger Assigned To: Oliver Heger Fix For: 1.5 A call to setDelimiterParsingDisabled(true) should completely turn off the mechanism for searching for list delimiters and splitting property values. However XMLConfiguration.save() escapes list delimiters even in this mode. When later such a configuration file is loaded and delimiter parsing is turned off, the values of affected properties will contain the escape character. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JAVA-DBCP-UNIX Experts
Dear JAVA-DBCP-UNIX Experts, I'm my all-life Cobol guy. I have recently started working on Java side. I apologize if I use improper java terminologies/terms. Currently I'm trying to bring Oracle data in my Cobol programs through Java objects on SCO UNIX. Firstly, I have written set of test (cobol/java) programs using jdbc to access oracle db, which is working perfectly. I've read accessing oracle db through jdbc call, which creates new connection for each user is time consuming and costly. So finally, I modified implemented my test bed with DBCP share pool of open connections. And this approach is also working fine, accessing database in my Cobol program successfully. **MY ENVIRONMENT** I'm running Cobol Java programs (using JDK 1.4) on SCO UNIX, trying to access Oracle db located on Windows server. MOST IMPORTANTLY, THERE IS NOT ANY KIND OF JAVA APPLICATION SERVER or WEB SERVER on my platform. That means I'm using COBOL/JAVA/DBCP (pooling concept) in standalone mode under UNIX. **MY ENVIRONMENT** Questions - 1. How can I know this connection pooling concept is working on my Unix environment? It looks like the program is creating connections on each user's call to db? 2. I need a strategy (if possible some utility) to confirm connection pooling in my environment? how can i test this? 3. Since I'm not using any kind of application web server, is this thing fits under standalone platform like the one i described above? Am I using in a right way? 4. When do you think I should call shutdownDataSource method? Your great help will be appreciated. Best regards, Sayeed my config file --- properties entry key=driverClassNameoracle.jdbc.driver.OracleDriver/entry entry key=usernameusernm/entry entry key=passwordusrpswd/entry entry key=urljdbc:oracle:thin:@host:1521:dbsid/entry entry key=maxActive50/entry entry key=initialSize5/entry entry key=maxIdle1/entry entry key=maxWait3000/entry entry key=testOnBorrowtrue/entry entry key=validationQueryselect * from dual/entry /properties my java file ... import java.io.IOException; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.Iterator; import java.util.List; import java.util.Properties; import javax.sql.DataSource; import org.apache.commons.dbcp.BasicDataSource; import org.jdom.Attribute; import org.jdom.Document; import org.jdom.Element; import org.jdom.JDOMException; import org.jdom.input.SAXBuilder; import org.xml.sax.helpers.DefaultHandler; public class DataSourceTest { // DefaultHandler contain no-op implementations for all SAX events. // This class should override methods to capture the events of interest. static class MyHandler extends DefaultHandler { } public static void main(String[] args) throws IOException, Exception { // First we set up the BasicDataSource. // Normally this would be handled auto-magically by // an external configuration, but in this example we'll // do it manually. // System.out.println(Setting up data source.); DataSource dataSource = getDataSource(); System.out.println(Done.); System.out.println(Print Data Source Statistics.); printDataSourceStats(dataSource); // // Now, we can use JDBC DataSource as we normally would. // Connection conn = null; Statement stmt = null; ResultSet rset = null; try { System.out.println(Creating connection.); conn = dataSource.getConnection(); System.out.println(Creating statement.); stmt = conn.createStatement(); System.out.println(Executing statement.); // rset = stmt.executeQuery(args[1]); rset = stmt.executeQuery(SELECT desc from tabdesc); System.out.println(Results:); int numcols = rset.getMetaData().getColumnCount(); while(rset.next()) { for(int i=1;i=numcols;i++) { System.out.print(\t + rset.getString(i)); } System.out.println(); } System.out.println(Print Data Source Statistics after open connection.); printDataSourceStats(dataSource); } catch(SQLException e) { e.printStackTrace(); } finally { try { rset.close(); } catch(Exception e) { } try { stmt.close(); } catch(Exception e) { } try { conn.close(); } catch(Exception e) { } } System.out.println(Print Data Source Statistics after closing connection.); printDataSourceStats(dataSource); System.out.println(Print Data Source Statistics after closing data source.); shutdownDataSource(dataSource); printDataSourceStats(dataSource); } public static DataSource getDataSource()throws IOException, Exception{
Re: Having an daemon release
Mladen Turk wrote: Filip Hanik - Dev Lists wrote: can the daemon support thread dumps? If not it is still crippling for many operations teams that wish to use it for production For those interested, I would like to add it to the enhancement list Impossible without a native part inside JVM (at least for Windows). Kill -3 should work in all other use cases. However Windows procrunw (tomcat6w.exe) even has a 'Thread Dump' button. Just look at the log file, it should make a thread dump even from the service. cool, havent checked out 6w yet, will let you know what I find Filip Anyhow, if it doesn't work we have a goal for the next release ;) Cheers, Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JXPath setting values with predicates
Hello, I like JXPath, but I'd like to make a change to the source, and I'm hoping for some advice here. When using the JXPathContext.createPathAndSetValue() method on some Java beans, I get an exception if something like: /[EMAIL PROTECTED] = 'Rental Reimbursement' and @detailName = 'Number']/detail results in the predicate returning an null value. But, using the same createPathAndSetValue() method with that XPath when the predicate does not result in null, works just fine. I could easily turn my predicate into an object if I were dumped into my AbstractFactory.createObject() method. Can anyone suggest what I might change to make that happen, or give a good explanation as to why I should not do that? Thanks, Dustin
[jira] Commented: (MATH-164) Complex - Issue with non-compliance to C99!
[ https://issues.apache.org/jira/browse/MATH-164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494424 ] Richard Lyon commented on MATH-164: --- I don't believe full compliance with C99 is required or desirable. For instance the classification of whether a complex is a NaN or Infinite. If a complex number has a component which is a NaN, why would you want to classify the complex as anything but NaN? Isn't this going to effect just about every function which takes a complex operand? However to maintain some consistency with the way java handles doubles it is necessary to comply with many parts of C99. A typical example is the case I have reported. I have only been testing using the sun jdk and jre. What about other implementations? Complex - Issue with non-compliance to C99! --- Key: MATH-164 URL: https://issues.apache.org/jira/browse/MATH-164 Project: Commons Math Issue Type: Wish Affects Versions: 1.1 Reporter: Richard Lyon Priority: Minor Complex z1, z2, z3; // assign values to the two complex numbers z1 = new Complex(1.0, 0.0); z2 = new Complex(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY); // multiply the two complex numbers z3 = z1.multiply(z2); The result is that both the real and imaginary part of z3 are NaN. Isn't it somewhat desirable that both parts of the complex should be Infinity? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Having an daemon release
On 5/8/07, Mladen Turk [EMAIL PROTECTED] wrote: Hi, I spoke with couple of Jakarta PMC members at the ApacheCon EU, and it looks like we don't have an daemons release for quite some time. Well, the reason is, as I vividly explained :) because daemons is so stable that we for example inside Tomcat use the trunk as a stable version. Yes, I know :) However, think we'd need a cut. At least just appear as a live Jakarta project. I even volunteer to act as a RM. Any objections? Sounds good to me - got for it. Niall Regards, Mladen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Having Trouble with Validator JavaScript
On 5/8/07, Rechell Schwartz [EMAIL PROTECTED] wrote: Hi, Can anyone guide me on how to configure the Validator to use one of built in JavaScript functions? What must be done in validation-rules.xml and what must be done in the JSP file? I assume you're using Struts since validation-rules.xml is a Struts file - if thats the case then look at the validator module in the struts-examples webapp - it has a JavaScript example(s). Niall - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Created: (LANG-332) EqualsBuilder to alternatively use method properties
EqualsBuilder to alternatively use method properties Key: LANG-332 URL: https://issues.apache.org/jira/browse/LANG-332 Project: Commons Lang Issue Type: Improvement Affects Versions: 2.3 Reporter: Paul Benedict Fix For: 3.0 While it is very nice reflection can be used to build a nice equals method, the strategy to focus on private properties is non-negotiable. This strategy is incompatible with CGLIB proxies which rely on method invocations to delegate to the properties of the inner target. I would prefer a switch to dynamically invoke public get* methods over direct property access. PS: Same thoughts on ReflectionToStringBuilder and HashCodeBuilder -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]