文件不断出现错误

时间:2018-07-10 08:55:16

标签: java

我尝试运行我的文件,但这给了我下面的错误

try{

        Connection con = (Connection)DriverManager.getConnection ("jdbc:mysql://localhost:3306/SOCIETY","root","");
        PreparedStatement query = null;
        query = con.prepareStatement("select * from users");
        ResultSet rs = query.executeQuery();
        while (rs.next()) {
            String User = jTextField1.getText();
            String Pwd = new String(jPasswordField1.getPassword());


            String uname = rs.getString("Username");
            String Password = rs.getString("Password");

            if((User.equals(uname))&& Pwd.equals(Password))
            {
                new LOGINPAGE().setVisible(true);

            }
            else
            {
                JOptionPane.showMessageDialog(this,"Incorrect Username or Password!");
            } 
        }
        con.close();
    }
    catch (Exception e)
    {
        JOptionPane.showMessageDialog(this, e.getMessage());
    }
}

我得到的错误是

  

java.lang.ClassException:java.math.BigInteger无法转换为java.lang.long

0 个答案:

没有答案