报这个错,只有一个原因,就是你转化的类型不对. 如果你的类是一个单实体类,也就是没有继承或是接口别的类. public class HjmServiceImpl {} 那么这样写就可以: HjmServiceImpl service = (HjmServiceImpl)ctx.getBean("HjmServiceImpl"); 但如果你的类,一般像SERVER的实体类,是接口过的. public class HjmServiceImpl implementsHjmExampleSer…
错误现象: [framework] 2016-05-26 11:34:53,590 -INFO [http-bio-8080-exec-7] -1231863 -com.dhcc.base.db.DBLink - sql=select metadata from map_metadata_format where pid='agme.asm.bcgz.57989' and format_id='iso19139' and FORMAT_ORIGIN='test20160526' for up…
出这个异常的原因是在项目中添加了新lication类(public class Application extends lication)之后,没有在AndroidManifest.xml中添加该类的声明,所以编译器抛出异常: java.lang.ClassCastException: android.app.Application cannot be cast to 类名 <application android:icon="@drawable/icon" android:l…
有时在修改xml文件时,全报这种错误,这个应该是缓存没得到及时更新导致的,可以通过以下方法解决: Eclipse tends to mess up your resources every now and then. This leads to some odd behavior such as strings and images being swapped all over your app, and more commonly classCastException(s), which ha…