网上商城中遇见的错误
2017-06-04 11:55
204 查看
1.版本问题
jdk版本与eclipse版本不同时,会报错
查看myeclipse版本方法:查看32位还是34位:打开 eclipse 的 plugins目录下,找,如果你发现某个文件夹名字带着 x86_64 的话就是 64位的。
查看版本号:.eclipseproduct用记事本打开,version的值为版本eclipse.platformversion=4.4.1
2.Cannotfind class [cn.itcast.shop.user.action.checkImgAction] for bean with name'checkImgAction' defined in class path resource
原因:错误配置文件出错 applicationContext出错
解决:<beanid="checkImgAction"class="cn.itcast.shop.user.action.checkImgAction"scope="prototype">
</bean>
3.拼写错误
注意大小写和空格的错误。
The content of element type "package" must match "(result-types?,interceptors?,default-interceptor-ref?,default-action-ref?,default-class-ref?,global-results?,global-exception-mappings?,action*)".
action拼写错误。
4.“Thecontent of element type "package" must match"(result-types?,interceptors?,default-interceptor-ref?,default-action-ref?,default-class-ref?,global-results?,global-exception-mappings?,action*)".”
struts2中这个错误的意思是,package里元素必须按照一定的顺序排列。
result-types
interceptors
default-interceptor-ref
default-action-ref
default-class-ref
global-results
global-exception-mappings
action*(就是所有的action放到最后)
5.图片的显示
${pageContent.request.contextPath}路径问题:
${pageContent.request.contextPath}bank_img/bc.bmp显示图片
${pageContent.request.contextPath}/bank_img/bc.bmp 不显示图片
6.id to loadis required for loading
这个错误一般是因为需要传入的字段值为空,在这里我出现这种错误的原因是保存一级分类时,return null,所以后面用到该属性值时,出现空值。
7.时间格式问题
Incorrect datetime value: '' for column 'pdate' at row 1
与数据库中时间字段格式不符出现该错误,win10系统出现时间格式不符问题
参考博客:http://blog.csdn.net/chenxiaochan/article/details/50529452
jdk版本与eclipse版本不同时,会报错
查看myeclipse版本方法:查看32位还是34位:打开 eclipse 的 plugins目录下,找,如果你发现某个文件夹名字带着 x86_64 的话就是 64位的。
查看版本号:.eclipseproduct用记事本打开,version的值为版本eclipse.platformversion=4.4.1
2.Cannotfind class [cn.itcast.shop.user.action.checkImgAction] for bean with name'checkImgAction' defined in class path resource
原因:错误配置文件出错 applicationContext出错
解决:<beanid="checkImgAction"class="cn.itcast.shop.user.action.checkImgAction"scope="prototype">
</bean>
3.拼写错误
注意大小写和空格的错误。
The content of element type "package" must match "(result-types?,interceptors?,default-interceptor-ref?,default-action-ref?,default-class-ref?,global-results?,global-exception-mappings?,action*)".
action拼写错误。
4.“Thecontent of element type "package" must match"(result-types?,interceptors?,default-interceptor-ref?,default-action-ref?,default-class-ref?,global-results?,global-exception-mappings?,action*)".”
struts2中这个错误的意思是,package里元素必须按照一定的顺序排列。
result-types
interceptors
default-interceptor-ref
default-action-ref
default-class-ref
global-results
global-exception-mappings
action*(就是所有的action放到最后)
5.图片的显示
${pageContent.request.contextPath}路径问题:
${pageContent.request.contextPath}bank_img/bc.bmp显示图片
${pageContent.request.contextPath}/bank_img/bc.bmp 不显示图片
6.id to loadis required for loading
这个错误一般是因为需要传入的字段值为空,在这里我出现这种错误的原因是保存一级分类时,return null,所以后面用到该属性值时,出现空值。
private Category category=new Category(); public Category getModel(){ return null;//应该为return cagegory; }
7.时间格式问题
Incorrect datetime value: '' for column 'pdate' at row 1
与数据库中时间字段格式不符出现该错误,win10系统出现时间格式不符问题
参考博客:http://blog.csdn.net/chenxiaochan/article/details/50529452
相关文章推荐
- [java]网上商城错误集锦
- 【Java】SSH网上商城错误及解决方案总结(一)
- 【Java】SSH网上商城错误及解决方案总结(二)
- SSH网上商城总结之SSH框架分析
- SSH网上商城
- openjweb汽车配件网上商城及进销存系统介绍
- JavaWeb开发知识总结(网上商城项目总结)
- 【SSH网上商城项目实战01】整合Struts2、Hibernate4.3和Spring4.2
- 网上商城后台架构设计
- 【SSH网上商城项目实战06】基于DataGrid的数据显示
- 【SSH网上商城项目实战12】添加和更新商品功能的实现
- 【SSH网上商城项目实战20】在线支付平台的介绍
- 网上商城推广5妙招你知道多少?
- 【SSH网上商城项目实战26】完成订单支付后的短信发送功能
- 网上商城不同类别产品数据库的设计思路
- BrnShop开源网上商城第三讲:插件的工作机制
- C# ASP.NET 开源网上商城、外贸产品网上展示的几个效果图 -- 仅供大家参考
- SSH网上商城--后台登录
- 【SSH网上商城项目实战10】商品类基本模块的搭建