java web程序中报错原因总结

1.
FeedbackManagerTest.test_insert_success
initializationError(org.junit.runner.manipulation.Filter)
(问题原因:没有在相应的测试方法上加@Test)



*********************************************************************************************************************************
2.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'admin.manager.FeedbackManagerTest': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [admin.manager.FeedbackManager] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@javax.annotation.Resource(shareable=true, lookup=, name=, description=, authenticationType=CONTAINER, type=class java.lang.Object, mappedName=)}

(问题原因:在ApplicationContext_test.xml中增加关于feedbackManager的bean)
**************************************************************************************************************************************


3.
 Cannot find class [admin.manager.impl。FeedbackManagerImpl] for bean with name 'feedbackManager' defined in class path resource [applicationContext-test.xml]; nested exception is java.lang.ClassNotFoundException: com.taobao.kelude.admin.manager.impl。FeedbackManagerImpl


(问题原因:写类的路径时.写成了。)
*********************************************************


org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): admin.mapper.FeedbackMapper.insert
at org.apache.ibatis.binding.MapperMethod$SqlCommand.<init>(MapperMethod.java:178)
at org.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:38)
at org.apache.ibatis.binding.MapperProxy.cachedMapperMethod(MapperProxy.java:49)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:42)



(问题原因:在增加了映射文件Feedback.xml,未在admin/dal/mybatis.xml中增加相应的映射到该映射文件)
**********************************************************************************************************
4.
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'islike' in 'class com.taobao.kelude.admin.model.Feedback'

(问题原因:Feedback.java中的islike写的是isLike,与Feedback.xml中的islike不一样,无法自动注入)
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值