Maven+SSM框架下项目开发常见异常及解决方案(二)
来源:互联网 发布:手机视频播放网页源码 编辑:程序博客网 时间:2024/06/09 16:31
1.
Servlet.service() for servlet [SpringMVC] in context with path [/biglovewj] threw exception [Request processing failed; nested exception is org.apache.ibatis.builder.IncompleteElementException: Could not find parameter map com.biglovewj.dto.Daily] with root cause java.lang.IllegalArgumentException: Parameter Maps collection does not contain value for com.biglovewj.dto.User
原因: mybatis的mapper文件中,XXXMapper.xml 文件中 增、改等方法参数类型存在错误。
解决方法: 参数类型为 parameterType 而非 parameterMap
2.
Servlet.service() for servlet [SpringMVC] in context with path [/biglovewj] threw exception [Request processing failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'diningController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.biglovewj.service.impl.DiningService com.biglovewj.controller.DiningController.service; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.biglovewj.service.impl.DiningService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}] with root causeorg.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.biglovewj.service.impl.DiningService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
原因:在controller层中,autowired注解下的service层为该层的接口类而非实现类
解决方法:查找错误的自动装配类型,将实现类改为接口类
3.
Servlet.service() for servlet jsp threw exceptionjavax.el.PropertyNotFoundException: Property 'col_linkName' not found on type com.biglovewj.dto.Collectivity
原因: jsp 页面中尝试获取了请求作用域中对象未包含的属性
解决方法: 找到报错的对象的正确属性,并修改jsp中的错误属性
4.
Servlet.service() for servlet [SpringMVC] in context with path [/biglovewj] threw exception [Request processing failed; nested exception is org.springframework.jdbc.BadSqlGrammarException: ### Error updating database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'XXX'' at line
原因: sql语言格式错误(注意如果基本格式没有错误的话,那就看看标点是不是用错了,尤其看最后一个字段值设置完毕后是不是多加了一个逗号)
解决方法: 修改错误的sql语句
5.提交表单信息时报错
type Status report description The request sent by the client was syntactically incorrect.
原因: 提交的表单中的字段可能存在问题,eg:某个字段的数据库类型是int 但是提交的字段中却包含字母、特殊符号等
解决方法: 检查表单中所有字段类型是否对应model层实体类的属性类型
阅读全文
0 0
- Maven+SSM框架下项目开发常见异常及解决方案(二)
- Maven+SSM框架下项目开发常见异常及解决方案(一)
- Maven+SSM框架下项目开发常见异常及解决方案(三)
- 在maven下搭建SSM开发框架
- 构建Maven多模块项目+SSM框架整合+Thymeleaf(二)
- 使用SSM+Maven搭建项目框架常见问题及解决方法
- SSM框架下的Maven项目引用报错
- Maven项目整合SSM框架
- maven下配置ssm框架
- SSM框架的搭建及项目开发的步骤
- 整合SSM框架的maven项目pom.xml的常见配置
- 项目常见异常+基本解决方案
- Maven下SSM框架搭建-下
- MAVEN IDEA SSM框架搭建《二》
- 二、maven+web整合ssm框架
- Maven常见异常及解决方法
- Maven常见异常及解决方法 .
- Maven常见异常及解决方法
- 微信小程序--使用微信官方demo解密userinfo加密数据
- C++继承与多态
- PHP字符串和数组转换
- Oracle-Sql规范
- ext id重复
- Maven+SSM框架下项目开发常见异常及解决方案(二)
- LeetCode 414 Third Maximum Number
- PHP字符串操作函数
- 初识通信
- 点击‘Edit Configurations’打开“ Run/Debug Configurations”,里面没有tomcat server选项
- HDU1841 Find the Shortest Common Superstring (KMP两字符串的首尾连接)
- Android系统截图分享
- Java logback 日志分级管理
- New Start