ibatis 表关联时出错

[复制链接]
查看11 | 回复1 | 2011-8-1 11:56:19 | 显示全部楼层 |阅读模式
查询的时候报错:
com.ibatis.sqlmap.client.SqlMapException: There is no statement named getEmployeeGroups in this SqlMap.
        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83)
        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
        at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:203)
        at org.springframework.orm.ibatis.SqlMapClientTemplate.queryForObject(SqlMapClientTemplate.java:268)
        at com.co.security.dao.impl.SecurityDaoImpl.loadEmployee(SecurityDaoImpl.java:31)
        at com.co.security.service.impl.SecurityServiceImpl.loadEmployee(SecurityServiceImpl.java:27)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)

                select
                        employee_no, employee_name, employee_sex, employee_birthday, employee_password, employee_mobile, employee_phone,
                        employee_country, employee_province, employee_city, employee_area, employee_zip, employee_id_card, is_enabled,
                        is_account_locked, account_expired_start_time, account_expired_end_time, credentials_expired_end_time, credentials_expired_start_time,
                        employee_head, employee_mail, employee_nation, employee_pinyin, employee_real_name, employee_remark
                from
                        t_employee
                where
                        employee_name = #employeeName#
       
       
       
                select
                        group_id, employee_no
                from
                        t_employee_group
                where
                        employee_no = #employeeNo#
       

回复

使用道具 举报

千问 | 2011-8-1 11:56:19 | 显示全部楼层
com.ibatis.sqlmap.client.SqlMapException: There is no statement named getEmployeeGroups in this SqlMap. ibatis没找到你配置的getEmployeeGroupsstatement 请确认你的SqlMapClient中是否加载了包含该statement的配置文件...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行