| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1284 人关注过本帖
标题:不知道错在哪里?
取消只看楼主 加入收藏
海蓝啸
Rank: 5Rank: 5
来 自:安徽
等 级:贵宾
威 望:17
帖 子:1611
专家分:0
注 册:2006-4-3
结帖率:100%
收藏
 问题点数:0 回复次数:2 
不知道错在哪里?
package service;


import User.User;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
import com.ibatis.dao.client.DaoException;
import java.sql.SQLException;
import javax.xml.rpc.ServiceException;
/**
 *
 * @author Administrator
 */
public class  UserService {
    private static User user = new User();
   
    public static User login(String UserCode, String UserPwd) throws DaoException, SQLException, ServiceException{
        return checkSystemUser(UserCode,UserPwd);
    }
   
    private static  User checkSystemUser(String UserCode,String UserPwd) throws DaoException, SQLException, ServiceException
    {
        User loginUser = UserService.getUserByCode(UserCode);
        if(loginUser==null)
            throw new ServiceException("用户不存在");
        String pwd=loginUser.getUserPwd();
        if((pwd)!=0)
            throw new ServiceException("密码不正确");
        return loginUser;         
    }
   
    private static User getUserByID(int id) throws DaoException, SQLException, ServiceException
    {
        User loginUser=user.findById(id);        
        if(loginUser==null)
            throw new ServiceException("用户没有找到");
        return loginUser;
        
    }
   
    private static User getUserByCode(String UserCode) throws DaoException, SQLException, ServiceException
    {
         User loginUser=user.findById(UserCode);         
         if(loginUser==null)
             throw new ServiceException("用户不存在");
         return loginUser;
    }
}


这是我项目里面的一个文件,搞不懂为什么红色部分总提示出错?
搜索更多相关主题的帖子: package service public change import 
2008-01-04 15:10
海蓝啸
Rank: 5Rank: 5
来 自:安徽
等 级:贵宾
威 望:17
帖 子:1611
专家分:0
注 册:2006-4-3
收藏
得分:0 
java.lang.ExceptionInInitializerError
提示这个错

这个社会太复杂。。。
2008-01-04 15:12
海蓝啸
Rank: 5Rank: 5
来 自:安徽
等 级:贵宾
威 望:17
帖 子:1611
专家分:0
注 册:2006-4-3
收藏
得分:0 
谢谢

这个社会太复杂。。。
2008-01-07 08:51
快速回复:不知道错在哪里?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.018605 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved