Results 1 to 2 of 2
  1. #1
    misteryuku is offline Member
    Join Date
    Apr 2012
    Rep Power

    Default Problem compiling the PropertiesConfiguration code for commons configuration API v3.1


    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

    public static void readConfigContents(){



  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Rep Power

    Default 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.

    ** This space for rent **

Similar Threads

  1. Replies: 1
    Last Post: 01-31-2012, 09:48 AM
  2. telnet login problem (apache.commons)
    By thedoubledipper in forum Networking
    Replies: 0
    Last Post: 01-20-2012, 08:13 PM
  3. Problem with apache.commons.telnet library
    By mr_anderson in forum Networking
    Replies: 4
    Last Post: 08-03-2011, 08:32 PM
  4. Help me out in compiling the source code
    By aks.nitw in forum Advanced Java
    Replies: 3
    Last Post: 10-17-2008, 09:33 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts