Results 1 to 2 of 2
- 05-03-2012, 06:45 AM #1
Member
- Join Date
- Apr 2012
- Posts
- 4
- Rep Power
- 0
Problem compiling the PropertiesConfiguration code for commons configuration API v3.1
Hello,
I'm using eclipse indigo IDE for windows 7 to code and im making use of the java commons configuration api version 3.1. i have initialized the PropertiesConfiguration object. I couldn't compile because the PropertiesConfiguration throws an ConfigurationException. The error message when i moused over the affected code hightlighted in red was this : No exception of type ConfigurationException can be thrown; an exception type must be a subclass of Throwable.
How do i make sure this code is compiled sucessfully?
import org.apache.commons.configuration.Configuration;
import org.apache.commons.configuration.ConfigurationExce ption;
import org.apache.commons.configuration.PropertiesConfigu ration;
public class CustomTrafficConfigurationFileReader {
private static String configFilePath = "";
public static int findConfigFile(){
try {
Configuration config = new PropertiesConfiguration("TrafficLogConfig.properti es");
} catch (ConfigurationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public static void readConfigContents(){
}
}
- 05-03-2012, 09:31 AM #2
Moderator
- Join Date
- Apr 2009
- Posts
- 10,460
- Rep Power
- 16
Re: Problem compiling the PropertiesConfiguration code for commons configuration API
You haven't got another ConfigurationException class hiding in your code have you?
If you're using an IDE like Eclipse you can probably CTRL-click on the class name above and find out what class it thinks it's looking at. This is no guarantee, though.Please do not ask for code as refusal often offends.
Similar Threads
-
Plz help for some reason this code is not compiling
By webslinger55 in forum JDBCReplies: 1Last Post: 01-31-2012, 08:48 AM -
telnet login problem (apache.commons)
By thedoubledipper in forum NetworkingReplies: 0Last Post: 01-20-2012, 07:13 PM -
Problem with apache.commons.telnet library
By mr_anderson in forum NetworkingReplies: 4Last Post: 08-03-2011, 07:32 PM -
Help me out in compiling the source code
By aks.nitw in forum Advanced JavaReplies: 3Last Post: 10-17-2008, 08:33 AM


LinkBack URL
About LinkBacks

Bookmarks