Re: Apache's Maven repository missing commons-io, most versions

2017-03-30 Thread Jörg Schaible
sebb wrote:

> On 30 March 2017 at 16:29, Matt Sicker  wrote:
>> A lot of old artifacts uses the groupId == artifactId convention. I don't
>> know when that changed to using org.apache.foo as the groupId, but I'm
>> guessing it was sometime around the advent of Maven Central.
> 
> Possibly.
> 
> Commons components are gradually moving from commons-abc to
> org.apache.commons.abc.
> However that can only be done if the Java package name is also changed.
> As that is disruptive, it's only done when an API breakage is essential.
> 
> https://wiki.apache.org/commons/MavenAndClasspath

And for commons-io we had one wrongly published version (the one you were 
referencing initially). After that we finalized the rule above.

Cheers,
Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [ANNOUNCE] Apache Commons JCS 2.0-beta-2 Released

2016-11-16 Thread Jörg Schaible
Tim Cronin wrote:

> doesn't show up in the main maven repo the listings
> 
> http://mvnrepository.com/artifact/org.apache.commons/commons-jcs-core

Ask the owner of that site. The link below points to central and that's the 
only official Maven repository (searchable using http://search.maven.org).

> On Wed, Nov 16, 2016 at 8:54 AM, Thomas Vandahl  wrote:
> 
>> On 16.11.16 14:56, Tim Cronin wrote:
>> > when will it be accessible via maven/ivy repo?
>>
>> It already is:
>> http://repo1.maven.org/maven2/org/apache/commons/commons->> 
>> jcs-core/2.0-beta-2/
>>
>> Bye, Thomas.

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [configuration2]: AbstractConfiguration::getArray

2016-05-02 Thread Jörg Schaible
Oliver Heger wrote:

> 
> 
> 
> Am 29.04.2016 um 20:36 schrieb Jörg Schaible:
>> c...@honton.org wrote:
>> 
>>> Jorge,
>>>
>>> You could create a different named method for each primitive array
>>> type.  Would be a pain to use in a generic fashion.
>> 
>> 
>> [snip]
>> 
>> 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 get(Class cls, String key);
>> 
>> would have been completely enough. See my examples from the last mail.
> 
> IIRC get() currently cannot handle arrays, but this should be easy to
> add. So could you please open a Jira ticket to track this?

Done: CONFIGURATION-626

Cheers,
Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [configuration2]: AbstractConfiguration::getArray

2016-04-29 Thread Jörg Schaible
c...@honton.org wrote:

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


[snip]

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 get(Class cls, String key);

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

Cheers,
Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [configuration2]: AbstractConfiguration::getArray

2016-04-29 Thread Jörg Schaible
Hi Oliver,

Oliver Heger wrote:

> Hi Jörg,
> 
> Am 28.04.2016 um 16:34 schrieb Jörg Schaible:
>> Chas Honton wrote:
>> 
>>> Try casting Object[] to long[]. The compiler and the runtime will
>>> complain.
>> 
>> It is not about a cast, it's about returning the proper object. And it
>> has nothing to do with primitives, because you cannot cast e.g. Object[]
>> to String[] either.
> 
> my first idea was the generic version, too. However, as Chas said, it is
> not possible to make a method with such a signature return an array of
> primitives. After type erasure, you have
> 
> public Object[] toArray(Class cls, String key)
> 
> and a primitive array is not an Object[].

The question is, why do we have getArray at all? These calls should be 
completely valid:

String[] strArray = conf.get(String[].class, "strings");
Integer[] integerArray = conf.get(Integer[].class, "integers");
int[] intArray = conf.get(int[].class, "ints");

... and I have implemented something like this in the past.

Method getArray should be deprecated immediately. Especially if it is not 
possible to use it in a type-safe way.

Cheers,
Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [configuration2]: AbstractConfiguration::getArray

2016-04-28 Thread Jörg Schaible
Chas Honton wrote:

> Try casting Object[] to long[]. The compiler and the runtime will
> complain.

It is not about a cast, it's about returning the proper object. And it has 
nothing to do with primitives, because you cannot cast e.g. Object[] to 
String[] either.

> 
>> On Apr 27, 2016, at 11:59 PM, Jörg Schaible
>> <joerg.schai...@bpm-inspire.com> wrote:
>> 
>> Hi Oliver,
>> 
>> Oliver Heger wrote:
>> 
>>> Hi Rainer,
>>> 
>>>> Am 27.04.2016 um 21:22 schrieb Rainer Hirschmiller:
>>>> Hi.
>>>> 
>>>> 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?
>>>> 
>>>> e.g.
>>>> AbstractConfiguration  = ;
>>>> 
>>>> Object obj = configuration.getArray(String.class, "key);
>>>> // expected Object[] obj = configuration.getArray(String.class, "key);
>>> 
>>> the explanation can be found in the Javadocs of the ConversionHandler
>>> interface which is used behind the scenes. Citing from the docs of the
>>> toArray() method:
>>> 
>>> "Note that the result type of this method is Object; because this method
>>> can also produce arrays of a primitive type the return type Object[]
>>> cannot be used."
>> 
>> That does not explain, why the method is not declared using generics:
>> 
>>  public  T[] toArray(Class cls, String key);
>> 
>> Cheers,
>> Jörg
>> 
>> 
>> -
>> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
>> For additional commands, e-mail: user-h...@commons.apache.org
>>



-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [configuration2]: AbstractConfiguration::getArray

2016-04-28 Thread Jörg Schaible
Hi Oliver,

Oliver Heger wrote:

> Hi Rainer,
> 
> Am 27.04.2016 um 21:22 schrieb Rainer Hirschmiller:
>> Hi.
>> 
>> 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?
>> 
>> e.g.
>> AbstractConfiguration  = ;
>> 
>> Object obj = configuration.getArray(String.class, "key);
>> // expected Object[] obj = configuration.getArray(String.class, "key);
>> 
> 
> the explanation can be found in the Javadocs of the ConversionHandler
> interface which is used behind the scenes. Citing from the docs of the
> toArray() method:
> 
> "Note that the result type of this method is Object; because this method
> can also produce arrays of a primitive type the return type Object[]
> cannot be used."

That does not explain, why the method is not declared using generics:

  public  T[] toArray(Class cls, String key);

Cheers,
Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [configuration] Will the jar be available in maven repo

2016-04-07 Thread Jörg Schaible
Mansour Al Akeel wrote:

> I am wondering if there's any plan to make Apache commons
> configuration 2.X available in maven repo.
> 
> If it's already available, please direct me to where I can pull it.
> 
> Thank you

http://search.maven.org/#artifactdetails|org.apache.commons|commons-configuration2|2.0|jar

Cheersm
Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [configuration] is common-configuration affected by COLLECTIONS-580

2015-11-18 Thread Jörg Schaible
Hi Joël,

Joël Traber wrote:

> Hi guys,
> 
> I am running an application working with commons-configuration version 1.6
> I just noticed a bug in
> commons-collection.
(http://markmail.org/search/?q=COLLECTIONS-580%20list%3Aorg.apache.commons.users%2F#query:COLLECTIONS-580%20list%3Aorg.apache.commons.users%2F+page:1+mid:fzhzqaroxf46apyb+state:results)
> 
> As the older versions (will be changed in 2.0) of commons-configuration
> are having a runtime dependency to commons-collections I am wondering if
> they are potentially affected by this bug as well? Commons-configuration
> version 1.6 uses commons-collections 3.2.1. which still contains the bug.
> (From 3.2.2. they disabled the classes by default The documentation says
> only ConfigurationConverter has a dependency to commons-collections
> (org.apache.commons.collections.ExtendedProperties;). I bet that affected
> classes by the bug are never referenced and do not run. That looks to me
> pretty much that using commons-configuration 1.6 is safe, not recommended
> but safe. Even more because it is not using any Serialization support from
> commons-collections.
> 
> Can somebody confirm this?

It is completely pointless if commons-collections is actually using some of 
those classes or not. The vulnerability applies if your application (or your 
application server, Spring or OSGi container) uses somewhere serialization 
and a vulnerable version of commons-collections is in the classpath. If an 
attacker can manipulate the serialized stream, you're affected.

Therefore you should simply look if your final application, war, etc 
contains an old copy of commons-collections and adjust your build if it is 
the case.

Cheers,
Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: Commons Lang substitution

2015-11-17 Thread Jörg Schaible
Alex Soto wrote:

> Hi, thank you for your answers, Jörg I think that StrMatcher is for
> implementing where you want to get information to be replaced on the
> string, not for parsing issues.

Instead of guessing, I'd rather have a look into the Javadocs of 
StrSubstitutor.

Cheers,
Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: Commons Lang substitution

2015-11-16 Thread Jörg Schaible
Benedikt Ritter wrote:

> Hello,
> 
> 2015-11-14 22:25 GMT+01:00 Anthony Brice :
> 
>> I could be wrong, but I do believe StrSubstitor requires a prefix and
>> suffix. I don't think the class will replace variables that aren't in the
>> map either, unless you write a custom StrLookup that returns an empty
>> string for variables not previously defined.
>>
> 
> Yes, this is correct. The replace with blank could be implemented using a
> custom StrLookup. However, it is not possible to configure a
> StrSubstitutor to use only a starting character.

End "character" could be any non-alphanum character. Isn't it what the 
StrMatcher could be used for?

Cheers,
Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [lang] StrSubstitutor - a dollar sign before a variable

2015-07-23 Thread Jörg Schaible
Hi Woonsan,

Woonsan Ko wrote:

 Hi there,
 
 I tried to use the following, expecting ...ick brown fox paid $20.00
 to jump over the la…:
 
 // In org.apache.commons.lang3.text.StrSubstitutorTest.java locally
 // after cloning https://github.com/woonsan/commons-lang.
 @Test
 public void testReplaceEscapingDollarSign() {
 values.put(amount, 20.00);
 doTestReplace(The quick brown fox paid $20.00 to jump over
 the lazy dog.,
   The ${animal} paid $$${amount} to jump over the
 ${target}., true);
 }
 
 (I put double dollar signs like $$${amount} because $ is the default
 escape character.)
 
 But, the result was:...ick brown fox paid $${amount} to jump over the
 la….
 
 Is it a bug or did I miss something?

I'd call it a bug. You escaped the first dollar sign properly.

Cheers,
Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: Re: [POOL2] Pooling mutable objects

2015-02-06 Thread Jörg Schaible
Hi William,

William Speirs wrote:

 I'm not sure I understand your comment Mat. From what I can tell, Michael
 made his own hash function. That's fine, but *might* have unexpected
 collision issues. Might not too... I don't know. My guess though is that
 he's not an expert (who is an expert on hash functions?) and might
 unknowingly fall into a trap here.
 
 For example, commons-lang HashBuilder uses 37 as the prime and 17 as the
 initial result... Michael didn't. Maybe he's OK, maybe he's not... but why
 risk it? Why not just use the library and not reinvent the wheel? (Most
 valid reason would be not wanting to pull in a whole library for these two
 functions/classes.)

Maybe because it can be dead-slow?

https://www.mail-archive.com/user@xstream.codehaus.org/msg00677.html

I use HashCodeBuilder and EqualsBilder for Mock objects only ... for good 
reason.

Cheers,
Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [lang] SystemUtils and Cygwin

2015-01-01 Thread Jörg Schaible
Hi Paulo,

Paulo Roberto Massa Cereda wrote:

 Dear friends,
 
 I have to execute a certain system command according to the underlying
 operating system; so far, SystemUtils works like a charm. But now I'm
 facing a quite peculiar situation: I'd need to run a different code if
 my Java application is being invoked from a Cygwin session.
 
 I do not have a Windows machine (that's good!) so I cannot test how
 things go (that's bad!). Do you guys know if it's possible to find out
 if my code is running with Cygwin?
 
 Any help is greatly appreciated. :)

What do you try to accomplish? Please understand, that all the Cygwin stuff 
works only for applications compiled for Cygwin. Unless you don't have a JVM 
compiled for the Cygwin core, every JVM is a native Windows application 
which knowns nothing about Cygwin's Posix compatibility layer. Cygwin itself 
forces therefore the launch of the Java runtime with an environment adjusted 
for a pure Windows process.

 All the best and a happy new year!

Same to you.

Cheers,
Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [collections] Problems compiling w/gentoo

2014-04-25 Thread Jörg Schaible
sebb wrote:

 On 24 April 2014 19:29, Gary Gregory garydgreg...@gmail.com wrote:
 Should we fix 3.x for Java 8 and release?
 
 The fix works by renaming a public method so IMO is not appropriate for
 3.x.
 
 It would break any existing code that used the remove method,
 requiring the user to edit their source and rebuild.
 
 AFAICT there is no nice solution here.
 
 I think we will just have to accept that 3.x cannot be used on Java 8.
 Seems to me that is better than breaking existing use of the library.

IMHO it just cannot be compiled in Java 8, but existing code will run. You 
can even build your own stuff with Java 8 and a dependency to cc-3.x as long 
as you do not use the MultiValueMap or code that uses it internally hiding 
behind the Map interface.

Maybe we should evaluate further what is actually broken in combination with 
a Java 8 runtime and the problem will manifest at runtime.

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [FTPSclient] FTPS Authentication using client Certificate / public key

2013-11-06 Thread Jörg Schaible
Hi Michael,

Seganti, Michael wrote:

 I'm attempting to connect via FTPS to one of our clients.  We provided
 them a public SSL key for authorization for their server.  How can I
 perform authentication of the FTP user (as in FTP login, not just SSL
 negotiation/validation) by supplying a client certificate/public key?
 
 If there is an example, it would be greatly appreciated.

this is only possible with the HEAD revision, you cannot do it yet with the 
latest release ...

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: Class org.apache.commons.logging.impl.SimpleLog does not implement Log

2013-02-27 Thread Jörg Schaible
Hi Paul,

Schuetz, Paul (EXTERN: DOS) wrote:

 Hello,
 
 I am trying to get up and running a simple application under an IBM WAS
 8.0. My application consist of an simple jsf file and a bean used as an
 actionlistener for a button inside the jsf. On pushing the button the bean
 should just log using commons-logging. I am using WAS 8.0 own adaptation
 of myfaces and commons-logging. The complete stack trace as it is:
 
 [2/27/13 14:46:12:644 CET] 0008 AbstractFaces E   An error occured
 [while initializing MyFaces:
 [org.apache.commons.logging.LogConfigurationException:
 [org.apache.commons.logging.LogConfigurationException: Class
 [org.apache.commons.logging.impl.SimpleLog does not implement Log

[snip]

This is unfortunately a typical sign, that the app server itself has 
commons-logging in its system classpath and another one is somewhere in your 
EAR/WAR. WHat happens if you do *not* provide commons-logging?

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



getservbyname

2012-04-02 Thread Jörg Schaible
Guys,

do we have somewhere an equivalent for the C system call getservbyname in 
commons?

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: getservbyname

2012-04-02 Thread Jörg Schaible
Hi Emmanuel,

Emmanuel Bourg wrote:

 Le 02/04/2012 16:41, Jörg Schaible a écrit :
 
 do we have somewhere an equivalent for the C system call getservbyname in
 commons?
 
 You mean something that map a service name (http, ssh) to a port number
 (80, 22) ?

Right. Best would be a system call, but I can also live with some 
functionality that parses the etc/services in Linux/Windows directly. For 
support in the Java runtime I only found a 15 year old enhancement request 
in Oracles Bugzilla ... :-/

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: getservbyname

2012-04-02 Thread Jörg Schaible
Hi Emmanual,

Emmanuel Bourg wrote:

 Le 02/04/2012 18:13, Jörg Schaible a écrit :
 
 Right. Best would be a system call, but I can also live with some
 functionality that parses the etc/services in Linux/Windows directly. For
 support in the Java runtime I only found a 15 year old enhancement
 request in Oracles Bugzilla ... :-/
 
 It should be easy to do this in a platform independent manner by parsing
 the IANA port database:
 
 http://www.iana.org/assignments/service-names-port-numbers/service-names-
port-numbers.xml
 
 That's the authoritative source for port names.

This is useless, you will need the current settings of the system. It is not 
uncommon in large companies to modify the official mappings, remove 
unwanted or add private ones.

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [io] org.apache.commons.io.ThreadMonitor.class ?

2012-03-28 Thread Jörg Schaible
Hi Steve,

Steve Cohen wrote:

 Someone has suggested that our team look at the Apache Thread Monitor
 as a way of timing out some classes that don't natively support timeouts.
 
 In investigating this using the Google, I find references such as this:
 
 
http://commons.apache.org/io/cobertura/org.apache.commons.io.ThreadMonitor.html
 
 and this:
 
 http://commons.apache.org/io/xref/org/apache/commons/io/ThreadMonitor.html
 
 Yet when I look at the official Commons IO Javadoc
 (http://commons.apache.org/io/api-release/index.html), this class does
 not appear to exist.  Nor can I find it in any of the older official
 javadocs?
 
 Can someone explain this discrepancy and where I might find this class?
 
 Is this old code that was abandoned for some (probably good) reason?  Is
 something else recommended instead?

It's internal, uses package scope, can therefore not be used from outside of  
the package and does in consequence not appear in the official API.

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: commons vfs with http

2011-12-19 Thread Jörg Schaible
William Speirs wrote:

 There is no commons http-client, 

It is, that's version 3.x

 it is called http components now:
 http://hc.apache.org/

That's version 4.x and it is API-wise something different. vfs uses http-
client 3.x.

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [configuration] Common-configuration is not compatible with apache-lang-3.X

2011-12-08 Thread Jörg Schaible
Hi Ivan,

Ivan Boelle wrote:

 Hello,
 
 We recently upgraded our apache-common-lang library from 2.4 to 3.
 But some classes of apache-common-configuration rely on classes that are
 not part of apache-common-lang anymore.

c-lang and c-lang3 are designed to be used side-by-side, since they are 
binary incompatible. You cannot expect that anything using c-lang is 
immediately ported to c-lang3.

 (ConfigurationException depends on NestableException for example)
 - http://commons.apache.org/lang/article3_0.html
 
 I can't find any information on that issue, am I the only one in this
 situation ?
 What can I do ?

Use c-lang for c-configurations. However, nothing prevents you from using c-
lang3 in *your* code.

 Does apache-common-configuration will be modified to be compatible with
 apache-common-lang-3 ?

Development of a version using Java 5 has started some days ago, so may take 
quite some time for it to be finished.

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [io] Should FileUtils.writeByteArrayToFile(...) not use a BufferedOutputStream?

2011-09-25 Thread Jörg Schaible
Hi Timo,

Timo Rumland wrote:

 Hello everyone,
 
 sorry to bump this, but does anyone not have a comment to my question?
 I really think I missed something, I can't imagine that the Commons IO
 forgot to buffer the bytes that should be written to a file.
 
 Please see my original question below.

Why should it? You provide all the bytes which are written immediately and 
the stream is closed afterwards. So what should a buffer be good for except 
for decreasing performance?

- Jörg

 
 Thanks a lot!
 
 -
 
 Hello,
 
 I recently started using the FileUtils class of Commons IO, and had a
 quick look into the source code.
 
 The method FileUtils.writeByteArrayToFile(...) internally uses the
 private method openOutputStream(...), which creates (after some
 smart checks) an FileOutputStream.
 
 But, shouldn't writeByteArrayToFile(...) or openOutputStream(...)
 not use/create a BufferedOutputStream, wrapping the FileOutputStream?
 
 Or do I overlook something?
 
 I think one should always buffer the bytes when writing to a file...
 
 Any thoughts?
 
 Thanks !



-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [ANNOUNCEMENT] Commons Configuration 1.7 Released

2011-09-08 Thread Jörg Schaible
Jesse Farinacci wrote:

 Congratulations!
 
 On Thu, Sep 8, 2011 at 7:45 AM, Oliver Heger ohe...@apache.org wrote:
 The Apache Commons team is pleased to announce the availability
 of Commons Configuration 1.7.
 
 Only 33 months since the previous release.. ;-)

Means that for an earlier release date you'd had plenty of time to get 
involved and finally release it yourself as release manager. ;-)

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: Zip64 support

2011-07-20 Thread Jörg Schaible
Stefan Bodewig wrote:

 On 2011-07-20, Chris Bamford wrote:
 
 Can someone please tell me the status of Zip64 support in
 commons:compress?
 
 No support at all, sorry.
 
 I read that it was supposed to go into 1.1, but I don't know how to tell.
 
 The people (myself included) who thought they might find time to do it
 ran out of steam and available time prior to the release and so far
 nobody has stepped up and provided patches to add support.
 
 https://issues.apache.org/jira/browse/COMPRESS-36 is used to track
 (the lack of) progress.
 
 I wish I had a more positive answer

At least Java 7 will support it:
http://blogs.oracle.com/xuemingshen/entry/zip64_support_for_4g_zipfile

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [Javaflow]java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.init(ZZ)V

2011-06-08 Thread Jörg Schaible
Hi Wayne,

wayne wrote:

 Jörg  wrote:
 
 You have other ASM classes on the classpath or you're using some code that
 depends on a different version.
 
 
 even I delete all jar about asm  on classpath

You're never explicit in your explanations. What does this mean now? Again, 
what *is* on your classpath?

,  I still got same problem.

With the detail level of your postings, nobody can really help you.

 I am wandering whether  I need to use asm-3.2.jar to replace the asm part
 in the javaflow and package a new javeflow.jar again.

I cannot recommends anything due to lack of info, sorry.

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [Javaflow]java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.init(ZZ)V

2011-06-08 Thread Jörg Schaible
Hi Wayne,

wayne wrote:

 I list my classpath info as follow:
 
 ?xml version=1.0 encoding=UTF-8?
 classpath
 classpathentry kind=src path=src/java/
 classpathentry kind=src path=src/resources/
 classpathentry kind=con
 path=org.eclipse.jdt.launching.JRE_CONTAINER/ classpathentry
 combineaccessrules=false kind=src path=/JPPF/ classpathentry
 kind=lib path=F:/jppfrun/JPPF-2.4-node/lib/jppf-common-node.jar/
 classpathentry kind=lib
 path=F:/jppfrun/JPPF-2.4-node/lib/jppf-common-node-src.jar/
 classpathentry kind=lib
 path=F:/jppfrun/JPPF-2.4-node/lib/log4j-1.2.15.jar/
 classpathentry kind=lib
 path=F:/jppfrun/JPPF-2.4-node/lib/slf4j-api-1.6.1.jar/
 classpathentry kind=lib
 path=F:/jppfrun/JPPF-2.4-node/lib/slf4j-log4j12-1.6.1.jar/
 classpathentry kind=lib path=C:/Documents and
 Settings/whwayne/Desktop/jar/commons-logging-1.1.1-bin/commons-
logging-1.1.1/commons-logging-1.1.1.jar/
 classpathentry kind=output path=classes/
 /classpath

Just some general comments on the classpath:
1/ jppf-common-node-src.jar does not belong to the classpath at all
2/ either use slf4j or commons-logging, but not both at the same time

BTW: Sorry, I missed your first posting of the classpath. Therefore was my 
last mail harsher than it should have been.

However, I fail now to see the relation to Javaflow. What has this Eclipse 
project to do with the Ant built.xml where you try to use the Javaflow Ant 
task? The classpath of the Ant build is what is of real interest ...

 Torsten, what is mvn clean test by the way?
 
He assumed that you build with Maven, but from your Eclipse classpath above, 
this is clearly not the case.

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [Javaflow]java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.init(ZZ)V

2011-06-08 Thread Jörg Schaible
Hi Wayne,

wayne wrote:

 Jörg. Thank you for your comments
 
 there is Ant Build content including classpath definition:
 
 project name='JPPF-Node' default=run basedir=.

[snip]

 !--
 =
 --
 !--  instrument
  --
 !--
 =
 --
 
 taskdef name=javaflow
 classname=org.apache.commons.javaflow.ant.AntRewriteTask
 classpath id = project.class.path
 fileset dir = lib
 include name = **/commons-javaflow-20060411.jar/
 include name = **/bcel-5.2.jar/
 /fileset
 /classpath
 /taskdef

[snip]

When I look at your version of javaflow from 2006 and compare it with the 
list of dependencies 
(http://commons.apache.org/sandbox/javaflow/dependencies.html) published in 
2008, then it is obvious that your javaflow version cannot use ASM 3.x or 
newer. I don't know which ASM version was used to build javaflow in 2006, 
but in 2008 it was still ASM 2.2.1. AFAICS ASM 2.x and ASM 3.x are not 
compatible.

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [Javaflow]java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.init(ZZ)V

2011-06-07 Thread Jörg Schaible
Hi,

wayne wrote:

 Hi All:
 
 I use [javaflow] Ant task with ASM transformer
 but it still terminates with java.lang.NoSuchMethodError:
 org.objectweb.asm.ClassWriter.init(ZZ)V
 
 
 Torsten mentioned the solution as follow:
 (http://mail-archives.apache.org/mod_mbox/commons-
user/200608.mbox/%3c98e4f1cd0608240555j5fd1ead9ma44d2f77ba7e7...@mail.gmail.com%3E)
 
 
 For the task:
 I tried asm 2.2.3 and asm 3.0 RC1, but I always get this exception:
 java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.init(ZZ)V

 I can't make any sense out of it.
 
 Looks like for some reason you have the wrong version of ASM in your
 classpath?!

Typically ASM versions are not compatible between major releases. Even 
worse, some 3rd party libraries contain silently some of the ASM classes 
without shading them. Can you therefore list your complete classpath here?

Torsten: Which version of ASM is used by Javaflow?

[snip]

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [Javaflow]java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.init(ZZ)V

2011-06-07 Thread Jörg Schaible
wayne wrote:

 I look up the source code of  AssertionViolatedException
 
 the reason is :Instances of this class should never be thrown. When
 such an instance is thrown,
  * this is due to an INTERNAL ERROR of BCEL's class file verifier
 
 about java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter,  I
 do not know why.

You have other ASM classes on the classpath or you're using some code that 
depends on a different version.

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [io] Tailer returning partial lines returned when EOF before newline

2011-05-25 Thread Jörg Schaible
Hi,

Simone Tripodi wrote:

 Great, that's the way to go, well done and thanks for your contribution!

actually I think, it's not the way to go. The Javadoc in the patch implies 
that Frank simply took the code from the JDK and adjusted it a bit. This is 
not possible! We cannot simply relicense Oracle's IP.

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [Configuration] Is there any way to save my complex bean in XML resource and use it later ?

2011-02-16 Thread Jörg Schaible
Hi Moein,

Moein Enayati wrote:

 Dear all
 Hi
 
 
 Till now ,whenever I want to use Apache.Commons.Configuration API with an
 XML file , I’ve written down myBeans definition manually in XML resource.
 
 But now I have a new demand to use complex beans with complex property
 types and the ability to save them (their signature) automatically in the
 XML resource.
 
 
 I’ve just find apache.commons.betwixt. BeanWriter() having the ability ,
 but it seems configuration-API has its own signature.
 
 
 Is there any way in Apache.commons.configuration  to save my beans in an
 xml file which is compatible with configuration ?

This is definitely out of scope for commons configuration. What you're 
looking for is a persistence layer that can turn a Java object into XML and 
restore it later. This is a classical task for JAXB or something like 
XStream.

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [configuration] Testing against commons-lang 2.5 and 2.6

2011-02-16 Thread Jörg Schaible
Holmes, Daniel wrote:

 Is this project tested (or planned to be) against the latest releases of
 commons-lang
 
 According to this page it has not been yet
 http://commons.apache.org/configuration/dependencies.html

Gump runs against lang 2.x trunk without problems.

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [vfs] Where is version 1.1?

2011-02-07 Thread Jörg Schaible
Hi Rogelio,

Rogelio Flores wrote:

 I have an app where a previous developer--no longer here--added
 commons-vfs-1.1.jar to our dependencies. I'd like to get the source
 code for this but the download site lists 1.0 as the latest official
 download (http://commons.apache.org/vfs/download_vfs.cgi)
 
 So my question is, where did he get this 1.1 JAR file?  (in case it
 helps, the timestamp of the files within it is 11/8/2008 9:53 - 9:54
 AM and this jar file weights 362,465 bytes)
 
 Contents of Manifest.mf:
 
 Manifest-Version: 1.0
 Ant-Version: Apache Ant 1.7.0
 Created-By: 11.0-b15 (Sun Microsystems Inc.)
 
 
 I just want to get the source code for the version we're using.

I think, we cannot help you, because IMHO that jar has not been build by the 
ASF. The manifest lacks the usual entries that are added when we build the 
jar (even snapshots). So all you can do is to checkout the source from svn 
using the date above and hope that it matches your jar.

- Jörg



-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



[SURVEY] Android users wanted

2011-01-31 Thread Jörg Schaible
Guys,

can somebody tell us, what the different Android versions return for the 
java.version and java.specification.version?

- Jörg



-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [vfs]

2011-01-18 Thread Jörg Schaible
Hi Anand,

Joshi, Anand wrote:

 Hi All:
 
  
 
 Mylogin has the '@' when I am using Apache VFS to FTP files. Is this
 supported while formatting the URL string ? Something like
 ftp://a...@xyz.com:somepassword@server/path/file

You have to URL-encode your '@' character.

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



RE: Commons Configuration 1.7

2010-11-17 Thread Jörg Schaible
Hi Patel,

Patel, Ronak Avinash (US SSA) wrote:

 Any ideas when VFS will be released? I was under the impression that it
 was all patched and ready to go...

It's actively worked on. Since it was not binary compatible to the last 
version and it is the first major release since years, we decided to raise 
the minimum JDK requirement to Java 5 and work over the API to reflect the 
current state of technique. Follow the conversation on the dev list to see 
the current state. Nevertheless this will raise some questions about the 
impact for Commons Configuration ...

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



RE: How can I get Commons-net-2.1 Source and Binaries

2010-10-15 Thread Jörg Schaible
陳雪傑 wrote:

 
 Hi Jörg
  
 
 You cannot, since it was never officially released. So, yes,
 there is a tag in Subversion, but nobody knows, who spread it
 into public, what it actually contains and you're on your own
 using this code. Therefore you cannot download any binaries
 or tar balls, it has no direct support here. Actually you
 should use version 2.0 until we release the next version
 which will be 2.2.
 
 Do you know the version 2.2 release date?

No, sorry. Does 2.0 not work for you?

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: How can I get Commons-net-2.1 Source and Binaries

2010-10-14 Thread Jörg Schaible
陳雪傑 wrote:

 
 Hi all
 
 How can I get Commons-net-2.1 Source and Binaries?
 
 I want get publiced Commons-net-2.1 Source and Binaries from apache,
 but the page (http://commons.apache.org/net/download_net.cgi) do not
 provide it.

You cannot, since it was never officially released. So, yes, there is a tag 
in Subversion, but nobody knows, who spread it into public, what it actually 
contains and you're on your own using this code. Therefore you cannot 
download any binaries or tar balls, it has no direct support here. Actually 
you should use version 2.0 until we release the next version which will be 
2.2.

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [jexl] custom expressions / registering functions

2010-05-25 Thread Jörg Schaible
Adrian Herscu wrote:

 Hi all,
 
 I am looking for an expression language to using in a testing framework
 that I am designing.
 
 The requirement is that the users of the framework are allowed to define
 their own functions. I could not find it possible to add a function to a
 JEXL context. Is there any other mechanism?

Why don't you simply use the JavaScript engine (JSR 223)? It comes out of 
the box with Java 6 (including Rhino) and for earlier JDKs you can use 
Apache BSF (http://jakarta.apache.org/bsf/) that implements also JSR 223 and 
provides therefore a smooth upgrade path. With the embedded JavaScript of 
Rhino you can access easily also all Java stuff.

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [LANG] incompatibility of jar with svn

2010-04-15 Thread Jörg Schaible
Hi Tom,

Tom Brito wrote:

 But the new svn trunk don't have the lang package, just the lang3.
 So the code that depends on the old stuff don't work.

The new stuff in 3.x is not binary compatible either. You have to adjust 
your code in any case, if you want to use it.

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [LANG] incompatibility of jar with svn

2010-04-15 Thread Jörg Schaible
Tom Brito wrote:

 The trunk and the jar have are different from each other. They aren't
 suppose to be the same code?

No. A released jar refers always a special tag in Subversion.

 And the Branches be the variants (not the
 Trunk)?

Branches are different code lines. There is currently a branch for possible 
2.x releases, but it's not for certain that another 2.x release happens.

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



RE: Commons Lang ToStringBuilder.reflectionToString / Hibernate question

2010-04-13 Thread Jörg Schaible
Gary Gregory wrote:

 You are correct.

However, you have to consider, that CGLIB adds itself some stuff to the 
class that will be catched then ... :-)

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: Serializable alternative to MultiHashMap

2010-03-22 Thread Jörg Schaible
Hi Adelino,

Reis Da Rocha, Adelino (NSN - PT/Aveiro) wrote at Wednesday, 17. March 2010 
19:28:

  
 Hi,
  
 I have been using MultiHashMap and according to documentation
 this objects has been set as deprecated and it is recomended that we use
 MultiValueMap however MultiValueMap is not serializable.
  
 Is there any serializable alternative to MultiValueMap ?
  
 Case not, why do you decided to deprecate MultiHashMap before
 providing a Serializable alternative ?
  
 Is it expected MultiValueMap to be serializable in the near
 future ?

Please open a JIRA issue about this! I am sure it will be handled for the 
next release then.

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: Space or single quote as a value in properties files

2010-02-05 Thread Jörg Schaible
Asterios Katsifodimos wrote:

 Hi all,
 
 I would like to know if there is a way to set the value of a variable
 (key) to be the space character in a PropertiesConfiguration file.
 
 for example
 
 variable =  
 
 could I use the double quotes to do that?

Did you try to enter it as Unicode character?

variable=\u0020

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: FaltFile.jar

2010-01-05 Thread Jörg Schaible
Matt Benson wrote:

 FWIW, there is a [flatfile] M2 snapshot published at
 repository.apache.org.

Which should be definitely not there! Only official reelases can go to the 
repository.

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: how to change log label at the run time

2009-12-10 Thread Jörg Schaible
Hi Vijay,

vijay shanker wrote at Freitag, 11. Dezember 2009 07:07:

 Hi all
 
 I am using commons-logging with aspectj.
 
 Once I created a log object by below code
 
 
 private Log log = LogFactory.getLog(LoggingAspect.class);
 
 
 When i print log with this object; i get output like
 
 
 2009-12-11 11:31:41,558 INFO  [LoggingAspect]
 com.stpl.pocs.logs.BaseService
 : Entering method getName.
 2009-12-11 11:31:41,558 INFO  [LoggingAspect]
 com.stpl.pocs.logs.BaseService
 : Exiting method getName.
 
 
 Is there any way I can change the  [LoggingAspect] to the class name
  com.stpl.pocs.logs.BaseService.
 
 So this is requirement I presume is to change log label dynamically.
 
 Please suggest.

Actually you cannot. Simply because commons-logging does not log ;-)

See, commons-logging is only a bridge for various logging systems. Therefore 
you have to look into the documentation of the log implementation in use, 
how to configure the output. Looking at yours, the log seems to be handled 
by the JDK logger, so consult the JDK documentation for the logger 
configuration. Or select a logging implementation you're more familiar with: 
http://commons.apache.org/logging/commons-
logging-1.1.1/guide.html#Configuration

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Hex.encodeHexString([B)Ljava/lang/String;

2009-11-16 Thread Jörg Schaible
Java Struts wrote at Montag, 16. November 2009 22:41:

 Could you please tell me the format of the manifest file?
 
 do i have to add every thing in the same line with space as delimiter?

http://java.sun.com/javase/6/docs/technotes/guides/jar/jar.html

Delimiter is space, line may not exceed 72 characters (well, bytes) and must
be continued then. Have a look at the manifest Maven or Ant is creating.

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: Commons-configuration and EasyMock?

2009-09-11 Thread Jörg Schaible
Hi David,

David Hoffer wrote at Donnerstag, 10. September 2009 18:07:

 We have upgraded commons-configuration to version 1.6 (was 1.1) and
 now I get an this error when we mock something using EasyMock that is
 hard coded to use commons-configuration to read conf data from
 file(s).
 
 java.lang.NoSuchMethodError:

org.apache.commons.configuration.CompositeConfiguration.getListDelimiter()C
 at

org.apache.commons.configuration.CompositeConfiguration.clear(CompositeConfiguration.java:161)
 at

org.apache.commons.configuration.CompositeConfiguration.init(CompositeConfiguration.java:56)
 at

org.apache.commons.configuration.ConfigurationFactory$ConfigurationBuilder.init(ConfigurationFactory.java:733)
 at

org.apache.commons.configuration.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:145)
 
 Any idea why we get this error?
 
 Any idea how I can resolve this?  I just want to make a mock so I
 obviously don't need commons-configuration to do anything.

it looks like the classical problem having still the old version in the
classpath somewhere ... getListDelimiter has been introduced with 1.4.

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: 64bit windows server 2008 OS

2009-08-31 Thread Jörg Schaible
Hi Thanik,

Thanikaiarasu wrote:

 Dear All,
 I would like to know whether commons-dbcp 1.2.2 and commons-pool 1.4 will
 work properly in a 64bit windows server 2008 operating system without any
 issues. Kindly reply and provide any official link for knowing the same.

With very view exceptions all Apache Commons Components do not contain any
native code and are build to run on a JVM. It depends on the component
which version specification that JVM must implement, but that's all.
Commons-dbcp and commons-pool are not different to other Apache components
in this regard.

The platform independence is part of the Java specification and if you are
in doubt, you have to look for compatibility issues in the JVM vendor's
documentation of your target JVM.

Regards,
Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [collections] LRUMap Problem ConcurrentModificationException

2009-06-18 Thread Jörg Schaible
Renè Glanzer wrote at Mittwoch, 17. Juni 2009 20:09:

 I only gave it a short test. Then i found the MapIterator in the docs an
 switched to it.
 The docs stated that MapIterator is the better way than entrySet.
 Sorry for this, I'm at home right now so i can test it with an entrySet at
 the earliest tomorrow.

The mapIterator fails for me also in the unit tests.

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [collections] LRUMap Problem ConcurrentModificationException

2009-06-17 Thread Jörg Schaible
Hi Renè,

Renè Glanzer wrote at Mittwoch, 17. Juni 2009 09:47:

 OK so my search will continue :-)
 Meanwhile I'll consider to change my implementation, which i'd like to
 prevent.

I've reopened COLLECTIONS-3, since I was able to write a unit test that
reproduces the problem.

 Maybe somebody of you knows a time and size based cache system where i can
 map a key to an object?

My enhancement of the unit test for the LRUMap shows, that the
ConcurrentModificationException only happens, if you use an iterator form
the keySet. So you should simply use the entrySet in your code and you'll
be fine.

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [collections] LRUMap Problem ConcurrentModificationException

2009-06-17 Thread Jörg Schaible
Renè Glanzer wrote at Mittwoch, 17. Juni 2009 11:48:

 Hi Jörg,
 
 that are great news, I'll give it a try.
 And of course I'll report my experience.

That would be fine. Actually I opened an own JIRA issue for this now
(COLLECTION-330), COLLECTION-3 was simply too vague and had a too long
history of different symptoms.

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [collections] LRUMap Problem ConcurrentModificationException

2009-06-17 Thread Jörg Schaible
Renè Glanzer wrote at Mittwoch, 17. Juni 2009 16:07:

 Hi,
 
 it's me again with an update.
 the LRUMap.mapIterator() still produces the
 ConcurrentModificationException when a call to MapIterator.remove()
 occurs.

So did you also try with the entrySet? I've not written a unit test for the
MapIterator, so I cannot say, what you should expect... :)

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: why is my withArgName argument being overwritten

2009-03-26 Thread Jörg Schaible
sagun shakya wrote at Donnerstag, 26. März 2009 02:38:

 Hi,
 
 I have an Option created as:
 Option fooOption = OptionBuilder.withDescription(add foo)
.withLongOpt(add_foo)
.hasArgs(2)
.withArgName(foo)
.withArgName(bar)
   .create(baz);

Because the OptionBuilder builds always only one option at a time.
http://commons.apache.org/cli/usage.html

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [cli] simple Java problem - please, help

2009-02-23 Thread Jörg Schaible
Hi Alex,

Alexander Fooks wrote at Montag, 23. Februar 2009 09:48:

 Hello, All,
  
 
 My application received parameters from the Java command line.

Well, first of all you should always prepend the subject of a message posted
to this list with the commons module you're talking about. Otherwise it is
always hard to guess and a lot of pepole will not even read your mail.


 Some of parameter names have spaces inside.
 
 In W2K I use quotation marks and it works.
 
 In Linux (Red Hat) the same command line doesn't work:
 
  
 
 ./run1.sh -add -service -name serviceNew -application Other TCP
 -service_type PRIMARY -add_port TCP:DEFAULT:555

[snip]

 This is script on Linux:
 
 java   -cp  .:./lib/commons-cli-1.1.jar cli.TestCli $*
  
 
 It's clear that Java VM does this wrong parsing of command line before
 of using commonCli.

Welcome to Unix shell programing. No it's not the Java VM that does it
wrong, it is your script that does not respect the shell behavior. While
the quoted param is properly passed as param to your *script*, the quotes
are the already resolved and $* is expanded with the plain value i.e.
without quotes. The Java VM has to interpret it as two params here.

 Could anybody help me?

http://www.gnu.org/software/bash/manual/bashref.html#Special-Parameters

Actually you want
 java   -cp  .:./lib/commons-cli-1.1.jar cli.TestCli $@

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [VFS][SFTP] cannot connect to SFT server

2008-12-15 Thread Jörg Schaible
lmk wrote at Montag, 15. Dezember 2008 15:18:

 
 how can I do that?

http://en.wikipedia.org/wiki/Hosts_file

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [VFS][SFTP] cannot connect to SFT server

2008-12-15 Thread Jörg Schaible
lmk wrote at Montag, 15. Dezember 2008 15:33:

 
 Actually I have a host name defined on hosts file, but, I cannot ping it
 however.

Well, that should be possible if the entry in the hosts file is correct and
the hosts file is in use.

 I can connect to SFTP server with Win SCP, I put the server ip address and
 it works ..

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [VFS][SFTP] cannot connect to SFT server

2008-12-15 Thread Jörg Schaible
lmk wrote at Montag, 15. Dezember 2008 14:20:

 
 I dont have a DNS server installed, the host cannot be found by name.

Well, you may temporarily add an entry to your local hosts file.

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [VFS][SFTP] cannot connect to SFT server

2008-12-15 Thread Jörg Schaible
lmk wrote at Montag, 15. Dezember 2008 15:55:

 
 I passed to the last version of jcraft I get more explicit exception:
 
 UnknownHostKey: x.x.x.x. RSA key fingerprint is
 0d:51:c6:7f:e1:84:5e:37:8b:93:29:bd:d4:d1:ba:79
 
 how can I verify the host key??

OK, this is really something different. Bascially it tells you, that is is
missing the fingerprint in the known_hosts file. Using the command line
you're normally asked on the first connect, wether the fingerprint is
correct or not and you have to confirm this by typing yes.

The same applies more or less to all the Windows tools, but unfortunately
there's abolutely no standard where each tool writes its known_hosts file
and JSch has no idea where it should looking for it. However, the Sftp
connectot has a parameter ...

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [VFS][SFTP] cannot connect to SFT server

2008-12-15 Thread Jörg Schaible
Well,

lmk wrote at Montag, 15. Dezember 2008 11:35:

 
 Hi all,
 
 I try vainly to use VFS to connect to SFTP server .
 I do the same as explained on
 http://wiki.apache.org/commons/SimpleSftpFileDownload wiki page

[snip]

 Caused by: com.jcraft.jsch.JSchException: UnknownHostKey: x.x.x.x
 at com.jcraft.jsch.Session.checkHost(Unknown Source)
 at com.jcraft.jsch.Session.connect(Unknown Source)
 at com.jcraft.jsch.Session.connect(Unknown Source)
 at

org.apache.commons.vfs.provider.sftp.SftpClientFactory.createConnection(SftpClientFactory.java:210)
 ... 6 more

VFS cannot connect, since the underlaying library (JSch) cannot find the
host x.x.x.x. Can you try again with the real host name instead of an IP
address?

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



RE: [Configuration] Bug with XMLConfiguration and getString() ...?!

2008-10-30 Thread Jörg Schaible
Oliver Heger wrote:
 Jörg Schaible schrieb:
[snip]
 Actually, it works as designed. getString() delivers the
 first list entry. And I am sure, that quite everyone will
 consider this as a bug ... it makes no sense to me either :-/
 
 - Jörg
 
 You can disable this behavior by calling
 xml_config.setDelimiterParsingDisabled(true);
 
 That said, I fully agree that the default behavior is
 confusing - I fell
 into this trap more than once myself. For reasons of backwards
 compatibility we cannot change this in the 1.x series. But in a 2.0
 version I am happy to disable delimiter parsing per default.

+1000, really looking forward to 2.0

- Jörg

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [VFS] How to use operations

2008-07-22 Thread Jörg Schaible
Mario Ivankovits wrote:
 Hi!
 1. Do you have any mechanism in mind to give feedback on the result
 of the operation? 
 
 Not yet, this is all work in progress. But probably changing the
 FileOperation interface to ProcessReturn process()
 and add a new ProcessReturn interface with.
 boolean isCorrect();
 int getReturnCode();

Why not simply use a java.util.concurrent.Future implementation?

- Jörg

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Strange performance issues seen with Log.isDebugEnabled()

2008-06-26 Thread Jörg Schaible
Jean-Philippe Daigle wrote:
[snip]
 
 Ah, so there's one more thing I hadn't tried, which I just did, and
 explained a bit of the situation: completely removing the
 logging block
 (don't check isDebugEnabled(), don't call .debug(), etc.
 
 Removing the whole logging block results in getting the same slow
 throughput case that I was blaming on isDebugEnabled().
 
 Replacing it with just this assignment (to a public var so it's not
 optimized away): 
 
_dbg_str = String.format(appack id=%s res=%s, id, ack_r);
 
 Gives me the fast throughput case. Wow. So apache commons logging is
 blameless, what determines whether you get the fast or the
 slow message
 throughput case is actually _slowing down the thread calling the
 ackMessage() method_. Slowing down this frequently-called method with
 useless String.format() work results in more than double the
 throughput. 
 
 I have no idea why (it's counterintuitive), I suspect I need
 to get more
 visibility into the interactions between threads here.
 
 Thanks to everyone that read this thread, looks like the problem's
 somewhere else in my code. (Though if you DO have any suggestions that
 could explain what I'm seeing, let me know, even if this is
 no longer a
 logging issue :) )

Can you stip it down to detect the real call that is responsible for the 
speed-up?

1/ _dbg_str = ack_r.toString();

 or 

2/ _dbg_str = String.valueOf(id);

 or even

3/ ack_r.toString();

alone?

What's implemented with ack_r.toString() ? What kind of implementation is ack_r 
? A proxy ?

- Jörg

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: a question about URL encoding

2008-05-07 Thread Jörg Schaible
Hi Jim,

Jim the Standing Bear wrote:
 Hello,
 
 I read somewhere that the URL Encoding of the space character can be
 either %20 or +.  The behavior of the URLEncoders from both
 commons-codec and jdk converts spaces to +.  Is there anyway to force
 the URLEncoder to convert spaces to %20 instead?  Thanks.

Benjamin Bentman created a quite valuable summary of the situation for the 
Maven devs: 
http://thread.gmane.org/gmane.comp.jakarta.turbine.maven.devel/83251/focus=85098

- Jörg

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Whitespace in XML configuration file

2008-01-27 Thread Jörg Schaible
Hi Oliver,

Oliver Heger wrote:
 Ricardo Espírito Santo schrieb:
 I've tried xml:space=preserve and still no luck.
 
 
 Yes, this special attribute is not yet supported. If you
 like, you can
 open a new ticket in our bug tracking system [1] and enter an
 enhancement request. 
 
 @Jörg: Would you be interested in providing a patch?

intestested, yes. Realistically currently no. Within the next two months I will 
have to refurbish our new home and move over. Real world beats virtual ;-)

- Jörg

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [lang] equalsBuilder unexplained wrong equality with java.lang.Longs ?

2007-12-17 Thread Jörg Schaible
Gary Gregory wrote:
 Hello Laurent:
 
 This behavior is 'normal'. The concepts of object equality
 (the equals() method) and object identity (==) are different.

Well, this was not Laurent's question. He was wondering, why the EqualsBuilder 
seems to use in his example the Long objects' identity instead of their equals 
method.

[snip]

- Jörg

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[vfs] FTP extremely slow compared to SFTP

2007-12-10 Thread Jörg Schaible
Hi,

can somebody explain the following numbers - especially why FTP is that dead 
slow compared to SFTP handling a lot of files? I measure a simple copy action 
of a directory containing some few files:


FTP

* Initial Run
  - Exporter.. 8252.0 ms
* Single File (25kb)
  - Exporter.. 8021.0 ms
* Single File (25000kb)
  - Exporter.. 11437.0 ms
* Single File (5kb)
  - Exporter.. 16043.0 ms
* Single Directory (with 10 files of 1kb)
  - Exporter.. 47859.0 ms
* Single Directory (with 25 files of 1kb)
  - Exporter.. 113964.0 ms
* Single Directory (with 50 files of 1kb)
  - Exporter.. 224312.0 ms


SFTP

* Initial Run
  - Exporter.. 1252.0 ms
* Single File (25kb)
  - Exporter.. 921.0 ms
* Single File (25000kb)
  - Exporter.. 14952.0 ms
* Single File (5kb)
  - Exporter.. 24885.0 ms
* Single Directory (with 10 files of 1kb)
  - Exporter.. 601.0 ms
* Single Directory (with 25 files of 1kb)
  - Exporter.. 922.0 ms
* Single Directory (with 50 files of 1kb)
  - Exporter.. 1552.0 ms


Any explanation or - even better - suggestions to improve FTP speed?

- Jörg

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FileUpload: Stop ISP Caching ?

2007-11-06 Thread Jörg Schaible
Constantin Moisei wrote:

 Hello,
 
 I'm using commons-fileupload.jar with ajax to do a multi file upload.
 
 I have the feeling that my ISP uploads the file and when they receive
 it all only then they pass it to me. That causes me to get the file
 almost instantly.
 
 I'm displaying a progress bar for each upload but if they pass the
 file to me like that I got no control and the user will not be able to
 figure it out what's happening.
 
 How do I have to self manage the cache via response headers with
 Cache-Control ?

That's a typical behaviour if your ISP is running an automatied virus check
on those files ...

- Jörg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: codec - thread safe

2007-10-08 Thread Jörg Schaible
David J. Biesack wrote on Monday, October 08, 2007 3:02 PM:

 Date: Sat, 6 Oct 2007 23:31:19 -0500
 From: Qingtian Wang [EMAIL PROTECTED]
 
 Well, it's pick-your-poison kind of a deal. Either block on one
 instance and take a performance hit, or burn up the memory with lots
 of instances.
 
 Why not compromise? Create a ThreadPoolExecutor of some
 reasonable size and submit a FutureTask
 to run the encode or decode, and then do a future.get() when
 the value is needed. You might
 even get some concurrency if you can start the encode, then continue
 doing other work until you need the result.

Because it runs on JDK 1.3? However, that's the reason why I argumented not to 
promise thread-safety for any codec and provide synchronization wrappers or a 
user might take the pool approach ... which is quite easy with JDK 5 as you've 
provided here :)

- Jörg

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: codec - thread safe

2007-10-08 Thread Jörg Schaible
David J. Biesack wrote on Monday, October 08, 2007 4:40 PM:

 Date: Mon, 8 Oct 2007 16:23:59 +0200
 From: =?iso-8859-1?Q?J=F6rg_Schaible?=
 [EMAIL PROTECTED]
 
 David J. Biesack wrote on Monday, October 08, 2007 3:02 PM:
 
 Date: Sat, 6 Oct 2007 23:31:19 -0500
 From: Qingtian Wang [EMAIL PROTECTED]
 
 Well, it's pick-your-poison kind of a deal. Either block on one
 instance and take a performance hit, or burn up the memory with
 lots of instances.
 
 Why not compromise? Create a ThreadPoolExecutor ...
 
 Because it runs on JDK 1.3?
 
 The java.util.concurrent backport
 http://backport-jsr166.sourceforge.net/ runs on 1.3, for just this
 kind of use. 

I know this, but I doubt that we wanna start to depend Apache common components 
on it ;-)

- Jörg

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [lang] ClassCastException in Enum.compareTo with anonymous inner classes

2007-09-14 Thread Jörg Schaible
Samuel Fleischle wrote on Friday, September 14, 2007 9:19 AM:

 Hi Jörg,
 
 thanks for your quick response and your approach to solve
 this issue. But anyway I think it should be possible to add
 these Enums to a Set without throwing a ClassCastException
 regardless of which class, anonymous inner class or whatever else the
 Enum is. 

Well, this is what is excplicitly documented in the JDK's docs for 
Comparable.compareTo(). The ValueEnum must ensure that it does not compare 
apples and oranges and two different classes imply this.

The exception was surprising for you, since the old version of CL simply did 
this, but I'd rather declare that impl of compareTo as buggy ;-)

- Jörg

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [lang] ClassCastException in Enum.compareTo with anonymous inner classes

2007-09-13 Thread Jörg Schaible
Hi Samuel,

Samuel Fleischle wrote on Thursday, September 13, 2007 3:51 PM:

 Hi,
 I updated from Commons Lang 2.1 to Commons Lang 2.3 and got
 some issues with the changed compareTo() method of Enum with
 anonymouse inner classes: 
 
 Here is my simplified Enum:
 
 
 public class ItemStatus extends Enum
 {
// --
 Static Fields
   public static final ItemStatus CANCEL = new
 ItemStatus(CANCEL, Cancel);
 
public static final ItemStatus SHIPPED = new
 ItemStatus(SHIPPED, Shipped) {
   public String getDisplayName() {
   // do something special for this status
   }
};
 
   public static final ItemStatus MOVED = new
 ItemStatus(MOVED, Moved) {
   public String getDisplayName() {
   // do something special for this status
   }
};
 

[snip]

 }

[snip]
 
 com.myapp.common.model.order.ItemStatus
 com.myapp.common.model.order.ItemStatus$1
 com.myapp.common.model.order.ItemStatus$2
 
 The compareTo-Method now tries to compare ItemStatus$1 with
 ItemStatus$2 and says to me, that my ItemStatus-Enums are
 different classes.

Well, obviously those *are* different classes.

 I saw in JIRA there are some other issues in
 ValuedEnum.compareTo(). Is there a bug in the
 Enum.compareTo() implementation which got changed in Lang 2.2?

IIRC, this was more about using different class loaders loading the EnumValue 
class.
 
 Thanks in advance for any help or comment on this issue.

Why don't you factor out a (private) interface with this method? Write an 
addition ctor that takes such an implementation and use otherwise a default 
one. With this approach the enum class is always the same and the anonymous 
class is of a different type. Make the an additional field in the enum class 
keeping that implementation and declare it as transient for seamless 
serialization.

- Jörg

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]