Problem:
I wrote the following code in Netbeans 6.8.
import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.PropertiesConfiguration;
import org.apache.commons.configuration.reloading.FileChangedReloadingStrategy;
public static void main(String[] args) throws ConfigurationException {
PropertiesConfiguration config = new PropertiesConfiguration("usergui.properties");
config.setReloadingStrategy(new FileChangedReloadingStrategy());
}
}
The Error was,
Compiling 1 source file to /root/configurationread/build/classes
/root/configurationread/src/configurationread/Main.java:21: cannot access org.apache.commons.lang.exception.NestableException
class file for org.apache.commons.lang.exception.NestableException not found
public static void main(String[] args) throws ConfigurationException {
1 error
/root/configurationread/nbproject/build-impl.xml:430: The following error occurred while executing this line:
/root/configurationread/nbproject/build-impl.xml:199: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 1 second)
Solution:
I added the commons-lang-2.3.jar to the library
Now the problem was solved.
Reference:
http://jimlife.wordpress.com/2007/12/12/netbeans-6-bug-configurationexception-class-in-apache-common-configuration-is-not-throwable/
I wrote the following code in Netbeans 6.8.
import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.PropertiesConfiguration;
import org.apache.commons.configuration.reloading.FileChangedReloadingStrategy;
public static void main(String[] args) throws ConfigurationException {
PropertiesConfiguration config = new PropertiesConfiguration("usergui.properties");
config.setReloadingStrategy(new FileChangedReloadingStrategy());
}
}
Compiling 1 source file to /root/configurationread/build/classes
/root/configurationread/src/configurationread/Main.java:21: cannot access org.apache.commons.lang.exception.NestableException
class file for org.apache.commons.lang.exception.NestableException not found
public static void main(String[] args) throws ConfigurationException {
1 error
/root/configurationread/nbproject/build-impl.xml:430: The following error occurred while executing this line:
/root/configurationread/nbproject/build-impl.xml:199: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 1 second)
Solution:
I added the commons-lang-2.3.jar to the library
Now the problem was solved.
Reference:
http://jimlife.wordpress.com/2007/12/12/netbeans-6-bug-configurationexception-class-in-apache-common-configuration-is-not-throwable/
Thank very much - that saved me figuring out why the heck it was complaining about not being a throwable object. thanks again. Stuart
ReplyDeleteYou are welcome
Delete