But sql developer gives me connection error with both users.
Can anyone tell me what is the problem?
Please give us a screen shot or cut/paste of the exact error message. Without it, anyone answering is just guessing.
Ok - now post the screenshot showing sql*plus connecting from the SAME machine using the SAME credentials and connection method.
If you get that exception it means what it says - the username or password is wrong. Maybe you are connecting as SYSDBA in sql*plus and not as a normal user as that screenshot shows for sql developer.