In the maven POM a lot of dependencies are declared. These are all needed during compile time. On runtime however you only need to add the dependencies to your classpath that are required by the parts of the Commons Configuration package you are using. The following table helps you to determine which dependencies you have to include based on the components you intend to use:
Component | Dependencies |
---|---|
Core |
Java 1.3 commons-collections commons-lang commons-logging |
ConfigurationFactory |
commons-digester commons-beanutils JDK 1.4 or xml-apis |
DefaultConfigurationBuilder |
commons-beanutils JDK 1.4 or (xml-apis + xerces + xalan) |
DatabaseConfiguration | JDBC 3.0 (Java 1.4 or jdbc2_0-stdext.jar) |
XMLConfiguration | Java 1.4 or (xml-apis + xerces + xalan) |
XMLPropertiesConfiguration | Java 1.4 or (xml-apis + xerces) |
PropertyListConfiguration | commons-codec |
XMLPropertyListConfiguration |
commons-digester commons-beanutils commons-codec JDK 1.4 or xml-apis |
ConfigurationDynaBean | commons-beanutils |
XPathExpressionEngine | commons-jxpath |
Notes
Component | Version |
---|---|
commons-lang | 2.1 |
commons-collections | 3.1 |
commons-logging | 1.0.4 |
commons-digester | 1.6 |
commons-beanutils | 1.7.0 |
commons-codec | 1.3 |
commons-jxpath | 1.2 |
java.lang.NoSuchMethodError
is thrown when a SAX data source is to be transformed into a
DOM result). With version 2.6.0 these problems do not occur.
In both cases the error happened only in test code; the actual
code was not affected. But if you face a similar problem with
Xalan 2.7.0 it is worth trying the older version.