How to get the entire string with Configuration.getString

2005-03-30 Thread Zsolt Koppany
Hi, Configuration (XmlConfiguration) getString returns (^|\\s)#([1-9][0-9]{3 for config.getString([EMAIL PROTECTED]). How can I get the entire String? scc task_expression=(^|\\s)#([1-9][0-9]{3,}) / I use 1.1RC2. Zsolt - To

Re: How to get the entire string with Configuration.getString

2005-03-30 Thread Oliver Heger
You have hit a known limitation: The configuration interprets the , as a property delimiter and inserts two values for this key. For more details see here: http://issues.apache.org/bugzilla/show_bug.cgi?id=29716 So config.getString([EMAIL PROTECTED](0)) will return the first part of the

File is corrupted after the upload

2005-03-30 Thread Vicky Kontogianni
Hello, We are using the Jakarta Commons File upload mechanism within an application that must upload PDF files to our servers. It happened twice lately to receive PDF files which after the EOF character had many more characters which eventually made the PDF file corrupted (like rubbish) ;

[commons-collections]: how to do reverse iteration in TreeBidiMap

2005-03-30 Thread rinke hoekstra
Hi list, maybe a stupid question, or maybe I am missing something, but I cannot sort out how to do a reverse iteration over the values of a TreeBidiMap, and couldn't find much about it on the web. I want to retrieve the 10 greatest values from a HashMap, and thought it best to use a

Re: How to get the entire string with Configuration.getString

2005-03-30 Thread Oliver Heger
Oh, I forgot an important point: you can escape the delimiter using a backslash. So if your configuration file contains: scc task_expression=(^|\\s)#([1-9][0-9]{3\,}) / the entire string should be returned. Oliver Oliver Heger wrote: You have hit a known limitation: The configuration interprets

Re: Chain : [Digester] Empty stack (returning null) : found a bug

2005-03-30 Thread Vinicius Caldeira Carvalho
Martin Cooper wrote: On Tue, 29 Mar 2005 18:33:49 -0300, Vinicius Caldeira Carvalho [EMAIL PROTECTED] wrote: Hello there! I'm trying to use commons chains on my project. Here's a piece of my web.xml: context-param param-nameorg.apache.commons.chain.CONFIG_CLASS_RESOURCE/param-name

AW: How to get the entire string with Configuration.getString

2005-03-30 Thread Zsolt Koppany
Thank you Oliver, unfortunately I cannot do that because we have to assure compatibility (with the version where we didn't use commons-configuration), thus here is my code: List exprs = config.getList([EMAIL PROTECTED]); if (!exprs.isEmpty()) { sccTaskIdExpression =

Re: [commons-collections]: how to do reverse iteration in TreeBidiMap

2005-03-30 Thread José Antonio Pérez Testa
Maybe I am confused, but the inverseMap is not ordered in inverse order?? In that case greatest value is first ant lowest is last. rinke hoekstra wrote: Hi list, maybe a stupid question, or maybe I am missing something, but I cannot sort out how to do a reverse iteration over the values of a

Re: AW: How to get the entire string with Configuration.getString

2005-03-30 Thread Emmanuel Bourg
You can also disable the string splitting by changing the delimiter to a char unlikely to be found in your configuration: XMLConfiguration conf = new XMLConfiguration(); conf.setDelimiter('\u'); conf.setFilename(conf.xml); conf.load(); We will have a cleaner solution when Bug 29716 is fixed

Re: [commons-collections]: how to do reverse iteration in TreeBidiMap

2005-03-30 Thread rinke hoekstra
On 30 Mar 2005 at 14:25, José Antonio Pérez Testa wrote: Maybe I am confused, but the inverseMap is not ordered in inverse order?? In that case greatest value is first ant lowest is last. No, that is not the case (sorry for not explaining clear enough). The inverse map is switching keys and

Runtime.exec() Utilities?

2005-03-30 Thread Lukas Bradley
Is there ANYTHING out there that can help manage executing system commands to batch input, capture output, and generally not make a mess of things on different platforms? I'm pulling my hair out. If no one knows of anything, I might write an API description and propose it be included in

AW: AW: How to get the entire string with Configuration.getString

2005-03-30 Thread Zsolt Koppany
Sorry, but this doesn't work with 1.1RC2. XMLConfiguration config = new XMLConfiguration(); AbstractConfiguration.setDelimiter('\u'); char del = AbstractConfiguration.getDelimiter(); log.debug(Delimiter + del + ); config.setFile(file); config.load(); CompositeConfiguration cc = new

Re: [commons-collections]: how to do reverse iteration in TreeBidiMap

2005-03-30 Thread matthew.hawthorne
rinke hoekstra wrote: maybe a stupid question, or maybe I am missing something, but I cannot sort out how to do a reverse iteration over the values of a TreeBidiMap, and couldn't find much about it on the web. I want to retrieve the 10 greatest values from a HashMap, and thought it best

Re: How to get the entire string with Configuration.getString

2005-03-30 Thread Emmanuel Bourg
Sorry I forgot the method was static. Try this instead: XMLConfiguration config = new XMLConfiguration(); XMLConfiguration.setDelimiter('\u'); Emmanuel Bourg Zsolt Koppany wrote: Sorry, but this doesn't work with 1.1RC2. XMLConfiguration config = new XMLConfiguration();

Re: [commons-collections]: how to do reverse iteration in TreeBidiMap

2005-03-30 Thread rinke hoekstra
Yes, I thought of that sollution It seems a good sollution. But still I am very curious to know how one would use hasPrevious() I think I will just stop bothering about it and use your sollution. Rinke How about something like this? TreeBidiMap bidiMap = new

Re: [commons-collections]: how to do reverse iteration in TreeBidiMap

2005-03-30 Thread Ha ryon
I think previous() is not about to get the collection in the reverse order, it's about to be able to backtrack an iteration. Means, you did 10 next() and you realise you have went one step too far, then you do previous(). As you said, previous() doesn't start at the end. I think you have to use

AW: How to get the entire string with Configuration.getString

2005-03-30 Thread Zsolt Koppany
setDelimiter is in AbstractConfiguration and XMLConfiguration doesn't overwrite it. Again: I'm using 1.1RC2, I don't have the source code of 1.1-RC2 thus I cannot check it. Zsolt -Ursprüngliche Nachricht- Von: Emmanuel Bourg [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 30. März

Re: How to get the entire string with Configuration.getString

2005-03-30 Thread Ha ryon
maybe try : AbstractConfiguration.setDelimiter('\u'); XMLConfiguration config = new XMLConfiguration(); I would assume that, it's better to change a static parameter before an instance that need the change is created. On Wed, 30 Mar 2005 17:24:12 +0200, Zsolt Koppany [EMAIL PROTECTED]

Re: Runtime.exec() Utilities?

2005-03-30 Thread Christian Aust
Hi, Lukas Bradley schrieb: Is there ANYTHING out there that can help manage executing system commands to batch input, capture output, and generally not make a mess of things on different platforms? I'm pulling my hair out. If no one knows of anything, I might write an API description and

Re: How to get the entire string with Configuration.getString

2005-03-30 Thread Emmanuel Bourg
The code I suggested does work, there is a test case with a similar syntax, see testChangingDelimiter() in TestPropertiesConfiguration: http://svn.apache.org/repos/asf/jakarta/commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestPropertiesConfiguration.java This will

Re: [commons-collections]: how to do reverse iteration in TreeBidiMap

2005-03-30 Thread Stephen Colebourne
There is no direct way to iterate over the 10 largest values. However you can do the following: TreeBidiMap map; Object last = map.lastKey(); Object oneBefore = map.previousKey(last); Object oneBeforeThat = map.previousKey(oneBefore); Note that these are methods directly on TreeBidiMap. The

Re: Runtime.exec() Utilities?

2005-03-30 Thread Lukas Bradley
ANT gives you a selection of well-tested tasks of all kinds, combinable and system-independent. Give it a try. HTH, This looks like it might be perfect: org.apache.tools.ant.taskdefs.Execute Execute(ExecuteStreamHandler streamHandler, ExecuteWatchdog watchdog) However, I don't see a stream

Chain: too damn buggy to be out of sandbox

2005-03-30 Thread Vinicius Caldeira Carvalho
Well, I don't know why in the heck did jakarta put chain as a main commons project. The thing is too damn buggy. I think it's like esperanto a good idea not very well implemented. The first bug I found was the name of the catalog. Now, read this, cuz this is cool. Only commands that return

RE: Re: Runtime.exec() Utilities?

2005-03-30 Thread Scovetta, Michael V
It'd probably be pretty easy to wrap the ant tools with a simpler interface. It'd be nice to say: Batch b = new Batch(); b.add(dir bar); b.add(cat bar | grep myfile); b.run(); String output = b.getOuput(); Michael Scovetta Computer Associates Senior Application Developer -Original

Re: Chain: too damn buggy to be out of sandbox

2005-03-30 Thread Vinicius Caldeira Carvalho
Vinicius Caldeira Carvalho wrote: Well, I don't know why in the heck did jakarta put chain as a main commons project. The thing is too damn buggy. I think it's like esperanto a good idea not very well implemented. The first bug I found was the name of the catalog. Now, read this, cuz this is

RE: Runtime.exec() Utilities?

2005-03-30 Thread Gary Gregory
How about Commons-Launcher [1]? Gary [1] http://jakarta.apache.org/commons/launcher/ -Original Message- From: Christian Aust [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 30, 2005 7:51 AM To: Jakarta Commons Users List Subject: Re: Runtime.exec() Utilities? Hi, Lukas Bradley

Re: commons logging class level logging

2005-03-30 Thread Trenton D. Adams
Ok, is there a way of my wrapper class starting up, and automatically detecting all the classes available in every package I specify, and then setting up loggers for each one? I mean an easy way. I could just search through all the files, and convert them to class names without the '/' or

Re: Chain : [Digester] Empty stack (returning null) : found a bug

2005-03-30 Thread Martin Cooper
On Wed, 30 Mar 2005 09:02:52 -0300, Vinicius Caldeira Carvalho [EMAIL PROTECTED] wrote: Martin Cooper wrote: On Tue, 29 Mar 2005 18:33:49 -0300, Vinicius Caldeira Carvalho [EMAIL PROTECTED] wrote: Hello there! I'm trying to use commons chains on my project. Here's a piece of my web.xml:

Re: commons logging class level logging

2005-03-30 Thread Thorbjørn Ravn Andersen
Trenton D. Adams wrote: Ok, is there a way of my wrapper class starting up, and automatically detecting all the classes available in every package I specify, and then setting up loggers for each one? I mean an easy way. I could just search through all the files, and convert them to class

Re: commons logging class level logging

2005-03-30 Thread Trenton D. Adams
Thanks for the suggestions. Keep reading... Thorbjørn Ravn Andersen wrote: Trenton D. Adams wrote: Ok, is there a way of my wrapper class starting up, and automatically detecting all the classes available in every package I specify, and then setting up loggers for each one? I mean an easy way.

AW: How to get the entire string with Configuration.getString

2005-03-30 Thread Zsolt Koppany
I also tried that, didn't work either. Zsolt -Ursprüngliche Nachricht- Von: Ha ryon [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 30. März 2005 17:32 An: Jakarta Commons Users List Betreff: Re: How to get the entire string with Configuration.getString maybe try :

AW: How to get the entire string with Configuration.getString

2005-03-30 Thread Zsolt Koppany
Can it be an xmlconfiguration problem? -Ursprüngliche Nachricht- Von: Emmanuel Bourg [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 30. März 2005 17:59 An: Jakarta Commons Users List Betreff: Re: How to get the entire string with Configuration.getString The code I suggested does

Re: Runtime.exec() Utilities?

2005-03-30 Thread Lukas Bradley
How about Commons-Launcher [1]? Commons Launcher seems very geared toward launching Java processes. I am attempting to launch a non-Java related binary, with versions on Windows and LINUX systems. So far, Ant's Execute task is working nicely. However, I'm using an interium batch/shell script

Re: Chain: too damn buggy to be out of sandbox

2005-03-30 Thread Craig McClanahan
On Wed, 30 Mar 2005 14:24:03 -0300, Vinicius Caldeira Carvalho [EMAIL PROTECTED] wrote: Einstein used to say : Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe. Well I guess I fit right in to it. Sorry, no bugs, just dumb user and stressed

Re: [jxpath] regular expressions in XSLT string operations

2005-03-30 Thread Stephen Colebourne
Apologies in advance for MY brevity: - Read the mailing list guidelines. - Add [jxpath] to the subject. - Remember that we don't get paid for this. - Generally, if you want it, you may have to help do it. Stephen depub2 wrote: Apologies in advance for my brevity: I did not ask for a workaround - I

[Digester] Problem with XML rule definiton.

2005-03-30 Thread Silas Snider
Dear List: I am having problems with Digester. I am using it to parse the XML returned by Amazon's Web Services. My problem occurs when I create a .jar out of my java program. I am passing the XML rules to DigesterLoader as a stream from the getClass().getResourceAsStream(resource file name)

[Commons-DBCP] Connections not being closed.

2005-03-30 Thread Nathan Smith
Hi all, We have had a major problem over the last few weeks with respect to connections not being closed. The problem started to occur after installing our software for a new client. I suppose we hadn't tested the software as well we should have, but we also trust and use a lot of software from

Re: Chain: too damn buggy to be out of sandbox

2005-03-30 Thread Dakota Jack
I know that people have said Einstein said this. Does anyone have a real citation to prove it? This does not sound like Einstein. This sounds like a list-geek. Jack On Wed, 30 Mar 2005 13:27:32 -0800, Craig McClanahan [EMAIL PROTECTED] wrote: On Wed, 30 Mar 2005 14:24:03 -0300, Vinicius

[commons-logging] Problem renaming logfiles

2005-03-30 Thread Jeroen Verhagen
Hi all, I using commons-logging with log4j in my webapp. I'm using a DailyRollingFileAppender and every morning when I start developping I get the following message in my Tomcat console: log4j:ERROR Failed to rename [logfile.txt] to ... I did some investigation using the handle utility from

Re: [Digester] Problem with XML rule definiton.

2005-03-30 Thread Reid Pinchback
It sounds like one of two things: 1) in the jar'd configuration something is missing from the classpath 2) in the jar'd configuration you aren't using the same type of classloaders as you are in the non-jar'd configuration (e.g. not just jar vs non-jar, but jar-in-webapp vs