您的位置:首页 > 其它

网上商城中遇见的错误

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,所以后面用到该属性值时,出现空值。

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

      
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: