I am trying to use this stub to test XMLConfigruation and an exception ConfigurationException and I am getting "incompatiable type" required java.lang.Throwable found org.apache.commons.configuration.ConfigurationException message on the catch line and I not understanding this error. Not much available on google. This seems so basic and I am still learning.
Very peculiar. That looks as if you didn't have the correct inheritance tree, or had a different ConfigurationException class, but when you look here, the class mentioned definitely has the correct inheritance tree.
I presume you have the Apache file in your CLASSPATH, otherwise you would get "cannot find class" errors.
Joined: Sep 19, 2009
Well, I found the convoluted solution. It is all about learning.
I needed to download the following from apache Commons, lang, collections and logging.
Still need to work on understanding the configuration library but I got it working.
Oh! I also needed to import java.util.Collections; so it would work.
There's no code there that uses java.util.Collections--you should only need to import it if *your* code actually uses it.
I'd recommend turning up the logging levels using whatever log implementation you're using; it can help diagnose seemingly mysterious errors. In this case I'd suspect it'd give you a class not found exception as a root cause somewhere.