Function: Read configuration file
Java Rookie: Import Project at the registration office began to error, the first time encountered
Import Org.apache.commons.lang3.StringUtils;
Import org.apache.commons.configuration.ConfigurationException;
Package com.test;
The type org.apache.commons.lang.exception.NestableException cannot be resolved. It is indirectly referenced from required. class files
catch (ConfigurationException E)
No exception of type ConfigurationException can be thrown; An exception type must is a subclass of Throwable
Reason:
Http://hi.baidu.com/virackt/item/8534b95d49ce78d4d48bac4d
No exception of type ConfigurationException can be thrown; An exception type must is a subclass of Throwable
later, it is because the definition of the configurationexception in this class is inherited by Lang inside the nestableexception.
It is necessary to introduce two packages at a time to use this class. It seems that many of the Apache jar packages are interrelated, with a function to load several packages
Because there is no lang3 in the nestableexception this exception class, so the use of the configuration will be an exception, so instead of lang2.6 problem solved
Summarize:
With configuration, you have to use version lang to
Java-no exception of type ConfigurationException can be thrown; An exception type must is a subclass of Throwable