功能:读配置文件

java菜鸟:导入工程在报名处就开始报错,第一次遇到

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 be a subclass of Throwable

原因:

http://hi.baidu.com/virackt/item/8534b95d49ce78d4d48bac4d

No exception of type ConfigurationException can be thrown; an exception type must be a subclass of Throwable

后来查了一下居然是因为这个类里面定义的configurationException是继承了lang里面的NestableException

要同时引入两个包才能使用这个类。貌似apache很多jar包都是相互牵连,用一个功能就得加载好几个包

由于lang3中已经没有NestableException这个异常类了,所以使用configuration会出现异常,所以改用lang2.6问题就解决了

总结:

使用configuration,要有对用版本lang才可以

java-No exception of type ConfigurationException can be thrown; an exception type must be a subclass of Throwable的更多相关文章

  1. Exception in thread "main" org.apache.ibatis.binding.BindingException: Type interface com.test.bean.groupMapper is not known to the MapperRegistry.

    Exception in thread "main" org.apache.ibatis.binding.BindingException: Type interface com. ...

  2. org.springframework.beans.TypeMismatchException: Failed to convert property value of type 'null' to required type 'double' for property 'band'; nested exception is org.springframework.core.convert.Con

    本文为博主原创,未经允许不得转载: 先将异常粘贴出来: 20:37:26,909 ERROR [com.suning.fucdn.controller.ProductDataStaticsContro ...

  3. Java之POI读取Excel的Package should contain a content type part [M1.13]] with root cause异常问题解决

    Java之POI读取Excel的Package should contain a content type part [M1.13]] with root cause异常问题解决 引言: 在Java中 ...

  4. 使用Spire组件抛出异常The type initializer for 'spr857' threw an exception

    使用Spire组件抛出异常The type initializer for 'spr857' threw an exception 我使用免费的Spire.Xls组件尝试去转换Excel文档到PDF文 ...

  5. HibernateProxy异常处理 java.lang.UnsupportedOperationException: Attempted to serialize java.lang.Class: org.hibernate.proxy.HibernateProxy. Forgot to register a type adapter?

    这里使用google的Gson包做JSON转换,因为较早的1.4版本的FieldAttributes类中没有getDeclaringClass()这个方法,这个方法是获取field所属的类,在我的排除 ...

  6. ASP.Net Core "The type initializer for 'Gdip' threw an exception"

    ASP.NET Core项目部署在Linux下可能会出现GDI错误 The type initializer for 'Gdip' threw an exception 解决方案:创建 libdl 的 ...

  7. Attempted to serialize java.lang.Class: org.hibernate.proxy.HibernateProxy. Forgot to register a type adapter?

    当我们使用gson 转对象时,并且这个对象中有一些属性是懒加载时如 @Entity @Table(name = "user") public class User { @Id @C ...

  8. java.rmi.server.ExportException: Port already in use: 1099; nested exception is

    现象 mac上tomcat启动时报错: java.rmi.server.ExportException: Port already in use: 1099; nested exception is. ...

  9. Exception of type 'System.OutOfMemoryException' was thrown

    最近刚换了服务器,开始测试的时候未发现什么问题,可是一旦同一时间段操作的人比较多的时候,就会抛出如下错误: Server Error in '/' Application. Exception of ...

随机推荐

  1. UVA 11401 - Triangle CountingTriangle Counting 数学

    You are given n rods of length 1,2, . . . , n. You have to pick any 3 of them and build a triangle. ...

  2. win10开机密码怎么取消

    win10怎么取消电脑开机密码?比较快捷的方法就是使用netplwiz在WIN2000以后的版本都是适用.最新版的WIN10同样也是适用的.下面我来演示一下win10开机密码怎么取消? 1. WIN1 ...

  3. Spring框架学习之第6节

    bean的生命周期 为什么总是一个生命当做一个重点? Servlet –> servlet生命周期 Java对象生命周期 往往笔试,面试总喜欢问生命周期的问题? ①   实例化(当我们的程序加载 ...

  4. QQ群共享文件下载很慢解决办法

    QQ群共享文件下载很慢解决办法.我们经常会不群里面共享文件,文件文件稍大,下载非常慢.家庭是20M的网速,一般正常下载能够达到2.5MB左右,而在QQ群实际下载网速却只有80KB左右.如果要下1G,就 ...

  5. CentOS 7快速搭建Nodejs开发环境

    Node.js是一个事件驱动I/O服务端JavaScript环境,基于Google的V8引擎,V8引擎执行Javascript的速度非常快,性能非常好.学习Nodejs首先需要会安装环境.这里我介绍如 ...

  6. wamp集成环境开启虚拟主机多站点功能

    方法/步骤   如果不是全白色,说明没有正常启动,先解决这个情况再进行下一步操作. 我们一键安装wamp到D盘,并可以正常启动,状态如下图所示:   在D:\wamp\bin\apache\Apach ...

  7. 【Cocosd2d实例教程二】地图编辑器Tiled的安装使用

    (转载请注明出处:http://blog.csdn.net/buptgshengod) 我们知道cocos2d是一个基于2d效果的游戏引擎,那么如果制作一个2d手机游戏我们需要创建相应的游戏画面,而c ...

  8. ACdream 1735 输油管道 (排序)

    http://acdream.info/problem?pid=1735 官方题解:http://acdream.info/topic?tid=4246 因为主干线是平行于x轴的直线,那么跟x坐标其实 ...

  9. Back to Back Order Process

    Steps involved involved in back to back order process in oracle apps 1. Enter Sales Order 2. Book Sa ...

  10. Windows Myeclipse 10 安装 Perl 插件

    1.首先安装 windows 下的 perl 环境这里使用 active perl,选择最新版本 5.16.1下载地址:http://www.activestate.com/activeperl/do ...