解决: The server encountered an internal error that prevented it from fulfilling this request.
项目场景:
在自己练习黑马的javaweb小案例中出现
![](/assets/blank.gif)
type Exception report
message
description The server encountered an internal error that prevented it from fulfilling this request.
exception
org.apache.ibatis.exceptions.PersistenceException:
Error updating database. Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named ‘CompanyName’ in ‘class com.itheima.pojo.Brand’
The error may exist in com/itheima/mapper/BrandMapper.java (best guess)
The error may involve com.itheima.mapper.BrandMapper.add-Inline
The error occurred while setting parameters
SQL: insert into tb_brand values(null,?,?,?,?,?)
Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named ‘CompanyName’ in ‘class com.itheima.pojo.Brand’
org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:199)
org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:184)
org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:62)
org.apache.ibatis.binding.MapperProxyPlainMethodInvoker.invoke(MapperProxy.java:152)org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:85)com.sun.proxy.PlainMethodInvoker.invoke(MapperProxy.java:152) org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:85) com.sun.proxy.PlainMethodInvoker.invoke(MapperProxy.java:152)org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:85)com.sun.proxy.Proxy32.add(Unknown Source)
com.itheima.service.BrandService.add(BrandService.java:46)
com.itheima.web.AddServlet.doGet(AddServlet.java:38)
com.itheima.web.AddServlet.doPost(AddServlet.java:46)
javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
原因分析:
经仔细检查,发现在form表单中有错误。因为我采用的是JavaBean的方式传送数据,所以标签iinsert into tb_brand values(null,#{brandName},#{CompanyName},#{ordered},#{description},#{status})name=“user.userName” 中CompanyName 写错
解决方案:
将CompanyName修改为companyName,确保数据库的字段名与javabean中的属性名保持一致
解决: The server encountered an internal error that prevented it from fulfilling this request.相关推荐
- description The server encountered an internal error that prevented it from fulfilling this request错
以前的项目有问题需要维护,导进去之后登陆直接报错,一番折腾之后发现是sturts2自带的 antlr-2.7.2.jar出现了jar包冲突,删除后搞定. HTTP Status 500 - type ...
- The server encountered an internal error that prevented it from fulfilling this request 的解决方法
在多次实验发现这个报错,我认为作为小白,最容易报错的可能是 空指针异常(NullPointerException )
- Tomcat遇到500 The server encountered an internal error that prevented it from fulfilling this request
故事背景: 我使用jdk1.8和tomcat8.0但是遇到了下边两个问题 ![在这里插入图片描述](https://img-blog.csdnimg.cn/20210603211006342.jpg? ...
- The server encountered an internal error () that prevented it from fulfilling this requet异常解决
1.数据库连接配置问题 2.抓取的姓名和密码为null 看下下面的配置是否正确
- 记录学习Java HttpServletRequests报错The server encountered an internal error that prevented it from fulfil
文章目录 一.错误提示 二.解决办法 一.错误提示 通过错误信息可以看出是出现空指针异常,并且报错在registerServlet.java的第26行. 二.解决办法 通过排查发现registerSe ...
- jsp使用session出现The server encountered an unexpected condition that prevented it from fulfilling the r
The server encountered an unexpected condition that prevented it from fulfilling the request 解决方法 如果 ...
- Internal Server Error 错误 The server encountered an internal error or misconfiguration and was una...
在家中搭一个个人的eyoucms的测试环境,安装时,前边顺利的很,但到后边,一直报以下的这个错误,让人头疼不已. Internal Server Error The server encountere ...
- Remoting: Server encountered an internal error
发生这个错误的原因是Remoting的一个配置项: <customErrors> 元素 指示此应用程序域中的服务器通道是否将经筛选的或完整的异常信息返回给本地或远程调用方. <?x ...
- 登陆weblogic console报错 The server encountered an unexpected condition which prevented it from
登陆weblogic console报错 The server encountered an unexpected condition which prevented it from fulfilli ...
- brat报错:The server encountered a serious error, please contact the administrators at ____ and give th
The server encountered a serious error, please contact the administrators at ____ and give the id# 记 ...
最新文章
- C语言单向链表的实现
- Python 中最强大的错误重试库
- 构建根文件系统启动(1)
- java 12-3 StringBuffer的添加和删除功能
- CISCO专用协议CDP
- Java-使用JavaMail发送一封邮件给用户邮箱功能实现
- 笔记本控制机器人方法
- java虚拟机的内存模型_JVM(Java虚拟机)内存模型(转载/整理)
- 【bzoj 1754】【POJ - 2389 】Bull Math (高精度运算)
- 量子计算机网络指数时间,科普:量子计算机是这样计算的
- linux shell脚本关于文件存在与否的判断
- oracle 提取连续数字,oracle 得到连续不重复的数字序列
- 12.MongoDB之固定集合(Capped Collections)
- sw如何缩放装配体_solidworks提高大型装配体的展示、设计效率
- rog主板php,华硕主板有哪些系列 华硕主板各系列区别对比
- R语言混合线性模型包代码演示
- pano2vr 笔记
- BZOJ4134 ljw和lzr的hack比赛
- 案例1:文件系统ACLs
- C语言 队列 的基本功能和详细代码(含详细注释)