Problem Accessing databases
I'm trying to validate data from a Database, matching a textbox with the data in a table, I made this with Derby using the example that comes with the documentation, It works fine with the example, but my problem is that I can't use another database, I try to access from Oracle, from SQLServer and the result is the same, I obtain a NullPointerException.
I use this code:
CachedRowSetDataProvider employeeDataProvider =getSessionBean1().getEmployeesDataProvider();
CachedRowSetXImpl employeeRowSet =getSessionBean1().getEmployeesRowSet();
employeeDataProvider.setCursorRow(
employeeDataProvider.findFirst("EMPLOYEE.LASTNAME", txtUser.getValue()));
let's say that all the code is good, but the problem comes when I compare the data:
if (correctName.equals(txtUser.getValue()) && correctPassword.equals(txtPass.getValue()))
{
JOptionPane.showMessageDialog(null, "Bienvenido a CPS ");
return "login";
I obtain the message that I said before.
java.lang.NullPointerException
If I put a table and drop the data into the table, I can see the data.
Please help me.

