1.
Caused by: org.springframework.beans.factory.BeanCreationException:
Error creating bean with name ‘cusCustomerDaoMybatisImpl’:
Injection of resource dependencies failed;
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name ‘sqlSession’ defined in class path resource [applicationContext-dao.xml]:
Cannot resolve reference to bean ‘sqlSessionFactory’ while setting constructor argument;
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name ‘sqlSessionFactory’ defined in class path resource [applicationContext-dao.xml]:
Invocation of init method failed; nested exception is org.springframework.core.NestedIOException:
Failed to parse mapping resource: ‘file [D:\软件\eclipse\JAVAWorks\saleSys\target\classes\com\yc\dao\SaleOrderDaoMapper.xml]’;
nested exception is org.apache.ibatis.builder.BuilderException: Error creating document instance.
Cause: org.xml.sax.SAXParseException; lineNumber: 36; columnNumber: 42; 必须为元素类型 “insert” 声明属性 “useGeneratesKeys”。
错误原因:没写public void setSqlSession(SqlSessionTemplate sqlSession) {
this.sqlSession = sqlSession;
}
2.
Error creating bean with name ‘org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping’:
Invocation of init method failed; nested exception is java.lang.IllegalStateException: Ambiguous mapping.
Cannot map ‘saleOrderController’ method
错误原因:@RequestMapping(name=”saleOrder_save.action”)应该为@RequestMapping(”saleOrder_save.action”)
3.
严重: Servlet.service() for servlet [springmvc] in context with path [/saleSys] threw exception
[Request processing failed; nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name ‘saleProductController’:
Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.
NoSuchBeanDefinitionException:
No bean named ‘SaleProductBizImpl’ available] with root cause
错误原因: @Resource(name=”SaleProductBizImpl”)应该为@Resource(name=”saleProductBizImpl”)
4.日志出不来 log4j的jar包slf4j的jar包有冲突
5.tomcat错误一般都是xml文件出错
6.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name
‘org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping’:
Invocation of init method failed; nested exception is java.lang.IllegalStateException: Ambiguous mapping. Cannot map ‘userController’ method
错误原因:@RequestMapping()中的值相同