出现错误:

java.lang.ClassCastException: com.xxx cannot be cast to ResourceBundle

百度搜索错误,没有结果。谷歌搜索:http://stackoverflow.com/questions/5694017/specify-java-localization-file

解决方法,修改了一行代码

prop = ResourceBundle.getBundle(this.getClass().getName());//这里需要读取一个配置文件
改成:
prop = ResourceBundle.getBundle("xxx.properties");

错误 java.lang.ClassCastException: com.ylpw.sms.YZZYSenderUtil cannot be cast to ResourceBundle的更多相关文章

  1. Caused by: java.lang.ClassCastException: org.springframework.web.SpringServletContainerInitializer cannot be cast to javax.servlet.ServletContainerInitializer错误解决办法

    严重: Failed to initialize end point associated with ProtocolHandler ["http-bio-8080"] java. ...

  2. java.lang.ClassCastException: org.slf4j.impl.Log4jLoggerFactory cannot be cast to ch.qos.logback.classic.LoggerContext问题原因及解决方法

    一.错误信息 java.lang.ClassCastException: org.slf4j.impl.Log4jLoggerFactory cannot be cast to ch.qos.logb ...

  3. java.lang.ClassCastException: android.view.ViewGroup$LayoutParams cannot be cast to android.widget.L(转)

    09-09 10:19:59.979: E/AndroidRuntime(2767): FATAL EXCEPTION: main09-09 10:19:59.979: E/AndroidRuntim ...

  4. java.lang.ClassCastException: com.liuyang.annocation.UserAction cannot be cast to com.liuyang.annocation2.UserAction at com.liuyang.annocation2.App.test

    java.lang.ClassCastException: com.liuyang.annocation.UserAction cannot be cast to com.liuyang.annoca ...

  5. EJB学习(三)——java.lang.ClassCastException: com.sun.proxy.$Proxy2 cannot be cast to..

    在上一篇博客介绍了怎样使用使用Eclipse+JBOSS创建第一个EJB项目,在这期间就遇到一个错误: Exception in thread "main" java.lang.C ...

  6. java.lang.ClassCastException: com.sun.proxy.$Proxy6 cannot be cast to com.etc.service.serviceImpl.BankServiceImpl

    错误原因: java.lang.ClassCastException: com.sun.proxy.$Proxy6 cannot be cast to com.etc.service.serviceI ...

  7. Java-Spring:java.lang.ClassCastException: com.sun.proxy.$Proxy* cannot be cast to***问题解决方案

    java.lang.ClassCastException: com.sun.proxy.$Proxy* cannot be cast to***问题解决方案 临床表现: 病例: 定义代理类: @Tra ...

  8. java.lang.ClassCastException: android.view.AbsSavedState$1 cannot be cast to android.widget.ProgressBar$SavedState

    java.lang.ClassCastException: android.view.AbsSavedState$1 cannot be cast to android.widget.Progress ...

  9. java.lang.ClassCastException: com.sun.proxy.$Proxy32 cannot be cast to com.bkc.bpmp.core.cache.MemcachedManager

    java.lang.ClassCastException: com.sun.proxy.$Proxy32 cannot be cast to com.bkc.bpmp.core.cache.Memca ...

随机推荐

  1. django 富文本展示 以及 post提交出错

    1.富文本转义 使用 {{ content.record.content | safe }} 2.post提交报错 页面表单内追加 <form id="f"action=&q ...

  2. Audio播放音效

    AudioToolbox.framework是一套基于C语言的框架,使用它来播放音效其本质是将短音频注册到系统声音服务(System Sound Service).System Sound Servi ...

  3. The Bottom of a Graph-POJ2553强连通

    The Bottom of a Graph Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 9759 Accepted: 4053 ...

  4. 平时一些mysql小技巧及常识

    >navicat premium 快捷键1.ctrl+q 打开查询窗口2.ctrl+/ 注释sql语句3.ctrl+shift +/ 解除注释4.ctrl+r 运行查询窗口的sql语句5.ctr ...

  5. PHP入门【一】$_SERVER

    这几天要个同事写php的程序,就开始学习了PHP ,基础语法不用说了语言都是基本相通的,只是有若类型和强类型的区别(声明数据类型) 把现在看到的感觉有用的记录一下. $_SERVER['PHP_SEL ...

  6. jdbc.properties各种数据库连接配置

    # HSQLDB  #jdbc.driverClassName=org.hsqldb.jdbcDriver #jdbc.url=jdbc:hsqldb:hsql://localhost:9001/bo ...

  7. Openlayers自定义简单popup

    OpenLayers中可以使用很多种类型的popup,大家可以到Openlayers的 popupMatrix.html示例中看.之前存在这样一个错误的想法:popup和marker是绑定的,要有po ...

  8. String All Methods

    1.public char charAt(int index) public class Test{ public static void main(String args[]){ String s= ...

  9. 如何编写高质量的Javascript代码

    1.避免全局变量,因为全局变量容易发生名称上的冲突,可维护性不好. a,使用命名空间 b,使用闭包 c,在函数内部使用var声明 2.编写可维护的代码 a.可读性 b.连续性 c.预见性 d.看起来是 ...

  10. CMD 规范是不是就是 commonJS 规范?

    作者:giscafer链接:https://www.zhihu.com/question/20576942/answer/58094030来源:知乎著作权归作者所有,转载请联系作者获得授权. CMD是 ...