Questions tagged [apache-commons-config]

The Commons Configuration software library provides a generic configuration interface which enables a Java application to read configuration data from a variety of sources.

The Apache Commons Configuration software library provides a generic configuration interface which enables a Java application to read configuration data from a variety of sources. Commons Configuration provides typed access to single, and multi-valued configuration parameters as demonstrated by the following code:

Double double = config.getDouble("number");
Integer integer = config.getInteger("number");

Configuration parameters may be loaded from the following sources:

  • Properties files
  • XML documents
  • Windows INI files
  • Property list files (plist)
  • JNDI
  • JDBC Datasource
  • System properties
  • Applet parameters
  • Servlet parameters

Different configuration sources can be mixed using a ConfigurationFactory and a CompositeConfiguration. Additional sources of configuration parameters can be created by using custom configuration objects. This customization can be achieved by extending AbstractConfiguration or AbstractFileConfiguration.

Official Website: http://commons.apache.org/configuration/

Useful Links:

146 questions
0
votes
1 answer

Apache Commons - ConfigurationInterpolator blocking threads

In a multithreaded application I use the great Apache Commons library. However, for some reason, half of my threads gets blocked when calling its getList and similar methods. This is a sample of the threadump: java.lang.Thread.State: BLOCKED (on…
krisy
  • 1,508
  • 1
  • 14
  • 32
0
votes
1 answer

Apache Commons Configuration get property based on parent with attribute equal to value

I'm using Apache Commons Configuration with XML for the configuration of my application, and I'm having trouble getting a property that I want. I have the following XML structure (minimal structure just to get point across):
crush
  • 16,713
  • 9
  • 59
  • 100
0
votes
1 answer

Parsing custom xml config file

My target is java 1.5 I have a custom configuration file provided from another software provider i need to read it
user1594895
  • 587
  • 1
  • 10
  • 31
0
votes
1 answer

How to change .properties file using apache.commons.configuration

I have an app where I filter messages according to some rules(existing some keywords or regexps). These rules are to be stored in .properties file(as they must be persistent). I've figured out how to read data from this file. here is the part of the…
Nikitin Mikhail
  • 2,983
  • 9
  • 42
  • 67
0
votes
3 answers

How to find the string which begins with the exact word

I have an app with GUI on gwt. using this gui I'd like to change(and this is the subquestion: how this would be better to change the .properties file(I know how to read properties from them using org.apache.commons.configuration, but don't know how…
Nikitin Mikhail
  • 2,983
  • 9
  • 42
  • 67
0
votes
1 answer

Apache Commons Configuration: Save properties file within a jar

All the apologies for disturbing you. I have an issue with the apache commons configuration. I have a properties file that is located at the src folder of an application I am building (with Eclipse). When I run the app and trying saving into the…
Arsene
  • 1,037
  • 4
  • 20
  • 47
0
votes
1 answer

apache common configuration library: corrupted property file

I have got a corrupted property file from customer. The file is modified by application to update version number. The code uses apache commons configuration. When I tested, the library always seems to write files in iso-8859-1 format. Code is…
Jayan
  • 18,003
  • 15
  • 89
  • 143
-1
votes
3 answers

After mvn install I try to run main, but I get a NoClassDefFoundError in ConfigurationException

I created a maven project and I have written for weeks an application and want to run it in the end... But I can't. I get the following stacktrace when executing my .jar: C:\Users\MyUser\.m2\repository\com\myCompany\MyApp\ 0.0.1-SNAPSHOT> java…
MartinL
  • 3,198
  • 4
  • 18
  • 20
-1
votes
1 answer

Show properties file content and edit it from web page

I have a properties file whose content would be like below myprop=key1:value1,key2:value2 myprop2=key21:value21,key22:value22 second set myprop3=key31:value31,key32:value32 How can I show the content on a web page and make it editable, so that, if I…
AngryJS
  • 955
  • 5
  • 23
  • 47
-1
votes
2 answers

how to read complex xml using common configuration java

I need to read complex XML files using common configuration. can somebody help me?
-2
votes
1 answer

How to use Apache Commons Configuration for our hierarchical organized config file?

I have to evaluate, how to use Apache Commons Configuration for our configuration structure. I only find how to handle hierarchical structuring for configurations that comes from within 1 file. But how can I handle hierarchical structures like…
fancyJaneDo
  • 67
  • 10
1 2 3
9
10