Hi,

Tried to configure my new TDK application to take multiple configuration files through the
XML configuration file approach (as described in the Turbine Configuration Howto).


a) I was using the unofficial TDK-2.3 (tdk-2.3_20031210.tar.gz) initially. It wouldn't load
the "turbine.xml" file at all and would go straight to the default TR.props file. Found that
the Commons Configuration jar (commons-configuration-1.0-dev.jar) file included with
that version doesn't even include the ConfigurationFactory class, so obviously Turbine
wasn't even calling the code to load the XML file


b) Upgraded to the "tdk-2.3_01.tgz" (still unofficial) version pointed to by the tdk-how to
page. The Commons Configuration jar (commons-configuration-20030706.202021.jar)
now contains the ConfigurationFactory class. So assumed things would be fine.


c) The Turbine servlet wouldn't even start now since it threw an Exception from its init()
method. On tracing the logs, found that it was a ClassNotFoundException - the offending
class being org.apache.commons.digester.ObjectCreationFactory. The Jar file for commons
digester seemed to be missing from the library included with the TDK.


d) Since I didn't know which version of digester was required, downloaded the latest stable
one (commons-digester-1.5.jar) and dropped into the library directory. The ClassNotFoundException
vanished, but the init method still threw an exception which said it couldn't locate the properties
files which were referred to from the "turbine.xml" file even though the files were very much
present in the specified path :-(


e) Tried digging through the source code of Commons Configuration package to see if this is a bug that has got
fixed subsequently - but the source downloaded from CVS seemed to have dependencies on commons-lang-2.0
(which does have some backward-incompatible API changes from 1.0 at least in the StringUtils class which is
used heavily all over the Turbine source tree), So trying to replace Commons-Configuration with the newly built
commons-configuration binary was too risky an option :-(


f) Eventually resorted to trial_and_error solutions. The first one tried solved the problems (Removing the leading
'/' from the file specification in turbine.xml) - And voila !! I had a switchable situation specific properties file
overriding some of the properties in the default file (the motive behind my exercise)


Now - could some of the developers explain the following ?

1) Which is the correct version of the digester package required for the Commons-Configuration jar included with
tdk_2.3_01 ? Is version 1.5 OK ?


2) Is there a patch available for commons-configuration wherein the BasePath set by the caller will be correctly
used to resolve files in the base xml file ? (Removing the leading '/' seemed little bit of a hack)


Regards,

Babu


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



Reply via email to