一个关于 ibatis 的问题

birdie333 2014-06-03 10:26:59
我之前有一个good.java 和一个 good_SqlMap.xml 的文件,并且在 sql-map-config.xml 文件里注册了,
但现在我加多了一个 shop.java 和一个 shop_SqlMap.xml 文件,在 sql-map-config.xml 文件一注册就报错,这是什么原因呢?
...全文
115 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
MiceRice 2014-06-03
  • 打赏
  • 举报
回复
对象属性跟配置文件不匹配吧: Cause: com.ibatis.common.beans.ProbeException: There is no WRITEABLE property named 'cus_address' in class 'com.xxx.app.good.good.model.Shop' 找不到 cus_address 可写属性,看是不是没有定义Set方法?
birdie333 2014-06-03
  • 打赏
  • 举报
回复
哦,不好意思,我找不到 ibatis 版块,报下面的错误, 2014-6-3 10:24:13 org.apache.catalina.core.StandardContext listenerStart 严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'SysPowerAction' defined in file [E:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\demo1\WEB-INF\classes\conf\spring\applicationContext-admin-action.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sysPowerService' defined in file [E:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\demo1\WEB-INF\classes\conf\spring\applicationContext-admin-service.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'publicDAO' defined in file [E:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\demo1\WEB-INF\classes\conf\spring\applicationContext-datasource.xml]: Cannot resolve reference to bean 'sqlMapClient' while setting bean property 'sqlMapClient'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlMapClient' defined in file [E:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\demo1\WEB-INF\classes\conf\spring\applicationContext-datasource.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Error occurred. Cause: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'. Cause: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMap/resultMap/result'. Cause: com.ibatis.common.beans.ProbeException: There is no WRITEABLE property named 'cus_address' in class 'com.xxx.app.good.good.model.Shop'
MiceRice 2014-06-03
  • 打赏
  • 举报
回复
至少应该把错误信息贴出来吧?而且这里是高性能板块,楼主发错版了吧~~~
birdie333 2014-06-03
  • 打赏
  • 举报
回复
搞定了,是我 shop_sqlmap.xml 里打错字段名了,谢谢 ls ,给分结贴.
birdie333 2014-06-03
  • 打赏
  • 举报
回复
有啊,全选自动生成的,不可能会少的,

25,984

社区成员

发帖
与我相关
我的任务
社区描述
高性能WEB开发
社区管理员
  • 高性能WEB开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧