Mailing User | 4 May 06:33 2016

[FTP] Handling the stream from retrieveFileStream()

InputStream x = retrieveFileStream();
When closing x, I have to call completePendingCommand(). And it seems I cannot retrieve another file
stream unless x has been already closed. This makes things complicated when x is used in nested,
multi-threaded codes.
How do I know if x is open and I need to close x? Or how do I know if the FTPClient has an opened stream? (I may
not simply call x.close() again when it has already been closed, because I need
to call completePendingCommand() after x.close(), and if x has already been closed, it feels it
would cause problems to call completePendingCommand() again.)
Mansour Al Akeel | 2 May 02:19 2016

[SCXML] Next states

Is there a way to get the next valid states or transitions ?
I am working with AbstractStateMachine

Thank you
Mailing User | 1 May 17:16 2016

[FTP] Create new client for retrieveFileStream()?

I searched Google for examples uses of Apache Commons FTP library, but only found very basic examples. For
efficiency and not to reach user limit, I used only one client.

When I called mlistFile(), I got an "java.lang.ArrayIndexOutOfBoundsException: length=1; index=1." at
    String entry = getReplyStrings()[1].substring(1); 

I found that at that time, getReplyStrings returned a String array that had only one element, and it was
    226 Successfully transferred "/somefile.mp4"
instead of the expected
    250-Listing /somefile.mp4
     type=file;size=1834618;modify=20090501101746; /somefile.mp4
    250 End

It seems that the response for MLST was mixed with a file close (InputStream.close()) response. What is the
best way to avoid this? Should I use a separate client for retrieveFileStream()?
Mansour Al Akeel | 1 May 01:40 2016

[SCXML] Any release date

Hello all,

The website shows the latest unstable version is 2.0-SNAPSHOT.

I am not sure the date the snapshot was updated but I can see
extensive activity:

Thanks to the development team. Are there any plans to release it any
time soon ?

Thank you
sebb | 30 Apr 09:44 2016

[ANNOUNCE] Apache Commons Validator 1.5.1 released

The Apache Commons Team is pleased to announce the release of Apache
Commons Validator 1.5.1

Apache Commons Validator provides the building blocks for both client side
validation and server side data validation. It may be used standalone or
with a framework like Struts.

The main changes are:
* DomainValidator.ArrayType is not public Fixes VALIDATOR-386.
  This now allows the TLD lists to be overriddent using
DomainValidator#updateTLDOverride [1]
* EmailValidator fixes
* Mastercard Series 2 BIN ranges (active from October 2016)
* Updated to the TLD list dated Mon Apr 25 07:07:01 2016 UTC

Details of all the changes in 1.5.1 can be found in the changelog:

1.5.1 is fully binary compatible to the last release. No client code
changes are required to migrate from version 1.4.x (or later) to 1.5.1.
The minimum required JDK version for this release is 1.6.

However note that the Javascript code has been dropped, see

Source and binary distributions are available for download from the Apache
Commons download site:
(Continue reading)

Jörg Schaible | 29 Apr 20:36 2016

Re: [configuration2]: AbstractConfiguration::getArray

chas <at> wrote:

> Jorge,
> You could create a different named method for each primitive array
> type.  Would be a pain to use in a generic fashion.


I agree with a method returning explicitly an array, but that has been 
nonsense in first place.

As I already pointed out, the existing

 <T> T get(Class<T> cls, String key);

would have been completely enough. See my examples from the last mail.

Rainer Hirschmiller | 27 Apr 21:22 2016

[configuration2]: AbstractConfiguration::getArray


I wonder why AbstractConfiguration::getArray(cls, key) returns a single 
object, not an array of objects? Can somebody explain why the caller 
have to make an explicit cast?

AbstractConfiguration &configuration = ....;

Object obj = configuration.getArray(String.class, "key);
// expected Object[] obj = configuration.getArray(String.class, "key);

Leonardo K. Shikida | 26 Apr 14:32 2016

[exec] how to use watchdog / wrong javadoc



 ExecuteWatchdog watchdog = new ExecuteWatchdog(30000);
 Executer exec = new Executer(myloghandler, watchdog);
 int exitvalue = exec.execute();
 if (Execute.isFailure(exitvalue) && watchdog.killedProcess()) {
     // it was killed on purpose by the watchdog


"Executer" does not exist

"Executor" does exist but it is an interface

DefaultExecutor implements Executor but does not set a watchdog in the


Ahmad, Zeba | 25 Apr 09:45 2016

[configuration] Monitoring configs


I'm looking at providing a platform for users to monitor their configurations either via JMX or some other
means. Some ways I can think of doing this

1)      Let users register their chosen configurations as MBeans.
a similar approach by Netflix. Here however, platform cannot mandate all configurations to get surfaced
for monitoring.

2)      Read all config files present for the given application in config directory, use Apache Modeler or some
other to dynamically generate bean descriptors and JMX MBeans for monitoring. But here I'm duplicating
the reading of the configs and the memory structures.

3)      Have instrumentation within apache-commons-config  for such monitoring by JMX or any other means.

Reg. #3, is there any recommendation on how users can efficiently monitor/view/modify their
configurations dynamically (without delivering an updated file)?

Robert Onslow | 22 Apr 12:43 2016

[CSV] Error: End-of-File, expected line


I'm reading CSV encoded in UTF-16:

Reader reader  = new BufferedReader(new InputStreamReader(new
FileInputStream(source), "UTF-16"));
//Ignore 2 bytes of format data;
CSVParser parser = format.parse(reader)

The CSV, with record separators 0D0A,  is consumed correctly except I
get thie above error at the end of the parse

The file ends with 0D0A

Does anyone know what the problem may be here, please?


Ashok Panghal | 22 Apr 10:39 2016

[Imaging][TIFF]- Out Of Memory Heap issue while getting BufferedImage for a High Resolution Tiff image


Attached [0] is a tiff file of size 18 MB in compressed form which inflates
to ~ 3 GB in uncompressed state.It is a high resolution image with width >
18000 px and height > 47000 px, so while using TiffImageParser it results
into outofmemory error when it tries to allocate space for pixel raster
data in a two-dimensional array in memory in [1].
Can someone points me to an approach or further optimization to avoid heap
issues while dealing with high res tiff images. Heap issue not seen if Heap
size increased to 8 GB or so but that's not very scalable solution for
other more high res images we have almost 5 times bigger than this sample